more than one directory in attributte 'appBase' in host container
Hi all, i like to know if i can set more than one directory in attributte 'appBase' in host container for automatic scan of web applications when tomcat starts. Regards, Mariano López - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAAS Realm Help
Information about JAAS can be faound at: http://www.JAASbook.com Hi, Trying to get a custom login through a JAAS LoginModule. Got the authentication to work (confirmed thru println()), but get back a HTTP unauthorized error in the browser. Gets to the commit() of LoginModule, where I add a Principal based on the one role defined in tomcats web.xml ... same as SampleLoginModule example. How does authorization work in general once you have a authenticated user ? Ideally, don't want to list any users or Roles in *any* tomcat config file. Possible ? Yes. Look at your WEB-INF/web.xml: security-constraint ... auth-constraint role-name*/role-name /auth-constraint /security-constraint -- Franck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: High CPU with tomcat 5.5.7
Hi, I don't see anything strange in your thread dump. The threads you mentioned are the http-worker threads which are waiting for new requests to server, no reason to be worried. I don't now what your image-processing threads do ( com.wfb.ivs.delayedImage.thread.ObjectFIFO), is there an underlying native lib, which could be eating cpu? regards Leon On 4/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all, I'm facing an issue of high CPU with tomcat process. Because of this, I've to bounce server once in a week. I am using tomcat 5.5.7 #43 AXIS 1.1 #43 jdk 1.4.2_07 on an Solaris box. I've a sessionless webservice app deployed in this tomcat. Even when the server is idle, tomcat shows high CPU value ! I took a snapshot of thread list for the tomcat process using prstat -L -p command. I can see 120 lwp threads, but only one of them takes high cpu usage. Is this a GC thread or something else ? {I believe - Axis creates lot of temp variables..this might result in GC at regular intervals} There are so many threads at 0 ??? I guess, this might be the threads I get in core dump when I do kill -3. I did kill -3 to see what each lwp thread is doing.. Out of 120, 70 were like - http-8082-Processor168 daemon prio=5 tid=0x00407348 nid=0x1065d in Object.wait() [62d7f000..62d7fc28] at java.lang.Object.wait(Native Method) - waiting on 0x801e2470 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656) - locked 0x801e2470 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:534) and 5 were - TP-Processor3 daemon prio=5 tid=0x00ffee70 nid=0x32 in Object.wait() [6b77f000..6b77fc28] at java.lang.Object.wait(Native Method) - waiting on 0x78d29888 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656) - locked 0x78d29888 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:534) I've got no idea what this trace is about to know whether its causing high CPU.. Even with high CPU, application shows normal response times and behaviour. I've attached core dump and snapshot of prstat command results. I really appreciate your time and inputs for this issue. Thanks!! Naveen. coredump.txt prstat_snap.JPG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jdk1.5, tomcat 5.5.9 and jsp compilation
I'm pretty sure you can't use 1.5 features in the jsp page itself because it's not using the javac compiler. You can use 1.5 features in your java class files though. -- View this message in context: http://www.nabble.com/jdk1.5%2C-tomcat-5.5.9-and-jsp-compilation-t1392691.html#a3779909 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to Reference External Classes?
Hi, Is there a recommended way to reference classes/jars external to the Tomcat 5.5 directory tree? I've googled on this and seen a variety of postings. Modifying setclasspath.sh seems to work - but changes here affect the System Class Loader. How have others referenced external classes/jars at a web app level? Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Reference External Classes?
MERVYN.SANDS wrote: Is there a recommended way to reference classes/jars external to the Tomcat 5.5 directory tree? I've googled on this and seen a variety of postings. Modifying setclasspath.sh seems to work - but changes here affect the System Class Loader. How have others referenced external classes/jars at a web app level? Classes go to WEB-INF/classes, jars to WEB-INF/lib. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multi user setup in a non root environnement
Hello, I'm currently setting up a tomcat 5.5 serveur behind an apache 1.3 server using mod_jk, all of this running under freebsd 6.0. I've got two questions : 1) I managed to successfully run Tomcat under the root account in a multi user setup, with .jsp files reachables via www.site.com/~user/test.jsp and www.site.com:8080/~user/test.jsp by using the PasswdUserDatabase UserConfig. The problem is that I'm kinda worried about security and running tomcat under the root account. I used the -security switch, which seems to work great, but is it secure enough ? I don't want my users to walk through the whole filesystem if there's some security leak :| If so, then the following question might just be for scientific purposes ;) 2) I created a tomcat user and tomcat group, chowned the whole tomcat directory to tomcat:tomcat and launched the tomcat server without any particular switch after having su-ed to the tomcat user. The www.site.com:8080/ default page works great, but trying to get to www.site.com/~user/test.jsp or www.site.com:8080/~user/test.jsp issues a 404 error from tomcat. I found little help about this, and I'm quite puzzled about this 404 error. Does anyone can help me with this ? Thanks by advance, -- François Conil Administrateur Systèmes et Réseaux Pax I wish my lawn was emo, so it would cut itself. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multi user setup in a non root environnement
From: François Conil [mailto:[EMAIL PROTECTED] 2) I created a tomcat user and tomcat group, chowned the whole tomcat directory to tomcat:tomcat and launched the tomcat server without any particular switch after having su-ed to the tomcat user. The www.site.com:8080/ default page works great, but trying to get to www.site.com/~user/test.jsp or www.site.com:8080/~user/test.jsp issues a 404 error from tomcat. Can Tomcat read ~user/test.jsp as the non-root user? Presumably that file and its containing directory would need world read access. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi user setup in a non root environnement
Peter Crowther a écrit : From: François Conil [mailto:[EMAIL PROTECTED] 2) I created a tomcat user and tomcat group, chowned the whole tomcat directory to tomcat:tomcat and launched the tomcat server without any particular switch after having su-ed to the tomcat user. The www.site.com:8080/ default page works great, but trying to get to www.site.com/~user/test.jsp or www.site.com:8080/~user/test.jsp issues a 404 error from tomcat. Can Tomcat read ~user/test.jsp as the non-root user? Presumably that file and its containing directory would need world read access. - Peter Tomcat can read the file, afaik : -rw-r--r-- 1 user staff 1.6K Apr 6 11:32 test.jsp Even a chmod +rx on the jsp files doesn't help. I can edit it under the tomcat account using vi, tail-ing it, more-ing and so long, but I still get the 404 error. By trying things here and there, I found that actually, it launches a 404 error on /~user/ when using the www.site.com:8080 address. The www.site.com works just fine, being an apache frontend. Something must prevent it from correctly use the UserConfig directive, but the log doesn't show anything relevant :| 2006-04-06 12:11:52 UserConfig[www.site.com]: UserConfig: Processing START 2006-04-06 12:11:52 UserConfig[www.site.com]: Deploying user web applications When launching it under the root account, I get : 2006-04-06 12:11:52 UserConfig[www.site.com]: UserConfig: Processing START 2006-04-06 12:11:52 UserConfig[www.site.com]: Deploying user web applications 2006-04-06 11:18:06 UserConfig[www.site.com]: Deploying web application for user User 2006-04-06 11:28:27 UserConfig[www.site.com]: UserConfig: Processing STOP Looks kinda fishy to me. Thanks, -- François Conil Administrateur Systèmes et Réseaux Pax I wish my lawn was emo, so it would cut itself. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
Now, i only use tomcat. I delete context from the server.xml and i work only whith CoffeeNet.xml. Is necessary have the same structure of directories that required but the specifications? Thank you -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:40 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Is your IDE or your tomcat who create the CoffeeNet.xml in the catalina/localhost ? I recommend you use the CoffeeNet.xml in the catalina and delete the context from the server.xml The below folders structure MUST be kept, if your tomcat do not found the web.xml into your webapp, that context will never raise. -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:35 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? I have the context declaring in the server.xml but tomcat make a CoffeeNet.xml into /Catalina/localhost. When i delete the context into server.xml the error is the next: 05-abr-2006 17:30:12 org.apache.catalina.core.StandardHostDeployer install INFO: Procesando URL de archivo de configuraci¾n de Contexto file:C:\Tomcat\con\Catalina\localhost\CoffeeNet.xml 05-abr-2006 17:30:12 org.apache.catalina.startup.ContextConfig applicationConfi INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeNet] If you saw muy directories don't have the same path. Por example, classes and lib is out of WEB-INF. Thank you. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:21 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The docBase should refer to where your jsps and/or html are. %docBase%/my.jsp /other.html /WEB-INF/lib /WEB-INF/classes /WEB-INF/web.xml Now, where are you declaring this context ? Into a context file inside %TOMCAT%/conf/Catalina/localhost/CoffeeNET.xml ?? Or in %TOMCAT%/conf/server.xml ?? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:06 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java
RE: undeploy then redeploy, sessionId valid?
Tomcat serialized the session(s) when the application was shut down, and de-serialized it (them) when the application was restarted. It's a beautiful thing that Tomcat can persist sessions across shutdowns and redeploys. The session is invalidated when the timeout passes, or if the redeploy changes the serialized object in a non-compatible way. Why do you need to detect redeploys in a filter? Tim -Original Message- From: Dave [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 1:56 AM To: Tomcat Users List Subject: undeploy then redeploy, sessionId valid? Undeploy a web application, then redeploy it. Click a link in an old page(page before undeploy), making the first request after redeploy. In a filter: String sessionId = httpRequest.getRequestedSessionId(); boolean valid = httpRequest.isRequestedSessionIdValid(); sessionId is AD890098123763728AD80 valid: true. This means that the old sessionId is still valid. what is the criteria to determine whether a session id is valid or not? How to detect redeploy in a filter? Thanks! David - New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat's getSession(true) returning null
Hi people, i'm experiencing a strange session behaviour in several of my projects running on Tomcat 5.5.12. When the page is being rendered inside servlet's doGet (or doPost, actually it doesn't matter), i call request.getSession(true) many times in order to get data, and at random times it suddenly returns null, eventhough by specification it MUST return a valid session. That, of course, crashes my application in random time intervals. Probably anybody has experienced the same and could help me solve this problem?? I'm totally confused with tomcat, because not a single forum has a post related to this. Here is some of my code: // Servlet class public class IntranetServlet extends HttpServlet { // called from doGet doPost public void syncGet(HttpServletRequest request, HttpServletResponse response) { ResourceManager resourceManager = new ResourceManager(this, request, response); VelocityEngine ve = ResourceManager.getTemplateEngine(); } } // Code which causes null to pop-up public class ResourceManager { private static HttpServlet servlet; private HttpServletRequest request; private HttpServletResponse response; public ResourceManager(HttpServlet aServlet, HttpServletRequest aRequest, HttpServletResponse aResponse) throws FileUploadException { servlet = aServlet; request = aRequest; response = aResponse; } public HttpSession getSession() { HttpSession session = request.getSession(true); // null, randomly System.out.println(session); return session; } it's just a standard session handling, nothing else. And there are no code that explicitly does anything else but session.set/get/removeAttribute on the session. i'll appreciate any help alot. vienzo -- View this message in context: http://www.nabble.com/Tomcat%27s-getSession%28true%29-returning-null-t1405617.html#a3783393 Sent from the Tomcat - User forum at Nabble.com.
SecurityManager - java.lang.ClassCircularityError
I am running tomcat 5.5.9 with a security manager. I am testing an application that still uses the servlet 2.3 web.xml file and jstl 1-0-5 My policy file has an entry like: grant signedby software, Principal com.mypackage.MyPrincipal Paul { permissions. }; This principal is bundled in a jar file in the web application's /WEB-INF/lib directory. I also have a security constraint defined in web.xml for web pages in a certain directory that require authorization. After logging in to access a page in the protected directory, I get the following exception: java.lang.ClassCircularityError: com/mypackage/MyPrincipal at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1403) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1307) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1270) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1211) at sun.security.provider.PolicyFile.implies(PolicyFile.java:1166) at java.security.ProtectionDomain.implies(ProtectionDomain.java:195) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:249) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkRead(SecurityManager.java:871) at java.io.File.exists(File.java:700) at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:824) at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:210) at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:293) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1699) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1570) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1403) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1307) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1270) at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1211) at sun.security.provider.PolicyFile.implies(PolicyFile.java:1166) at java.security.ProtectionDomain.implies(ProtectionDomain.java:195) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:249) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkRead(SecurityManager.java:871) at java.io.File.exists(File.java:700) at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:824) at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:210) at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:293) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1699) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1570) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:88) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:278) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:107) at org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:177) at org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:137) at org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) at org.apache.jasper.compiler.Validator.validate(Validator.java:1495) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) at
RE: need inputs on connection pool
Lenin is correct. With my experience, I can say that to write a good quality connection pool is not easy jobb. Particularly * Else wait for a resource to be released from one of the threads ( this is tricky, say there's a DB resource leak and all the resources in the pool are leaks, then you'll run into a freeze. Your waiting thread will have to wait indefinitely for a DB resource to be released while they are actually leaks ) needs to be done carefully. Because any issues in the connection pool will not be reflected immedatly unless the pool is tested against the expected loads and concurrency. This problem will be reflected as there will be more concurrent users to your application. The application may itself hang OR the database may escalate its lock levels. I suggest that you refer to some already implemented freely available connection pools(I think there is one from Orielly) and then make your changes on the top of that. Regards, Chandrashekhar. -Original Message- From: Lenin Lakshminarayanan -X (lelakshm - HCL at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:45 PM To: Tomcat Users List Subject: RE: need inputs on connection pool You'll have to release the connection to the pool and _NOT_ close the connection. It's something like this : * Create a resource pool that maintains the pool * release the resource from the pool upon request ( if the resource Is already there in the pool and can be utilized ) * Else create a resource ( if the resource pool limit is not reached ) upon request and once the resource is used, _RELEASE_ it to the pool and _NOT_CLOSE_ the connection. * Else wait for a resource to be released from one of the threads ( this is tricky, say there's a DB resource leak and all the resources in the pool are leaks, then you'll run into a freeze. Your waiting thread will have to wait indefinitely for a DB resource to be released while they are actually leaks ) Hope this helps. Lenin -Original Message- From: Abh N [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 8:16 AM To: users@tomcat.apache.org Subject: need inputs on connection pool Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Doubt About the Flush() at Tomcat 5.5
Hi everyone ! At the project we use the Tomcat 5.0 and implement it under this version, yesterday we make a atualization of the container using the Tomcat 5.5.14, but I found a problem with the buffer, at the 5.0 when call the method flush() ou flushbuffer() the container send to the client screen everithing and clean the buffer, but now at this new version they only send it when the buffer has a minimum size and not when I call it to flush the buffer, anyone see this problem and know how can I fix it at the application, because at the 5.0 it work wonderful. I send the code that I use at the tests. [code] ... String texto = !-- ACERTANDO BUFFER DO NAVEGADOR IE --\n; PrintWriter out = response.getWriter(); out.println(response.getBufferSize()); while (true) { out.println(texto); out.flush(); response.flushBuffer(); try { Thread.sleep(1000L); } catch (InterruptedException e) { e.printStackTrace(); } } ... [/code] Thanks, Marcio Camurati
crossContext breaking class hierarchy?
Hello, I am experiencing a problem with Tomcat and class hierarchies. In particular when an object (which implements interface X) is shared among serveral contexts I am unable to cast the object back into interface X. Here is the setup (for simplicity I'll illustrate this with 2 contexts): * Interface ClassInterface is distributed across all applications in a .jar. Application A in context a -- - Implements ClassInterface and adds an instance of the class in it's context: ClassInterface i = new ClassInterfaceImplementation(); getServletContext().setAttribute(some.key, i); Application B in context b -- - Tries to cast the object in the context back into a ClassInterface but fails with a classCastException: ClassInterfaceImplementation ServletContext context = (ServletContext) getServletContext.getContext(/a); ClassInterface i = (ClassInterface) context.getAttribute(some.key); -- EXCEPTION IS THROWN -- java.lang.ClassCastException: ClassInterfaceImplementation Has anybody experienced this before? Does setting an attribute in the context mess things up with the class hierarchy? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access control
Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: crossContext breaking class hierarchy?
I've seen this with Oracle jdbc objects. If you have classes12.jar in your WEB-INF/lib directory, and a copy in common/lib (for the Tomcat Datasource) then you will have TWO oracle.jdbc.XX classes loaded, one in the common classloader and on in your web app's classloader and although they are both oracle.jdbc.XX, they are not the SAME class object (instance). So, be certain your interface X is not in two visible places. Or if it is, you cannot cast objects from one classloader to the other. Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 10:10 AM To: users@tomcat.apache.org Subject: crossContext breaking class hierarchy? Hello, I am experiencing a problem with Tomcat and class hierarchies. In particular when an object (which implements interface X) is shared among serveral contexts I am unable to cast the object back into interface X. Here is the setup (for simplicity I'll illustrate this with 2 contexts): * Interface ClassInterface is distributed across all applications in a .jar. Application A in context a -- - Implements ClassInterface and adds an instance of the class in it's context: ClassInterface i = new ClassInterfaceImplementation(); getServletContext().setAttribute(some.key, i); Application B in context b -- - Tries to cast the object in the context back into a ClassInterface but fails with a classCastException: ClassInterfaceImplementation ServletContext context = (ServletContext) getServletContext.getContext(/a); ClassInterface i = (ClassInterface) context.getAttribute(some.key); -- EXCEPTION IS THROWN -- java.lang.ClassCastException: ClassInterfaceImplementation Has anybody experienced this before? Does setting an attribute in the context mess things up with the class hierarchy? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: crossContext breaking class hierarchy?
My interface is only in the 2 context specific locations: Application A context a: /WEB-INF/lib/interface.jar Application B context b: /WEB-INF/lib/interface.jar It is not in the Tomcat common or shared lib folders; I've verified this just in case I had a brain cramp. I've seen this with Oracle jdbc objects. If you have classes12.jar in your WEB-INF/lib directory, and a copy in common/lib (for the Tomcat Datasource) then you will have TWO oracle.jdbc.XX classes loaded, one in the common classloader and on in your web app's classloader and although they are both oracle.jdbc.XX, they are not the SAME class object (instance). So, be certain your interface X is not in two visible places. Or if it is, you cannot cast objects from one classloader to the other. Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 10:10 AM To: users@tomcat.apache.org Subject: crossContext breaking class hierarchy? Hello, I am experiencing a problem with Tomcat and class hierarchies. In particular when an object (which implements interface X) is shared among serveral contexts I am unable to cast the object back into interface X. Here is the setup (for simplicity I'll illustrate this with 2 contexts): * Interface ClassInterface is distributed across all applications in a .jar. Application A in context a -- - Implements ClassInterface and adds an instance of the class in it's context: ClassInterface i = new ClassInterfaceImplementation(); getServletContext().setAttribute(some.key, i); Application B in context b -- - Tries to cast the object in the context back into a ClassInterface but fails with a classCastException: ClassInterfaceImplementation ServletContext context = (ServletContext) getServletContext.getContext(/a); ClassInterface i = (ClassInterface) context.getAttribute(some.key); -- EXCEPTION IS THROWN -- java.lang.ClassCastException: ClassInterfaceImplementation Has anybody experienced this before? Does setting an attribute in the context mess things up with the class hierarchy? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access control
They used to be all interface servlets, but then I unified all external interface access into one simple servlet that forwards the request to the appropriate service. This way it should be easier to control the access to that context (e.g., protect it with a password, deny access to internal services, etc.). The internal contexts also provide service to other internal servers. - Original Message - From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 06, 2006 17:23 Subject: Re: access control Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
Yes Jose, you have to have that structure. Thatz is the only way that tomcat can load the context files -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 6:36 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Now, i only use tomcat. I delete context from the server.xml and i work only whith CoffeeNet.xml. Is necessary have the same structure of directories that required but the specifications? Thank you -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:40 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Is your IDE or your tomcat who create the CoffeeNet.xml in the catalina/localhost ? I recommend you use the CoffeeNet.xml in the catalina and delete the context from the server.xml The below folders structure MUST be kept, if your tomcat do not found the web.xml into your webapp, that context will never raise. -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:35 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? I have the context declaring in the server.xml but tomcat make a CoffeeNet.xml into /Catalina/localhost. When i delete the context into server.xml the error is the next: 05-abr-2006 17:30:12 org.apache.catalina.core.StandardHostDeployer install INFO: Procesando URL de archivo de configuraci¾n de Contexto file:C:\Tomcat\con\Catalina\localhost\CoffeeNet.xml 05-abr-2006 17:30:12 org.apache.catalina.startup.ContextConfig applicationConfi INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeNet] If you saw muy directories don't have the same path. Por example, classes and lib is out of WEB-INF. Thank you. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:21 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The docBase should refer to where your jsps and/or html are. %docBase%/my.jsp /other.html /WEB-INF/lib /WEB-INF/classes /WEB-INF/web.xml Now, where are you declaring this context ? Into a context file inside %TOMCAT%/conf/Catalina/localhost/CoffeeNET.xml ?? Or in %TOMCAT%/conf/server.xml ?? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:06 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL
RE: Problem whith constructs of directories?
I'll do it. Thank you. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: jueves, 06 de abril de 2006 16:58 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Yes Jose, you have to have that structure. Thatz is the only way that tomcat can load the context files -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 6:36 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Now, i only use tomcat. I delete context from the server.xml and i work only whith CoffeeNet.xml. Is necessary have the same structure of directories that required but the specifications? Thank you -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:40 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Is your IDE or your tomcat who create the CoffeeNet.xml in the catalina/localhost ? I recommend you use the CoffeeNet.xml in the catalina and delete the context from the server.xml The below folders structure MUST be kept, if your tomcat do not found the web.xml into your webapp, that context will never raise. -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:35 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? I have the context declaring in the server.xml but tomcat make a CoffeeNet.xml into /Catalina/localhost. When i delete the context into server.xml the error is the next: 05-abr-2006 17:30:12 org.apache.catalina.core.StandardHostDeployer install INFO: Procesando URL de archivo de configuraci¾n de Contexto file:C:\Tomcat\con\Catalina\localhost\CoffeeNet.xml 05-abr-2006 17:30:12 org.apache.catalina.startup.ContextConfig applicationConfi INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeNet] If you saw muy directories don't have the same path. Por example, classes and lib is out of WEB-INF. Thank you. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:21 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The docBase should refer to where your jsps and/or html are. %docBase%/my.jsp /other.html /WEB-INF/lib /WEB-INF/classes /WEB-INF/web.xml Now, where are you declaring this context ? Into a context file inside %TOMCAT%/conf/Catalina/localhost/CoffeeNET.xml ?? Or in %TOMCAT%/conf/server.xml ?? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:06 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase
RE: crossContext breaking class hierarchy?
Problem sovled. Thanks Tim you got me thinking on the right path. I put the interface.jar in the tomcat shared/lib rather than in the individual context's lib folder. This worked because the jar in the shared/lib folder is common to each of the context's classloader. Putting the interface.jar in each context reflects having two different interfaces (because of the different classloaders). My interface is only in the 2 context specific locations: Application A context a: /WEB-INF/lib/interface.jar Application B context b: /WEB-INF/lib/interface.jar It is not in the Tomcat common or shared lib folders; I've verified this just in case I had a brain cramp. I've seen this with Oracle jdbc objects. If you have classes12.jar in your WEB-INF/lib directory, and a copy in common/lib (for the Tomcat Datasource) then you will have TWO oracle.jdbc.XX classes loaded, one in the common classloader and on in your web app's classloader and although they are both oracle.jdbc.XX, they are not the SAME class object (instance). So, be certain your interface X is not in two visible places. Or if it is, you cannot cast objects from one classloader to the other. Tim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 10:10 AM To: users@tomcat.apache.org Subject: crossContext breaking class hierarchy? Hello, I am experiencing a problem with Tomcat and class hierarchies. In particular when an object (which implements interface X) is shared among serveral contexts I am unable to cast the object back into interface X. Here is the setup (for simplicity I'll illustrate this with 2 contexts): * Interface ClassInterface is distributed across all applications in a .jar. Application A in context a -- - Implements ClassInterface and adds an instance of the class in it's context: ClassInterface i = new ClassInterfaceImplementation(); getServletContext().setAttribute(some.key, i); Application B in context b -- - Tries to cast the object in the context back into a ClassInterface but fails with a classCastException: ClassInterfaceImplementation ServletContext context = (ServletContext) getServletContext.getContext(/a); ClassInterface i = (ClassInterface) context.getAttribute(some.key); -- EXCEPTION IS THROWN -- java.lang.ClassCastException: ClassInterfaceImplementation Has anybody experienced this before? Does setting an attribute in the context mess things up with the class hierarchy? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Eclipse plugins for tomcat
Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access control
Zohar wrote: They used to be all interface servlets, but then I unified all external interface access into one simple servlet that forwards the request to the appropriate service. This way it should be easier to control the access to that context (e.g., protect it with a password, deny access to internal services, etc.). The internal contexts also provide service to other internal servers. Ah, I see. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access control
Can I grant access to some jsp pages and deny access to others (in the same context)? - Original Message - From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 06, 2006 17:23 Subject: Re: access control Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse plugins for tomcat
take a look at WTP (http://www.eclipse.org/webtools/) - Original Message - From: Anandi Vyagrapuri [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, April 06, 2006 18:35 Subject: Eclipse plugins for tomcat Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Eclipse plugins for tomcat
I really like using myeclipse to debug project I am deploying into tomcat. If you plan on using hibernate, spring or struts there is even an excellent added value there. Khalid -Original Message- From: Zohar [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 10:47 AM To: Tomcat Users List Subject: Re: Eclipse plugins for tomcat take a look at WTP (http://www.eclipse.org/webtools/) - Original Message - From: Anandi Vyagrapuri [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, April 06, 2006 18:35 Subject: Eclipse plugins for tomcat Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hibernate3 in tomcat
I am wondering if anyone successfully deployed a war project that uses persistence.xml into tomcat. I am running into problems when I try to do that. Khalid -Original Message- From: Zohar [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 10:47 AM To: Tomcat Users List Subject: Re: Eclipse plugins for tomcat take a look at WTP (http://www.eclipse.org/webtools/) - Original Message - From: Anandi Vyagrapuri [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, April 06, 2006 18:35 Subject: Eclipse plugins for tomcat Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse plugins for tomcat
Anandi Vyagrapuri ha scritto: Anybody tried the plugin called Lombaz Errr... it is Lomboz anyway. ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Eclipse plugins for tomcat
I've been working with sysdeo but then I switch to WTP. You need some effort to learn the tricks, and if you need to debug JSP, this is excellent. Juan José García -Original Message- From: Zohar [mailto:[EMAIL PROTECTED] Sent: Jueves, 06 de Abril de 2006 09:47 a.m. To: Tomcat Users List Subject: Re: Eclipse plugins for tomcat take a look at WTP (http://www.eclipse.org/webtools/) - Original Message - From: Anandi Vyagrapuri [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, April 06, 2006 18:35 Subject: Eclipse plugins for tomcat Hi, Can anyone comment on the best eclipse plugin for tomcat development. Tried sysdeo but had difficulties running the application from eclipse. Anybody tried the plugin called Lombaz ? Or, should i purchase My eclipse ? Any suggestions are welcome. Thanks Anandi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information from Banco Cuscatlan Guatemala, which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please disregard it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with httpservletrequest.getRemoteAddr() returns wrong IPaddress in multihomed machine
Hi , I have a machine with multihomed interface . basically , I am making call where both the server and client are same machine . Here , I am trying to validate the IPaddress from the request with InetAddress.getLocalHost () . Since ,both the client and server are same machine . I expects httpservletrequest.getRemoteAddr() should be equals InetAddress.getLocalHost().getHostAddress();But Its not the case .. i.e ; In my multihomed machine : IPaddress of interface hme0 is : x.x.x.17 and IPaddress of interface hme0:1 is :x.x.x.18 Hostname of the machine is mapped to x.x.x.18 . Here , request.getRemoteAddr() returns x.x.x.17 ,whereas netAddress.getLocalHost().getHostAddress() returns x.x.x.18 . I feels request.getRemoteAddr() should also return x.x.x.18 . Can someone helps me out , whats the problem here ?? , Is machine problem / Tomcat problem ?? . I am having Tomcat version 4.1.31 Also , I have similar configuration on other machine ,but there it is working fine . Thanks in Advance . Mani
RE: Problem with Tomcat 5.5.15, [173 javajni.c] [error] %1 is not a valid Win32 application
No Matt I didn't get answer, but I think the problem it's the program that run as a service: tomcat5w.exe. It runs as 32bit, so when this tries to start the tomcat at 64 bit gives the error. But I resolve temporally this way: I make this bat file, just fix the path for your machine. --- if %OS% == Windows_NT setlocal SET JAVA_HOME=d:\jdk1.5.0_06 SET CATALINA_HOME=d:\Tomcat_5.5.15 start Tomcat 5.5.15 %JAVA_HOME%\bin\java -classpath %JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar -Dcatalina.home=%CATALINA_HOME% -Dcatalina.base=%CATALINA_HOME% -Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed -Djava.io.tmpdir=%CATALINA_HOME%\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties -Djava.security.manager -Djava.security.policy==%CATALINA_HOME%\conf\catalina.policy org.apache.catalina.startup.Bootstrap start --- The problem, it's that tomcat is not running as a service and you need to be logged with an account. You may also find useful to download this tcnative-1.dll for AMD win64 at http://tomcat.heanet.ie/native/1.1.2/binaries/win64/amd64/ Hope this help you. If you find how to run Tomcat as a service in win64 don't forget to tell me. Good luck and Regards, Juan José García Lau Información y Tecnología From: Matt Hill [mailto:[EMAIL PROTECTED] Sent: Miércoles, 05 de Abril de 2006 09:11 p.m. To: Juan Jose Garcia Lau Subject: Problem with Tomcat 5.5.15, [173 javajni.c] [error] %1 is not a valid Win32 application Hi Juan, Did you ever get an answer to the problem below? We are having the same issue: Hi, I have installed successfully tomcat 5.5.15 for development, but now I need it to install in a production server, but the Apache Tomcat service doesn't start. I think the problem it's the machine because it an AMD Opteron 64Bit with Windows 2003. Anybody knows how can I resolve the issue? Thanks in advance. Juan Garcia This is the log: [2006-02-27 11:37:36] [info] Service Tomcat5 name Apache Tomcat [2006-02-27 11:37:37] [info] Service Tomcat5 installed [2006-02-27 11:37:37] [info] Procrun finished. [2006-02-27 11:37:37] [info] Updating service... [2006-02-27 11:37:38] [info] Service Tomcat5 updated [2006-02-27 11:37:38] [info] Update service finished. [2006-02-27 11:37:38] [info] Procrun finished. [2006-02-27 11:37:39] [info] Updating service... [2006-02-27 11:37:40] [info] Service Tomcat5 updated [2006-02-27 11:37:40] [info] Update service finished. [2006-02-27 11:37:40] [info] Procrun finished. [2006-02-27 11:37:41] [info] Updating service... [2006-02-27 11:37:41] [info] Service Tomcat5 updated [2006-02-27 11:37:41] [info] Update service finished. [2006-02-27 11:37:41] [info] Procrun finished. [2006-02-27 11:37:46] [info] Running Service... [2006-02-27 11:37:46] [info] Starting service... [2006-02-27 11:37:46] [173 javajni.c] [error] %1 is not a valid Win32 application. [2006-02-27 11:37:46] [924 prunsrv.c] [error] Failed creating java D:\jdk1.5.0_06\jre\bin\server\jvm.dll [2006-02-27 11:37:47] [1179 prunsrv.c] [error] ServiceStart returned 1 [2006-02-27 11:37:47] [info] Run service finished. [2006-02-27 11:37:47] [info] Procrun finished. Thanks, Matt Hill This message contains information from Banco Cuscatlan Guatemala, which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please disregard it.
Cluster-Deployed application: Tomcat admin: javax.management.AttributeNotFoundException: Cannot find attribute className
On a non- FarmWarDeployer'd cluster, my tomcat adminstrator has my context Tomcat Server Service (Catalina) Host (localhost) Context (/) Resources Data Sources ... And I can change my data sources. Due to my previously posted problem deploying the ROOT.war (/) application using the FarmWarDeployer, I have opted to deploy a named war and use Apache rewrite rules to map it to /. When I deploy in this manner, expanding the Host node in the Tomcat admin reveals the admin application itself, but also produces the exception below. This renders it impossible to modify my datasources in production (well, using the UI it does). This sounds like a bug to me -- has anyone else seen this? Tim == catalina.out == javax.management.AttributeNotFoundException: Cannot find attribute className at org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:3 06) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.getAttribute(DynamicMetaDataImpl .java:96) at com.sun.jmx.mbeanserver.MetaDataImpl.getAttribute(MetaDataImpl.java:181) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMB eanServerInterceptor.java:638) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:659) at org.apache.webapp.admin.Lists.getValves(Lists.java:401) at org.apache.webapp.admin.Lists.getValves(Lists.java:452) at org.apache.webapp.admin.TomcatTreeBuilder.getValves(TomcatTreeBuilder.java:4 62) at org.apache.webapp.admin.TomcatTreeBuilder.getContexts(TomcatTreeBuilder.java :310) at org.apache.webapp.admin.TomcatTreeBuilder.getHosts(TomcatTreeBuilder.java:26 3) at org.apache.webapp.admin.TomcatTreeBuilder.getServices(TomcatTreeBuilder.java :185) at org.apache.webapp.admin.TomcatTreeBuilder.getServers(TomcatTreeBuilder.java: 144) at org.apache.webapp.admin.TomcatTreeBuilder.buildTree(TomcatTreeBuilder.java:1 01) at org.apache.webapp.admin.SetUpTreeAction.execute(SetUpTreeAction.java:125) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.webapp.admin.filters.SetCharacterEncodingFilter.doFilter(SetChara cterEncodingFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:514) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.jav a:247) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC onnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo rkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Thread.java:595) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.27 and java sdk
I was wondering what version of the java sdk I should use with tomcat 5.0.27. I am currently using sdk 1.4.1_04b05 and it seems that Tomcat goes down once a day. I was wondering if sdk 1.4.1.11 might run better. Thanks.
Re: Tomcat 5.0.27 and java sdk
Reis, Tom wrote: I was wondering what version of the java sdk I should use with tomcat 5.0.27. I am currently using sdk 1.4.1_04b05 and it seems that Tomcat goes down once a day. I was wondering if sdk 1.4.1.11 might run better. Thanks. I'd go all the way to the latest 1.4.2.x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with httpservletrequest.getRemoteAddr() returns wrong IPaddress in multihomed machine
manikandan mvk wrote: I have a machine with multihomed interface . basically , I am making call where both the server and client are same machine . Here , I am trying to validate the IPaddress from the request with InetAddress.getLocalHost () . Since ,both the client and server are same machine . I expects httpservletrequest.getRemoteAddr() should be equals InetAddress.getLocalHost().getHostAddress();But Its not the case .. i.e ; In my multihomed machine : IPaddress of interface hme0 is : x.x.x.17 and IPaddress of interface hme0:1 is :x.x.x.18 Hostname of the machine is mapped to x.x.x.18 . Here , request.getRemoteAddr() returns x.x.x.17 ,whereas netAddress.getLocalHost().getHostAddress() returns x.x.x.18 . I feels request.getRemoteAddr() should also return x.x.x.18 . request#getRemotesAddr() should return the address the request was made from. Which address does your client use to send the request from? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PLease
Hi all, I getting the following error please help me resolve this error. Apr 6, 2006 1:52:39 PM org.apache.commons.modeler.Registry registerComponent SEVERE: Error registering Catalina:type=RequestProcessor,worker=http-8080,name=H ttpRequest2 java.security.AccessControlException: Access denied (javax.management.MBeanTrust Permission register): MBean class org.apache.commons.modeler.BaseModelMBean is n ot trusted for registration at mx4j.server.interceptor.SecurityMBeanServerInterceptor.checkTrustRegi stration(SecurityMBeanServerInterceptor.java:161) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(S ecurityMBeanServerInterceptor.java:121) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(De faultMBeanServerInterceptor.java(Compiled Code)) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(De faultMBeanServerInterceptor.java(Compiled Code)) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.regi stration(ContextClassLoaderMBeanServerInterceptor.java:159) at mx4j.server.MX4JMBeanServer.registerImpl(MX4JMBeanServer.java:822) at mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:76 9) at mx4j.server.MX4JMBeanServer.registerMBean(MX4JMBeanServer.java:753) at org.apache.commons.modeler.Registry.registerComponent(Registry.java:8 71) at org.apache.coyote.http11.Http11Protocol$JmxHttp11ConnectionHandler.in it(Http11Protocol.java:147) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.getInitData(Lea derFollowerWorkerThread.java:48) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:673) at java.lang.Thread.run(Thread.java:568) Apr 6, 2006 1:52:39 PM org.apache.coyote.http11.Http11Protocol$JmxHttp11Connecti onHandler init WARNING: Error registering request Thanks, Vikas NAGPAL. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Global Resource Bundles in Tomcat
I was able to use Tim Lucia's suggestion and get Resource Bundles working. Can any one provide any ideas/leads on how to use this resource bundle globally within any application within Tomcat? Thank you.
Re: Diagnosing DBCP JDBC connection leak using removeAbandoned parm
Richard Mixon wrote: Marc, Thank you - We are using a recent version of the MySQL Connector/J (3.1.10), but maybe that does not mean anything. - Richard Hmm thats not very recent. I know of 2 bugs since then that have bitten me. 3.1.13 should be brewing and that would be the first release to resolve both. I have not read the details of your problem but around 12 months ago I had a problem with connection pooling and MySQL driver, in that the connection pool wasn't working. The connection pooler did not take already open connections from out the pool first before opening new connections (it did this to the point of creating 100+ connections during simple testing where a single http client ran at a time). Also during a web-app restart those already open connections in the pool were never reclaimed and remained open between the JVM and MySQL server. I never got to the bottom of the problem, I just upgraded everything and added some utility functions to my contextDestroyed() web-app lifecycle method. Maybe useful links for this: http://forum.hibernate.org/viewtopic.php?t=935948start=150 HTH -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
catalina problem
Hi all, I getting the following error please help me resolve this error. Apr 6, 2006 1:52:39 PM org.apache.commons.modeler.Registry registerComponent SEVERE: Error registering Catalina:type=RequestProcessor,worker=http-8080,name=H ttpRequest2 java.security.AccessControlException: Access denied (javax.management.MBeanTrust Permission register): MBean class org.apache.commons.modeler.BaseModelMBean is n ot trusted for registration at mx4j.server.interceptor.SecurityMBeanServerInterceptor.checkTrustRegi stration(SecurityMBeanServerInterceptor.java:161) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(S ecurityMBeanServerInterceptor.java:121) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(De faultMBeanServerInterceptor.java(Compiled Code)) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(De faultMBeanServerInterceptor.java(Compiled Code)) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.regi stration(ContextClassLoaderMBeanServerInterceptor.java:159) at mx4j.server.MX4JMBeanServer.registerImpl(MX4JMBeanServer.java:822) at mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:76 9) at mx4j.server.MX4JMBeanServer.registerMBean(MX4JMBeanServer.java:753) at org.apache.commons.modeler.Registry.registerComponent(Registry.java:8 71) at org.apache.coyote.http11.Http11Protocol$JmxHttp11ConnectionHandler.in it(Http11Protocol.java:147) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.getInitData(Lea derFollowerWorkerThread.java:48) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:673) at java.lang.Thread.run(Thread.java:568) Apr 6, 2006 1:52:39 PM org.apache.coyote.http11.Http11Protocol$JmxHttp11Connecti onHandler init WARNING: Error registering request Thanks, Vikas NAGPAL. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat send ThreadDeath to one of it's own Threads
David Delbecq wrote: I experienced a strange behaviour of tomcat a few minutes ago. Container is configured to do webapp auto reloading when classes changes. I updated a few WEB-INF/classes/*.properties. Tomcat decided it's time to reload the webapp because classes did change. However, it killed it's own webapp loader Thread using a ThreadDeath. As a result, the webapp is not accessible anymore. I suppose it's a bug from the webapp reloader, but before submission to bug tracker, i'd appreciate comments. The result of this problem is 1) webapp does not exist anymore (404 while trying to access it) 2) webapp is marqued in manager as not started, but trying to start it result in an 'already started' error 3) you must either restart tomcat, either undeploy/redploy the webapp to get it back working I have also experienced behavior similar to what you describe. I have been able to categorize a few distinct variants. First of all, can you reliably re-create the variant you have just witnessed ? For some reason that I don't understand the container chooses to use a logger instance that is loaded through the WebappClassLoader for its own purposes. Maybe this is mandated in specifications, maybe this is so that a web-app has some control internally over context related logging events the container generates. But in my own testing if the container sticks with its own logger instance (not loaded via WebappClassLoader) then it remain inert to (mis)configuration effects the web-app chooses to make. I believe the variant you witnessed can be reduced into a simple situation where the web-application might reconfigure its logger instance (which it rightfully believes its own to do so) in such a way to cause problems to the container when it tries to use it later. This problem shows up in a future container logging event. In your case I think org.apache.catalina.core.StandardWrapper#loadServlet() made an innocent call to log.error(). Unfortunately this resulted in an exception being thrown. This does not have to be a ThreadDeath exception, it could be almost any Throwable, the root problem here is that TC expects its logger to never throw an exception no matter what and in some ways a best-effort logger should behave this way. One solution could be to wrap all foreign logger instance usage inside the container to catch and eat both Exceptions, Errors (aka Throwables). Or make sure the container's internal code never calls a foreign logger, i.e. keep the well configured on that the JVM or StandardClassLoader seems to have. Back to your situation. Then unfortunately TC was executing inside internal code at the time. Then unfortunately the Thread of execution for org.apache.catalina.core.StandardContext#loadOnStartup() in version 5.5.16 and older was not adequately protected against exceptions occurring in the moment your stack trace show so the threads assigned class loader got hosed. So even if it could have recovered its remaining execution would have been with the wrong class loader. Remy has committed a couple of patches a week or so ago, which would address some of these matters for this particular variant, maybe the background threads now survives to be invoked again, maybe the thread classloader assignment is protected. For me this is a major problem during development, where an integrated IDE is modifying the file layout from under the container, this the situation I am continuously getting stung in, maybe in the future some guidelines and improvements could be made to allow more seamless development in this way (even with major performance loss or complexity to achieve) such a solution would result in even greater web-app development speeds and much less headache. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: W3C Extended Log Format
Have you tried here: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html It has common and combined, and all the primitives -- perhaps you can combine the primitives to form what you need? Tim -Original Message- From: Bernie Durfee [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 5:27 PM To: Tomcat Users List Subject: W3C Extended Log Format Is there a way to have Tomcat 5.5 output access logs in W3C Extended Log Format? I'm specifically trying to get elapsed request time into the log, in a standard way, so that I can pick the value up in WebTrends 7. It seems like the W3C format is the only way that it can get into the log and be picked up by WebTrends. Any ideas? Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deployer does not support multi-level context path (was RE: Major bug in deployer!!)
Seems that many people have been asking how to use Tomcat deployer to deploy a war to a context that contains multi-level path (like /subdir/myapp or /foo/bar/myapp instead of simple /myapp). After spending a day trying this and that, searching through the mail archive, I found that this feature is not implemented and the corresponding bug request has been marked as WONT FIX in March 2005. See http://issues.apache.org/bugzilla/show_bug.cgi?id=34057 http://issues.apache.org/bugzilla/show_bug.cgi?id=35035 Seems that you can deploy an application to a multi-level context manually by copying context.xml file into $CATALINA_BASE/conf/Catalina/localhost/subdir#myapp.xml and copying the application files into $CATALINA_BASE/webapps/subdir/myapp/. Why can't the deployer do the just that? Did anyone find a workaround? Thanks ps. In any case, this message is just to summarize the response by apache developer Remy Maucherat [EMAIL PROTECTED], since none of the discussions on the user mailing list were answered conclusively. Hopefully a note can be added to the deployer reference manual. -- Nicholas Sushkin, Senior Software Engineer Open Finance, Chelsea Piers Pier 62 Suite 316, New York NY 10011 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: access control
From: Zohar [EMAIL PROTECTED] Date: 2006/04/06 Thu AM 11:46:27 EDT To: Tomcat Users List users@tomcat.apache.org, tomcat-user@jakarta.apache.org Subject: Re: access control Can I grant access to some jsp pages and deny access to others (in the same context)? Yes. I've done it by creating a subdirectory within the webapp and placing those jsps I only want admin users to access inside that folder and adding the security constraint to web.xml. Here's a snippet security-constraint web-resource-collection web-resource-nameUserArea/web-resource-name url-pattern//url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-namestandard_user/role-name role-nameadmin_user/role-name /auth-constraing /security-constrant security-constraint web-resource-collection web-resource-nameAdminArea/web-resource-name url-pattern/admin/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameadmin_user/role-name /auth-constraint /security-constraint There may be a better way, but I was in a hurry - Original Message - From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 06, 2006 17:23 Subject: Re: access control Zohar wrote: I have a few servlets which are deployed to different contexts (each servlet to its own context). One of these servlets acts as an interface to clients, and it forwards the requests from clients to the appropriate servlets. I don't want any of the non-interface servlets to be accessible to clients (but they must still be accessible to the interface servlet). How do I do that? You could, for example, use a Remote Address Filter or a Remote Host Filter for the contexts you don't want to be accessible: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Remote%20Address%20Filter But would you mind to elaborate a little why you put servlets into contexts you don't want to be accessible or why it is neccessary for those non-interface servlets to be servlets at all? Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stopping of tomcat failed.
Hi. Please help me. I'm using apache and tomcat to use Web-based GUI tool on RHEL3.0. The GUI tool has a shell script that starts/stops apache and tomcat. This script with stop option displayed message [FAILED]. It means that stopping of tomcat has been failed. But the tomcat was disappeared in the process list. And re-execution of stop was failed as same as the execution of stop after succeeded-stop. (The messages output to catalina.out is tha same.) Then GUI tool was not used at that time. In the script, all the messages were discarded to /dev/null, and nothing related message was output to /var/log/messages or catalina.out. So, I want to know : 1. Did tomcat stopped clearly ? For example, are there any possibilities that tomcat leave garbage of files ? Restart of tomcat was succeeded. Does it mean that tomcat has stopped clearly ? 2. What kind of error is guessed ? --- #!/bin/sh # # Startup script # # chkconfig: 345 80 15 # description: # ### BEGIN INIT INFO # Provides: test # Required-Start: $network $remote_fs # Required-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description:Start the gui daemon ### END INIT INFO # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_statuscheck and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failedset local and overall rc status to failed # rc_failed num set local and overall rc status to numnum # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status cd / if [ -f /etc/rc.status ]; then . /etc/rc.status fi if [ -f /etc/init.d/functions ]; then . /etc/init.d/functions fi if [ -f /etc/rc.status ]; then # First reset status of this service rc_reset fi case $1 in 'start') echo -n Starting the service if [ -f /etc/init.d/functions ]; then daemon /usr/local/tomcat/bin/startup.sh /opt/FJSVihs/bin/httpd -f /usr/local/apache/conf/httpd.conf 2 /dev/null else /usr/local/tomcat/bin/startup.sh /dev/null /opt/FJSVihs/bin/httpd -f /usr/local/apache/conf/httpd.conf 2 /dev/null fi if [ -f /etc/rc.status ]; then rc_status -v fi if [ -f /etc/init.d/functions ]; then touch /var/lock/subsys/test echo fi ;; 'stop') echo -n Stopping service. kill `cat /usr/local/apache/httpd.pid` if [ -f /etc/init.d/functions ]; then daemon /usr/local/tomcat/bin/shutdown.sh else /usr/local/tomcat/bin/shutdown.sh /dev/null fi if [ -f /etc/rc.status ]; then rc_status -v fi if [ -f /etc/init.d/functions ]; then rm -f /var/lock/subsys/test echo fi ;; 'restart') $0 stop $0 start if [ -f /etc/rc.status ]; then rc_status fi ;; 'status') if [ -f /etc/rc.status ]; then echo -n Checking: if [ -f /usr/local/apache/httpd.pid ]; then rc_failed 0 rc_status -v exit 0 else rc_failed 3 rc_status -v exit 3 fi fi ;; *) echo Usage: $0 {start|stop|restart|status} ;; esac exit 0 Regards Taniguchi -- Open Source Software Database Prj. Middleware Platform Div. Software Unit, Fujitsu Limited Yasunori Taniguchi e-mail : [EMAIL PROTECTED] office layout was changed in 26th Sep., and phone number was changed phone:+81-78-304-0563 ext.:7773-5431 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: W3C Extended Log Format
Look at class o.a.c.valves.ExtendedAccessLogValve at the Source Distribution. This AccessLogger is currently not documented :-( You can configured this Logger conform to the http://www.w3.org/TR/WD-logfile.htm spec. Regards Peter Am 06.04.2006 um 23:26 schrieb Bernie Durfee: Is there a way to have Tomcat 5.5 output access logs in W3C Extended Log Format? I'm specifically trying to get elapsed request time into the log, in a standard way, so that I can pick the value up in WebTrends 7. It seems like the W3C format is the only way that it can get into the log and be picked up by WebTrends. Any ideas? Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]