Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Servlet+JSP Review

Servlet+JSP Review

Ratings: (0)|Views: 12 |Likes:
Published by karthikieyan

More info:

Published by: karthikieyan on Mar 17, 2011
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/27/2013

pdf

text

original

 
2
Slides © Marty Hall, http://www.coreservlets.com, books © Sun Microsystems Press
Servlet and JSPReview
Core 
Servlets & JSP book: www.coreservlets.com
More 
Servlets & JSP book: www.moreservlets.comServlet and JSP Training Courses: courses.coreservlets.com
3
Slides © Marty Hall, http://www.coreservlets.com, books © Sun Microsystems Press
For live Struts training, please seeJSP/servlet/Struts/JSF training courses athttp://courses.coreservlets.com/.
Taught by the author of 
Core Servlets and JSP 
,
More Servlets and JSP 
, and this tutorial. Available at publicvenues, or customized versions can be held on-site atyour organization.
 
Servlet and JSP Review4
www.coreservlets.com
Agenda
What servlets are all about
Advantages of servlets
What JSP is all about
Free servlet and JSP engines
Compiling and invoking servlets
Servlet structure
A few basic servlets
Servlet lifecycle
Initializing servlets
Debugging servlets
Servlet and JSP Review5
www.coreservlets.com
A Servlet’s Job
Read explicit data sent by client (form data)
Read implicit data sent by client(request headers)
Generate the results
Send the explicit data back to client (HTML)
Send the implicit data to client(status codes and response headers)
 
Servlet and JSP Review6
www.coreservlets.com
Class Setup
Main development directory
C:\Servlets+JSP
Starting Tomcat
Double click startup.batEnter http://localhost/ to verify that it is runningSee popup window for error messages andSystem.out.println output
Stopping Tomcat
Double click shutdown.bat
Shortcuts to Tomcat directories
In C:\Servlets+JSPRecommend copying onto shortcuts, not going into thedirectories
Servlet and JSP Review7
www.coreservlets.com
Using the Default Web App andInvoker Servlet on Tomcat
Packageless Servlets
Code:
tomcat_dir 
/webapps/ROOT/WEB-INF/classesURL: http://localhost/servlet/ 
ServletName
See shortcut in C:\Servlets+JSP
Packaged Servlets
Code:
tomcat_dir 
/webapps/ROOT/ WEB-INF/classes/ 
subdirectoryMatchingPackageName
URL: http://localhost/servlet/ 
packageName
.
ServletName
HTML and JSP Files
Code:
tomcat_dir 
/ROOTURL: http://localhost/ 
filename
See shortcut in C:\Servlets+JSP

You're Reading a Free Preview

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