You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by John Vincent <jo...@towersperrin.com> on 2004/11/11 03:10:29 UTC

Struts app to be passed a parameter (of some kind)

 Need one Struts app, but must have multiple URLs.
 
Thus
http://www.jv.com/company1
http://www.jv.com/company2
 
actually start the same Struts app, say
 
http://www.jv.com/myApp
 
but must "pass" something into the Struts app so that it knows who, or 
rather, which URL invoked it.
 
Thoughts:

Write a servlet, handles multiple URLs, init-param set to a unique value 
for each servlet. Redirect to the Struts app.
Add a header into the http response object before issuing the redirect.
 
The Struts app, in web.xml, has a welcome file of logon.jsp. Could I get 
the header here? Doesn't seem to work.

Any ideas? 
 
John 




NOTICE:  This communication may contain confidential, proprietary or 
legally privileged information. It is intended only for the person(s) to 
whom it is addressed.  If you are not an intended recipient, you may not 
use, read, retransmit, disseminate or take any action in reliance upon it. 
Please notify the sender that you have received it in error and 
immediately delete the entire communication, including any attachments. 
Towers Perrin does not encrypt and cannot ensure the confidentiality or 
integrity of external e-mail communications and, therefore, cannot be 
responsible for any unauthorized access, disclosure, use or tampering that 
may occur during transmission.  This communication is not intended to 
create or modify any obligation, contract or warranty of Towers Perrin, 
unless the firm clearly expresses such an intent.

Re: Struts app to be passed a parameter (of some kind)

Posted by Eddie Bush <ea...@swbell.net>.
John,

This is more of a user list question.  This list is centered on the 
development of Struts itself.  Try posting to the user list.

Tip:  You can get the context path through the request object.  In fact, 
you've got access to every piece that makes up what you'd see in the address 
bar.  Have you examined the Javadocs for HttpServletRequest to see what all 
is available to you?  I'd start there.

Good Luck!

Eddie Bush

----- Original Message ----- 
From: "John Vincent" <jo...@towersperrin.com>
To: <de...@struts.apache.org>
Sent: Wednesday, November 10, 2004 8:10 PM
Subject: Struts app to be passed a parameter (of some kind)


> Need one Struts app, but must have multiple URLs.
>
> Thus
> http://www.jv.com/company1
> http://www.jv.com/company2
>
> actually start the same Struts app, say
>
> http://www.jv.com/myApp
>
> but must "pass" something into the Struts app so that it knows who, or
> rather, which URL invoked it.
>
> Thoughts:
>
> Write a servlet, handles multiple URLs, init-param set to a unique value
> for each servlet. Redirect to the Struts app.
> Add a header into the http response object before issuing the redirect.
>
> The Struts app, in web.xml, has a welcome file of logon.jsp. Could I get
> the header here? Doesn't seem to work.
>
> Any ideas?
>
> John
>
>
>
>
> NOTICE:  This communication may contain confidential, proprietary or
> legally privileged information. It is intended only for the person(s) to
> whom it is addressed.  If you are not an intended recipient, you may not
> use, read, retransmit, disseminate or take any action in reliance upon it.
> Please notify the sender that you have received it in error and
> immediately delete the entire communication, including any attachments.
> Towers Perrin does not encrypt and cannot ensure the confidentiality or
> integrity of external e-mail communications and, therefore, cannot be
> responsible for any unauthorized access, disclosure, use or tampering that
> may occur during transmission.  This communication is not intended to
> create or modify any obligation, contract or warranty of Towers Perrin,
> unless the firm clearly expresses such an intent.
> 



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0446-1, 11/10/2004
Tested on: 11/10/2004 9:04:22 PM
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com




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


Re: Struts app to be passed a parameter (of some kind)

Posted by Vic <ce...@yahoo.com>.
If you ask on user list somone might say something about how to get a 
referer
.V

John Vincent wrote:
>  Need one Struts app, but must have multiple URLs.
>  
> Thus
> http://www.jv.com/company1
> http://www.jv.com/company2
>  
> actually start the same Struts app, say
>  
> http://www.jv.com/myApp
>  
> but must "pass" something into the Struts app so that it knows who, or 
> rather, which URL invoked it.
>  
> Thoughts:
> 
> Write a servlet, handles multiple URLs, init-param set to a unique value 
> for each servlet. Redirect to the Struts app.
> Add a header into the http response object before issuing the redirect.
>  
> The Struts app, in web.xml, has a welcome file of logon.jsp. Could I get 
> the header here? Doesn't seem to work.
> 
> Any ideas? 
>  
> John 
> 
> 
> 
> 
> NOTICE:  This communication may contain confidential, proprietary or 
> legally privileged information. It is intended only for the person(s) to 
> whom it is addressed.  If you are not an intended recipient, you may not 
> use, read, retransmit, disseminate or take any action in reliance upon it. 
> Please notify the sender that you have received it in error and 
> immediately delete the entire communication, including any attachments. 
> Towers Perrin does not encrypt and cannot ensure the confidentiality or 
> integrity of external e-mail communications and, therefore, cannot be 
> responsible for any unauthorized access, disclosure, use or tampering that 
> may occur during transmission.  This communication is not intended to 
> create or modify any obligation, contract or warranty of Towers Perrin, 
> unless the firm clearly expresses such an intent.
> 


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