You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kurt Overberg <ku...@hotdogrecords.com> on 2005/04/11 18:43:57 UTC
Returning a different .jsp than the one the browser asked for...
Gang,
I've scoured the net looking for something that would help me do this- currently
looking at Wrapping the HttpServletRequest, but not having much luck.
Environment: tomcat 5.0.28 on linux, also using struts 1.1
I'm trying to make my system so that if a user asks for something like
/pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists
and if it does, it returns (executes, whatever) that page. Otherwise it will
return /pages/testing.jsp. It seems like the tomcat (or was it struts?) used to
do something like this where if testing_fr.jsp existed, and the person's locale
was set to "FR" it would return that, but that appears to have gone away and I
can't really find anything on it. ANY help or pointers would be greatly
appreciated! Thanks!
/kurt
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Returning a different .jsp than the one the browser asked for...
Posted by Kurt Overberg <ku...@hotdogrecords.com>.
I was kinda able to do what I needed by using a filter- thanks for your reply!
/kurt
Dakota Jack wrote:
> I don't know if this is helpful, but if you have a front controller in
> your architecture, which would be normal,, this sort of behavior would
> be simple to code. Do you have a front controller?
>
> On Apr 11, 2005 9:43 AM, Kurt Overberg <ku...@hotdogrecords.com> wrote:
>
>>Gang,
>>
>>I've scoured the net looking for something that would help me do this- currently
>>looking at Wrapping the HttpServletRequest, but not having much luck.
>>
>>Environment: tomcat 5.0.28 on linux, also using struts 1.1
>>
>>I'm trying to make my system so that if a user asks for something like
>>/pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists
>>and if it does, it returns (executes, whatever) that page. Otherwise it will
>>return /pages/testing.jsp. It seems like the tomcat (or was it struts?) used to
>>do something like this where if testing_fr.jsp existed, and the person's locale
>>was set to "FR" it would return that, but that appears to have gone away and I
>>can't really find anything on it. ANY help or pointers would be greatly
>>appreciated! Thanks!
>>
>>/kurt
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Returning a different .jsp than the one the browser asked for...
Posted by Dakota Jack <da...@gmail.com>.
I don't know if this is helpful, but if you have a front controller in
your architecture, which would be normal,, this sort of behavior would
be simple to code. Do you have a front controller?
On Apr 11, 2005 9:43 AM, Kurt Overberg <ku...@hotdogrecords.com> wrote:
>
> Gang,
>
> I've scoured the net looking for something that would help me do this- currently
> looking at Wrapping the HttpServletRequest, but not having much luck.
>
> Environment: tomcat 5.0.28 on linux, also using struts 1.1
>
> I'm trying to make my system so that if a user asks for something like
> /pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists
> and if it does, it returns (executes, whatever) that page. Otherwise it will
> return /pages/testing.jsp. It seems like the tomcat (or was it struts?) used to
> do something like this where if testing_fr.jsp existed, and the person's locale
> was set to "FR" it would return that, but that appears to have gone away and I
> can't really find anything on it. ANY help or pointers would be greatly
> appreciated! Thanks!
>
> /kurt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org