Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   passing data between jsp pages (http://www.go4expert.com/forums/passing-data-jsp-pages-t21928/)

clarky 28Apr2010 07:02

passing data between jsp pages

Part 1

I'm populating a dropdown list from data retrieved from a web services request. When the user makes a selection I want to link to another jsp page passing the selected item as the value of parm1.

<select onchange="document.location='./otherPage.jsp?parm1='+this.value;" >

This works fine if 1. the user is using firefox, not ie and, 2. there is no spaces in the selected item.

If ie, the linked adress is shown as...

In firefox its...

Part 2

The second part of my issue relates to the linked jsp page where I use...
String[] ws_parm1 = request.getParameterValues("parm1");

I have to receive parm1 as an array though I want it as a single string.

any assistance would be appreciated.

clarky 29Apr2010 08:33

Re: passing data between jsp pages
Ignore Part 2, Ive sorted that out by replacing the spaces with another character and the reverting back to spaces in the receiving jsp...

shabbir 29Apr2010 08:39

Re: passing data between jsp pages
Why don't you make the form post as Get instead of you doing all the passing.

All times are GMT +5.5. The time now is 21:10.