Predefined Variables
request
The HttpServletRequest (1st arg to doGet)
response
The HttpServletResponse (2nd arg to doGet)
session
The HttpSession associated with the request (unless 
disabled with the session attribute of the page directive)
out
The stream (of type JspWriter) used to send output to the 
client
application
The ServletContext (for sharing data) as obtained via
getServletConfig().getContext().
25
JSP
www.corewebprogramming.com
JSP Scriptlets
Format
<%
Java Code 
%>
Result
Code is inserted verbatim into servlet s _jspService
Example
<% 
String queryData = request.getQueryString();
out.println("Attached GET data: " + queryData); 
%>
<% response.setContentType("text/plain"); %>
XML compatible syntax
Java Code
26
JSP
www.corewebprogramming.com
13




  

Home

About Services Network Support FAQ Order Contact
 

Java Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved