954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Pass Multiple value in Query String in JSP

Anyone help me as soon as possible :
Sir/Mam
I want to pass more than 1 value through Query String
I use the Code but it not working :

<tr>
                              <td><a href="patmedrcd.jsp?id=<%=patid%> & q123=<%=qid%>"> View Patient's Medical Record</a></td>
                              <td></td>
                          </tr>


and i get the value by this code :

String idpat=request.getParameter("id");
        String idq=request.getParameter("q123");
        out.println(idpat);
        out.println(idq);

But It gave only first string value ( id=<%=patid%> )
2nd one is fetched NULL

Please Help Me OUT!!!

arfharwinder
Newbie Poster
1 post since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

Don't place spaces around the &

And don't use scriptlets. Learn how to do it all right. See the JEE 6 tutorials, and read through them completely.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

for my knowledge cookies/sessions will be the right choice for this problem

anand01
Posting Whiz in Training
225 posts since Aug 2010
Reputation Points: 12
Solved Threads: 20
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: