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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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-INFfolder. You shouldn’t do that becauseWEB-INFfolder is not accessible directly from a web browser. Your JSP files should be outside of it.WEB-INFfolder 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).