You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by yitzle <yi...@users.sourceforge.net> on 2007/06/04 19:30:50 UTC

Retrieving HTTP query string

If I got a URL with a parameter embedded in it, how do I check what
the query string is?

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


Re: Retrieving HTTP query string

Posted by yitzle <yi...@users.sourceforge.net>.
On 6/4/07, Dave Newton <ne...@yahoo.com> wrote:
> --- yitzle <yi...@users.sourceforge.net> wrote:
> > How do I get the Request object?
>
> Struts version?
>
> S1: It's passed in to Action.execute(...)
>
> S2: Implement ServletRequestAware
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/interceptor/ServletRequestAware.html
>
> I have no idea why you would want to do that in S2 if
> all you're doing is accessing a request parameter, and
> it's a Bad Idea if that's the only reason you need it.
I guess what I wanted was the implements ParameterAware

>
> > Implementing RequestAware gets me a map...
> > There's a sun.misc.Request object, but that doesn't
> > look right...
>
> Yeah, probably not.
>
> Do you have any familiarity with JEE at all? Have you
> looked at the S2 docs which *specifically* answer this
> question?
>
> http://struts.apache.org/2.x/docs/how-can-we-access-the-httpservletrequest.html
>
> d.

I'm not very familiar with JEE. I've used it before, but not extensively.


Thanks

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


Re: Retrieving HTTP query string

Posted by Dave Newton <ne...@yahoo.com>.
--- Musachy Barroso <mu...@gmail.com> wrote:
> what are these empty emails?

They're your email client :) For whatever reason the
actual msg is in the fwd'ed attachment.

d.

> 
> musachy
> 
> On 6/4/07, animesh.saxena@wipro.com
> <an...@wipro.com> wrote:
> >
> >
> > The information contained in this electronic
> message and any attachments
> > to this message are intended for the exclusive use
> of the addressee(s) and
> > may contain proprietary, confidential or
> privileged information. If you are
> > not the intended recipient, you should not
> disseminate, distribute or copy
> > this e-mail. Please notify the sender immediately
> and destroy all copies of
> > this message and any attachments.
> >
> > WARNING: Computer viruses can be transmitted via
> email. The recipient
> > should check this email and any attachments for
> the presence of viruses. The
> > company accepts no liability for any damage caused
> by any virus transmitted
> > by this email.
> >
> > www.wipro.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?"
> Pink Floyd
> 



      ___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

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


Re: Retrieving HTTP query string

Posted by Musachy Barroso <mu...@gmail.com>.
what are these empty emails?

musachy

On 6/4/07, animesh.saxena@wipro.com <an...@wipro.com> wrote:
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Retrieving HTTP query string

Posted by Dave Newton <ne...@yahoo.com>.
--- yitzle <yi...@users.sourceforge.net> wrote:
> How do I get the Request object?

Struts version?

S1: It's passed in to Action.execute(...)

S2: Implement ServletRequestAware
http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/interceptor/ServletRequestAware.html

I have no idea why you would want to do that in S2 if
all you're doing is accessing a request parameter, and
it's a Bad Idea if that's the only reason you need it.

> Implementing RequestAware gets me a map...
> There's a sun.misc.Request object, but that doesn't
> look right...

Yeah, probably not.

Do you have any familiarity with JEE at all? Have you
looked at the S2 docs which *specifically* answer this
question?

http://struts.apache.org/2.x/docs/how-can-we-access-the-httpservletrequest.html

d.



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

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


RE: Retrieving HTTP query string

Posted by an...@wipro.com.
I guess you are missing the cast..
public String intercept(ActionInvocation invocation) throws Exception
  {
    HttpServletRequest request = (HttpServletRequest) invocation
      .getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
//........
//........
//crap...........
//.........
}
Now U have the request object.
 
Animesh
 
 
http://inlovewithlinux.blogspot.com

________________________________

From: anexpert@gmail.com on behalf of yitzle
Sent: Mon 6/4/2007 11:22 PM
To: Struts Users Mailing List
Subject: Re: Retrieving HTTP query string


> Its as simple as using the Request object. Request.QueryString
> Maybe I am getting the question wrong. Can you explain the scenario in
> which you are using this?

How do I get the Request object?
Implementing RequestAware gets me a map...
There's a sun.misc.Request object, but that doesn't look right...

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




Re: Retrieving HTTP query string

Posted by yitzle <yi...@users.sourceforge.net>.
> Its as simple as using the Request object. Request.QueryString
> Maybe I am getting the question wrong. Can you explain the scenario in
> which you are using this?

How do I get the Request object?
Implementing RequestAware gets me a map...
There's a sun.misc.Request object, but that doesn't look right...

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


RE: Retrieving HTTP query string

Posted by an...@wipro.com.
Its as simple as using the Request object. Request.QueryString
 
Maybe I am getting the question wrong. Can you explain the scenario in which you are using this?
 
________________________________

From: anexpert@gmail.com on behalf of yitzle
Sent: Mon 6/4/2007 11:00 PM
To: Struts Users Mailing List
Subject: Retrieving HTTP query string



If I got a URL with a parameter embedded in it, how do I check what
the query string is?

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




Re: Retrieving HTTP query string

Posted by yitzle <yi...@users.sourceforge.net>.
On 6/4/07, Dave Newton <ne...@yahoo.com> wrote:
> --- yitzle <yi...@users.sourceforge.net228> wrote:
> > If I got a URL with a parameter embedded in it, how
> > do I check what the query string is?
>
> Struts version?
>
> d.

Sorry. Struts 2

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


Re: Retrieving HTTP query string

Posted by Dave Newton <ne...@yahoo.com>.
--- yitzle <yi...@users.sourceforge.net> wrote:
> If I got a URL with a parameter embedded in it, how
> do I check what the query string is?

Struts version?

d.



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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