Strange behavior of Tooltip when used with JComponent with in Applet
I have a problem with a JComboBox placed in an applet which is having a ToolTip text set on it. While moving the mouse over the ComboBox I am getting the following error stack in the Java Console. java.lang.Error: Destination component not connected to component tree hierarchy at javax.swing.SwingUtilities.convertPoint(Unknown Source) at javax.swing.ToolTipManager.mouseExited(Unknown Source) at java.awt.AWTEventMulticaster.mouseExited(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source This is not happening regularly. Is it a bug with Java? JDK used: J2SDK 1.4.2_02 Servlet Engine: Tomcat 4.1.29 Web Server: Apache 2.0.43 Please help me out with your suggestions / comments. Thanks in Advance. Ajith Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
realm in context in war file
Has any of you tried defining a realm inside the context.xml taken form META-INF file from inside the war file? I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context but the realm definition is simply ignored by tomcat. Any idea why? Thanks in advance, Michal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Automatic redeploy based on web.xml contents
I'm using Tomcat 5.5.9 with Tapestry and Spring. Given my usage of Spring, I've found that I need to reload my project on occasion to pick up new XML configurations. To this point, I've accomplished this by writing a simple Ant script that simply touches my web.xml file. The file update triggers Tomcat to reload my project. However, after doing some JNDI / JDBC setup in my server.xml, my update-the-web.xml-file method of reloading my project quit working. It still works when I manually reload the project through the Tomcat Manager, though. I back-tracked far enough to find that the mere presence of the Context node pointing to my web application causes the reload to stop working - even when I have reloadable=true set on my Context node. I remove that context node pointing to my web app, and the reloading starts working again when I touch my web.xml file. Can anyone fill me in on why this is so? Is there a setting whose default is getting wiped out when I use the Context node in the server.xml file for my web app? Am I doing something wrong to cause this behavior? Is there something far more sinister going on here? :) Thanks, Paul Kimbrel
Cannot build Tomcat 5.5 using Ant
Hello, when I tried to build Tomcat 5.5 using Ant 1.6.2 and the packaged build-file, an error occurred telling, that Ant was unable to expand file.zip and that there has been an error in the build-file. I have tried several versions of Tomcat 5.5, but it does not work. Anyone having the same problems?
Java 1.4.2_08 and up breaks Jstl
Hi All I have found a Bug in Java 1.4.2_08 and Java 1.4.2_09. Goto this address to read about it: http://forum.java.sun.com/thread.jspa?threadID=599301tstart=0 The new versions will break your jstl code and create errors in the log and create blank pages. I have tried a new Tomcat version, no luck. I had it running on another server but that server is running on Java 1.4.2_05. So just a tip. Dont install Java 1.4.2_08 or higher. It will kill your application if your using jstl. Martyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support for this type of problem, but I am unsure who would be best to help with this. Without further help, I will have to sideline the upgrade to 5.5, until there is more info out there for the connecting using JNDI with a MS SQL Server example. In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. This is one of the things that makes the Tomcat offering lacking somewhat in maturity. It seems to me it is relatively easy to get the basic JSP / Servlet stuff up and running in no time, but it has always been a hassle to get JNDI to work in Tomcat. The Tomcat folks provide MySQL and an Oracle example but they need to provide examples for MS SQL Server, DB2 and Sybase. Thanks for your help though - as it may have worked... :-) Best Regards, Ian Ian Wylie Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 14:56 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 4:37 AM To: tomcat-user@jakarta.apache.org Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _ - 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: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
Hi, Can you please send more information, such as error messages, stdout logging and the configuration for your pool. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:28 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support for this type of problem, but I am unsure who would be best to help with this. Without further help, I will have to sideline the upgrade to 5.5, until there is more info out there for the connecting using JNDI with a MS SQL Server example. In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. This is one of the things that makes the Tomcat offering lacking somewhat in maturity. It seems to me it is relatively easy to get the basic JSP / Servlet stuff up and running in no time, but it has always been a hassle to get JNDI to work in Tomcat. The Tomcat folks provide MySQL and an Oracle example but they need to provide examples for MS SQL Server, DB2 and Sybase. Thanks for your help though - as it may have worked... :-) Best Regards, Ian Ian Wylie Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 14:56 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 4:37 AM To: tomcat-user@jakarta.apache.org Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _ - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does Tomcat 5 support mod_JK?
Hi, I am trying load balancing with Tomcat 5, fornted with Apache's mod_jk connector. It is always the local one that serves my request. Cannot get my remote Tomcat to serve any. http://localhost/jkstatus also gives a error page Have workers.properties and all configured but ... Doing a search on google found Tomcat + mod_JK documentation take me to Tomcat 4.0.1 docs (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html) Tomcat 5 docs has almost nothing on mod_JK (The page http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/jk.html is NON existant) Am I trying in vain. DOES TOMCAT 5.x.xx support mod_JK or vice versa. I am using Tomcat 5.0.28 and mod_JK binary - mod_jk-1.2.14-apache-2.0.54.so OS: Windows XP any clues will be appreciated. thx g1 _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data push
Paul Wallace wrote: Thanks Len, And what of other protocols? Are sockets then required? What are some other protocols that might be used to push/pull data? (off Tomcat I know ;)) Paul. I'm interested in the answer to this too. What terms do I stick into google to find generic socket based communication systems between isolated JVMs ? Protocols, Frameworks, something that will slot in with TC but not as raw as HTTP I want the API to be a POJO as possible but with a open / setup / work / close cycle. Idealy I'm really after a multiplexing (read as single socket) messaging framework that can deliver command / event like objects to a remote JVM for processing then return the appropiate reponse object and have multiple events outstanding all in different states with any sized payload. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian === JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport.java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) 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.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) 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:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:744) 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(Unknown Source) 10-Aug-2005 15:30:09 org.apache.catalina.core.ApplicationContext log ERROR MESSAGE END = -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:38 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, Can you please send more information, such as error messages, stdout logging and the configuration for your pool. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:28 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processConne ction(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT cpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le aderFollowerWo rkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:684) at java.lang.Thread.run(Unknown Source) 10-Aug-2005 15:30:09 org.apache.catalina.core.ApplicationContext log ERROR MESSAGE END = -Original Message-
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processConne ction(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT cpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
Hi, A) First, can you clarify which method you have opted for now of; 1. TOMCAT_HOME/webapps/webappname/META-INF/context.xml or 2. TOMCAT_HOME/conf/Catalina/localhost/webappname.xml B) Ensure your database JAR(s) are in TOMCAT_HOME/common/lib (not in your webapp lib). C) Try something simpler ... DataSource dataSource = null; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); } catch (NamingException nE) { log.error(nE.getMessage()); } catch (NullPointerException npE) { log.error(npE.getMessage()); } Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 12:02 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173) at
Re: Cannot build Tomcat 5.5 using Ant
Hello to all, I have made one simple Intranet in my home and i'm using Apache Tomacat as a server. I have my all jsp pages and index.html inside Webbapps/test/ What i want to do is access to intarnet with my others computers. I configure in hosts (on System32) with the IP of my Server machine. 192.168.0.1 with the name intranet, but when i write intranet inside my browser only appears the tomcat webPage, and i want automatically go to intranet/test/index.html writing intranet.. inside my web.xml i have welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list but my problem is the redirection to intranet/test after that automatacally goes to index.html Sorry for my english (I'm Portuguese)I hope have been understood, any help? Thanks in advanced, Nuno __ Email gratuito com 2 000 MB Espaço para guardar as memórias de uma vida http://www.portugalmail.pt/2000mb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java 1.4.2_08 and up breaks Jstl
Hi, I'm not convinced by that forum thread. It's very hard to believe that there is such a severe bug in Java 1.4.2_06 *that isn't fixed yet* Do you have a link to a Sun Bugparade entry describing the problem? Christoph Martyn Hiemstra wrote: Hi All I have found a Bug in Java 1.4.2_08 and Java 1.4.2_09. Goto this address to read about it: http://forum.java.sun.com/thread.jspa?threadID=599301tstart=0 The new versions will break your jstl code and create errors in the log and create blank pages. I have tried a new Tomcat version, no luck. I had it running on another server but that server is running on Java 1.4.2_05. So just a tip. Dont install Java 1.4.2_08 or higher. It will kill your application if your using jstl. Martyn - 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: Strange behavior of Tooltip when used with JComponent with in Applet
This doesn't sound like a tomcat question--or am I missing something? Brian [EMAIL PROTECTED] wrote: I have a problem with a JComboBox placed in an applet which is having a ToolTip text set on it. While moving the mouse over the ComboBox I am getting the following error stack in the Java Console. java.lang.Error: Destination component not connected to component tree hierarchy at javax.swing.SwingUtilities.convertPoint(Unknown Source) at javax.swing.ToolTipManager.mouseExited(Unknown Source) at java.awt.AWTEventMulticaster.mouseExited(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source This is not happening regularly. Is it a bug with Java? JDK used: J2SDK 1.4.2_02 Servlet Engine: Tomcat 4.1.29 Web Server: Apache 2.0.43 Please help me out with your suggestions / comments. Thanks in Advance. Ajith Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
From: Wylie, Ian [mailto:[EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. Question: How much have YOU contributed to Tomcat? The people that work on it are all volunteers, donating their time, energy, and skills to the project. It seems a bit presumptious for any of us non-contributors to tell volunteers what they should be doing. Asking would be appropriate, but in this particular instance, the number of database variations extant makes that extremely difficult. Once you do get the configuration working, submitting a doc update with your findings would certainly be appreciated. - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: realm in context in war file
From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: realm in context in war file
I've sorted it out: the problem was in the syntax! I was using context instead of Context, and tomcat (5.0.28) simply ignored it without writing any error message. But thanks for the tip for 5.5 - I'm going to migrate soon, so it will be useful. Michal. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:03 PM To: Tomcat Users List Subject: RE: realm in context in war file From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 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: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?
And the other thing is, the link I gave you is for a setup that works - I know so because I am using it right now and I figured it out last week. So while you may not have it running on your system, that is not due to lack of how to do it being documented. - dave David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 7:40 AM To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? From: Wylie, Ian [mailto:[EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. Question: How much have YOU contributed to Tomcat? The people that work on it are all volunteers, donating their time, energy, and skills to the project. It seems a bit presumptious for any of us non-contributors to tell volunteers what they should be doing. Asking would be appropriate, but in this particular instance, the number of database variations extant makes that extremely difficult. Once you do get the configuration working, submitting a doc update with your findings would certainly be appreciated. - 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 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]
tomcat and active directory
Has any of you managed to configure tomcat JNDIRealm to talk to Active Directory? I'm having a hard time setting it up and my wild guess is that the JNDIRealm does not support SASL mechanism. Here's my config: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://cern.ch; userBase=OU=Organic Units,DC=cern,DC=ch userSearch=(userPrincipalName={0}) userRoleName=memberOf / my error message: 2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm authenticate SEVERE: Exception performing authentication javax.naming.NamingException: [LDAP: error code 1 - : LdapErr: DSID-0C09 0627, comment: In order to perform this operation a successful bind must be comp leted on the connection., data 0, vece ]; remaining name 'OU=Organic Units,DC=ce rn,DC=ch' At the same time, I can connect to Active Directory with the same settings using ldapsearch: ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w my_password -b 'OU=Organic Units,DC=cern,DC=ch' [EMAIL PROTECTED] Any ideas? Thanks in advance, Michal. -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:06 PM To: Tomcat Users List Subject: RE: realm in context in war file I've sorted it out: the problem was in the syntax! I was using context instead of Context, and tomcat (5.0.28) simply ignored it without writing any error message. But thanks for the tip for 5.5 - I'm going to migrate soon, so it will be useful. Michal. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:03 PM To: Tomcat Users List Subject: RE: realm in context in war file From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 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]
adding mime-type
Hello, I have added a mimetype for the crt-extension to the $CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted tomcat. However, when I open the crt-file, it is still presented as a text-file. Any idea why this is? Am I doing something wrong? Do I need to do additional steps? I'm using tomcat 5.5.9. greetings and thanks, Michel Brabants - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Max thread/session timeouts
Peddireddy, how about your project? I have finally found a solution here ;-) If the database handles requests faster, the load on my Tomcat(s) are lower, because of the lower count of active threads. This does not resolve the problem induced by the apparent connection limit on Windows 2003 Standard Edition, especially in peak situations with ~3000 active Threads. I've got the computing centre to install Red Hat Enterprise 4 on one of the servers and voila, the errors are gone! Admittedly, it seems that Linux is a bit slower when getting into a high thread count, it's sufficiently fast for my project. Also, it seems faster on low thread counts (500). A simple servlet building a XML tree (without any database access or other 3rd party access) runs about 30% faster on Linux than on Windows on the same machine. I think the slower response of Linux with high thread counts is induced by a slower thread handling. An engineer from Red Hat will try to optimize that tomorrow.. -- Michael On Fri, Jul 22, 2005 at 11:23:24AM +0200, Michael Kleinhenz wrote: Peddireddy, your mail is very informative. we have a very similar set up (4 Xeon processors 3.5 GB Ram and WIn2003 Standard edition) and hardpart is that we cant change this setup and switch to Linux. same problem over here. The computing centre of our client can't provide Linux servers. I'm struggling with this problem for 3 weeks now. I heard about clustering on diferent boxes. Is the process of running multiple tomcats on a single machine will be same?? My experience was that with a single Tomcat on a large machine, you'll never use that box fully. Besides that you can't get the Sun JVM to accept a large amount of threads while giving them enough memory, Tomcat seems to have performance problems with 3000+ threads busy at the same time. The BEA JVM (JRockit) performs better in terms of memory and threads but is slower than the Sun JVM. If you have rather complex database operations performed by your webapp, this will get you into trouble, because if there is a single bottleneck in the whole system, the requests will pile up in the server, it hits its thread limit, and ceases operation. So, I have made good experiences with 4 Tomcats on a 2xXeon with 4GB. The server's load is somewhere between 70% and 100% while running with high load and can handle more concurrent requests than a single Tomcat. You talked about some workarounds using esoteric registry keys, can you eloborate on this or tell me where I can get details about it and the details about limitations placed by windows2003 on a single process in terms of number of threads, memory etc. We use 2003 Standard Edition and get the following limitations: . Windows only provides 2GB memory to all applications running, regardless of how much memory you have. All other memory is used for Windows itself. With a registry key, you can extend this to 3GB. I don't have the key handy, but it can be found in MSDN. . The somewhat larger problem is the crappy TCP stack on Windows. A single Tomcat easily handles 1000 concurrent connections, but if I start 4 Tomcats, I get a WSAENOBUFS error (An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full) at about 3300 concurrent connections. Because each Tomcat runs with his own instance of the JVM, I suppose the problem is Windows, the network or anything else that is used by all Tomcats at the same time. Even worse, after such a crash, there is a 10% chance, the Tomcats not resuming normal operation but crashes completely. . Windows has a default limit of 5000 ephemeral ports that can be used fo outgoing connections. This can be changed with the MaxUserPorts registry key. Also, the TcpTimedWaitDelay key is relevant for network performance. Both are described here: http://msdn.microsoft.com/library/en-us/randz/protocol/tcp_time-wait_delay.asp I'm now really irritated by this problem. I need a capacity of about 15000 concurrent connections for my project. I also have 3 2xXeon servers here, but windows (or anything else) doesn't allow more than ~8000 connections until it dies. -- Michael -- Dipl.-Technoinform. Michael Kleinhenz tarent GmbH . Bahnhofstr. 13 . 53123 Bonn fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25 -- Michael Kleinhenz tarent GmbH . Bahnhofstr. 13 . 53123 Bonn fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding mime-type
If you are calling it though a servlet I believe you will still need the set the MIME type in the HttpResponse object with a call like response.setContentType(text/html); I am not sure how you would do it for a JSP page. Unless you just went for the inelegant option of % response.setContentType(text/html); % You would clearly need to replace text/html with the MIME type you set up already. [EMAIL PROTECTED] wrote: Hello, I have added a mimetype for the crt-extension to the $CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted tomcat. However, when I open the crt-file, it is still presented as a text-file. Any idea why this is? Am I doing something wrong? Do I need to do additional steps? I'm using tomcat 5.5.9. greetings and thanks, Michel Brabants - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding mime-type
What client browser are you using. MS IE can ignore the mime-type presented by the server and make decisions based on its own voodoo. See: http://www.spartanicus.utvinternet.ie/file_extensions_and_mime_types_on_the_web.htm http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/BookofSP1/e5a730ee-a68b-4789-8419-4de4c3c7950d.mspx [EMAIL PROTECTED] wrote: Hello, I have added a mimetype for the crt-extension to the $CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted tomcat. However, when I open the crt-file, it is still presented as a text-file. Any idea why this is? Am I doing something wrong? Do I need to do additional steps? I'm using tomcat 5.5.9. greetings and thanks, Michel Brabants - 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]
Configuring webapps (or, bean access in ServletContext and JSP?)
Hi list! Long time lurker, first time poster. I've been trying to figure out how to do this all day and it's driving me crazy. Any help greatfully accepted! Also, apologies for this being slightly OT -- it's more about J2EE in general than Tomcat. If anyone knows a decent J2EE mailing list they could point me to I'd be very happy, but I couldn't find any after googling for a while, and you folks all seem to know so /much/. I have a webapp that has a single JSP page. The JSP page scrapes data from two remote HTML pages and presents it. This scraping needs to only happen on demand (i.e. when the page is loaded) and at most every NNN seconds (it's a monitoring app and I don't want it to turn into an accidental DoS!) The scraping itself is done by one Bean object for each remote source. These looks a bit like: (Please forgive errors in my code snippets, I'm rewriting them in Gmail's compose box so there might be small syntax problems) === abstract class Scraper() { public abstract void doScrape(); protected URL url; public void setUrl(String url) { this.url = new URL(url); } protected scrapeIfNecessary() { // check a timeout; if we haven't scraped in the last // NNN seconds, then: doScrape(); } } class ScraperOne() { // ideally I'd like a one-arg constructor with the URL in, but I have to // make this class a bean for the JSP page, so no-args it must be public ScraperOne() { super(); } private String dataOne, dataTwo; public void doScrape() { // loads from this.url // puts results in dataOne, dataTwo } public void getDataOne() { scrapeIfNecessary(); return this.dataOne;} public void getDataTwo() { scrapeIfNecessary(); return this.dataTwo;} } // ScraperTwo is similar === Now, up until now, I had lines in the JSP that looked like this: === jsp:useBean id=data1 scope=application class=foo.ScraperOne jsp:setProperty id=data1 name=url value=http://www.foo.com/foo.html/ /jsp:useBean pI got data ${data1.dataOne}. === Now, however, I want to move that URL configuration out of the JSP and into a config file. Thing is, I'm not really sure on how I'm supposed to make a webapp read a configuration file on startup then make that config available to all objects that need it. In the past I've done this with a load-on-startup servlet and a Singleton to store the config, but I know that's a bit of a kludge. After some research and messing about, I've created an implementation of ServletContextListener that can read an XML file, create an instance of my ConfigurationBean class, then put it in the context with: ServletContext.setAttribute(config, myConfigurationBean) My first problem with this is when I use it in my JSP: jsp:useBean id=config scope=application class=foo.ConfigurationBean/ I get this error: === org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 10 in the jsp file: /index.jsp Generated servlet error: /usr/local/jakarta-tomcat-5.0.29/work/Catalina/localhost/foo/index_jsp.java:51: config is already defined in _jspService(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) foo.ConfigurationBean config = null; === It looks like the jsp:useBean tag is trying to declare another application-scoped ConfigurationBean. I would have expected it to read in the one declared in the ServletContextListener instead. What have I misunderstood? My second problem: assuming that I get the ConfigurationBean correctly set up in the JSP, what is the best way to pass the appropriate values through from it into the DataOne scraper? Is it just with a Java snippet in the JSP, or am I missing a trick? Something like this: === jsp:useBean id=data1 scope=application class=foo.ScraperOne % data1.setUrl(config.getDataOneURL()); % !-- or maybe -- % data1.setConfig(config); % === With JSP2 though I thought we would be avoiding Java in JSPs like this... is there a simple way to pass arbitrary values out of an application-level bean and into arbitrary Java classes? Sorry for this rather exhaustingly long post. Again, any suggestions will be very greatfully received. I'm sure this whole configuring webapps thing must be well discussed somewhere but I've been googling, searching JavaWorld, developer.ibm.com, sun.com etc without ever finding a clear, easy do this, then this type guide. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat and active directory
It looks like you are configured for anonymous bind. By default, the AD LDAP implementation does not allow anonymous bind. You have two ways of handling this: 1. Configure your AD tree to allow anonymous bind. Essentially, you will need to create an ACL against the appropriate object (container) in the tree. 2. Create a low powered user that has read access to the directory tree and configure the realm to bind as that user.. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 8:17 AM To: Tomcat Users List Subject: tomcat and active directory Has any of you managed to configure tomcat JNDIRealm to talk to Active Directory? I'm having a hard time setting it up and my wild guess is that the JNDIRealm does not support SASL mechanism. Here's my config: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://cern.ch; userBase=OU=Organic Units,DC=cern,DC=ch userSearch=(userPrincipalName={0}) userRoleName=memberOf / my error message: 2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm authenticate SEVERE: Exception performing authentication javax.naming.NamingException: [LDAP: error code 1 - : LdapErr: DSID-0C09 0627, comment: In order to perform this operation a successful bind must be comp leted on the connection., data 0, vece ]; remaining name 'OU=Organic Units,DC=ce rn,DC=ch' At the same time, I can connect to Active Directory with the same settings using ldapsearch: ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w my_password -b 'OU=Organic Units,DC=cern,DC=ch' [EMAIL PROTECTED] Any ideas? Thanks in advance, Michal. -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:06 PM To: Tomcat Users List Subject: RE: realm in context in war file I've sorted it out: the problem was in the syntax! I was using context instead of Context, and tomcat (5.0.28) simply ignored it without writing any error message. But thanks for the tip for 5.5 - I'm going to migrate soon, so it will be useful. Michal. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:03 PM To: Tomcat Users List Subject: RE: realm in context in war file From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 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]
RE: tomcat and active directory
I have just seen that it works. But I don't understand it: if tomcat uses bind to authenticate the user accessing the webpage, why does it need a different AD user? Isn't it a bug in the realm implementation? Michal. -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 5:27 PM To: 'Tomcat Users List' Subject: RE: tomcat and active directory It looks like you are configured for anonymous bind. By default, the AD LDAP implementation does not allow anonymous bind. You have two ways of handling this: 1. Configure your AD tree to allow anonymous bind. Essentially, you will need to create an ACL against the appropriate object (container) in the tree. 2. Create a low powered user that has read access to the directory tree and configure the realm to bind as that user.. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 8:17 AM To: Tomcat Users List Subject: tomcat and active directory Has any of you managed to configure tomcat JNDIRealm to talk to Active Directory? I'm having a hard time setting it up and my wild guess is that the JNDIRealm does not support SASL mechanism. Here's my config: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://cern.ch; userBase=OU=Organic Units,DC=cern,DC=ch userSearch=(userPrincipalName={0}) userRoleName=memberOf / my error message: 2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm authenticate SEVERE: Exception performing authentication javax.naming.NamingException: [LDAP: error code 1 - : LdapErr: DSID-0C09 0627, comment: In order to perform this operation a successful bind must be comp leted on the connection., data 0, vece ]; remaining name 'OU=Organic Units,DC=ce rn,DC=ch' At the same time, I can connect to Active Directory with the same settings using ldapsearch: ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w my_password -b 'OU=Organic Units,DC=cern,DC=ch' [EMAIL PROTECTED] Any ideas? Thanks in advance, Michal. -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:06 PM To: Tomcat Users List Subject: RE: realm in context in war file I've sorted it out: the problem was in the syntax! I was using context instead of Context, and tomcat (5.0.28) simply ignored it without writing any error message. But thanks for the tip for 5.5 - I'm going to migrate soon, so it will be useful. Michal. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:03 PM To: Tomcat Users List Subject: RE: realm in context in war file From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: JSTL and JSF book recommendations
We're using Tomcat 5.5.9, and I'm looking for good books (or other resources) for learning JSTL and JSF. These will be for a person with a novice-level understanding of Java and Tomcat, so I'd like something that will take him from beginner to intermediate (or better). He'll be learning Java at the same time. Any suggestions you have are appreciated.
Re: OT: JSTL and JSF book recommendations
Starting out, I suggest the Core Servlets and JavaServer Pages by Marty Hall to gain an understanding of the Java EE web technologies. It's about as good of a book as I've seen on any technical subject matter, particularly for a beginner. I still reference it after several years. For JSF I have both the O'Reilly book and the Core JSF books. I wouldn't say one is particularly better than the other, but both need a working knowledge of underlying technologies to make total sense. I have the first editions of them both though, so they are a bit behind the game on the latest and I believe second editions on each are available. I also suggest going here http://forum.java.sun.com/forum.jspa?forumID=427 it's the official JSF forum, you'll get lots of information from it. David Boyer wrote: We're using Tomcat 5.5.9, and I'm looking for good books (or other resources) for learning JSTL and JSF. These will be for a person with a novice-level understanding of Java and Tomcat, so I'd like something that will take him from beginner to intermediate (or better). He'll be learning Java at the same time. Any suggestions you have are appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Knowing the line when the error happen
Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Shall jdom be handled differently?
I have the jdom-1.0.jar in the application library directory, that is WEB-INF/lib, where other jar files are. The jar doesn't seem to be loaded. I get the following error: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type Someone suggests that I need to place the jar file in some place else and create a class path for it. Is it the only solution? Thanks, Vernon Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat and active directory
In order to query the LDAP tree, you have to bind to it. Binding requires that anonymous bind be enabled, or that you bind with a user id and password. This is just how LDAP works. The information that I sent you was information I learned while creating an LDAP authentication module for our software. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 9:30 AM To: Tomcat Users List Subject: RE: tomcat and active directory I have just seen that it works. But I don't understand it: if tomcat uses bind to authenticate the user accessing the webpage, why does it need a different AD user? Isn't it a bug in the realm implementation? Michal. -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 5:27 PM To: 'Tomcat Users List' Subject: RE: tomcat and active directory It looks like you are configured for anonymous bind. By default, the AD LDAP implementation does not allow anonymous bind. You have two ways of handling this: 1. Configure your AD tree to allow anonymous bind. Essentially, you will need to create an ACL against the appropriate object (container) in the tree. 2. Create a low powered user that has read access to the directory tree and configure the realm to bind as that user.. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 8:17 AM To: Tomcat Users List Subject: tomcat and active directory Has any of you managed to configure tomcat JNDIRealm to talk to Active Directory? I'm having a hard time setting it up and my wild guess is that the JNDIRealm does not support SASL mechanism. Here's my config: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://cern.ch; userBase=OU=Organic Units,DC=cern,DC=ch userSearch=(userPrincipalName={0}) userRoleName=memberOf / my error message: 2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm authenticate SEVERE: Exception performing authentication javax.naming.NamingException: [LDAP: error code 1 - : LdapErr: DSID-0C09 0627, comment: In order to perform this operation a successful bind must be comp leted on the connection., data 0, vece ]; remaining name 'OU=Organic Units,DC=ce rn,DC=ch' At the same time, I can connect to Active Directory with the same settings using ldapsearch: ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w my_password -b 'OU=Organic Units,DC=cern,DC=ch' [EMAIL PROTECTED] Any ideas? Thanks in advance, Michal. -Original Message- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:06 PM To: Tomcat Users List Subject: RE: realm in context in war file I've sorted it out: the problem was in the syntax! I was using context instead of Context, and tomcat (5.0.28) simply ignored it without writing any error message. But thanks for the tip for 5.5 - I'm going to migrate soon, so it will be useful. Michal. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:03 PM To: Tomcat Users List Subject: RE: realm in context in war file From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Subject: realm in context in war file I have the following context definition: context path=/test1 override=true docBase=webapps/test1 realm className=org.apache.catalina.realm.MemoryRealm debug= pathname=webapps/test1/META-INF/context-users.xml / /context What level of Tomcat are you using? If it's 5.5, you should not have a path attribute. If you remove the pathname attribute from the realm tag, does authentication function with the default conf/tomcat-users.xml? - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL
Re: Shall jdom be handled differently?
Works for me. Show us the snippet of the jsp with the import statement... Jon Vernon wrote: I have the jdom-1.0.jar in the application library directory, that is WEB-INF/lib, where other jar files are. The jar doesn't seem to be loaded. I get the following error: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type Someone suggests that I need to place the jar file in some place else and create a class path for it. Is it the only solution? Thanks, Vernon Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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: OT: JSTL and JSF book recommendations
JSF In Action and JSTL in Action are both very good. - dave David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Joe Plautz [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 10:31 AM To: Tomcat Users List Subject: Re: OT: JSTL and JSF book recommendations Starting out, I suggest the Core Servlets and JavaServer Pages by Marty Hall to gain an understanding of the Java EE web technologies. It's about as good of a book as I've seen on any technical subject matter, particularly for a beginner. I still reference it after several years. For JSF I have both the O'Reilly book and the Core JSF books. I wouldn't say one is particularly better than the other, but both need a working knowledge of underlying technologies to make total sense. I have the first editions of them both though, so they are a bit behind the game on the latest and I believe second editions on each are available. I also suggest going here http://forum.java.sun.com/forum.jspa?forumID=427 it's the official JSF forum, you'll get lots of information from it. David Boyer wrote: We're using Tomcat 5.5.9, and I'm looking for good books (or other resources) for learning JSTL and JSF. These will be for a person with a novice-level understanding of Java and Tomcat, so I'd like something that will take him from beginner to intermediate (or better). He'll be learning Java at the same time. Any suggestions you have are appreciated. - 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: Knowing the line when the error happen
Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like stdout_20050802.log (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - 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]
Http Refferer
Hi Does anyone know how to get the refferal address from a servlet request I have dumped the header and it does not seem to be there. On apache it was an enviroment variable called HTTP_REFERER (May of had 2 f's) Thanks Oscar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Knowing the line when the error happen
Thanks for answering. That I mean, is this: i get this error message (and it is in the logs, too) C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js p.java:55: not a statement ocsa; I make that error intentionally. I thought that the tomcat say the error is in the line 55 but actually, i put that error in the line number 8 of my JSP file. I know that every jsp is translated into a servelt, but, how i can know the exact line of the JSP file ? -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like stdout_20050802.log (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - 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: OT: JSTL and JSF book recommendations
The spec is actually pretty striaghtforward to read. If you insist reading books other than the spec, I would recommend Sun's Core JSTL, Core JSF or Manning's JSTL in Action. -Original Message- From: Joe Plautz [mailto:[EMAIL PROTECTED] Sent: August 11, 2005 12:31 PM To: Tomcat Users List Subject: Re: OT: JSTL and JSF book recommendations Starting out, I suggest the Core Servlets and JavaServer Pages by Marty Hall to gain an understanding of the Java EE web technologies. It's about as good of a book as I've seen on any technical subject matter, particularly for a beginner. I still reference it after several years. For JSF I have both the O'Reilly book and the Core JSF books. I wouldn't say one is particularly better than the other, but both need a working knowledge of underlying technologies to make total sense. I have the first editions of them both though, so they are a bit behind the game on the latest and I believe second editions on each are available. I also suggest going here http://forum.java.sun.com/forum.jspa?forumID=427 it's the official JSF forum, you'll get lots of information from it. David Boyer wrote: We're using Tomcat 5.5.9, and I'm looking for good books (or other resources) for learning JSTL and JSF. These will be for a person with a novice-level understanding of Java and Tomcat, so I'd like something that will take him from beginner to intermediate (or better). He'll be learning Java at the same time. Any suggestions you have are appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:42fb7c8152591501418128!
Re: Http Refferer
Well String referer = req.getHeader(Referer); Log.say(INTERNALE: referer is [+referer+]); Date d = new Date( ); Log.say(INTERNALE: [+d+] Dumping HTTP header START); Enumeration e = req.getHeaderNames( ); while(e.hasMoreElements()){ String name = (String)e.nextElement(); String value = req.getHeader(name); Log.say(INTERNAL: name [+name+] value [+value+]); } Log.say(INTERNALE: [+d+] Dumping HTTP header END); } Should get the Referer But it gets a null Why would it get a null ? Every page has a referrer. On Thu, 2005-08-11 at 18:14 +0100, Oscar Mechanic wrote: Hi Does anyone know how to get the refferal address from a servlet request I have dumped the header and it does not seem to be there. On apache it was an enviroment variable called HTTP_REFERER (May of had 2 f's) Thanks Oscar - 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: Shall jdom be handled differently?
Hi, Jon, Thank for your quick response. Here is more log messages: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type at com.sun.syndication.io.SyndFeedInput.init(SyndFeedInput.java:21) at com.xxx.web.rss.NewsFeedComponentController.doPerform(NewsFeedComponentController.java:39) ... ERROR org.apache.struts.taglib.tiles.InsertTag.doEndTag:920 - ServletException in '/WEB-INF/jsp/news/content1.jsp': Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type javax.servlet.ServletException: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) at org.apache.jsp.WEB_002dINF.jsp.news.content1_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.news.content1_jsp:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) ... Try to resolve this problem, I have insert an immport statement in the content1.jsp file as %@ page import='org.jdom.*' % That doesn't make any difference. --- Jon Wingfield [EMAIL PROTECTED] wrote: Works for me. Show us the snippet of the jsp with the import statement... Jon Vernon wrote: I have the jdom-1.0.jar in the application library directory, that is WEB-INF/lib, where other jar files are. The jar doesn't seem to be loaded. I get the following error: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type Someone suggests that I need to place the jar file in some place else and create a class path for it. Is it the only solution? Thanks, Vernon Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Knowing the line when the error happen
Ah. Looks like I answered the wrong question. It's a two step process to make a servlet from a .jsp file: first is translate it (make a .jsp into a .java), the next is compile it. When the jsp is made into a servlet it gets all of the stuff added to it that makes it into a real java file (public final class jsp name extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent etc etc). The newly created file is placed into a the work directory: by default, that's something like: {Tomcat Home}/work/Catalina/hostname/context/org/apache/jsp/, which is the file that's referenced in the error above. You'll have to look at the line number in *that* file (line 55 in the java file) and see what code is at that line, then look and see where that code is in the JSP. For example, in the JSP you might see: %= foo.toString() % when in the java file it looks like: out.print( foo.toString() ); It's really the same code, but it just looks different; read the java, and refer back to the JSP and it will probably make sense. One thing that can screw you up and be hard to track down is misplaced parens () or braces {} becuase the compiler matches up the braces in your jsp code with the java code added at translation time and reports seemingly nonsensical errors. Hope this all helps. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Thanks for answering. That I mean, is this: i get this error message (and it is in the logs, too) C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js p.java:55: not a statement ocsa; I make that error intentionally. I thought that the tomcat say the error is in the line 55 but actually, i put that error in the line number 8 of my JSP file. I know that every jsp is translated into a servelt, but, how i can know the exact line of the JSP file ? -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like stdout_20050802.log (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - 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]
Re: Shall jdom be handled differently?
That import statement looks ok but the error is being reported for line 21 in SyndFeedInput. Looking at the code (link below) it's a common or garden import statement. https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/SyndFeedInput.java?rev=1.5view=autocontent-type=text/vnd.viewcvs-markup Not sure what is wrong so I would: 1) Check that the jdom jar is readable, non-corrupt and contains org.jdom.Document 2) Delete the work directory and restart tomcat. 3) Move the jsp out from under WEB-INF (tomcat shouldn't be directly serving pages from under there anyway) to see if that's the problem. 4) Tear hair out. etc, etc Jon Vernon wrote: Hi, Jon, Thank for your quick response. Here is more log messages: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type at com.sun.syndication.io.SyndFeedInput.init(SyndFeedInput.java:21) at com.xxx.web.rss.NewsFeedComponentController.doPerform(NewsFeedComponentController.java:39) ... ERROR org.apache.struts.taglib.tiles.InsertTag.doEndTag:920 - ServletException in '/WEB-INF/jsp/news/content1.jsp': Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type javax.servlet.ServletException: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) at org.apache.jsp.WEB_002dINF.jsp.news.content1_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.news.content1_jsp:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) ... Try to resolve this problem, I have insert an immport statement in the content1.jsp file as %@ page import='org.jdom.*' % That doesn't make any difference. --- Jon Wingfield [EMAIL PROTECTED] wrote: Works for me. Show us the snippet of the jsp with the import statement... Jon Vernon wrote: I have the jdom-1.0.jar in the application library directory, that is WEB-INF/lib, where other jar files are. The jar doesn't seem to be loaded. I get the following error: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/icommunity].[jsp].invoke:704 - Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problems: The import org.jdom cannot be resolved Document cannot be resolved to a type Someone suggests that I need to place the jar file in some place else and create a class path for it. Is it the only solution? Thanks, Vernon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Knowing the line when the error happen
That's the answer, Patrick !!! Thank you very much. -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:56 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Ah. Looks like I answered the wrong question. It's a two step process to make a servlet from a .jsp file: first is translate it (make a .jsp into a .java), the next is compile it. When the jsp is made into a servlet it gets all of the stuff added to it that makes it into a real java file (public final class jsp name extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent etc etc). The newly created file is placed into a the work directory: by default, that's something like: {Tomcat Home}/work/Catalina/hostname/context/org/apache/jsp/, which is the file that's referenced in the error above. You'll have to look at the line number in *that* file (line 55 in the java file) and see what code is at that line, then look and see where that code is in the JSP. For example, in the JSP you might see: %= foo.toString() % when in the java file it looks like: out.print( foo.toString() ); It's really the same code, but it just looks different; read the java, and refer back to the JSP and it will probably make sense. One thing that can screw you up and be hard to track down is misplaced parens () or braces {} becuase the compiler matches up the braces in your jsp code with the java code added at translation time and reports seemingly nonsensical errors. Hope this all helps. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Thanks for answering. That I mean, is this: i get this error message (and it is in the logs, too) C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js p.java:55: not a statement ocsa; I make that error intentionally. I thought that the tomcat say the error is in the line 55 but actually, i put that error in the line number 8 of my JSP file. I know that every jsp is translated into a servelt, but, how i can know the exact line of the JSP file ? -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like stdout_20050802.log (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar [EMAIL PROTECTED] wrote: Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Test Post
Dave Morrow wrote: I am receiving some NDR's when sending to this list. This shouldn't happen. Please forward the NDR including all the headers to [EMAIL PROTECTED] ir directly to [EMAIL PROTECTED] and I will investigate futher. Thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Out of memory
Hello, I am using Tomcat5.0.28. When I try to run my web application, I got this message: exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.OutOfMemoryError How can I solve this problem? I tried to uninstall tomcat5 as service using service.bat remove and tried to reinstall it as service in Windows XP. How can I add option like -xmx512M into service.bat? Or How can I increase the heap size? I added this statement into Catalina.bat set JAVA_OPTS=-Xmx512m. It works. But When I run tomcat5.0 as server it still does not work. Thanks, Yun Yang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Http Refferer
Oscar Mechanic wrote: Why would it get a null ? Every page has a referrer. Are you sure? What if I click on a bookmark or type in the URL manually? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java 1.4.2_08 and up breaks Jstl
Hi Do you have a link to a Sun Bugparade entry describing the problem? No I don't. I have performed a test of my own. I have installed j2sdk 1.4.2_05 and j2sdk 1.4.2_08 and j2sdk 1.4.2_09. I have installed these to the /opt directory. I have my JAVA_HOME pointed to /opt/java. First I point /opt/java to /opt/j2sdk1.4.2_09 and restart tomcat. The bug happens again. I then point /opt/java to /opt/j2sdk1.4.2_08. I restart tomcat and the same bug occures. I then point /opt/j2sdk1.4.2_05 to /opt/java, restart tomcat and BINGO no bug. Apparently versions java 2 sdk 1.4.2_09 and java 2 sdk 1.4.2_08 cause the bug to occure just as in the forum thread. I have tried a different tomcat version but no luck. Any ideas anybody? Maybe a configuration change that has occured in the new java versions? Martyn Hi, I'm not convinced by that forum thread. It's very hard to believe that there is such a severe bug in Java 1.4.2_06 *that isn't fixed yet* Do you have a link to a Sun Bugparade entry describing the problem? Christoph Martyn Hiemstra wrote: Hi All I have found a Bug in Java 1.4.2_08 and Java 1.4.2_09. Goto this address to read about it: http://forum.java.sun.com/thread.jspa?threadID=599301tstart=0 The new versions will break your jstl code and create errors in the log and create blank pages. I have tried a new Tomcat version, no luck. I had it running on another server but that server is running on Java 1.4.2_05. So just a tip. Dont install Java 1.4.2_08 or higher. It will kill your application if your using jstl. Martyn - 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: Http Refferer
Oscar Mechanic wrote: Why would it get a null ? Every page has a referrer. Simply not true -- a page accessed by having the URL hand-typed into a browser's address field has no referer. And PC anti-virus software frequently *blocks* sending a referer header regardless... -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context reloading
I'm having a problem reloading / redeploying one of my web applications using the ant tasks. The target I am trying to run is this and it fails on when stopping the application. target name=redeploy description=Reinstall the existing web application stop url=${url} username=${username} password=${password} path=${path}/ delete dir=${base}/ copy todir=${base} fileset dir=${content.base}/ /copy start url=${url} username=${username} password=${password} path=${path}/ /target The error message given is removeAttribute: Session already invalidated which seems to be exactly the same as this bug http://issues.apache.org/bugzilla/show_bug.cgi?id=30489 Unfortunately I don't have a test case either but I am running tomcat 5.5.9. Three other web applications deployed in the same instance of tomcat can be redeployed with an essentially identical ant target just fine. It is just this one application that fails. Annoyingly when it fails it takes out the tomcat manager as well meaning the whole of tomcat needs to be restarted. Any ideas what might be wrong? TIA Graham - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data push
From: Paul Wallace [EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 6:38 PM Hi and thanks for that, That's the crux of my question! The data (I am unsure of the protocol it is delivered in) is sent at random points in time i.e not from any request. I wish to create particularly the client (server B) that listens for this data. I (mistakenly) mentioned server A to mimic the data pushes. I can write something to fire off data at intermittent times, but I am more interested in how to capture that data, when no request has been made. This is the reason why I first questioned on Sockets. Perhaps I should have been clearer from the off! Yea, that protocol detail is kind of important. As others have said, Tomcat is set up for HTTP requests, and pretty much ONLY HTTP requests. As much as it would be nice to extend GenericServlet to work with ANY protocol, in truth it just doesn't happen and is not really practical. The GenericServlet interface is still pretty heavily tainted by HTTP. If you want to listen to HTTP datastreams, then Tomcat is the hot tip. If not, then you can start with the Jakarta Avalon project (which is basically dead). Avalon was a lower level container designed to be the boiler plate so you can focus on implementing your own protocols. While the actual Avalon project is dead, the current project page shows you how it has forked into several other projects, so you can use that as a starting point to perhaps hunt down a framework to more easily handle your own protocol. Now, to be fair, if you don't have any real VOLUME of data (lots of connections, high load, vs just the occasional chit-chat), you may well be able to write a simple server in just plain Java. A simple server is not difficult, and there are no doubt several examples on the net. Listening to a socket is no longer the rocket science it once was. Just depends on your tolerance for getting it to work vs learning a framework. Finally, if you REALLY want to dig in to the Tomcat internals, you can break it into little pieces and bits and hammer to fit to support your protocol. Also, there's the book How Tomcat Works which is actually a pretty good book if you want to know how to write a network server in Java. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Http Refferer
Yes apologies of coarse you are right but in this scenario It is a link from a different site. On Thu, 2005-08-11 at 14:32 -0400, Charles Meier wrote: Oscar Mechanic wrote: Why would it get a null ? Every page has a referrer. Are you sure? What if I click on a bookmark or type in the URL manually? - 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: Http Refferer
Thanks I will conclude that the REFERER is not a reliable source of info so cannot be used. On Thu, 2005-08-11 at 11:38 -0700, Hassan Schroeder wrote: Oscar Mechanic wrote: Why would it get a null ? Every page has a referrer. Simply not true -- a page accessed by having the URL hand-typed into a browser's address field has no referer. And PC anti-virus software frequently *blocks* sending a referer header regardless... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Security Questions Regarding Tomcat
Hi! I'm hardening a Web Server running Tomcat for a client, but I'm having difficulty in finding information on how to accomplish the following tasks (bored of googling so I decided to ask here): 1. Remove/modify the banner presented by the coyote connector on the server header of an http reply. 2. Limit the HTTP methods available. (I wan't to disable trace, put, delete). Regards! Leandro -- LFM [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Security Questions Regarding Tomcat
The Server header can be configured in the Connector declaration. server='Sun Solaris IIS/6.0' To limit the HTTP methods this can be done a few ways; 1) Use a servlet filter 2) Use web.xml and security constraints on those method types 3) ??? -Tim LFM wrote: Hi! I'm hardening a Web Server running Tomcat for a client, but I'm having difficulty in finding information on how to accomplish the following tasks (bored of googling so I decided to ask here): 1. Remove/modify the banner presented by the coyote connector on the server header of an http reply. 2. Limit the HTTP methods available. (I wan't to disable trace, put, delete). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with sendredirect
Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. I make a web app that uses, in some jsp's files, the command response.sendRedirect. When i execute the pages locally in my computer, works fine, but, i if try to test the pages from another computer, i get an error. This is the way i was executed the sendRedirect for test in another machine, and always get an error: response.sendRedirect(http://localhost:8080/activation/obligatorios.jsp;) response.sendRedirect(http://192.168.1.137:8080/activation/obligatorios.jsp ) response.sendRedirect(http://mycomputer:8080/activation/obligatorios.jsp;) response.sendRedirect(/obligatorios.jsp) response.sendRedirect(activation/obligatorios.jsp) I think that could be some context problems because, for make the webapp structure, i copied one example webapp that comes with the tomcat, then i deleted and renamed those files and directories that i dont use (off course, the web-inf still exist) What can i do ? Is there is some file where i must configure the context of the webapp ? Thanks !! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Security Questions Regarding Tomcat
Tim, Thanks for the reply, but I can't get in working: In conf/server.xml I added server=TEST, as shown: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false server=TEST/ Stopped, started Tomcat. nc'ed to localhost, but still got the old server header. $ nc localhost 8180 GET / HTTP/1.0 HTTP/1.1 302 Moved Temporarily Location: http://localhost.localdomain:8180/index.jsp Content-Length: 0 Date: Thu, 11 Aug 2005 20:15:38 GMT Server: Apache-Coyote/1.1 Connection: close What I'm I doing wrong? Thanks! Leandro On Thu, 2005-08-11 at 15:56 -0400, Tim Funk wrote: The Server header can be configured in the Connector declaration. server='Sun Solaris IIS/6.0' To limit the HTTP methods this can be done a few ways; 1) Use a servlet filter 2) Use web.xml and security constraints on those method types 3) ??? -Tim LFM wrote: Hi! I'm hardening a Web Server running Tomcat for a client, but I'm having difficulty in finding information on how to accomplish the following tasks (bored of googling so I decided to ask here): 1. Remove/modify the banner presented by the coyote connector on the server header of an http reply. 2. Limit the HTTP methods available. (I wan't to disable trace, put, delete). - 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: Security Questions Regarding Tomcat
copied share to meb/robo laters! On 8/11/05, LFM [EMAIL PROTECTED] wrote: Tim, Thanks for the reply, but I can't get in working: In conf/server.xml I added server=TEST, as shown: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false server=TEST/ Stopped, started Tomcat. nc'ed to localhost, but still got the old server header. $ nc localhost 8180 GET / HTTP/1.0 HTTP/1.1 302 Moved Temporarily Location: http://localhost.localdomain:8180/index.jsp Content-Length: 0 Date: Thu, 11 Aug 2005 20:15:38 GMT Server: Apache-Coyote/1.1 Connection: close What I'm I doing wrong? Thanks! Leandro On Thu, 2005-08-11 at 15:56 -0400, Tim Funk wrote: The Server header can be configured in the Connector declaration. server='Sun Solaris IIS/6.0' To limit the HTTP methods this can be done a few ways; 1) Use a servlet filter 2) Use web.xml and security constraints on those method types 3) ??? -Tim LFM wrote: Hi! I'm hardening a Web Server running Tomcat for a client, but I'm having difficulty in finding information on how to accomplish the following tasks (bored of googling so I decided to ask here): 1. Remove/modify the banner presented by the coyote connector on the server header of an http reply. 2. Limit the HTTP methods available. (I wan't to disable trace, put, delete). - 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: Out of memory
On Windows try the tomcat5w binary in the bin directory of tomcat. Hope this helps. Ken - Original Message - From: Yun Yang [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, August 11, 2005 2:31 PM Subject: Out of memory Hello, I am using Tomcat5.0.28. When I try to run my web application, I got this message: exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.OutOfMemoryError How can I solve this problem? I tried to uninstall tomcat5 as service using service.bat remove and tried to reinstall it as service in Windows XP. How can I add option like -xmx512M into service.bat? Or How can I increase the heap size? I added this statement into Catalina.bat set JAVA_OPTS=-Xmx512m. It works. But When I run tomcat5.0 as server it still does not work. Thanks, Yun Yang - 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]
Tomcat authentication with Kerberos
I have a standalone Tomcat 5.0 instance, and a third-party webapp that has support for authentication via LDAP. Of course, we don't have LDAP, we have Kerberos. It should be a simple matter to plug in a different Realm, right? I'm finding it hard to believe that no one has done this (Tomcat authentication with Kerberos) yet, but Google just isn't turning up anything. I started at the Realm HowTo [0] and found the JAASRealm section. From here it looks like I need to write my own LoginModule. Except... there is com.sun.security.auth.module.Krb5LoginModule [1]. Can I just use that? (I thought we weren't supposed to use com.sun.* classes, but it's not as though I can write my *own* Kerberos LoginModule!) After I (somehow) get the user authenticated with Kerberos, then I need to look in a [non-JDBC] database to get the Role information. For User and Role, it looks like I can extend AbstractUser and AbstractRole... but where does the code go that would create instances? In short, I'm confused. Can anyone offer advice on what I need to do to make this work? Or better yet, point to someone who has already done it? Thanks in advance! [0] http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html [1] http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.html -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data push
Darryl, Your remark about POJOs being part of the API prompted me to chime in -- William pretty much gave you the general answer, that Tomcat doesn't seem to be the best way to go for this (because everything is passed via http). I would point out that just as you can serialize/stream objects to disk and read them back again, you can do the same over network sockets -- in fact the code is nearly identical. So you can load up an object with all sorts of instance data on this end, open a socket connection to some other listening server (not tomcat, just a raw listener -- but that's only maybe 100 lines of code) and write(...) the object to the stream, then read it out on the other end. The serializing/deserializing concept of java will automagically reconstitute the object on the receiving end. (Assuming they both have access to the class at runtime). I seem to recall there being a very nice tutorial for java sockets on the sun java website; you could probably work up the basic communication in under an hour. Good Luck, Patrick On 8/11/05, Will Hartung [EMAIL PROTECTED] wrote: From: Paul Wallace [EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 6:38 PM Hi and thanks for that, That's the crux of my question! The data (I am unsure of the protocol it is delivered in) is sent at random points in time i.e not from any request. I wish to create particularly the client (server B) that listens for this data. I (mistakenly) mentioned server A to mimic the data pushes. I can write something to fire off data at intermittent times, but I am more interested in how to capture that data, when no request has been made. This is the reason why I first questioned on Sockets. Perhaps I should have been clearer from the off! Yea, that protocol detail is kind of important. As others have said, Tomcat is set up for HTTP requests, and pretty much ONLY HTTP requests. As much as it would be nice to extend GenericServlet to work with ANY protocol, in truth it just doesn't happen and is not really practical. The GenericServlet interface is still pretty heavily tainted by HTTP. If you want to listen to HTTP datastreams, then Tomcat is the hot tip. If not, then you can start with the Jakarta Avalon project (which is basically dead). Avalon was a lower level container designed to be the boiler plate so you can focus on implementing your own protocols. While the actual Avalon project is dead, the current project page shows you how it has forked into several other projects, so you can use that as a starting point to perhaps hunt down a framework to more easily handle your own protocol. Now, to be fair, if you don't have any real VOLUME of data (lots of connections, high load, vs just the occasional chit-chat), you may well be able to write a simple server in just plain Java. A simple server is not difficult, and there are no doubt several examples on the net. Listening to a socket is no longer the rocket science it once was. Just depends on your tolerance for getting it to work vs learning a framework. Finally, if you REALLY want to dig in to the Tomcat internals, you can break it into little pieces and bits and hammer to fit to support your protocol. Also, there's the book How Tomcat Works which is actually a pretty good book if you want to know how to write a network server in Java. Regards, Will Hartung ([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]
SAX warnings when compiling JSPs using Taglibs - 5.0.30
Hi, I don't know when this started to happen but suddenly those warning messages started to show up every time a JSP page is compiled. Has anyone got these message before, if yes how do we get rid of these? ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to parser for entity [document] ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope this SYSTEM id is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to parser for entity [dtd] ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd Here is a snippet from my tld file : ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd; taglib tlib-version1.0/tlib-version jsp-version1.2/jsp-version short-nameflow_taglib/short-name uri/flow_taglib/uri display-nameflow_taglib/display-name descriptionTaglib to simplify flow2 layout/description /taglib and this is how in load the taglib in the JSPs files: [EMAIL PROTECTED] uri=/WEB-INF/tlds/flow_taglib.tld prefix=flow% Thanks -- Jean-Francois Beaulac [EMAIL PROTECTED]
Tomcat and workers(2).properties files
Greetings, Does Tomcat itself ever use either the workers.properties or the worker2.properties files? My understanding is that these files are just example property files for the Apache2 mod_jk(2) modules and that Tomcat itself never references these files? Is this true? Thank you for your time, Nate __ 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]
HTTP Status 500
I have having problems with a servlet using Tomcat 5.0.25. In my research it appears to be associated with the Invoker. However, when I go through the Environmental and Container Dependencies everything checks out. I have my system set up to run both a Tomcat project and a JBoss project simultaneously. Up until now, I have had no problems with that configuration. The following is the display seen in the browser: * HTTP Status 500 - _ type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class com.ikano.wildblue.web.QueueServlet org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:702) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError: com/ikano/wildblue/Queue java.lang.Class.getDeclaredConstructors0(Native Method) java.lang.Class.privateGetDeclaredConstructors(Class.java:1610) java.lang.Class.getConstructor0(Class.java:1922) java.lang.Class.newInstance0(Class.java:278) java.lang.Class.newInstance(Class.java:261) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:702) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) java.lang.Thread.run(Thread.java:534) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs. _ Apache Tomcat/5.0.25 * Here is the information from the Log file... # 2005-08-11 16:34:48 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2005-08-11 16:34:48 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2005-08-11 16:34:49 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2005-08-11 16:34:49 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2005-08-11 16:35:02 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-11 16:35:02 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-11 16:35:02 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-08-11 16:35:05 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2005-08-11 16:35:05 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2005-08-11 16:36:27 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2005-08-11 16:36:27 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2005-08-11 16:36:28 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2005-08-11 16:36:28 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2005-08-11 16:36:47 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-11 16:36:47 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-11 16:36:47 StandardContext[/jsp-examples]SessionListener:
Re: Security Questions Regarding Tomcat
Setting the server header is a tomcat 5.5 feature. -Tim LFM wrote: Tim, Thanks for the reply, but I can't get in working: In conf/server.xml I added server=TEST, as shown: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false server=TEST/ Stopped, started Tomcat. nc'ed to localhost, but still got the old server header. $ nc localhost 8180 GET / HTTP/1.0 HTTP/1.1 302 Moved Temporarily Location: http://localhost.localdomain:8180/index.jsp Content-Length: 0 Date: Thu, 11 Aug 2005 20:15:38 GMT Server: Apache-Coyote/1.1 Connection: close What I'm I doing wrong? Thanks! Leandro On Thu, 2005-08-11 at 15:56 -0400, Tim Funk wrote: The Server header can be configured in the Connector declaration. server='Sun Solaris IIS/6.0' To limit the HTTP methods this can be done a few ways; 1) Use a servlet filter 2) Use web.xml and security constraints on those method types 3) ??? -Tim LFM wrote: Hi! I'm hardening a Web Server running Tomcat for a client, but I'm having difficulty in finding information on how to accomplish the following tasks (bored of googling so I decided to ask here): 1. Remove/modify the banner presented by the coyote connector on the server header of an http reply. 2. Limit the HTTP methods available. (I wan't to disable trace, put, delete). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and workers(2).properties files
correct. -Tim Nathan Hook wrote: Greetings, Does Tomcat itself ever use either the workers.properties or the worker2.properties files? My understanding is that these files are just example property files for the Apache2 mod_jk(2) modules and that Tomcat itself never references these files? Is this true? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 upgrade + logging problems
Hi. I have searched through archives and online for such solutions for the depreciated Logger element. We have a virtual host setup and requires separate logs for each host. We have followed the instructions such as this: jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html we've put log4j.properties file in each host's WEB-INF/classes folder, and log4j1.2.8.jar into WEB-INF/lib in each host still, nothing seems to work. there must be something we are missing. CONFIGURATION: CATALINA_HOME=/var/tomcat5 TOMCAT_USER=apache JAVA_HOME=/usr/java CATALINA_OPTS=-Xmx1228M -Djava.awt.headless=true java= 1.5.0_03 server.xml CUT Host name=domain.com unpackWARs=true autoDeploy=true appBase=/home/rondelli/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/rondelli-t omcat-users.xml/ Context path= docBase=/home/rondelli/html debug=0/ Aliaswww.domain.com/Alias Context path=/tomcatmanager docBase=/var/tomcat5/server/webapps/manager debug=0 privileged=true/ Logger className=org.apache.catalina.logger.FileLogger prefix=domain.com_log. suffix=.txt directo ry=/home/rondelli timestamp=true/ /Host Host name=domain2.com unpackWARs=true autoDeploy=true appBase=/home/revisionten/html Realm className=org.apache.catalina.realm.MemoryRealm pathname=/var/tomcat5/conf/tomcat-users/revisionte n-tomcat-users.xml/ Context path= docBase=/home/revisionten/html debug=0/ Aliaswww.domain2.com/Alias Context path=/tomcatmanager docBase=/var/tomcat5/server/webapps/manager debug=0 privileged=true/ Logger className=org.apache.catalina.logger.FileLogger prefix=domain2.com_log. suffix=.txt dire ctory=/home/revisionten timestamp=true/ /Host CUT. /usr/java/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLo gManager -Xmx1228M -Djava.awt.headless=true -Djava.endorsed.dirs=/var/tomcat 5/common/endorsed -classpath :/var/tomcat5/bin/bootstrap.jar:/var/tomcat5/bin/commons-logging-api.jar:/us r/java/jre/lib/mysql-connector-java-3.0.15-ga-bin.jar:/var/tomcat5/common/li b/log4j-1.2.8.jar -Dcatalina.base=/var/tomcat5 -Dcatalina.home=/var/tomcat5 -Djava.io.tmpdir=/var/tomcat5/temp org.apache.catalina.startup.Bootstrap start Does anyone have a setup like this and can offer any clues? If you need any further config details, please ask. I hope I gave all necessary. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and workers(2).properties files
Thank you Tim. Nate --- Tim Funk [EMAIL PROTECTED] wrote: correct. -Tim Nathan Hook wrote: Greetings, Does Tomcat itself ever use either the workers.properties or the worker2.properties files? My understanding is that these files are just example property files for the Apache2 mod_jk(2) modules and that Tomcat itself never references these files? Is this true? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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]
serving japanese file problem
i have a ウェブ.jpg (japanese filename) in images directory. while requesting that file url encode to %E3%82%A6%E3%82%A7%E3%83%96.jpg but tomcat doesn't serve ウェブ.jpg instead it says file not found. my question is how to make tomcat to decode %E3%82%A6%E3%82%A7%E3%83%96.jpg as ウェブ.jpg