简体   繁体   中英

How to host JSPs on a web server?

Hi I'm sorry for the naivety of this problem but I need some guidance as I have confused myself greatly.

I have been tasked with creating a database(mysql) and creating a web interface for i to be interacted with. I have experience with web design and database development. Previously I have used java to interact with a DB and was hoping I could use JSP for the web interface. This is where my problem is, how I would I deploy/host this website?

I have 2 theories which are misguided:

(A). Use a cms which has a web server for me to place the jsps in?

or

(B). Use a domian/web hosting site that has a server for me to place the jsps in?

I'm totally lost and any guidance would be greatly appreciated.

Simple answer is you will require a Java Application Server to host your JSPs.

You can use Apache Tomcat , GlassFish , or some other application server to do this.

You will also need a database eg MySQL running on your host or some other host accessible by the machine running the Java application server.

You can choose to host all of this locally or farm it out to a web host provider depending on your resources.

A CMS seems like overkill. See this link for a description of CMS and its functionality. I don't believe this is what you are looking.

I don't know exactly what you're looking for, but I think you need (B)

You need a MySQL instance running your database and a servlet container (eg Tomcat) to host your JSPs.

Running a CMS which is just used to use the DB that it works with is a little bit heavy for that usecase.

As suggested by Mr @cmd , yes there is no need to go for an outsourced server just to host your website, unless you need it to be visible to the world.

Else for your testing purpose, you can use Any of the Apache Tomcat , Glassfish servers for hosting the applications designed in JSP or in other web interface language.

And Inside of the JSP coding itself you may write the interaction coding with your database. your database also can be installed in the same server.

And actually instead of a server, you may even use your PC to install the Apache Tomcat and the database and start using it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM