[Java EE] project hard notes

Source: Internet
Author: User
J2ee| Notes | Project This 3 days to make eclipse-tocmat-struts configuration problem has been the first big, today before work finally finish it:-)


My approach is to deploy struts to the standard Java EE project, specifically: Put *.jar under Web-inf\lib, write


Web-inf under the Struts-config.xml file, put the TLD under Web-inf, configure Web.xml file;


at the time of release, the Java Project will be published as a standard war file, directly placed under the $TOMCAT \webapps\ run








1.struts-config.xml File Configuration

The most important
STRUTS configuration should be the configuration of struts-config.xml files,

The role of the
Struts-config.xml file is to map the form Bean && action Bean, the most important of which is


<action-mappings> </action-mappings> Mapping, which defines the jsp<->form bean<->action BEAN

Correspondence between
and forward forwarding (used in action beans); It is worth noting that Text/password
in JSP
Text labels such as
must have a Getter/setter method in their corresponding form BEAN, or you will be prompted for an error


(It took 2 days to get it done!) )





2. Project under Tomcat release


standard Java EE can be easily developed in Eclipse, in which unit testing of beans and servlet can also be


ECLIPSE, when everything seems to be fine, you can release it; it's worth noting that you should let Eclispe


First compile for you, will be SRC compiled to. Class into the Web-inf\class, (took 1 morning also did not finish, fortunately Zhengq


help), after compiling, can use Lomboz to do release, this thing will help you to publish the project as a. War file





3. Problems that still exist


1 The whole process is very troublesome, especially when debugging. JSP, expect a more elegant and efficient way


2 when publishing with Lomboz, you should be able to specify a directory, but it's not known yet


3) Eclipse debugging is also more complex, expect a concise way











Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.