tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: "/" getting added to action path
Date Wed, 06 Jun 2012 00:49:00 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dharamshila,

On 6/5/12 5:37 PM, Dharamshila Khandelwal wrote:
> I am doing testing of a web application on IE 8. I am not able to
> load any images, css, etc. because "/" is getting added in front of
> action path.
> 
> For example, when trying to load the following script, <script
> language="JavaScript" src="include/mm_menu.js"></script> It gives
> me the following error  in tomcat logs: [ERROR] RequestProcessor -
> -Invalid path /include/mm_menu.js was requested
> 
> The document base is /uom. Instead of finding this script under
> /uom, its finding it under /.
> 
> I am not sure how to fix this problem, can someone please help?

What is the URL of the resource that contains the above <script>
element? HTTP clients cannot make "relative" requests to a server: all
requests are fully-qualified and so the URL comes from the relative
URL in the page plus the base URL from the resource that contains it
(got that?).

This probably works from /foo/bar.html but not /bar.html because you
aren't using context-relative links, but rather using
resource-relative links. You are in for a lot of trouble this way.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/OqPwACgkQ9CaO5/Lv0PArVQCdHWNaAYsoJdG5quffpar1dzZM
E4QAnjmxKVOpj89/uF0DnpsOxCG57efE
=Wp3v
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message