You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gubler, Ruediger" <rg...@init-ka.de> on 2012/04/26 10:54:23 UTC
Reload servlet remotely
Hello,
I want to reload a servlet by calling
"http://<server>/manager/text/reload?path=/<servlet>"
This works from IE or Firefox but opens a form which asks for user and password.
But I need to call the reload from an groovy script.
How must the URL looks like to add the auth data?
The call of
"http://<server>/manager/text/reload?path=/<servlet>&username=myUser&password=myPass"
doesn't work.
Yours RĂ¼diger
Re: Reload servlet remotely
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mikolaj,
On 4/26/12 5:04 AM, Mikolaj Rydzewski wrote:
> On 26.04.2012 10:54, Gubler, Ruediger wrote:
>
>> But I need to call the reload from an groovy script. How must the
>> URL looks like to add the auth data? The call of
>>
>> "http://<server>/manager/text/reload?path=/<servlet>&username=myUser&password=myPass"
>>
>>
>>
doesn't work.
>
> http://username:password@<server>/manager/text/reload?path=/<servlet>
+1
Or,
>
you can set HTTP headers that contain the username and password.
The Groovy class for making an HTTP connection should have a method
for setting HTTP Authentication credentials.
I highly recommend two additional items:
1. Use SSL : you are otherwise going to be sending credentials in the
clear that are capable of deploying web applications onto your
server.
2. Configure a RemoteIPFilter (or similar) to restrict clients to
certain trusted machines. Otherwise, anyone on the Internet (or who
can open an HTTP connection to your server) will be able to probe
your manager webapp.
- -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+ZU9cACgkQ9CaO5/Lv0PAYCACfY2kQ0UVvC/q5/wPeOQKx55zB
DIUAn3UExcI9eqfdXezV4ePjKBEXs5rt
=EESi
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Reload servlet remotely
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
On 26.04.2012 10:54, Gubler, Ruediger wrote:
> But I need to call the reload from an groovy script.
> How must the URL looks like to add the auth data?
> The call of
>
>
>
> "http://<server>/manager/text/reload?path=/<servlet>&username=myUser&password=myPass"
>
> doesn't work.
http://username:password@<server>/manager/text/reload?path=/<servlet>
--
Mikolaj Rydzewski <mi...@ceti.pl>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org