CSS Links and request forwarding
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS Links and request forwarding
Try redirecting rather than forwarding On Tue, Jul 8, 2008 at 8:34 AM, Miguel Paraz [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS Links and request forwarding
On Tue, Jul 8, 2008 at 8:37 PM, James Carman [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CSS Links and request forwarding
The 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 [EMAIL PROTECTED] wrote: On Tue, Jul 8, 2008 at 8:37 PM, James Carman [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]