jsp-

What is the use of include statement in jsp?

What ate the tag available in jsp?

could you explain the page attributes tag
LVL 9
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
 
gksinghietConnect With a Mentor Commented:
>>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
 
arun_kuttzConnect With a Mentor Commented:
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
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
at what purpose we go for compile time attribute and runtime attribute
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.