Results 1 to 2 of 2
- 11-17-2015, 03:03 PM #1
Member
- Join Date
- Mar 2015
- Posts
- 56
- Rep Power
- 0
about JSP inclusion file, request scope and session scope
let's say there are two jsp files, main.jsp file and included.jsp
main.jspa has: <jsp:include page="/WEB-INF/includes/included.jsp" />
I have two questions:
1) my understanding is: the local variables(property) in main.jsp can't be seen in included.jsp, so can local variables in included.jsp be seen in main.jsp?
2) if I set the scope as "request" in main.jsp <jsp:useBean id="requestBean" class="coreservlets.BakedBean" scope="request" />, it seems that the variables(property) can be seen in the included.jsp? does this mean if there is no indication of scope, the default scope is "page"?
3) there are two different operation: redirect and forward
My understanding is: with forwarding, it is the same request, so the request scope is valid. with redirection it is different request, so the request scope is invalid
then how about session scope? does redirection means another session or the session scope is still valid?
thanks
- 11-18-2015, 01:09 PM #2
Re: about JSP inclusion file, request scope and session scope
please gothru this
JSP Include DirectiveRamya:cool:
Similar Threads
-
about JSP inclusion file and request scope
By esolve in forum Java ServletReplies: 0Last Post: 11-17-2015, 02:57 PM -
Request Scope in HttpServlet
By rkpasunoori in forum Java ServletReplies: 1Last Post: 11-13-2008, 06:43 AM -
How to use request Scope in Spring
By Java Tip in forum Java TipReplies: 0Last Post: 03-31-2008, 11:06 AM -
How to use session scope in Spring
By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 01:47 PM -
How to use request Scope in Spring
By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 01:46 PM
Bookmarks