如何在Jetty Web服务器中部署JSP文件? [英] How do I deploy a JSP file in the Jetty webserver?
问题描述
我创建了一个简单的JSP文件,想要在Jetty 7.2中进行部署.码头正在运行,我可以在http://localhost:8080/
上看到默认的网页.我用java -jar start.jar
命令启动了Jetty.
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.
我将简单的JSP文件jsp_test.jsp
保存在<my_jetty_directory>/webapps/jsp_test.jsp
上,然后尝试在http://localhost:8080/jsp_test.jsp
和http://localhost:8080/webapps/jsp_test.jsp
上访问该文件,但没有一个起作用.
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.
还有更多要做的事情吗?我应该将JSP文件放在Jetty文件结构中的什么位置?
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.
推荐答案
您必须将其放置在webapps内的文件夹中:
You have to place it in a folder inside webapps:
webapps/myapp
-> http://localhost:8080/myapp/test.jsp
这篇关于如何在Jetty Web服务器中部署JSP文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!