13多模块和扩展.pptVIP

  • 9
  • 0
  • 约1.88千字
  • 约 11页
  • 2017-02-27 发布于湖北
  • 举报
多模块和扩展 ? html:link指定module(模块路径) 和page(.do文件路径)名称 ? html:link page=“/页面” module=“/模块名称”/html:link ? 在默认模块中指定一个type为 org.apache.struts.actions.SwitchAction的 Action路径,然后利用: ? 切换:/actionPath?prefix=/模块名page=/页面名 ? 切换:/actionPath?prefix=page=/页面名 ? action path=/switch type=org.apache.struts.actions.SwitchA ction / ? html:link action=/switch?prefix=/submodulepage=/subJsp.dolianjie/html:link ? 有些时候,希望Struts框架在启动的时 候就自动做一些初始化工作,利用什么 方案? ? 传统方法:过滤器(服务器启动时自动运 行1次init,以后每次提交都运行一次 doFilter) ? 让Struts启动的时候,向application 内放入一个字符串Welcome ? (1):建立一个类,实现 org.apache.struts.action.PlugIn接口 ? (2)编写方法,注意servle

文档评论(0)

1亿VIP精品文档

相关文档