Action Tag

The JSP specification provides standard tags for use within JSP pages. Standand tags begin with the jsp:prefiex. Using these tags to reduce or eliminate scriptlet code within JSP pages.
Syntax of Declaration tag
<jsp:prefix % >
Some action tags
  • jsp:include
  • jsp:forward
  • jsp:useBean
  • jsp:setProperties
  • jsp:getProperties
  • jsp:pluging
  • jsp:elements
  • jsp:attributies
  • jsp:body
  • jsp:text
Example of action tag
action.jsp
<html> <head> <title>Welcome to action tag </title> </head> <body> <jsp:include page="index.jsp" /> </body> </html>
index.jsp
<html> <head> <title>Welcome to expression tag example </title> </head> <body> <%! int couter= 10; public String login(String name) { return "Welcome " + name ; } %> <p> The Value of Counter <%= couter %> </p> <p> Hello you are most <%= login("Sunil") %> </p> </body> </html>
Output
action tag
Download this example
 



 

Latest Tutorial


Most Visited Tutorial