Christopher, 

actually, I'm new to configuring tomcat and writing .jsp's. All that I 
managed to do up to the moment is - to set up authentication rules and to 
get a jsp that gives me a list of files that I need (in the 
/$catalina_base/my_instance/logs directory). So, I can't give you a sample 
of my code because it doesn't exist yet =)

Thanks for mentioning PsiProbe, I'll try to use it.

Best Regards, 
Karatun Lev,
RBRU IT Application Support ,
(495) 5464



Christopher Schultz <ch...@christopherschultz.net> 
03.02.2012 20:32
Please respond to
"Tomcat Users List" <users@tomcat.apache.org>


To
Tomcat Users List <users@tomcat.apache.org>
cc

Subject
Re: How can I access tomcat's logs using my jsp?






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

Lev,

On 2/3/12 8:53 AM, Lev A KARATUN wrote:
> I'm trying to write a simple jsp to make some superusers able to
> download tomcat logs via browser after entering a password. (In my
> organization it's not permitted to give anyone the "manager" role)

You could bail-out and use a separate utility like PsiProbe which, I
believe, has this kind of thing built right-in.

> I've already managed to get a list log-files' names (just copied
> someone's part of code and made some adjustments), but when I'm
> trying to make download links, I don't know how can I specify the
> path to /$CATALINA_BASE/logs via my web-browser. As far as I can
> see, I can reach only folders like /$CATALINA_BASE/webapps/myapp
> upon entering the link http://myhost:port/myapp.
> 
> So, the question is - how can I access tomcat's logs using my jsp?

Can you give us a sample of how you are trying to serve the file? Are
you performing a <forward> and trying to let the DefaultServlet serve
the log, or are you reading the file yourself and streaming it back to
the client? I believe only the latter will be possible without
significant alternative configuration.

- -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/

iEYEARECAAYFAk8sC9cACgkQ9CaO5/Lv0PCKbwCeLt3cUDYf0DjYsF76F9cLVD3s
migAnRHjThUJTyJ0Z2WiiFodz2Zq7GSx
=jWbS
-----END PGP SIGNATURE-----

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





-----------------------------------
This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. ZAO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed. 
-----------------------------------

Reply via email to