File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 35250
    
    7
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 ]

Android appsImageJ pluginsJava web charts
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: 35250
    
    7
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: 35250
    
    7
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
 
Similar Threads
Setting up a JDBC Connection Pool
about database connectivity
In Which Folder I palce Bean File
Cewolf tags
Tomcat with servlet