Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Get Parameter from URL

Thread view: 
sisilla14@gmail.com - 21 Feb 2007 18:54 GMT
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
Andrew Thompson - 21 Feb 2007 19:40 GMT
On Feb 22, 5:54 am, sisill...@gmail.com 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.
sisilla14@gmail.com - 22 Feb 2007 11:01 GMT
> On Feb 22, 5:54 am, sisill...@gmail.com wrote:
> ..
[quoted text clipped - 10 lines]
>
> Andrew T.

Thank you for your reply, Andrew. I tried out your suggestion, but it
did not work. I appreciate any further advice.
~Sisilla
impaler - 22 Feb 2007 11:54 GMT
On Feb 22, 11:01 am, sisill...@gmail.com wrote:

> > On Feb 22, 5:54 am, sisill...@gmail.com wrote:
> > ..
[quoted text clipped - 14 lines]
> 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>
sisilla14@gmail.com - 22 Feb 2007 12:30 GMT
> Have you tried this?
>
[quoted text clipped - 5 lines]
>
> - 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.