Header Ads

How to create a servlet in Jdeveloper



This post talk about how to create  servlet using Jdeveloper.I recommend you to download Jdeveloper (oracle) from Oracle site and use for creating Servlet.

Step-1
Open Oracle Jdeveloper by double clicking on the Jdev icon from desktop or from Start menu.
Step-2
Create a new Application and Project by using + sign
Step-3
Select Project and right Click

Step-4
Select Web Tire and select Servlet.





Step-5
Select the version for Servlet



Step-6
Give servlet information like-class/packages content type.Also provide the implementation methods
like-doGet() /doPost() etc.
Based on this you will get the method in your editor for further customization.

Step-7
Here we need to give the mapping information of a servlet and its URL pattern along with the implementation methods.
The URL pattern is important aspect of Servlet...I will discuss in another post.
Click on OK to proceed

Step-8
Boom !!!!! you are done
Notice a Sevlet1.java has been created under project and one more folder called Web-content has been created. Inside that there is one more folder called WEB-INF and a web.xml has been created.
This web.xml is the mapping file.

In the right side you can check the code for the corresponding code has been generated which you can further customized.
Powered by Blogger.