Get Parameter from URL

S

sisilla14

Hello All,

I am passing two parameters from a JSP as follows -:

<jsp:forward page = "NewTJQRSuccess.jsp?pttquotationrequestid=<
%=pttquotationrequestid%>&pttclientid=<%=pttclientid%>"/>

On NewTJQRSuccess.jsp, I can retrieve pttclient id with the
following-:

<%
String pttquotationrequestid =
request.getParameter("pttquotationrequestid");
String pttclientid = request.getParameter("pttclientid");
%>

However, pttquotationrequestid always evaluates to null even though a

<%
System.out.println(pttquotationrequestid);
%>

right before I pass the parameter tells me that pttquotationrequestid
= 100170.

What am I overlooking here? I am running Tomcat 5.5.9 and JDK 1.6.0 on
Windows XP Professional. I appreciate any and all efforts to help me.
Thank you so much for your time and consideration.

Sincerely,
Sisilla
 
A

Andrew Thompson

On Feb 22, 5:54 am, (e-mail address removed) wrote:
...
<jsp:forward page = "NewTJQRSuccess.jsp?pttquotationrequestid=<
%=pttquotationrequestid%>&pttclientid=<%=pttclientid%>"/>

I am not entirely sure, but I suspect that '&'
between the params needs to be encoded.

Something like..
<jsp:forward page = "NewTJQRSuccess.jsp?pttquotationrequestid=<
%=pttquotationrequestid%>&amp;pttclientid=<%=pttclientid%>"/>

Andrew T.
 
S

sisilla14

On Feb 22, 5:54 am, (e-mail address removed) wrote:
..


I am not entirely sure, but I suspect that '&'
between the params needs to be encoded.

Something like..
<jsp:forward page = "NewTJQRSuccess.jsp?pttquotationrequestid=<
%=pttquotationrequestid%>&amp;pttclientid=<%=pttclientid%>"/>

Andrew T.

Thank you for your reply, Andrew. I tried out your suggestion, but it
did not work. I appreciate any further advice.
~Sisilla
 
I

impaler

Thank you for your reply, Andrew. I tried out your suggestion, but it
did not work. I appreciate any further advice.
~Sisilla


Have you tried this?

<jsp:forward page = "NewTJQRSuccess.jsp>
<jsp:param name="pttquotationrequestid" value="<
%=pttquotationrequestid%>" />
<jsp:param name="pttclientid" value="<%=pttclientid%>" />
</jsp:forward>
 
S

sisilla14

Have you tried this?

<jsp:forward page = "NewTJQRSuccess.jsp">
<jsp:param name="pttquotationrequestid" value="<
%=pttquotationrequestid%>" />
<jsp:param name="pttclientid" value="<%=pttclientid%>" />
</jsp:forward>- Hide quoted text -

- Show quoted text -

Thank you so much, impaler. I should have tried that first! I just
assumed that both methods were equivalent. Apparently, they're not
because this one works. I don't know why, but I am happy!

Again Thanks,
Sisilla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top