I  ntroduction to Java Servlets
  
 Introduction

Java Servlet is the one of the most important Java technologies. It is the simplest model to build a complete Java J2EE Web Application. Furthermore, even for complex J2EE Web Application that uses Struts, Spring, EJB and etc, they are still using Servlet for certain purposes such as Servlet Filter, Listener and etc. Thus, it is just a good idea for you to have well-built understanding of Java Servlet. Prior reading this tutorial, it would be excellent if you have mastered the basic Java programming languages.

Servelet Example is give below with complete steps with screen-shots

Your Ad Here

 
 Package the Servlet into a J2EE Application (Continue...)

Next goto Start -> Programs -> Sun Microsystems ->Application Server PE -> Deploytool
Now in the deploytool,
  1. Goto File ->New -> Application

    (Click the Browse button)


  2. (Select the folder in the Look In dropdown box, and then give a file name “EmployeeDetails”. Next click the New Application button)


  3. (Click the OK button)
  4. Now goto File -> Save to save the file
  5. Next, goto File -> New -> Web Component

    (Click Next button)


  6. (Enter the WAR Name as “EmpApp” and then click the Edit Contents… button)


  7. (Select all the .class, .jsp , .tld and .html files and click the Add button)


  8. (Now click the OK button)


  9. (Now click the Next button)


  10. (Now select the Servlet option button and then click the Next button)


  11. (Now select the “EmployeeDetails” from the Servlet Class dropdown box)


  12. (Now select the Next button)


  13. (Now select the Finish button)


  14. (Now select the EmpApp in the left pane and select the General tab in the right pane. Here give a name “emp_details” in the Context Root text box)
  15. Next select the EmployeeDetails in the right side

    (Now select the EmployeeDetails in the left pane and then select the Aliases tab in the right pane. Next select the Add button)


  16. (Now add a name as “EmployeeDetails”)

  17. Now goto File ->Save
  18. Next goto Tools -> Deployee

    (Enter the User Name as “admin” and Password as “password”. Next click the OK button)


  19. (Now a message --- Operation Completed Successfully --- must display. Next click the Close button)
  20. Next goto File -> Exit to close it

 Click For Continue...
PreviousNext



Your Ad Here


 About Author
Author Name           : Mr. R.Franklin Bourgia Singh
Country                    : INDIA
Working In               : Aryans Infoway (P) Ltd.
Email                        : admin@completetutorials.co.cc
Author Home Page : http://www.completetutorials.googlepages.com
 Reach me!
   My Web URL : http://www.completetutorials.googlepages.com
   If you like this article and/or code, make a small donation to my account,
Till we meet next time BYE     

  Send your feed-back and query to admin@completetutorials.co.cc
©2008 Bourgia