You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2008/11/04 23:21:45 UTC

Re: Fw: Problem with form processing using doGet

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Remigiusz,

Remigiusz Andrzejak wrote:
> What is strange is that Tomcat doesn't give me exception: resource not found.

Could you provide a stack trace for that error?

> Instead nor doGet, nor doPost seem to be called for those servlets.
> 
> What might be the source of the problem is the way servlets are invoked.
> 
> Here is an example of what I have in HTML page to get a picture served by my servlet:
> 
> <img src="/Wedding/imageGetter?source=images&id=cal.gif" width="16" height="16" border="0" alt="Wybierz datÄ™">

You might want to check to see that the context name is the same between
machines. You are going to want to change all your links to point to
something like this:

<img src="<%= request.getContextPath() %>/Wedding/imageGetter?..." />

This allows you to relocate your webapp without having to change your
URLs all the time.

While you're at it, you should add a call to request.encodeURL() in
there so that non-cookie-using clients will work, too. ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkQyvkACgkQ9CaO5/Lv0PCb+ACfTxbBihOrkzdQIj+NJ4ePmYhq
08EAn0omOotVRK30C1VeNEIzwx+dUHKE
=s5VX
-----END PGP SIGNATURE-----

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