[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

jsp-

What is the use of include statement in jsp?

What ate the tag available in jsp?

could you explain the page attributes tag
0
Manikandan Thiagarajan
Asked:
Manikandan Thiagarajan
  • 4
  • 3
2 Solutions
 
arun_kuttzCommented:
check out the link... its a syntax refereance for JSP (2.0)...
its got a pretty decent description of the include tag.. as well as a list of all <jsp:...> tags

http://java.sun.com/products/jsp/syntax/2.0/syntaxref20.html

-KuTtZ
0
 
gksinghietCommented:
>>What is the use of include statement in jsp?
There are two types of includes in JSP, one is static include using include directive and other is dynamic include using <jsp:include> tag. Static include just copies the content of the included page into the including page at compile (translation) time.
>>What ate the tag available in jsp?
http://www.jsptut.com/Tags.jsp
>>could you explain the page attributes tag
Are you asking about page directive  <@ page>?
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
at what purpose we go for compile time attribute and runtime attribute
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
gksinghietCommented:
If I am gussing it right you wnat to know when to use static include and when dynamic include.
If you want that on changing your included JSP the change gets reflected in the including JSP you use dynamic include otherwise use static include. Also if you want to use the parameters declared in the including page in the included page you prefer static include.
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
could you give me a simple example for include with syntax
0
 
gksinghietCommented:
Static Include:
<%@ include file="includeMe.jsp" %>
Dynamic Include:
<jsp:include page="includeMe.jsp" />
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
difference between include and forward
0
 
gksinghietCommented:
Forward is for forwarding the request to another page where as include is for including a page or its output stream into another page.
I think you should go through a JSP tutorial like the one provided by Sun. This will answer most of your question.
Following Link might help:
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html
http://www.roseindia.net/jsp/jsp.htm
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now