struts入门

struts工作过程:

 

 

 

 

反射代码:

Class clazz = Class.forName("action全路径");
Method m =clazz.getMethod("execute");
Object o = m.invoke();

 package标签:

 

 转发:地址栏不变

 

 修改struts默认常量值:

  常用方法:

  <constant name="struts.i18n.encoding" value="UTF-8"></contant>   

  action 获取到表单有乱码,通过post提交,此常量已经解决post乱码

  其他方法:(了解)

  src 下面创建struts.properties,进行修改

  在web.xml进行配置

 

 

  

posted on 2018-03-09 16:08  投笔从码  阅读(68)  评论(0)    收藏  举报

导航