aspose file tools*
The moose likes Tomcat and the fly likes accessing the Tomcat classes in a web app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "accessing the Tomcat classes in a web app" Watch "accessing the Tomcat classes in a web app" New topic
Author

accessing the Tomcat classes in a web app

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41823
    
  62
I'd like to access the classes implementing Tomcat in my web app (to get the current Realm, as described here). The Tomcat docs mention that those classes are off-limits to web apps, and indeed this doesn't work for me (the class is not found).
Since this is apparently possible in general, the question is: How do I need to rearrange the Tomcat jars to make this work, or which setting needs to be tweaked?

Thanks,
Ulf
[ November 08, 2005: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you looked at the "privileged" attribute of "Context"?
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41823
    
  62
No, I didn't. From the description I wouldn't have thought that it has any bearing on this. I'll give it a try.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41823
    
  62
Thanks Ben, that did the trick. I'll make a suggestion to enhance the documentation.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

A suggestion would be good.
A patch would be better

Glad it's working
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing the Tomcat classes in a web app