开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜