Services | Updates | Contact
Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
Hibernate Training
Hibernate Training Course Objectives Learning Fundamentals of Hibernate by using the Hibernate persistence engine.
 
Arrays -- Examples
This applet shows a number of methods that use arrays.
 
More Tutorials...


    Loan Information     Struts     Open Source

Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

 
 
JSP

 
Comments
 
 

 

INTRODUCTION TO JSP SCRIPTLETS

                         

Syntax of JSP Scriptles are:

  <%
  //java codes
   %>

JSP Scriptlets begins with <% and ends %> .We can embed any amount of java code in the JSP Scriptlets. JSP Engine places these code in the _jspService() method. Variables available to the JSP Scriptlets are:

  • request:
    request represents the clients request and is a subclass of HttpServletRequest. Use this variable to retrieve the data submitted along the request.
    Example:
      <%
      //java codes
       String userName=null;
       userName=request.getParameter("userName");
       %>
  • response:
    response is subclass of HttpServletResponse.
     
  • session:
    session represents the HTTP session object associated with the request.
     
  • out:
    out is an object of output stream and is used to send any output to the client.
Other variable available to the scriptlets are pageContext, application,config and exception.

INTRODUCTION TO JSP EXPRESSIONS

Syntax of JSP Expressions are:

  <%="Any thing"   %>

JSP Expressions start with 

Syntax of JSP Scriptles are with <%= and ends with  %>. Between these this you can put anything and that will converted to the String and that will be displayed.

Example:
  <%="Hello World!" %>
Above code will display 'Hello World!'.
    

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

10 comments so far (post your own) View All Comments Latest 10 Comments:

*** Thanks for the reply...this site is really nice...and special thanks to neelam..who really guided me and solved my problems in JSP....

Posted by santhosh on Thursday, 04.3.08 @ 10:29am | #55194

I LIKE THIS WEB SITE. ITS EASILY UNDERSTANDING

Posted by sudha on Tuesday, 02.5.08 @ 17:13pm | #47302

This sight is good for reading...

Posted by Chirag on Wednesday, 01.2.08 @ 11:42am | #44357

No you can't as it goes to service method of Servlet.

Posted by Raj on Thursday, 09.27.07 @ 19:56pm | #30088

it is good

Posted by anand on Wednesday, 04.11.07 @ 14:53pm | #13865

hai this is sathish.. I am novice to JSP.so i need savvy it.so please help to give me new examples and present situation in world.

Posted by sathish on Thursday, 04.5.07 @ 16:36pm | #13390

Scriptlet canot be used to define a method;only declaration can be used 4 that..

Posted by ABHI on Tuesday, 04.3.07 @ 23:40pm | #13298

this is a really cool site..

Posted by mallika on Monday, 04.2.07 @ 00:05am | #13148

Can I write a method in Scriptlet in JSP?

Posted by abc on Sunday, 03.25.07 @ 00:33am | #12626

hai am beginner of Jsp i searched in net i found this site really this is ecxcellent and nice to study .... i wish to keep grow this site

Posted by dilip on Monday, 03.19.07 @ 16:36pm | #12185

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.