简体   繁体   中英

How to deploy/upload a JSP file on Server

I have created a jsp file which will give an output in JSON format using java class and servlet, i am new to java and i don't have idea about the deployment of jsp file. Can anyone suggest me how to do it? I used to develop an asp.net web application in which there was a specific option available which called " publish project", but i cant find in eclipse. I already have a php server in which i have uploaded few php files, can i use the same server to upload this file?

Currently, my application is running fine on localhost.

Please help me with this matter and thank you for your time.

To publish your project in Eclipse:

  1. Right click your project
  2. Export
  3. Under Web > Choose WAR
  4. Then just follow the instructions and your good to go.

It is done as a component of a WAR (Web Application Archive) file.

Upon deployment, JSP files are processed by the Servlet container. The processing effectively turns them into Servlets, such that the plain text of the JSP becomes println statements in the response of the Servlet, and the embedded Java code in the JSP becomes regular Java code in the Servlet.

The packaging details are covered in detail in the JEE7 tutorial , although earlier tutorials don't differ much in the details.

i assume you are using tomcat in your php? you can use tomcat or glassfish server to deploy your application. you just need the .war file of your application and upload it to the admin page of tomcat or glassfish server.

It should be in .war file format

Here are few links which can help you in building it from eclipse, link1 , link2 .

For deployment, there should be a server -- tomcat / glassfish / jboss which can provide platform to execute .war files.

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