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?

absessive
  • 1,121
  • 5
  • 14
  • 36

2 Answers2

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!

JohanB
  • 2,068
  • 1
  • 15
  • 15
  • i am thinking of paying for a java host, since I do not know how to install the web server online. – absessive Apr 16 '12 at 15:49
  • 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. – JohanB Apr 16 '12 at 15:56
  • Is there a good (low cost) hosting service that has the web server ready to run my jsp pages? – absessive Apr 16 '12 at 16:10
  • 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. – JohanB Apr 17 '12 at 06:22
  • 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? – absessive Apr 17 '12 at 16:32
  • 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: http://en.wikipedia.org/wiki/WAR_file_format_(Sun) – JohanB Apr 18 '12 at 10:55
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)

Abdu Egal
  • 130
  • 7