File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Passing data to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Passing data to JSP" Watch "Passing data to JSP" New topic
Author

Passing data to JSP

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Nov 02, 1999
Posts: 107
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

Joined: Oct 20, 2000
Posts: 14
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

Joined: Oct 20, 2000
Posts: 6
It should be :
<br><a href="store.jsp?prodid=<%=data1%>&manid=<%=data2%>">link here</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing data to JSP