Re: How to use catalina classloader
Ravi116 wrote: Charles, Sorry abt the typo. I have tried the privileged=true in application context xml file. dosent work. Wondering if the code loads with Catalina classloader based on package structure ? No. Package structure is not a factor. privileged=true should be enough. You can use the admin webapp to check that this has been correctly configured. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
I am referencing the Tomcat manager used to deploy/undeploy web application (/admin/html). Ravi Caldarale, Charles R wrote: From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader Writing a custom tomcat manager to add roll-back features. Assuming you're talking about a session.StandardManager replacement, I think you'd have to put it under server/classes rather than having it as part of the deployed webapp. Maybe one of the Tomcat developers would know a better way. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-use-catalina-classloader-tf2504023.html#a6991112 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader I am referencing the Tomcat manager used to deploy/undeploy web application (/admin/html). There is no /admin/html servlet, so I assume you mean /manager/html. Since this webapp does not appear to need access to the classloader for server/lib, why does your enhanced version need it? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
The manager servlet implements CatalinaServlet (so gets initialized with setWrapper method). I have written a similar custom servlet, but it seems to be not calling setWrapper since it dosent load using the Catalina classloader. The documentation suggests to be put the classes in server/classes, but it makes automated builds harder. Besides tomcat manager dosent seem to have its classes in server/classes. Any help is appreciated. Ravi Caldarale, Charles R wrote: From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader I am referencing the Tomcat manager used to deploy/undeploy web application (/admin/html). There is no /admin/html servlet, so I assume you mean /manager/html. Since this webapp does not appear to need access to the classloader for server/lib, why does your enhanced version need it? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-use-catalina-classloader-tf2504023.html#a6993166 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use catalina classloader
thats because the manager webapp accesses classes from $TOMCAT_HOME/server/webapps/manager/WEB-INF/lib/catalina-manager.jar if you place the classes in $TOMCAT_HOME/server/webapps/manager/WEB-INF/classes the manager webapp will be able to access those classes M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: Ravi116 [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, October 25, 2006 10:30 AM Subject: RE: How to use catalina classloader The manager servlet implements CatalinaServlet (so gets initialized with setWrapper method). I have written a similar custom servlet, but it seems to be not calling setWrapper since it dosent load using the Catalina classloader. The documentation suggests to be put the classes in server/classes, but it makes automated builds harder. Besides tomcat manager dosent seem to have its classes in server/classes. Any help is appreciated. Ravi Caldarale, Charles R wrote: From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader I am referencing the Tomcat manager used to deploy/undeploy web application (/admin/html). There is no /admin/html servlet, so I assume you mean /manager/html. Since this webapp does not appear to need access to the classloader for server/lib, why does your enhanced version need it? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-use-catalina-classloader-tf2504023.html#a6993166 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: Re: How to use catalina classloader thats because the manager webapp accesses classes from $TOMCAT_HOME/server/webapps/manager/WEB-INF/lib/catalina-manager.jar if you place the classes in $TOMCAT_HOME/server/webapps/manager/WEB-INF/classes the manager webapp will be able to access those classes Obvious and irrelevant (again). This has nothing to do with accessing classes in catalina-manager.jar. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader The manager servlet implements CatalinaServlet (so gets initialized with setWrapper method). It's ContainerServlet, not CatalinaServlet. A higher degreee of accuracy in your mailings will get you answers faster. Besides tomcat manager dosent seem to have its classes in server/classes. Which was my point before. Have you tried setting the privileged attribute of your Context element to true? Not sure if this will help, but it may provide access to the server/lib classloader - I'm browsing through the code to see. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader Have you tried setting the privileged attribute of your Context element to true? Should have noted that whatever build mechanism you use will still have to put catalina.jar on the javac classpath; annoying but necessary. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
Charles, Sorry abt the typo. I have tried the privileged=true in application context xml file. dosent work. Wondering if the code loads with Catalina classloader based on package structure ? Ravi -- View this message in context: http://www.nabble.com/How-to-use-catalina-classloader-tf2504023.html#a6995258 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader Wondering if the code loads with Catalina classloader based on package structure ? Looks to me like either that or the privileged flag should work. Here's the relevant code snippets from StandardWrapper.java: // Special case class loader for a container provided servlet if (isContainerProvidedServlet(actualClass) ! ((Context)getParent()).getPrivileged() ) { // If it is a priviledged context - using its own // class loader will work, since it's a child of the container // loader classLoader = this.getClass().getClassLoader(); } // Special handling for ContainerServlet instances if ((servlet instanceof ContainerServlet) (isContainerProvidedServlet(actualClass) || ((Context)getParent()).getPrivileged() )) { ((ContainerServlet) servlet).setWrapper(this); } /** * Return codetrue/code if the specified class name represents a * container provided servlet class that should be loaded by the * server class loader. * * @param classname Name of the class to be checked */ private boolean isContainerProvidedServlet(String classname) { if (classname.startsWith(org.apache.catalina.)) { return (true); } try { Class clazz = this.getClass().getClassLoader().loadClass(classname); return (ContainerServlet.class.isAssignableFrom(clazz)); } catch (Throwable t) { return (false); } } Not sure why the privileged flag by itself is insufficient. Perhaps the since it's a child of the container loader comment isn't completely accurate, or something isn't being inherited properly. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: How to use catalina classloader Need the web application to use catalina classloader. What problem are you actually trying to solve? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
Writing a custom tomcat manager to add roll-back features. Ravi Caldarale, Charles R wrote: From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: How to use catalina classloader Need the web application to use catalina classloader. What problem are you actually trying to solve? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-use-catalina-classloader-tf2504023.html#a6981350 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use catalina classloader
From: Ravi116 [mailto:[EMAIL PROTECTED] Subject: RE: How to use catalina classloader Writing a custom tomcat manager to add roll-back features. Assuming you're talking about a session.StandardManager replacement, I think you'd have to put it under server/classes rather than having it as part of the deployed webapp. Maybe one of the Tomcat developers would know a better way. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]