|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
CSS Links and request forwardingHi,
I have a servlet on /site. Depending on the User-Agent, it will use the RequestDispatcher and forward to /site1 or /site2. /site1 is mapped to the Wicket filter, /site2 is another plain servlet. When I open site1 directly, the CSS link is alright. In the original html: <link href="site1/styles/site.css" rel="stylesheet" type="text/css" /> In the processed html: <link href="../site1/styles/site.css" rel="stylesheet" type="text/css"/> But, when I open this through /site and it passes through the RequestDispatcher, the processed html becomes: <link href="../../site1/styles/site.css" rel="stylesheet" type="text/css"/> How did the base URL change? Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CSS Links and request forwardingTry redirecting rather than forwarding
On Tue, Jul 8, 2008 at 8:34 AM, Miguel Paraz <mparaz@...> wrote: > Hi, > I have a servlet on /site. Depending on the User-Agent, it will use > the RequestDispatcher and forward to /site1 or /site2. > /site1 is mapped to the Wicket filter, /site2 is another plain servlet. > > When I open site1 directly, the CSS link is alright. > > In the original html: > > <link href="site1/styles/site.css" rel="stylesheet" type="text/css" /> > > In the processed html: > > <link href="../site1/styles/site.css" rel="stylesheet" type="text/css"/> > > > But, when I open this through /site and it passes through the > RequestDispatcher, the processed html becomes: > > <link href="../../site1/styles/site.css" rel="stylesheet" type="text/css"/> > > > How did the base URL change? > Thanks. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CSS Links and request forwardingOn Tue, Jul 8, 2008 at 8:37 PM, James Carman <james@...> wrote:
> Try redirecting rather than forwarding I'm trying to avoid redirecting. Do you mean, forwarding cannot retain the correct URL? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CSS Links and request forwardingThe URL for the resources is based on the current URL used to access
the page. Forwarding doesn't change the URL, so I assume that's what's causing the problem. On Tue, Jul 8, 2008 at 10:24 AM, Miguel Paraz <mparaz@...> wrote: > On Tue, Jul 8, 2008 at 8:37 PM, James Carman <james@...> wrote: >> Try redirecting rather than forwarding > > I'm trying to avoid redirecting. > > Do you mean, forwarding cannot retain the correct URL? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free Forum Powered by Nabble | Forum Help |