How do I deploy a JSP file in the Jetty webserver?

心已入冬 提交于 2019-12-13 15:46:57

问题


I have created a simple JSP file that I want to deploy in Jetty 7.2. Jetty is running and I can see the default web page at http://localhost:8080/. I started Jetty with the java -jar start.jar command.

I saved my simple JSP file jsp_test.jsp at <my_jetty_directory>/webapps/jsp_test.jsp and then I tried to access that file on http://localhost:8080/jsp_test.jsp and http://localhost:8080/webapps/jsp_test.jsp but none of them works.

Is there something more I have to do? Where in the Jetty file structure should I place my JSP file?

If you know a helpful tutorial I would be thankful. I haven't found any good ones.


回答1:


You have to place it in a folder inside webapps:

webapps/myapp -> http://localhost:8080/myapp/test.jsp



来源:https://stackoverflow.com/questions/4109535/how-do-i-deploy-a-jsp-file-in-the-jetty-webserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!