I want to create a web project in Eclipse, but I don't understand the Folder Structure of the project. It is different with the "webapps" folder layout which state in Tomcat6 Folder. Could anyone tell me which folder I should put web file(like: html, jsp), which folder I should put java source, which folder I should put the servlet file.
Here is the Project in Eclipse:
Web Project - build - Webcontent * META-INF * WEB-INF * - scr (not default one) * - classes(not default one) * - web.xml - JavaSource * scr
now what I did is put .java file into /JavaSource/src , and put .jsp file into /WebProject/WEB-INF, and when I import such as "test.java" into "index.jsp" I write following:
<%page import="test.java" %>
but it shows error in eclipse. what is the correct way of organize those files to create a meaningful standard project.
<%page import="your.package.name.Test" %>
, where Test is the name of the class located in Test.java in WebProject/JavaSource/src/your/package/name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.