好地方

posts(0) comments(0) trackbacks(0)
  • BlogJava
  • 联系
  • RSS 2.0 Feed 聚合
  • 管理

留言簿

  • 给我留言
  • 查看公开留言
  • 查看私人留言

文章档案

  • 2006年10月 (1)

搜索

  •  

最新评论

View Post

Adding Struts to an Existing Web Application

Adding Struts to an Existing Web Application

from http://www.coreservlets.com/Apache-Struts-Tutorial/

By far the easiest way to develop a Struts application is to start with struts-blank, rename it, and work from there. If that approach is an option for you, do it that way and skip this section. However, if you already have an existing Web application and want to add Struts capabilities to it, starting with struts-blank won't work. Adding Struts capabilities to existing Web apps is a huge pain in the neck, and will proably require several attempts to get it right. Here is a quick summary:

  • Copy JAR files from struts-blank/WEB-INF/lib to your_web_app/WEB-INF/lib.
  • Copy TLD files from struts-blank/WEB-INF to your_web_app/WEB-INF.
  • Copy struts-config.xml from struts-blank/WEB-INF to your_web_app/WEB-INF.
  • Copy the application properties file from struts-blank/WEB-INF/classes/resources to your_web_app/WEB-INF/classes/resources.
  • If you plan on using the automatic validator copy validation.xml and validator-rules.xml from struts-blank/WEB-INF to your_web_app/WEB-INF.
  • If you plan on using Tiles copy struts-tiles.xml from struts-blank/WEB-INF to your_web_app/WEB-INF.
  • Copy declarations out of struts-blank/WEB-INF/web.xml into your_web_app/WEB-INF/web.xml. Most importantly, copy the servlet and servlet-mapping entries that map *.do to org.apache.struts.action.ActionServlet. Be sure you keep the entries in the same locations: the order of elements in web.xml matters.

posted on 2006-10-26 21:51 PC NO.9527 阅读(73) 评论(0)  编辑  收藏

新用户注册  刷新评论列表  

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问   管理
 
 
Powered by:
BlogJava
Copyright © PC NO.9527