Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java A JSP Actions : Java Glossary

Related Tutorials


 
 

Share on Google+Share on Google+

JSP Actions : Java Glossary

Advertisement
JSP actions are XML tags that forces the server to directly use the server to the existing components or control the behavior of the JSP engine.

JSP Actions : Java Glossary

     

JSP actions are XML tags that forces the server to directly use the server to the existing components or control the behavior of the JSP engine. JSP Actions are made of a usually (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters.

Many action tags are available for Java Server Pages. but most commonly used action tags are three of them and they are namely:

  • <jsp: include />
  • <jsp: forward/>
  • <jsp: useBean/>

jsp include action (<jsp: include />): include is a similar to jsp include directive tag but with a slight difference. The include tag includes either a static or a dynamic content, as and when required.

jsp forward action (<jsp: forward/>): jsp forward action transfers the control to a static or dynamic resource. The static or dynamic resource to which control is transferred is represented as a URL. The user can forward the control to an HTML file, another JSP file, or a servlet. It should be noted that the target file must be in the same application context as the forwarding JSP file.

jsp useBean action (<jsp: useBean/>): This action tag is the most commonly used tag as it has powerful features. By using this action a JSP creates an instance or receive an instance of a Java Bean. It creates or instantiates a bean having specific name and scope. It first locates the instance of the bean, and if the bean is not present, then the <jsp: useBean /> instantiates by using a class.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 27, 2006

Related Tutorials

Discuss: JSP Actions : Java Glossary  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com