[S2] access to URL information

2007-02-19 Thread bob

What's the cleanest way to get to the request url information, such as the 
domain name, from within an interceptor?  I know that I could get a hold of the 
servlet API to do this, but is this a best practice?  I know that I've read 
that you should try to avoid accessing the servlet API from within your struts 
code.  

Any advice on the cleanest way to get this domain name from within struts? 

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] access to URL information

2007-02-19 Thread Matt Filion
I'm actually having a similar issue. I'm trying to get some paramters from 
the querystring (in either an interceptor and tried earlier on an action) 
and have been unable to get any querystring values.

I am using the 1.4.2 version of struts 2.

Matt



This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.





bob [EMAIL PROTECTED] 
02/19/2007 11:26 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
user@struts.apache.org
cc

Subject
[S2] access to URL information







What's the cleanest way to get to the request url information, such as the 
domain name, from within an interceptor?  I know that I could get a hold 
of the servlet API to do this, but is this a best practice?  I know that 
I've read that you should try to avoid accessing the servlet API from 
within your struts code. 

Any advice on the cleanest way to get this domain name from within struts? 
 

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [S2] access to URL information

2007-02-19 Thread Dave Newton
--- Matt Filion [EMAIL PROTECTED] wrote:
 I'm actually having a similar issue. I'm trying to
 get some paramters from the querystring (in either
an
 interceptor and tried earlier on an action) 
 and have been unable to get any querystring values.

I don't know how either of you are going to get host
or URL information w/o access the request context
(which is also how you'd get the querystring, although
it is quite unclear to my why you would prefer that
over being ParameterAware).

I suppose you could set the information in one of the
interfaces with a map via an interceptor, or create
your own interface, but so far it's not clear to me
why you'd want to.

d.



 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] access to URL information

2007-02-19 Thread Matt Filion
Right now I have an interceptor that is creating a context for a set of 
menus that is being generated around each page. In order for it to capture 
the current section it is getting sent as a querystring paramter in a 
link. When I sniff the request which I check from both the opensymphony 
ActionContext.getContext().getParamter() and ServletActionContext.
getRequest().getParameter(). I am getting the names of all paramters in 
the request from both and printing them out and get absolutely no 
querystring parameters. I get the parameters submitted via the form but 
not the querystring parameters.


Matt


This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.





Dave Newton [EMAIL PROTECTED] 
02/19/2007 02:49 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: [S2] access to URL information






--- Matt Filion [EMAIL PROTECTED] wrote:
 I'm actually having a similar issue. I'm trying to
 get some paramters from the querystring (in either
an
 interceptor and tried earlier on an action) 
 and have been unable to get any querystring values.

I don't know how either of you are going to get host
or URL information w/o access the request context
(which is also how you'd get the querystring, although
it is quite unclear to my why you would prefer that
over being ParameterAware).

I suppose you could set the information in one of the
interfaces with a map via an interceptor, or create
your own interface, but so far it's not clear to me
why you'd want to.

d.



 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [S2] access to URL information

2007-02-19 Thread bob



I suppose you could set the information in one of theinterfaces with .map via 
an interceptor, or createyour own interface, but so far it's not clear to 
mewhy you'd want to.d.

Actually, I have multiple hostnames mapped to my application and the virtual 
host is determined by parsing the host name. 

If there's no Struts2 way of getting to the url info, I'll just get the servelt 
request directly. 

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]