How to run JSP files?

I need to know how to run a JSP file on a webserver. I have experience writing PHP, but for PHP all I have to do is save the file and open it in the web browser. Is there an easy tutorial that will help me understand how to run JSP files for a web site?


Solution 1:

You need to download and install web server like Apache Tomcat on your local machine. You can do it on any IDE also like eclipse.

Solution 2:

First of all you will need a Java web server like Tomcat, Jetty...etc. These will allow your application to run. Second you need to create a web project(WAR), which will contain your servlet's and JSP's.

I suggest you download a good IDE like eclipse or Netbeans(preferably Netbeans if you're new to this) and have a look at the samples they provide or just go and look here: http://www.oracle.com/technetwork/java/javaee/jsp/index.html

Solution 3:

Servlet and JSP development with Eclipse

Solution 4:

Download an IDE say eclipse.

Download the jdk say jdk1.7

Download a web server say tomcat. Download the binary distribtion from here

Create a dynamic web project in eclipse. Right click on the project , add a new jsp file say test.jsp. Write something in the body tag like "Hello World". Right click on test.jsp and run it on server. There you go!!!

for more information Visit http://www.srccodes.com/p/article/2/JSP-Hello-World-Program-using-Eclipse-IDE-and-Tomcat-web-server