Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Objects passing to JSP

  1. #1
    Member
    Join Date
    Feb 2011
    Posts
    40
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Objects passing to JSP

    First off, I apologize if this is a Java-only forum, no JSP stuff, but I figured I'd try.

    So I'm used to PHP and here's what I don't get: if I include one JSP inside of another one, why wouldn't I have access to the same objects inside the included JSP? Example:
    <% if(report.getWriterConfiguration().contains("Gauge")) { %>
           <jsp:include page="writer/outGauge.jsp" />
        <%
        }       
        else {

    But if I try to do anything with the report object in outGauge.jsp, it says it can't resolve 'report'.


  2. #2
    Member
    Join Date
    Feb 2011
    Posts
    40
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Objects passing to JSP

    Nevermind, I was including using the wrong method. I changed it to this:
    <%@ include file="writer/outGauge.jsp" %>

    And now everything works fine.

Similar Threads

  1. Passing a value to another class
    By Semple in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 4th, 2010, 05:49 PM
  2. Need help passing values through classes
    By Jared in forum Java Theory & Questions
    Replies: 2
    Last Post: October 6th, 2010, 09:42 AM
  3. passing input to a process
    By Yaten13 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: June 17th, 2010, 04:11 PM
  4. Passing in more than one flag
    By anon181 in forum Loops & Control Statements
    Replies: 3
    Last Post: February 2nd, 2010, 06:37 AM
  5. Passing objects as a constructor parameter
    By derky in forum Object Oriented Programming
    Replies: 2
    Last Post: October 27th, 2009, 05:31 AM