如何在Web服务器上托管JSP网站? [英] How to host a JSP website on a webserver?

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

问题描述

我有一个主要使用HTML和JSP开发的网站,并且正在访问MySQL数据库.从未有过这样的网站上线过,我想知道如何使其启动并在线运行.我知道需要有一个网络服务器.如何在线托管JSP网站?

I have a website developed mostly in HTML and JSP, and accessing a MySQL database. Having never put such a website online before, I wanted to know what are the steps needed to get it up and running online. I know there needs to be a web server. How do I host a JSP website online?

推荐答案

您要自己安装Web服务器,还是要为Java主机付费?

You want to install the web server yourself, or you want pay for a java host?

在文件之间,有一个web.xml文件(可能在WEB-INF文件夹中).您需要看一下它,其中包含webapp配置.您还需要找出数据库配置参数的位置.为新的托管环境配置了webapp之后,您只需将其复制到web服务器即可.它应该自动加载. 您可以先使用Java网络服务器(例如tomcat)在本地计算机上尝试此操作.这将帮助您确定webapp的配置设置.

Between the files, there is a web.xml file (probably in the WEB-INF folder). You need to take a look at it, it contains the webapp configuration. You also need to find out where the database configuration parameters are located. Once you’ve configured the webapp for its new hosting environment, you can just copy it to the webserver. It should automatically load. You could try this on your local machine first using a java webserver (like tomcat). This will help you to determine the webapp configuration settings.

祝你好运!

这篇关于如何在Web服务器上托管JSP网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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