Java Servlet and JSP/JSF Help/Guidance
I've had very limited exposure to Java Web development side and suddenly been asked to work on a web application and learn to maintain it. I’m struggling to setup an environment to be able to test and debug existing code given to me.
I'm on windows XP. Using Eclipse and Tomcat 5.
The web app they've dumped at me has the following structure:
Parent_directory
|- src
|- mainapp
|- model
|- AssignT.java
|- LeavePerm.java
|- Invoice.java
|- ....
|- util
|- Dates.java
|- reports.java
|- .....
|- application.properties
|- DB.properties
|- log.properties
|- email.properties
|- ......
|- Webroot
|-images
|- 1.png
|- ......
|-jsp
|- index.jsp
|- email.jsp
|- assign.jsp
|- leave.jsp
|- .....
|-META-INF
|- context.xml
|- MAINFEST.MF
|-Scripts
|- display.js
|- info.js
|- dates.js
|-WEB-INF
|- classes
|- {EMPTY}
|- lib
|- {MANY .jar files}
|- faces.config.mex
|- faces.config.xml
|- web.xml
The web application is working but minor modifications need to be made hence why I need to be able to setup an environments with eclipse and tomcat 5 to be able to make those changes and test.
Having installed tomcat and tomcat eclipse plugin I've added the tomcat server in server tab so eclipse knows where tomcat is and able to start/stop it but cannot get it to load the above imported project and run it. Trying the "Add or Remove" option on the server tells me "there are no resources that can be added".
I woul开发者_开发问答d appreciate any help or guidance.
Thank you
Did you download package labelled "Eclipse for Java EE Developers
"? If so, then it contains WTP and make sure the project as the facet "Dynamic Web Module" selected.
In eclipse Facets are used as markers for enabling user interface elements.
How to activate a Facets:
Not a faceted project then go in Project > Properties > Project Facets Click on "Convert to faceted form...".
Already faceted project go in Project > Properties > Project Facets Select "Dynamic Web Module" with the proper version 2.3 or 2.5.
After you should be able to add the project to the tomcat server in the server tab.
More information on Dynamic Web projects and applications.
精彩评论