tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Howto: call a Servlet from another Servlet (Example)?!
Date Mon, 20 Sep 2010 15:36:24 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ronald,

On 9/20/2010 11:07 AM, Ronald Klop wrote:
> You can use the RequestDispatcher.
> 
> RequestDispatcher dispatcher = request.getRequestDispatcher("/userlist");
> dispatcher.forward(request, response);

Of course, you can also issue a redirect to the client:

response.sendRedirect(...)

The advantage of issuing a redirect is that the client will not have to
re-authenticate if the user then RELOADs the resulting page.

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

iEYEARECAAYFAkyXf3gACgkQ9CaO5/Lv0PDRmQCfSKPGx2EbXA8dA0WlcbNee8M9
/YYAoJ6iHtoM5pYzteMy3DMHzH07OCno
=bBF7
-----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