Books Online Courses
Free Tutorials  Go to Your University  Placement Preparation 
Latest:- Important tips to get an Off Campus Placements
0 like 0 dislike

1 Answer

0 like 0 dislike
by Goeduhub's Expert (5.8k points)
selected by
Best answer

Simple JSP Example using Eclipse

We are writing a simple JSP code using Eclipse IDE and executing it using a web application server (Tomcat).

Step 1: Create a Dynamic project as shown

Step 1

Step 2: Type the project name of your choice and click Next.

Step 2

Step 3: Now select the checkbox “Generate web.xml deployment descriptor” and click on Finish button.

Step 3

Step 4: Once the project is created, you can see the project structure as in the screen below.

Step 4

Step 5: Now create a JSP file under the WebContent folder as shown below.

Step 5

Step 6: Name the file as goeduhub.jsp and click on Finish button.

Step 6

Step 7: Now open the file goeduhub.jsp and paste the below contents in it.


<%@ page language="java" contentType="text/html; charset=UTF-8"


<!DOCTYPE html>



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>




    <% out.print("Welcome to Goeduhub ");%>

     <p>Login Date: <%= (new java.util.Date())%></p>



Step 8: Now to execute this JSP, we need to configure a web server (in our case it is Tomcat 9). Now select the file goeduhub.jsp and select Run As > Run on Server as shown below.

To know step by step guide to install and setup Tomcat Server with Eclipse Click here

Step 8

Step 9: Choose the Tomcat version on your system. In our case it is “Tomcat v9.0 Server” and click Finish.

Step 10

Step 10: Output

Step 10

For more RTU V Sem Advance Java Lab Experiments Click here

3.3k questions

7.1k answers


4.6k users


About Us | Contact Us || Terms & Conditions | Privacy Policy || Youtube Channel || Telegram Channel © Social::   |  |