File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes href parameter and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "href parameter and jsp" Watch "href parameter and jsp" New topic
Author

href parameter and jsp

federico tonioni
Greenhorn

Joined: Dec 16, 2002
Posts: 9
should i catch the idcoll parameter in my currentcollectionview.jsp page as request.getParameter("idcoll")?

....// somejsp.jsp
<a href="currentcollectionview.jsp?idcoll=<%=parentCollection%>">
....// currentcollectionview.jsp
...
String col = request.getParameter("idcoll");
Erik Pragt
Ranch Hand

Joined: Sep 08, 2001
Posts: 125
Hello Federico,
if you want to do it like that, that's entirely possible. But if you want to know if there are better ways, than it depends on what you find better. You could use a servlet instead of a jsp, but this depends on a lot of things.
The this I would change if I where you was to change the 'idcoll' to <%= Collection.ID %> (the class collection would have a public static final String ID, which would have a content like 'id', 'collid', or something like that.
This would prevent typos, as you can also change the second statement

to


Greetings, Erik Pragt
[edit]type & smiley [/edit]
[ January 27, 2003: Message edited by: Erik Pragt ]
 
 
subject: href parameter and jsp
 
Threads others viewed
sending parameter through query string-post method
how to send parameter from html to jsp??
Drowning in DataPool.........
Parameter passing problem
JSP output problem
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture