Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing data to JSP

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to pass another data parameter to store.jsp
within the following command:-
<a href='store.jsp?prodid=<%="data1" %>'>
something like this:-
<a href='store.jsp?prodid=<%="data1" %> manid=<%="data2" %>'>
Can anybody help.
 
Paul Wetzel
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it as easy as putting an '&' between the lass parameter value and the next parameter name? like this:

I removed the double quotes aroung the vars and put double quotes around the href value.
I hop ethat was what you were looking for
paul
 
Martin Lawrence
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
Thanks for your prev help. I still have a problem with the
following code:-
<tr>
<td>
<b><input type="text" SIZE="20" name=data2 ></b>
</td>
</tr>
<% String data1="first"; %>
<tr>
<td>
<br><a href="store.jsp?prodid=<%=data1%>&manid=data2">link here</a>
</td>
</tr>
The output displays the content of data1 ok, but displays
data2 as "data2", instead of it's content.
 
Raj Kumar Gopal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be :
<br><a href="store.jsp?prodid=<%=data1%>&manid=<%=data2%>">link here</a>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic