如何在Jetty Web服务器中部署JSP文件? [英] How do I deploy a JSP file in the Jetty webserver?

查看:489
本文介绍了如何在Jetty Web服务器中部署JSP文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的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.jsphttp://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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆