如何在Web浏览器中部署servlet? [英] how to deploy servlet in Web browser?

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

问题描述

我在Eclipse中创建了My FirstHello WorldServlet。
它在Eclipse浏览器中正常运行。
我正在使用Apache Tomcat,它也正常运行。



如何在Web浏览器中部署我的Servlet,如Internet Explorer,Chrome,Mozilla Firefox等等?我不想在Eclipse浏览器中部署我的servlet。

解决方案

您不会部署到浏览器。部署到服务器。只需部署到服务器并以通常的方式启动服务器(如在Eclipse中所做的那样)。然后,只需在自己选择的webbrowser的地址栏中输入servlet的URL即可。它可以与您在Eclipse浏览器的地址栏中看到的完全相同的URL。如有必要,将此网址添加到您喜欢的浏览器中,以便您每次都不需要自己进行协商/输入。


I have create My First "Hello World" Servlet in Eclipse. It is running properly in Eclipse Browser. I'm using Apache Tomcat, and it is also running properly.

How can I deploy my Servlet in Web browser like Internet Explorer, Chrome, Mozilla Firefox etc? I don't want to deploy my servlet in Eclipse browser.

解决方案

You don't deploy to a browser. You deploy to a server. Just deploy to server and start the server the usual way (as you did in Eclipse). Then, just enter the servlet's URL in the address bar of the webbrowser of your choice yourself. It can be exactly the same URL as you see in Eclipse browser's address bar. If necessary, bookmark this URL in your favourite webbrowser so that you don't need to copypaste/enter it yourself everytime.

这篇关于如何在Web浏览器中部署servlet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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