How to host a JSP website on a webserver?
Asked Answered
M

2

7

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?

Mosher answered 16/4, 2012 at 15:18 Comment(0)
C
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!

Changeable answered 16/4, 2012 at 15:26 Comment(6)
i am thinking of paying for a java host, since I do not know how to install the web server online.Mosher
Then you need to setup a mysql database (unless the webapp does this for you). Change the webapp configuration to use the provided mysql credentials and upload it to your host. Don't forget to use the logfiles for debugging.Changeable
Is there a good (low cost) hosting service that has the web server ready to run my jsp pages?Mosher
You need to be aware that JSP/JAVA hosting is not as common as for instance PHP hosting. Therefore, on average, a JAVA host is a bit more expensive than a PHP host. You also want to ask yourself if you want to host a enterprise website on a cheap hosting platform. You want reliability, uptime, speed, … Not the things you will get from a cheap host.Changeable
it's just a class project and not an enterprise website, so I'm looking at something to host it so that a few users can use it intermittently for a month. What does Shared JVM Tomcat mean? Also deploying as a war file?Mosher
A shared JVM means that you share the Tomcat JVW with the other java websites on the webserver. If you have a small class project, this should be just fine. A war file is a single file containing your web application: en.wikipedia.org/wiki/WAR_file_format_(Sun)Changeable
V
0

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)

Vichy answered 16/4, 2012 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.