JSP in Eclipse
java code in the JSP File.
JavaServer Pages allow you to mix regular static HTML with dynamic
generated contents of Java
code. The java code is inserted in the HTML document on a JSP File,
Creating JSP in Eclipse IDE with Tomcat server
- Create a Dynamic web project
- create a jsp
- start tomcat server and deploy the project
1) Create
the dynamic web project
For creating a dynamic web project
click on File Menu -> New -> dynamic web project -> write your
project name e.g. first -> Finish.
|
2) Create the JSP file in eclipse IDE
For creating a jsp file explore the project by clicking the + icon -> right click on WebContent -> New ->jsp -> write your jsp file name e.g. index -> next -> Finish.
|
Your JSP code will be over here
|
3) Next ,we need to start
the server and deploy the project:
For starting the server and
deploying the project in one step Right click on your project -> Run As
-> Run on Server -> choose tomcat server -> next ->addAll ->
finish.
|
If you are using Eclipse IDE first
time, you need to configure the tomcat server First.
|
Now start
the tomcat server and deploy project
For starting the server and
deploying the project in one step Right click on your project -> Run As
-> Run on Server -> choose tomcat server -> next ->addAll ->
finish.
|
Thats it with Hello JSP by running
|
No comments:
Post a Comment