Results 1 to 2 of 2
  1. #1
    esolve is offline Member
    Join Date
    Mar 2015
    Posts
    56
    Rep Power
    0

    Default 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

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    878
    Rep Power
    11

    Default Re: about JSP inclusion file, request scope and session scope

    please gothru this
    JSP Include Directive
    Ramya:cool:

Similar Threads

  1. about JSP inclusion file and request scope
    By esolve in forum Java Servlet
    Replies: 0
    Last Post: 11-17-2015, 01:57 PM
  2. Request Scope in HttpServlet
    By rkpasunoori in forum Java Servlet
    Replies: 1
    Last Post: 11-13-2008, 05:43 AM
  3. How to use request Scope in Spring
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-31-2008, 10:06 AM
  4. How to use session scope in Spring
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-28-2007, 12:47 PM
  5. How to use request Scope in Spring
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-28-2007, 12:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •