Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Java Servlets Jsp Tutorial En

Java Servlets Jsp Tutorial En

Ratings: (0)|Views: 2 |Likes:
Published by kirivarnan
Java Servlets Jsp Tutorial
Java Servlets Jsp Tutorial

More info:

Published by: kirivarnan on Dec 30, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/25/2013

pdf

text

original

 
Java Server Pages combined with servlets in action
We want to create a small web application (library), that illustrates the usage of JavaServer Pagescombined with Java Servlets. We use the JavaServer Pages to display data (presentation) and theservlets to control and call the business logic of the web application.First we shortly explain the characteristics of these two technologies.
Generals
Author 
:Sascha Wolskihttp://www.laliluna.de/tutorials.html Tutorials for Struts, EJB, xdoclet and eclipse.
Date
:September, 23
th
2004
Source code:
http://www.laliluna.de/assets/tutorials/java-servlets-jsp-tutorial.zipThe sources does not contain the project files. So create a project first and copy the sources tothis projects.
PDF Version des Tutorials:
http://www.laliluna.de/assets/tutorials/java-servlets-jsp-tutorial-en.pdf 
Development Tools
Eclipse 3.xOptional:MyEclipse plugin 3.8(A cheap and quite powerful Extension to Eclipse to develop Web Applications and EJB (J2EE)Applications. I think that there is a test version availalable at MyEclipse.)
Application Server 
Jboss 3.2.5You may use Tomcat here if you like.
Java Servlets
Servlets represent java programs that run on a web server. They allow the developer to producedynamic web sites with java.A Servlet has the following tasks
It reads and processes data, which a user inputs in a HTML form on a web page.
Other informations can be processed, e.g. what browser or system will be used.
It generate results with the existing data, calls the business logic directly in the servlet or another class, which contains the logic or executes a database query.
The results are formated. If the Browser expects an answer in the HTML format, then theresults must be formatted in accordance with the standard. It is possible to return differentformats of data with a servlet. (gif, jpeg, doc, etc.).
Suitable answer parameters are set. Befor the servlet return the data to the browser, it sendssome parameter. The parameter contains the format, that will returned by the servlet, what timethe browser use to cache the site and some more.
 
Java Server Pages (JSP)
JavaServer Pages (JSP) are text documents, which are similar to HTML Files. But you find also java code in the JSP File. JavaServer Pages allow you to mix regular static HTML with dynamicgenerated contents of Java code. The java code is inserted in the HTML document on a JSP File,differently to a servlet, where the HTML code is embedded in the java code.
 
Create a new Web Projekt
Right click on the package explorer and choose
New > Project
.Choose the wizard Web Project in J2EE.Set a nice name for your project.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->