You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Young <pa...@yahoo.com> on 2003/03/28 16:57:05 UTC

Accessing query string parameter

I need to be able to access a parameter from a query
string.  

My url looks like...
http://localhost:8080/myApp/reports/summaryReport.jsp?reportType=print

I need to be able to access the reportType parameter
from this URL.  What is the best way to do this?

Pat Young

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Accessing query string parameter

Posted by julian green <ju...@jacobsrimell.com>.
Try this

String productName = request.getParameter("reportType");

Julian

Pat Young wrote:

>I need to be able to access a parameter from a query
>string.  
>
>My url looks like...
>http://localhost:8080/myApp/reports/summaryReport.jsp?reportType=print
>
>I need to be able to access the reportType parameter
>from this URL.  What is the best way to do this?
>
>Pat Young
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>http://platinum.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Accessing query string parameter

Posted by James Mitchell <jm...@apache.org>.
On Fri, 2003-03-28 at 10:57, Pat Young wrote:
> I need to be able to access a parameter from a query
> string.  
> 
> My url looks like...
> http://localhost:8080/myApp/reports/summaryReport.jsp?reportType=print
> 
> I need to be able to access the reportType parameter
> from this URL.  What is the best way to do this?

http://jakarta.apache.org/struts/userGuide/struts-bean.html#parameter

> 
> Pat Young
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org