[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Pass dynamic variable to include????

Posted on 2004-09-24
8
Medium Priority
?
299 Views
Last Modified: 2011-08-18
I want to pass a parameter to an include:
<%

String stage = request.getParameter("primaryComp");

%>

<jsp:include page="test.jsp?stage=<%=stage%>" flush="true"/>



/////////////////////
but this doesn't work? Any ideas?? The parameter is being passed in.
0
Comment
Question by:894359
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 12148022
<jsp:include ...
<jsp:param name="stage" value="<%stage%>" />
</jsp:include>
0
 

Author Comment

by:894359
ID: 12148133
I tried;

<jsp:include page="test.jsp" flush="true"/>
        <jsp:param name="stage" value="red"/>
          </jsp:include>

And it comes up null in the include???

Here's how I'm calling it in the include:

String stage = request.getParameter("stage");
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12148146
So it's coming up null even with a literal (as above)?
0
Technology Partners: 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!

 

Author Comment

by:894359
ID: 12148174
That's correct!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12148206
Hmm, not sure why. I'm clocking off now, but objects will be able to help out (soonish probably)
0
 

Author Comment

by:894359
ID: 12148299
I figured out why I was having problems, for some reason, I had to remove the "/" in the include call:

<jsp:include page="test.jsp" flush="true">
        <jsp:param name="stage" value="<%=stage%>"/>
          </jsp:include>
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12149407
:-)

Hmm. Can you please post the code that's now working?
0
 

Author Comment

by:894359
ID: 12427638
<jsp:include page="test.jsp" flush="true">
       <jsp:param name="stage" value="<%=stage%>"/>
         </jsp:include>

:)
0

Featured Post

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question