gavi's picture From gavi rss RSS  subscribe Subscribe

Servlets vs JSP 



Servlets vs JSP
 
Tags:  Servlets  vs  JSP 
Views:  37072
Downloads:  83
Published:  July 02, 2007
 
4
save to favorite
ask author to add audio Ask author to add audio
Share plick with friends Share
mark as inappropriate Mark as inappropriate
 
Related Plicks
Microsoft .Net vs. J2EE

Microsoft .Net vs. J2EE

From: emily
Views: 2734 Comments: 0

 
Mvc Design Pattern

Mvc Design Pattern

From: gavi
Views: 4241 Comments: 0
“Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way (more)

 
Java based.Oracle.Web.De velopment

Java based.Oracle.Web.Development

From: gavi
Views: 7727 Comments: 0
Are you concerned you're getting behind the curve? Have you been reading the industry rags only to have your head spin out of control? Have you been purchasing your own Java library (of Congress) - only to stack the books in hopes that you'll find t (more)

 
J2EE Pitfalls and Best Practices v2

J2EE Pitfalls and Best Practices v2

From: gavi
Views: 2966 Comments: 0
Java 2 Enterprise Edition (J2EE) and WebSphere Application Server (WAS) are quite powerful
But you can mis-use, under-use or over-use their capabilities quite easily, much to the detriment of your applications AND of your cu (more)

 
xml-java

xml-java

From: tonychan
Views: 1143 Comments: 0

 
See all 
 
More from this user
WS-BPEL 2.0 TC Briefing

WS-BPEL 2.0 TC Briefing

From: gavi
Views: 4944
Comments: 0

Albert Einstein

Albert Einstein

From: gavi
Views: 6750
Comments: 0

J2EE Design Patterns

J2EE Design Patterns

From: gavi
Views: 5919
Comments: 0

1,2 Chapter 1,2 Brake System Overview & Legal & Health

1,2 Chapter 1,2 Brake System Overview & Legal & Health

From: gavi
Views: 2601
Comments: 0

[CORSI - ITA] - Corso Star office

[CORSI - ITA] - Corso Star office

From: gavi
Views: 3002
Comments: 0

Successful Project Management

Successful Project Management

From: gavi
Views: 11740
Comments: 0

See all 
 
Place your Ad here for $4.00 a month
Lombardi Teamworks 6
Easy-to-use development tools for both business analysts and IT
 
 
 URL:          AddThis Social Bookmark Button
Embed Thin Player: (fits in most blogs)
Embed Full Player :
 
 

Name

Email (will NOT be shown to other users)

 

 
 
Comments:
 
 
Notes:
 
 
Slide 1: Servlets Can be generic or HTTP specific servletRequest and servletResponse used for generic protocols httpServletRequest and httpServletResponse used for HTTP protocol
Slide 2: Lifecycle of Servlets  init(servletConfig config) { super.init(config); }  service(servletRequest req,servletResponse res)  destroy()
Slide 3: Service methods for HTTP doGet(servletRequest req, servletResponse res); doPost(servletRequest req, servletResponse res); Note: The service method calls doGet or doPost. Signature of service, doGet and doPost is same.
Slide 4: httpServletResponse response.setContentType(“text/html” ) PrintWriter out = response.getWriter()
Slide 5: httpServletRequest getParameter(name) setParameter(name)
Slide 6: servletContext servletContext acts as a shared memory segment for web applications ServletContext context = getServletContext(); setAttribute, getAttribute and removeAttribute
Slide 7: JSP JSP is http specific
Slide 8: Directives Page Directive language=”scriptingLanguage” extends=”className” import=”importList” session=”true|false” buffer=”none|size in kb autoFlush=”true|false” isThreadSafe=”true|false” info=”text” errorPage=”error_url” isErrorPage=”true|false” contentType=”ctinfo”
Slide 9: Directives Include Directive <%@ include file="relativeURLspec" %> Taglib Directive Uri Prefix TagDir
Slide 10: JSP Scripting <! declaration %> <= expression %> <% scriptlet source %>
Slide 11: Implicit Objects Out -- JspWriter (derived from a java.io.Writer) Request -- javax.servlet.http.HttpServletRequest interface Response -- javax.servlet.http.HttpServletResponse object PageContext -- provides access to the namespaces associated with a JSP page SetAttribute getAttribute Session -- javax.servlet.http.HttpSession object store objects between client requests Application -- javax.servlet.ServletContex Config – ServletConfig Page -- contains a reference to the current instance of the JSP being accessed
Slide 12: Standard Actions <jsp:useBean> id, scope, class, beanName,type <jsp:setProperty> <jsp:getProperty> <jsp:param name="name" value="value"/> <jsp:include page="urlSpec" flush="true"> <jsp:forward page="relativeURL"> <jsp:plugin type="pluginType" code="classFile" codebase="relativeURLpath"/>

   
Time on Slide Time on Plick
Slides per Visit Slide Views Views by Location
close
Please fill out the form below. You will be asked to make your payment to Myplick (Eastar Technologies) via Paypal. Your request will be processed within 24 hours after your submission.
 
Title (max 25 characters)
Link (placed on title)
Content (max 100 characters)
You have successfully submitted your ad request. Please send your payment to ericandlei@myplick.com via PAYPAL.
Ad submission failed. Please report the problem to ericandlei@myplick.com.