How to host a JSP website on a webserver?

久未见 提交于 2019-12-07 02:35:48

问题


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?


回答1:


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

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.

Good luck!




回答2:


You need a servlet container like tomcat or Jetty to host it. There are hosting providers that have it.

But you can also use Google app engine to host it there (though mysql is not supported well there)



来源:https://stackoverflow.com/questions/10176916/how-to-host-a-jsp-website-on-a-webserver

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