Configuration about eclipse + Tomcat
I wrote a little helloworld jsp file to test it. But it failed. I can't figure it out.Any one help me ?
I got these error info:
开发者_运维百科HTTP ERROR 404
Problem accessing /myjsp/WEB-INF/myjsptest.jsp. Reason:
NOT_FOUND
HTTP error 404 means that the requested resource was not found by the server.
The problem doesn't seem to be related to Tomcat or Eclipse but rather to your web application. I think the reason is that you are trying to access a JSP file in WEB-INF
folder. You shouldn't do that because WEB-INF
folder is not accessible directly from a web browser. Your JSP files should be outside of it.
WEB-INF
folder is used to store configuration files (e.g. web.xml
) and Java classes (e.g. servlets). JSP files and all static content should be placed outside of it.
You may find more information about JSP technology e.g. in this tutorial or this tutorial (in Chapter 12).
精彩评论