Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to host a JSP website on a webserver?

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?

like image 398
absessive Avatar asked Apr 16 '12 15:04

absessive


People also ask

Can JSP run on web server?

Software EnvironmentTo run JSP pages, you need a web server with a web container that conforms to JSP and servlet specifications. The web container executes on the web server and manages the execution of all JSP pages and servlets running on that web server. Tomcat 3.2.

How do I host a JSP website?

To host with JSP, you'll need a servlet container. The most widely used open-source servlet containers are Apache Tomcat and Jetty. What exactly does a servlet container do? To put it simply, a servlet container is what creates, executes, and destroys Java servlets in order to create dynamic web pages.

How does a JSP page execute on web server?

JSP Engine intercepts the request for JSP and provides the runtime environment for the understanding and processing of JSP files. It reads, parses, build Java Servlet, Compiles and Executes Java code, and returns the HTML page to the client. The webserver has access to the Database.

Which server is used in JSP?

Released in 1999 by Sun Microsystems, JSP is similar to PHP and ASP, but uses the Java programming language. Open format? To deploy and run Jakarta Server Pages, a compatible web server with a servlet container, such as Apache Tomcat or Jetty, is required.


1 Answers

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!

like image 123
JohanB Avatar answered Oct 01 '22 02:10

JohanB