Re: Fw: POST-Data from Form can not be read-out
If you need multipart/form-data, then you will also need a third-party module to process it (e.g. commons-fileupload: http://jakarta.apache.org/commons/fileupload/). Tomcat won't ever (unless the 2.6 Servlet spec changes things for TC 7.x :) attempt to parse the parameters from an enctype=multipart/form-data. Oliver Enders [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hy Jon, hy Marc, after removing the enctype from the form tag it works fine !!! My problem will be, that in the next implementation step, i´ll need to add an type=file form element to upload a file...and that is only possible with method=post and enctype=multipart/form-data, isnt it ? How are these issues normaly implemented ? Perhaps that is an issue for a jsp mailing list... Thanx in advance Ön -Ursprüngliche Nachricht- Von: Jon Wingfield [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Juni 2006 17:31 An: Tomcat Users List Betreff: Re: Fw: POST-Data from Form can not be read-out What happens when you remove the enctype attribute from your form? The enctype you specified is for binary uploads. Tomcat doesn't automatically parse the http inputstream for parameters for this content type. HTH, Jon Oliver Enders wrote: Browser is IE6.0, here´s the code: % String m = request.getParameter(m); String flf = request.getParameter(flf); String modeDisp = Display; if(flf == null){ flf = 1; } if(m != null){ if(m.equalsIgnoreCase(c)) { modeDisp = Create; } else if (m.equalsIgnoreCase(m)) { modeDisp = Modify; } else if (m.equalsIgnoreCase(d)) { modeDisp = Delete; } else { modeDisp = Display; } } % html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / link rel=stylesheet type=text/css href=inc/eod.css title%=modeDisp% Test Request/title /head body m: %=m%BR flf: %=flf%BR % Enumeration enumeration = request.getParameterNames(); while (enumeration.hasMoreElements()) { String name = (String)enumeration.nextElement(); % Feld: %=name% BR % } % table class=tab1 cellspacing=0 cellpadding=0 tr class=zeile_header td class=standardHeader colspan=3%=modeDisp% Test Request (%=m%)/td /tr % if(flf.equals(1)){ % form name=HandleTR action=HandleTest.jsp method=post enctype=multipart/form-data trtd colspan=3fl input type=submit value=go!/td/tr input type=hidden name=flf value=0 input type=hidden name=m value=%=m% /form % } else { % trtd colspan=3kein fl/td/tr % } % /table /body /html The pages is submitted to itself. flf is used to define two different contents. Thanx in advance Ön - Original Message - From: Marc Farrow [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 07, 2006 4:25 PM Subject: Re: Fw: POST-Data from Form can not be read-out This could be any number of issues from browser bugs on. What browser are you using? Also, can you post the rendered HTML page that is submitting the request to the servlet? On 6/7/06, Oliver Enders [EMAIL PROTECTED] wrote: Hy List, I have a problem concerning submitting form-data by using POST. If I send the form using GET, the content of the form can be read out using: request.getParameter(xyz); If I change to POST, the parameters can not be read out. I´m using am Tomcat 4.1. Any Ideas ? Suggestions ? Thanx in advance Ön -- Marc Farrow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Undeploy task not working
Hi Mark, I went through the link given by you. Also checked for permissions of webapps folder (guess things are fine). The link is for Tomcat 5.5 but I'm working with Tomcat 4.3.1 . The context entry put by tomcat, for app1, when deploying the application is: Context className=org.apache.catalina.core.StandardContext crossContext=false reloadable=false mapperClass=org.apache.catalina.core.StandardContextMapper useNaming=true debug=0 swallowOutput=false privileged=false displayName=app1 wrapperClass=org.apache.catalina.core.StandardWrapper docBase=C:\Program Files\Apache Group\Tomcat 4.1\webapps\app1 cookies=true path=/app1 cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper workDir=work\Standalone\localhost\app1 /Context In addition I just want to mention that I installed Tomcat 5.5 and ran deploy and undeploy targets on it and everything works fine there. But I'm getting the problem only in Tomcat 4.1.3 ... How can this happen? Thank you, Venkatesh --- Mark Thomas [EMAIL PROTECTED] wrote: Marc Farrow wrote: Which still implies a permission problem. On Windows 2000 check the security tab of the webapps folder under Tomcat. Make sure the account that is running Tomcat has permission to delete. The archive set is the file type and doesn't really have much to do with permissions. More likely to be file locking. There are a couple of context settings that might help you work around this. Look at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html and search for antiJARLocking and antiResourceLocking As far as I recall there is an issue with one of the xml parsers that when it accesses resources from a war keeps a lock on the file. This only happens on Windows. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.28 - jsp:useBean causing a jsp error
Summary: Code that worked in Tomcat 4 throws a jsp exception in Tomcat 5.0.28 My Jsp file contains a line: jsp:useBean id=beanListaFvfieldtype class=java.util.List scope=request/ In Tomcat 4 this same line worked. However in Tomcat 5.0.28 it causes this exception: /cms/Back/code/fvlist_init.jsp(10,0) [Thu Jun 08 09:55:07 CEST 2006] org.apache.jasper.JasperException: /cms/Back/code/fvlist_init.jsp(10,0) at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227) at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBod... Anyone knows how can I solve it? Thanks. Angel
Tomcat Manager
action [ *.do ] Processing time: 17146.393 s Max time: 79823 ms Request count: 2469 In My application tomcat used as web server Jboss as AS What is mean by Max time ? IS it the Max time taken by any do request or what ? Please comment -- View this message in context: http://www.nabble.com/Tomcat-Manager-t1754215.html#a4769623 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Random NullPointerException when trying to connect to Datasource
I am using Tomcat 5.5.17. This appwas developed for this version of Tomcat, and worked on it until the morning that day, and has refused since. THere was no migration, though Thanks for the reply. On 6/8/06, Vijaya [EMAIL PROTECTED] wrote: Then I think you are in the same boat as mine. I saw some other post also having trouble to connect to the data base when migrated from tomcat 5.0.28 to 5.0.17. What is your tomcat version? Regards, Vijaya -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Vuyk Sent: Wednesday, June 07, 2006 6:59 PM To: Tomcat Users List Subject: Re: Random NullPointerException when trying to connect to Datasource Thank you for your reply. Unfortunately, no, I did not. I have checked my JSP over a few times, and as far as I can tell, the syntax is correct. Also, this error does not occur only in a specific page - no connection to the databse works, regardless of the page. On 6/7/06, Vijaya [EMAIL PROTECTED] wrote: Did you by chance miss any quotes while correcting the typo of the displayed text? Vijaya -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Vuyk Sent: Wednesday, June 07, 2006 5:38 PM To: users@tomcat.apache.org Subject: Re: Random NullPointerException when trying to connect to Datasource Still wondering if anyone has any thoughts on this. I appreciate any help. Brian On 6/6/06, Brian Vuyk [EMAIL PROTECTED] wrote: I feel compelled to also mention that I have rebooted the system, with still the same effect. On 6/6/06, Brian Vuyk [EMAIL PROTECTED] wrote: Hello. I am currently developing a JSP webapp for my employer, andhave run into a couple of serious problems. Randomly, tomcat seems to be losing it's ability to connect to the mySQL server running on the same server as Tomcat. Scenario: This morning I was using the webapp no problem. I made a small change to correct a typo in some displayed text, and then re-deployed the webapp. Upon attempting to log into the webapp I was unable to connect to the database. I recieved the below error. Steps Taken: I have restarted both Tomcat and mySQL, with no change. I have double checked my source code, and I do not think the issue is with the source itself. I have attempted re-deploying the webapp, including an archived, known good version. The result was the same exception posted above. I can log into the mySQL database from the command-line without any issue at all. Thank you in advance for any help. Brian Vuyk Tomcat error taken from logs -- 2006-06-06 05:06:42 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.lang.NullPointerException at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection (QueryTagSupport.java:276) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Qu eryTagSupport.java:159) at org.apache.jsp.jsp.authenticate_jsp._jspx_meth_sql_query_0(authenticate_ jsp.java:286) at org.apache.jsp.jsp.authenticate_jsp._jspService(authenticate_jsp.java:11 0) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at
Re: Re: HTTPD with Tomcat
Depending on your layout, with httpd 2.2 there should be a subdirectory named extra within the conf directory. Create an httpd-ajp.conf file inside the extra subdirectory. The following example httpd-ajp.conf file assumes mod-proxy-ajp is statically linked. It should get you started... # Example /conf/extra/httpd-ajp.conf Location /your_app_name/ ProxyPass ajp://localhost:8009/your_app_name/ /Location Depending on the location of your conf directory, add an include statement in httpd.conf similar the the following: # AJP - Apache-Tomcat Include /usr/share/apache2/conf/extra/httpd-ajp.conf From: [EMAIL PROTECTED] Date: 2006/06/07 Wed PM 10:36:09 EDT To: Tomcat Users List users@tomcat.apache.org Subject: Re: HTTPD with Tomcat Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.28 - jsp:useBean causing a jsp error
Or even better: change class=.. to type=.. class means: this class can be instantiated type means: This attribute has been set before and should not be instantiated (List cannot anyway because its an interface) Since Tomcat 5 the JSP compiler checks this to reduce runtime errors. Am Donnerstag, 8. Juni 2006 10:57 schrieb Ángel Luis Diez Hernández: Summary: Code that worked in Tomcat 4 throws a jsp exception in Tomcat 5.0.28 My Jsp file contains a line: jsp:useBean id=beanListaFvfieldtype class=java.util.List scope=request/ In Tomcat 4 this same line worked. However in Tomcat 5.0.28 it causes this exception: /cms/Back/code/fvlist_init.jsp(10,0) [Thu Jun 08 09:55:07 CEST 2006] org.apache.jasper.JasperException: /cms/Back/code/fvlist_init.jsp(10,0) at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler .java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:40 9) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:15 0) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1 227) at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBod... Anyone knows how can I solve it? Thanks. Angel - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Problem - JVM Crash
Hello folks, I have great troubles finding the right configuration for our productive system. After initial problems concerning perm space which I have resolved with putting all third party lib into common/lib I still have memory troubles. My system: OS: SUSE ES 9 64 bit RAM: 3 Gig Processor: 2 x Intel Xeon 3,2 GHz JVM: 1.5.0_04-b05 Tomcat: 5.5.9 JAVA_OPTS: -Xmx1900m -Xms256m -XX:MaxPermSize=256m With applications which don't need much memory nothing but more memory intensive ones like the new monitoring tool lambda probe keep crashing the JVM tomcat like this: An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x593cccbe, pid=20234, tid=3858828208 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode) # Problematic frame: # J java.nio.DirectByteBuffer.get(I)B Any ideas? Cheers, Pete - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: POST-Data from Form can not be read-out
Bill's suggestion is the correct one. On 6/8/06, Bill Barker [EMAIL PROTECTED] wrote: If you need multipart/form-data, then you will also need a third-party module to process it (e.g. commons-fileupload: http://jakarta.apache.org/commons/fileupload/). Tomcat won't ever (unless the 2.6 Servlet spec changes things for TC 7.x :) attempt to parse the parameters from an enctype=multipart/form-data. Oliver Enders [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hy Jon, hy Marc, after removing the enctype from the form tag it works fine !!! My problem will be, that in the next implementation step, i´ll need to add an type=file form element to upload a file...and that is only possible with method=post and enctype=multipart/form-data, isnt it ? How are these issues normaly implemented ? Perhaps that is an issue for a jsp mailing list... Thanx in advance Ön -Ursprüngliche Nachricht- Von: Jon Wingfield [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Juni 2006 17:31 An: Tomcat Users List Betreff: Re: Fw: POST-Data from Form can not be read-out What happens when you remove the enctype attribute from your form? The enctype you specified is for binary uploads. Tomcat doesn't automatically parse the http inputstream for parameters for this content type. HTH, Jon Oliver Enders wrote: Browser is IE6.0, here´s the code: % String m = request.getParameter(m); String flf = request.getParameter(flf); String modeDisp = Display; if(flf == null){ flf = 1; } if(m != null){ if(m.equalsIgnoreCase(c)) { modeDisp = Create; } else if (m.equalsIgnoreCase(m)) { modeDisp = Modify; } else if (m.equalsIgnoreCase(d)) { modeDisp = Delete; } else { modeDisp = Display; } } % html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / link rel=stylesheet type=text/css href=inc/eod.css title%=modeDisp% Test Request/title /head body m: %=m%BR flf: %=flf%BR % Enumeration enumeration = request.getParameterNames(); while (enumeration.hasMoreElements()) { String name = (String)enumeration.nextElement(); % Feld: %=name% BR % } % table class=tab1 cellspacing=0 cellpadding=0 tr class=zeile_header td class=standardHeader colspan=3%=modeDisp% Test Request (%=m%)/td /tr % if(flf.equals(1)){ % form name=HandleTR action=HandleTest.jsp method=post enctype=multipart/form-data trtd colspan=3fl input type=submit value=go!/td/tr input type=hidden name=flf value=0 input type=hidden name=m value=%=m% /form % } else { % trtd colspan=3kein fl/td/tr % } % /table /body /html The pages is submitted to itself. flf is used to define two different contents. Thanx in advance Ön - Original Message - From: Marc Farrow [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 07, 2006 4:25 PM Subject: Re: Fw: POST-Data from Form can not be read-out This could be any number of issues from browser bugs on. What browser are you using? Also, can you post the rendered HTML page that is submitting the request to the servlet? On 6/7/06, Oliver Enders [EMAIL PROTECTED] wrote: Hy List, I have a problem concerning submitting form-data by using POST. If I send the form using GET, the content of the form can be read out using: request.getParameter(xyz); If I change to POST, the parameters can not be read out. I´m using am Tomcat 4.1. Any Ideas ? Suggestions ? Thanx in advance Ön -- Marc Farrow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
DataSource problem
Hi all, i have problem with DataSource (JNDI). i'm using tomcat5.5.17. i receive the following message: Name jdbc is not bound in this Context but it functions in tomcat5.0.28 Thanks a lot! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SEVERE: Error reading tld listeners javax.servlet.ServletException. HELP
Have you checked the version of the struts jar files to make sure they are the same level from your old install of tomcat to your new install? It may just be that tomcat 5.5.X expects a certain level of struts. /shrug On 6/7/06, Richard DeGrande [EMAIL PROTECTED] wrote: I've recently upgraded to tomcat 5.5.15. I'm migrating current apps the the new tomcat. I get this error when starting/deploying a specific app. I have one other app deployed, it too uses struts, I have no problems with it. thanks Jun 7, 2006 4:28:51 PM org.apache.catalina.core.StandardContext processTlds SEVERE: Error reading tld listeners javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /paimport javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /paimport at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:547) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:300) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.jav - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: TNS entry JNDI
Please post your stack trace from where the context reference in your code is blowing out. On 6/7/06, Scott Purcell [EMAIL PROTECTED] wrote: I am having trouble connecting. That string does fine using JDBC, but when in the context element below does not connect. Thanks, - Original Message - From: Marc Farrow [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 07, 2006 12:44 PM Subject: Re: TNS entry JNDI Are you having a database connection problem or problem getting the reference from JNDI in your code? On 6/7/06, Scott Purcell [EMAIL PROTECTED] wrote: I am running Tomcat 5.x and have been using Oracle 9i. We are now running Oracle 10g and it only uses TNS names. Here is my context element: The one commented out used to work for 9i, and the other one is for the tns names. I am having trouble finding information about Tomcat and TNS names for connection. Does this look correct? Context reloadable=true path=/new10 Logger className=org.apache.catalina.logger.FileLogger prefix=cpe10g. suffix=.log timestamp=true/ !-- Resource name=jdbc/old auth=Container type=javax.sql.DataSource username=old password=xxx driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@xxxcom:1521:DEV maxActive=8 maxIdle=4/ -- Resource name=jdbc/new auth=Container type=javax.sql.DataSource username=new password=xxx driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP )(HOST=.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxx.com )(SERVER =DEDICATED))) maxActive=8 maxIdle=4/ /Context -- Marc Farrow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagInfo
looks like you have your tag library set up for a certain version of the tag library jars, but the jars are a different version. Check there to start with. On 6/7/06, Dave Kennedy [EMAIL PROTECTED] wrote: The Servlet Exception is displayed running SimpleExample.jsp Any help would be greatly appreciated SET CATALINA_HOME=C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.5.9 SET JAVA_HOME=C:\Program Files\Java\jdk1.5.0_06 http://localhost:8080/stuff09/SimpleExample.jsp javax.servlet.ServletException: javax.servlet.jsp.tagext.TagInfo.init(Ljava/lang/String;Ljava/lang/Str ing;Ljava/lang/String;Ljava/lang/String;Ljavax/servlet/jsp/tagext/TagLib raryInfo;Ljavax/servlet/jsp/tagext/TagExtraInfo;[Ljavax/servlet/jsp/tage xt/TagAttributeInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Strin g;[Ljavax/servlet/jsp/tagext/TagVariableInfo;Z)V org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) root cause java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagInfo.init(Ljava/lang/String;Ljava/lang/Str ing;Ljava/lang/String;Ljava/lang/String;Ljavax/servlet/jsp/tagext/TagLib raryInfo;Ljavax/servlet/jsp/tagext/TagExtraInfo;[Ljavax/servlet/jsp/tage xt/TagAttributeInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Strin g;[Ljavax/servlet/jsp/tagext/TagVariableInfo;Z)V org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryIn foImpl.java:435) org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImp l.java:248) org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl. java:162) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.jav a:211) org.apache.jasper.compiler.ParserController.parse(ParserController.java: 100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) SimpleExample.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN !-- Illustration of very simple JSP custom tag. Taken from Core Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.coreservlets.com/. copy; 2000 Marty Hall; may be freely used or adapted. -- HTML HEAD %@ taglib uri=csajsp-taglib.tld prefix=csajsp % TITLEcsajsp:example //TITLE LINK REL=STYLESHEET HREF=JSP-Styles.css TYPE=text/css /HEAD BODY H1csajsp:example //H1 csajsp:example / /BODY /HTML csajsp-taglib.tld ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd; !-- a tag library descriptor -- taglib !-- after this the default space is http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd; -- tlibversion1.0/tlibversion jspversion1.1/jspversion shortnamecsajsp/shortname !-- ** CHANGED FROM urn TO uri IN TOMCAT 3.1 ** -- uri/uri info A tag library from Core Servlets and JavaServer Pages, http://www.coreservlets.com/. /info !-- tag The name (after prefix) tag will have in JSP code nameexample/name The actual class implementing tag. In Tomcat 3.1 beta, it MUST be in a package. tagclasscoreservlets.tags.ExampleTag/tagclass Descriptive information about tag. infoSimplest example: inserts one line of output/info One of three values describing what goes between start and end tag. empty: no body JSP: body that is evaluated by container normally, then possibly processed by tag tagdependent: body is only processed by tag; JSP in body is not evaluated. ** NOTE: TOMCAT 3.1 FINAL DOES NOT SUPPORT BODYCONTENT ** ** THE BETA SUPPORTED IT, AND IT IS PART OF SPEC, BUT... ** bodycontentempty/bodycontent /tag -- tag nameexample/name tagclasscoreservlets.tags.ExampleTag/tagclass infoSimplest example: inserts one line of output/info !-- TOMCAT 3.1 DOES NOT SUPPORT BODYCONTENT bodycontentempty/bodycontent -- /tag tag namesimplePrime/name tagclasscoreservlets.tags.SimplePrimeTag/tagclass infoOutputs a random 50-digit prime./info !-- TOMCAT 3.1 DOES NOT SUPPORT BODYCONTENT
Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem after migrating to tomcat 5.5.16 from tomcat 5.0.28)
Couple of things. First, I have the JNDI working in Tomcat 5.5.9 without the reference tag in my web.xml. Secondly, can you describe more specifically where you are having the problem. Is it with trying to the the JNDI reference or when you actually try to use the reference or actually trying to use the Connection object return? Posting the stack trace might help, if the problem is in Java code. On 6/8/06, Vijaya [EMAIL PROTECTED] wrote: My web.xml is ?xml version=1.0 encoding=UTF-8? . web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 session-config session-timeout 30 /session-timeout /session-config resource-ref descriptionDB Connection/description res-ref-namejdbc/AYS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.action.ActionServlet /servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list jsp-config taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-menu/taglib-uri taglib-location/WEB-INF/struts-menu.tld/taglib-location /taglib /jsp-config /web-app server.xml is ... ... Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context crossContext=true debug=5 docBase=AtYourService path=/AtYourService reloadable=true Resource auth=Container driverClassName=net.sourceforge.jtds.jdbc.Driver maxActive=100 maxIdle=30 maxWait=1 name=jdbc/AYS password= type=javax.sql.DataSource url=jdbc:jtds:sqlserver://localhost/AtYourService?autoReconnect=true username=sa/ /Context /Host . . Regards, Vijaya -Original Message- From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 6:11 PM To: Tomcat Users List Subject: Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem after migrating to tomcat 5.5.16 from tomcat 5.0.28) It might be helpful to post your web.xml and context.xml (appname.xml or the server.xml if your context tag is still in there). On 6/7/06, Vijaya [EMAIL PROTECTED] wrote: Hi, I am sorry for being vague in my earlier mail. This is the background of my problem. We developed the portal using Tomcat 5.0.28. In this version we connected to the database (SQL Server) without the JNDI lookup. I.e. get the data source from the request object. Also we configured the struts-config.xml to have the db definitions. Everything worked okay till we moved the application to staging server. The staging server has tomcat 5.5.16 and when we deployed the application as it is, we got a 404 error (Servlet action not available). So I downloaded tomcat 5.5.16 in my development machine as a stand-alone tomcat and I deployed the application in my development machine. The 404 error was fixed when I connected to the DB using JNDI lookup (by making changes to server.xml and application web.xml and the action coded to get the data source using the context). However, I am now getting a Nullpointer exception while connecting to database. Jtds is the third party jdbc driver used to connect to the SQL Server. I am totally frustrated with this problem and do not have a clue what could be wrong. Any help is greatly appreciated. Thanks in advance for all help. Regards, Vijaya --- Vijaya [EMAIL PROTECTED] wrote: Hi, I downloaded NetBeans 5,0 and tomcat 5.5.16. I want to connect to a remote SQL Server. I am using jtds. I am not successful in using both NB50 and Tomcat 5.5.16 together. NB5.0 comes with bundled tomcat 5.5.9 and if I use this, I get a '404 error' while accessing the remote sql*server. Can someone help me on this? Is there a problem with NetBeans 5.0? Is there any other IDE can I use? Lastly, is there a tomcat user group in Bangalore, India?
Re: Configure Resource in context.xml does not work as expected
The big question is how you are deploying it. On 6/8/06, Timm Frenzel [EMAIL PROTECTED] wrote: Hello, I want to configure a JDBC-Resource within the Context of my web-app. I placed a Resource-entry and a ResourceParams-entry as child-elements of Context in the META-INF/contxt.xml-file. When I deployed my app (via a file-URL) it gets configured accordingly at first, but the resulting xml-file in conf\Catalina\localhost for the web-app does not contain any child-elements within the Context-Tag any more. So when I need to restart Tomcat my web-app is not configured with the Resource anymore. I also tried to use the override-Attribute, but this does not do any difference. I cannot place the Resource in the server.xml since I have no access to it. So my question is: How can I configure a Resource for a single web-app only without using server.xml ? I'm using Tomcat 5.0.28. Thanks Timm - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: Configure Resource in context.xml does not work as expected
Via Tomcat Manager - File-URL to Location of directory of web-app (I leave the first and second input field empty). Marc Farrow schrieb: The big question is how you are deploying it. On 6/8/06, Timm Frenzel [EMAIL PROTECTED] wrote: Hello, I want to configure a JDBC-Resource within the Context of my web-app. I placed a Resource-entry and a ResourceParams-entry as child-elements of Context in the META-INF/contxt.xml-file. When I deployed my app (via a file-URL) it gets configured accordingly at first, but the resulting xml-file in conf\Catalina\localhost for the web-app does not contain any child-elements within the Context-Tag any more. So when I need to restart Tomcat my web-app is not configured with the Resource anymore. I also tried to use the override-Attribute, but this does not do any difference. I cannot place the Resource in the server.xml since I have no access to it. So my question is: How can I configure a Resource for a single web-app only without using server.xml ? I'm using Tomcat 5.0.28. Thanks Timm - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Problem - JVM Crash
Have you tried a newer jdk? 1.5.07? Leon On 6/8/06, Peter Neu [EMAIL PROTECTED] wrote: Hello folks, I have great troubles finding the right configuration for our productive system. After initial problems concerning perm space which I have resolved with putting all third party lib into common/lib I still have memory troubles. My system: OS: SUSE ES 9 64 bit RAM: 3 Gig Processor: 2 x Intel Xeon 3,2 GHz JVM: 1.5.0_04-b05 Tomcat: 5.5.9 JAVA_OPTS: -Xmx1900m -Xms256m -XX:MaxPermSize=256m With applications which don't need much memory nothing but more memory intensive ones like the new monitoring tool lambda probe keep crashing the JVM tomcat like this: An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x593cccbe, pid=20234, tid=3858828208 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode) # Problematic frame: # J java.nio.DirectByteBuffer.get(I)B Any ideas? Cheers, Pete - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TNS entry JNDI
We are also using Tomcat 5 and Oracle 10g, but we don't have to use tnsnames, just a service name. Your commented out code uses a SID format, and you are trying to use a TNS entry format. Try something like: Resource name='jdbc/diamond9' auth='Container' type='javax.sql.DataSource' driverClassName='oracle.jdbc.OracleDriver' url='jdbc:oracle:thin:@//poseidon.interfast.ca:1521/develop.interf ast.ca' username='tomcat' password='noway' defaultAutoCommit='false' maxActive='10' maxIdle='2' maxWait='1000' minIdle='1' / The syntax for url is jdbc:oracle:thin:@//{hostname or ip}:{listenerPort}/{service name} I also noticed that you are using a deprecated classname for the Oracle Driver. The current class name is oracle.jdbc.OracleDriver (not oracle.jdbc.driver.OracleDriver) FYI: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq_0.htm specifically: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq_0.htm#05_04 and for the classname: http://forums.oracle.com/forums/ann.jspa?annID=201 Actually, looking at the faq, the url in your commented out code should still work. {host}:{port}:{SID}, unless your Listener is now a cluster or something that makes the SID no longer applicable. (Still the TNS names for should still work) I HTH, Brian -Original Message- From: Scott Purcell [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Date: Wed, 7 Jun 2006 12:39:20 -0500 Subject: TNS entry JNDI I am running Tomcat 5.x and have been using Oracle 9i. We are now running Oracle 10g and it only uses TNS names. Here is my context element: The one commented out used to work for 9i, and the other one is for the tns names. I am having trouble finding information about Tomcat and TNS names for connection. Does this look correct? Context reloadable=true path=/new10 Logger className=org.apache.catalina.logger.FileLogger prefix=cpe10g. suffix=.log timestamp=true/ !-- Resource name=jdbc/old auth=Container type=javax.sql.DataSource username=old password=xxx driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@xxxcom:1521:DEV maxActive=8 maxIdle=4/ -- Resource name=jdbc/new auth=Container type=javax.sql.DataSource username=new password=xxx driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TC P )(HOST=.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=xxx.com)(SERVE R =DEDICATED))) maxActive=8 maxIdle=4/ /Context - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Problem - JVM Crash
I'd give it a try. It will cost you 10 minutes to download the 1.5_07 and change the /usr/local/java link. why not? :-) Leon On 6/8/06, Peter Neu [EMAIL PROTECTED] wrote: Do you mean it's a bug in the JVM? -Peter -Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8. Juni 2006 15:23 An: Tomcat Users List Betreff: Re: Memory Problem - JVM Crash Have you tried a newer jdk? 1.5.07? Leon On 6/8/06, Peter Neu [EMAIL PROTECTED] wrote: Hello folks, I have great troubles finding the right configuration for our productive system. After initial problems concerning perm space which I have resolved with putting all third party lib into common/lib I still have memory troubles. My system: OS: SUSE ES 9 64 bit RAM: 3 Gig Processor: 2 x Intel Xeon 3,2 GHz JVM: 1.5.0_04-b05 Tomcat: 5.5.9 JAVA_OPTS: -Xmx1900m -Xms256m -XX:MaxPermSize=256m With applications which don't need much memory nothing but more memory intensive ones like the new monitoring tool lambda probe keep crashing the JVM tomcat like this: An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x593cccbe, pid=20234, tid=3858828208 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode) # Problematic frame: # J java.nio.DirectByteBuffer.get(I)B Any ideas? Cheers, Pete - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SEVERE: Error reading tld listeners javax.servlet.ServletException.
Sorry, I should have included this in my original email. I'm also converting from struts 1.1 - struts 1.2.9. I wanted to take advantage of some of the features offered by 2.4/2.0 servlet/jsp. So, the jars are different. thx -- View this message in context: http://www.nabble.com/SEVERE%3A-Error-reading-tld-listeners-javax.servlet.ServletException.---HELP-t1751842.html#a4773129 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error re-starting war application
Hi list I've posted that question already before (and i will post it until i'll get an answer ;) I am using Eclipse WTP 1.x for development of a web application and use it's 'Export' function for creating the .war file. Installing that application on Tomcat 5.5.17 works fine. Problem: Stopping and re-starting the application fails every time with a NullPointerException. Do you have any hints? Is that a known bug? Does anyone understand my questions? :) Pls hlp thx
RE: looking for TOMCAT monitor
Tomcat developed a glitch between versions 5.5.9 and 5.5.15 (I think), which would cause connector stats to be 0, hence no graphs. Try upgrading tomcat. Regards, Vlad -Original Message- From: segli [mailto:[EMAIL PROTECTED] Sent: 06 June 2006 16:07 To: users@tomcat.apache.org Subject: Re: looking for TOMCAT monitor I'm also a newbie to Tomcat and just installed this Lambda-Probe. It won't show me anything on the Connector Stats though, although there are three connectors configured in the Catalina section and they're up and running. Anything obvious that I could have done wrong or does this require special configuration? thanks! segli -- View this message in context: http://www.nabble.com/looking-for-TOMCAT- monitor-t1693458.html#a4735059 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof. Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. If you have received this message in error, please notify us by return and delete the message and any attachments. Further enquiries/returns can be sent to [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSource problem
did you add your JNDI in context.xml ? On 6/8/06, Sidney Senna [EMAIL PROTECTED] wrote: Hi all, i have problem with DataSource (JNDI). i'm using tomcat5.5.17. i receive the following message: Name jdbc is not bound in this Context but it functions in tomcat5.0.28 Thanks a lot! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Fadi Samara 851 North Glebe Rd. Apt #1805 Arlington, VA 22203 (703)944-9875
RE: looking for TOMCAT monitor
I'm using Tomcat 5.0.25 - would that explain this I guess...? Can't upgrade I'm affraid since it's a productive environment... cheers, -se -- View this message in context: http://www.nabble.com/looking-for-TOMCAT-monitor-t1693458.html#a4774195 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
readConfiguration() broken in juli
Hi there, I first ran into bug 39627 [1] when trying to get my logging working properly and got to have a pretty thorough read of the JULI code. I noticed that the readConfiguration(stream) method doesn't reset the configuration properly. It just calls a super.reset(), but the superclass doesn't know about the special per-classloader loggers. Should I file a bug? I have a simple patch which just creates a new ClassLoaderLogInfo for every readConfiguration() call and lets the garbage collector to delete the old one. I'm a bit confused about the way logging configuration is inherited by classloaders though. My patch doesn't reset any configuration in parent classloaders and I'm not sure what consequences this will have. Roger [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=39627 -- Ninth Avenue Software p: +61 7 3137 1351 (UTC +10) f: +61 7 3102 9141 w: http://www.ninthavenue.com.au e: [EMAIL PROTECTED] Index: org/apache/juli/ClassLoaderLogManager.java === --- org/apache/juli/ClassLoaderLogManager.java (revision 412714) +++ org/apache/juli/ClassLoaderLogManager.java (working copy) @@ -241,7 +241,6 @@ throws IOException, SecurityException { checkAccess(); -reset(); readConfiguration(is, Thread.currentThread().getContextClassLoader()); @@ -318,29 +317,18 @@ } } } - -Logger localRootLogger = new RootLogger(); -if (is == null) { -// Retrieve the root logger of the parent classloader instead -ClassLoader current = classLoader.getParent(); -ClassLoaderLogInfo info = null; -while (current != null info == null) { -info = getClassLoaderInfo(current); -current = current.getParent(); -} -if (info != null) { -localRootLogger.setParent(info.rootNode.logger); -} -} -ClassLoaderLogInfo info = -new ClassLoaderLogInfo(new LogNode(null, localRootLogger)); -info.loggers.put(, localRootLogger); -classLoaderLoggers.put(classLoader, info); - + if (is != null) { readConfiguration(is, classLoader); +} else { + +/* empty logging tree */ +Logger localRootLogger = new RootLogger(); +ClassLoaderLogInfo info = +new ClassLoaderLogInfo(new LogNode(null, localRootLogger)); +classLoaderLoggers.put(classLoader, info); } - + } @@ -354,9 +342,11 @@ protected void readConfiguration(InputStream is, ClassLoader classLoader) throws IOException { +Logger localRootLogger = new RootLogger(); ClassLoaderLogInfo info = -(ClassLoaderLogInfo) classLoaderLoggers.get(classLoader); - +new ClassLoaderLogInfo(new LogNode(null, localRootLogger)); +classLoaderLoggers.put(classLoader, info); + try { info.props.load(is); } catch (IOException e) { @@ -372,7 +362,6 @@ // Create handlers for the root logger of this classloader String rootHandlers = info.props.getProperty(.handlers); String handlers = info.props.getProperty(handlers); -Logger localRootLogger = info.rootNode.logger; if (handlers != null) { StringTokenizer tok = new StringTokenizer(handlers, ,); while (tok.hasMoreTokens()) { @@ -423,6 +412,7 @@ } } +addLogger(localRootLogger); } @@ -487,6 +477,9 @@ LogNode findNode(String name) { LogNode currentNode = this; +if (logger.getName().equals(name)) { +return this; +} while (name != null) { final int dotIndex = name.indexOf('.'); final String nextName; - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Way to debug ports Tomcat is listening on?
This server's Apache/Tomcat connector used to work just fine. Now it has stopped working and I get this error... I haven't changed anything in the config, but am wondering how I troubleshoot/debug this issue. I continually get this error: [jk_ajp_common.c (720)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (192.168.0.101:8009). Failed errno = 13 My server.xml file is configured as: Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Catalina Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS / Connector port=8009 enableLookups=false redirectPort=8443 debug=4 protocol=AJP/1.3 / Engine jvmRoute=p1 name=Catalina defaultHost=localhost debug=4 Host name=localhost debug=4 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server My workers.properties file has the following: worker.p1.port=8009 worker.p1.host=w1 worker.p1.type=ajp13 worker.p1.info=Ajp13 forwarding worker.p1.debug=0 worker.p1.tomcatId=p1 And my VirtualHost setting has the JkMount / p1 and JkMount /* p1 My /etc/hosts file has entries for w1 that point to the local private address, as follows: 192.168.0.101 w1 localhost How do I debug this and get it back working? Thanks, Kim :-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Way to debug ports Tomcat is listening on?
Not that it answers your question, but if you are using And my VirtualHost setting has the JkMount / p1 and JkMount /* p1 then y Then you are much better off using mod_proxy ProxyPass / http://w1:8080/ ProxyPassReserve / http://w1:8080/ ProxyPassPreserveHost On less head aches, less time spent on the user list :) Filip Kim Albee wrote: This server's Apache/Tomcat connector used to work just fine. Now it has stopped working and I get this error... I haven't changed anything in the config, but am wondering how I troubleshoot/debug this issue. I continually get this error: [jk_ajp_common.c (720)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (192.168.0.101:8009). Failed errno = 13 My server.xml file is configured as: Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Catalina Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS / Connector port=8009 enableLookups=false redirectPort=8443 debug=4 protocol=AJP/1.3 / Engine jvmRoute=p1 name=Catalina defaultHost=localhost debug=4 Host name=localhost debug=4 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server My workers.properties file has the following: worker.p1.port=8009 worker.p1.host=w1 worker.p1.type=ajp13 worker.p1.info=Ajp13 forwarding worker.p1.debug=0 worker.p1.tomcatId=p1 And my VirtualHost setting has the JkMount / p1 and JkMount /* p1 My /etc/hosts file has entries for w1 that point to the local private address, as follows: 192.168.0.101 w1 localhost How do I debug this and get it back working? Thanks, Kim :-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSource problem
resolved problem thanks - Original Message - From: Fadi Samara [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 08, 2006 12:09 PM Subject: Re: DataSource problem did you add your JNDI in context.xml ? On 6/8/06, Sidney Senna [EMAIL PROTECTED] wrote: Hi all, i have problem with DataSource (JNDI). i'm using tomcat5.5.17. i receive the following message: Name jdbc is not bound in this Context but it functions in tomcat5.0.28 Thanks a lot! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Fadi Samara 851 North Glebe Rd. Apt #1805 Arlington, VA 22203 (703)944-9875 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.8.1/354 - Release Date: 1/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CVS checkout problem
Hi, I want to use cvs to check out the Tomcat 5.0 source. First I used the ant with the default build.xml, but I got the following error: [cvs] cvs [checkout aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused Then I tried to connect to the cvs server manually by using the following command: cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login I was able to connect to the server but when I use the 'anoncvs' as the password, the server rejected and the output was the following: cvs [login aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused So I am wondering that has the password for user anoncvs been changed or the cvs server was no longer availabel or something else? Thanks a lot, Michael
Re: CVS checkout problem
[EMAIL PROTECTED] wrote: Hi, I want to use cvs to check out the Tomcat 5.0 source. First I used the ant with the default build.xml, but I got the following error: [cvs] cvs [checkout aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused Then I tried to connect to the cvs server manually by using the following command: cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login I was able to connect to the server but when I use the 'anoncvs' as the password, the server rejected and the output was the following: cvs [login aborted]: connect to cvs.apache.org(140.211.166.113):2401 failed: Connection refused So I am wondering that has the password for user anoncvs been changed or the cvs server was no longer availabel or something else? Thanks a lot, Michael Not sure whether the Tomcat CVS repository is still online at all. AFAIK it has all been moved to SVN. See http://tomcat.apache.org/svn.html Regards, Edmund - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Content-Disposition and Filename Attribute Not Working In Some Apache 2 Versions
Hi, I've found that when we upgraded from Apache 2.0.48 to 2.0.49 or any other Apache release up to the current 2.0.58 part of the content-disposition header seems to stop working. I opened up bug 39749 in the Apache section for this. I got a response from a person there who said they were stumped and suggested I suggest you discuss with the Tomcat folks which web server behavior influences the generation of that header field.. Can anyone help me bridge the gap on this to determine where the issue is? I've put my bug information from the other bug here. I'm willing to run other tests and things in debug mode if I am told what settings to use and where to look for results or output. We can reproduce this on our development system every time. Thanks! Rob Baily /-***-/ It appears that somewhere between 2.0.48 and 2.0.58 the setting of the Content- Disposition to set the file name for content returned broke. We are using Tomcat 5.0.28 and modJK 1.2.15. I have put the example servlet code below. When you run the URL the browser pops up with the file name TestServlet.doc instead of test_file_name.doc. I don't believe this to be a Tomcat issue since it works with HTTP 2.0.48 and not with HTTP 2.0.58. I ran http://dev.servicebench.com/rbaily/servlet/TestServlet on my system with this test servlet. Please let me know if there is anything I can do to clarify or help. Thanks! /* * Created on Jun 7, 2006 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.servicebench.webside.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.*; /** * @author rbaily * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class TestServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doPost(req, res); } public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType( application/msword ); res.setContentLength( 20 ); // set up file name String fileName = filename=\test_file_name.doc\; System.out.println( filename= + fileName ); res.setHeader( Content-Disposition, attachment; + fileName ); res.setHeader( Expires, 0 ); res.setHeader( Cache-Control, must-revalidate, post- check=0, pre-check=0 ); ServletOutputStream output = res.getOutputStream(); System.out.println( about to write ); output.print( 012345678900987654321 ); output.flush(); output.close(); } } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Restricting access to localhost for an HTTP connector
Is there to configure an HTTP Connector to only allow connections from localhost? We have a server that has an HTTPS port that handles all public access. However, we would like to leave a non SSL port open for a monitoring program we have running on the same machine. We would like to not allow anyone else to be able to access the non-SSL port. I know that the apache webserver has mechanism to do this, but I was wondering if a standalone tomcat could also do what we need. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restricting access to localhost for an HTTP connector
yes, you can bind the connector the 127.0.0.1, meaning it will only listen on that address use the "address" attribute in the connector http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Mark Claassen wrote: Is there to configure an HTTP Connector to only allow connections from localhost? We have a server that has an HTTPS port that handles all public access. However, we would like to leave a non SSL port open for a monitoring program we have running on the same machine. We would like to not allow anyone else to be able to access the non-SSL port. I know that the apache webserver has mechanism to do this, but I was wondering if a standalone tomcat could also do what we need. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik
RE: Restricting access to localhost for an HTTP connector
Thanks. I thought I heard that it was possible though the address, but was not sure. I read this in the docs, but I guess I didn't / don't understand the short explanation of "address". From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:24 PMTo: Tomcat Users ListSubject: Re: Restricting access to localhost for an HTTP connector yes, you can bind the connector the 127.0.0.1, meaning it will only listen on that addressuse the "address" attribute in the connector http://tomcat.apache.org/tomcat-5.5-doc/config/http.htmlMark Claassen wrote: Is there to configure an HTTP Connector to only allow connections from localhost? We have a server that has an HTTPS port that handles all public access. However, we would like to leave a non SSL port open for a monitoring program we have running on the same machine. We would like to not allow anyone else to be able to access the non-SSL port. I know that the apache webserver has mechanism to do this, but I was wondering if a standalone tomcat could also do what we need. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik
Clicking on Service throws an exception
I have a new installation of Tomcat 5.0, everything seems to be fine with the exception when I click on the Service link I receive the following error. javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:779) Anyone know why this is? Thanks Bill
Configuring Tomcat Service Wrapper for remote debugging.
I am having trouble finding info on how to configure the Tomcat Wrapper Service (Tomcat 5.0.x) for remote debugging. The Tomcat How TO page lists the following: If you run Tomcat using service wrapper, check the documentation for the service to determine how to set the required JVM options. I cannot find this documentation. Sam Ganzman Channel Logistics LLC (856) 428 9201 X 111
RE: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses
In your server.xml you will add an address element and specify it as: 127.0.0.1 !-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified during installation -- Connector address=127.0.0.1 port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Leo From: Mark Claassen [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 10:51 AM To: 'Tomcat Users List' Subject: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses Thanks. I thought I heard that it was possible though the address, but was not sure. I read this in the docs, but I guess I didn't / don't understand the short explanation of address. From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:24 PM To: Tomcat Users List Subject: Re: Restricting access to localhost for an HTTP connector yes, you can bind the connector the 127.0.0.1, meaning it will only listen on that address use the address attribute in the connector http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Mark Claassen wrote: Is there to configure an HTTP Connector to only allow connections from localhost? We have a server that has an HTTPS port that handles all public access. However, we would like to leave a non SSL port open for a monitoring program we have running on the same machine. We would like to not allow anyone else to be able to access the non-SSL port. I know that the apache webserver has mechanism to do this, but I was wondering if a standalone tomcat could also do what we need. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik
RE: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses
How do I get this tomcat email to stop? I have sent messages to unsubscribe to no avail. -Original Message- From: Leo Donahue - PLANDEVX [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 2:13 PM To: Tomcat Users List Subject: RE: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses In your server.xml you will add an address element and specify it as: 127.0.0.1 !-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified during installation -- Connector address=127.0.0.1 port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Leo From: Mark Claassen [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 10:51 AM To: 'Tomcat Users List' Subject: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses Thanks. I thought I heard that it was possible though the address, but was not sure. I read this in the docs, but I guess I didn't / don't understand the short explanation of address. From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 1:24 PM To: Tomcat Users List Subject: Re: Restricting access to localhost for an HTTP connector yes, you can bind the connector the 127.0.0.1, meaning it will only listen on that address use the address attribute in the connector http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Mark Claassen wrote: Is there to configure an HTTP Connector to only allow connections from localhost? We have a server that has an HTTPS port that handles all public access. However, we would like to leave a non SSL port open for a monitoring program we have running on the same machine. We would like to not allow anyone else to be able to access the non-SSL port. I know that the apache webserver has mechanism to do this, but I was wondering if a standalone tomcat could also do what we need. Thanks, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSPs will not load with virtual domain
Hello, I have a rather intresting but probably simple problem, as I am basically new to tomcat. Currently I am running Tomcat 5.5.17 on a Windows 2000 server. I installed the admin tool and setup a connector for port 80 and then a host of www.btdt.com (which I handle locally on my DNS). Here is the kicker. If I goto www.btdt.com/index.jsp it will not load...however if I goto 192.168.0.101/btdt the page renders fine. So I tried something static. if I goto www.btdt.com/static.htm it will load fine... as will 192.168.0.101/btdt/static.htm I am absoultly baffled as to why the virtual host fails to render the JSPs Can anyone help? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic,
Problem with Runtime.exec
I am having a very strange problem with Runtime.exec. I have a web app running under Tomcat 5.0.19 that needs to run an OS command. I debugged the class that calls runtime.exec in a standalone Java app and everything works fine, but when I call it from the web app, sometimes it works, and sometimes it doesn't. When it doesn't work, I get an empty stream returned from process.getInputStream(). I haven't been able to figure out what breaks it (redeploy, reload). Has anyone else seen this before? By the way, I have the following configuration: Sun Fire V440 Solaris 5.8 Java 1.4.2 Sun's Java Web Services Developer Pack 1.4 which I think has Tomcat 5.0.19 Thanks. Mark Cutshaw - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
Aye, Marc, I saw that. I'm not using proxy_balance, and the server.xml file you posted looks almost exactly like mine (the main difference being the port). Currently I'm defining the proxies for AJP in the httpd.conf file as: ProxyPass / ajp://localhost:8009/ ProxyPass /test ajp://localhost:8009/test And both are still producing the requested resource not available error. Could using the Proxy directive affect the results? Cheers, -- Steven Marc Bächinger wrote: Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links in my static content, or is there a more eloquent way of doing things? I thought the point of the connector was to prevent having to do this so the experience is seamless for the user. Any help or ideas are greatly appreciated. Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date:
How to unsubscribe this newsgroup?
Can someone plese tell me how to unsubscribe to this newsgroup? I've tried sending email to [EMAIL PROTECTED] for the past week but I'm still getting email from the newsgroup. The traffic in this newsgroup is so high that it's cluttering my mailbox everyday. Please help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Undeploy task not working
Venkatesh Babu wrote: But I'm getting the problem only in Tomcat 4.1.3 ... How can this happen? Because the file locking protection code has been implemented for 4.1.x but will be part of 4.1.32+ which has yet to be released. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error re-starting war application
[EMAIL PROTECTED] wrote: Hi list I've posted that question already before (and i will post it until i'll get an answer ;) Please don't. Such behaviour will get you kicked off the list for spamming. We read your message the first time. We don't need to read it again. I suggest you read http://tomcat.apache.org/faq/tomcatuser.html particularly the link about smart questions. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: readConfiguration() broken in juli
Roger Keays wrote: Should I file a bug? I have a simple patch which just creates a new ClassLoaderLogInfo for every readConfiguration() call and lets the garbage collector to delete the old one. Patches are best attached to bug reports. They tend to get lost in the noise on the lists if not acted on immediately. Since this is a known issue, attach the patch to the bug report. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Problem - JVM Crash
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSource problem
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SPAM:] - RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses
Dan Toomey wrote: How do I get this tomcat email to stop? I have sent messages to unsubscribe to no avail. You e-mail [EMAIL PROTECTED] I have removed you from the list. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPD with Tomcat
This appears to be working. Much appreciated! Cheers, -- Steven Warren Pace wrote: From: [EMAIL PROTECTED] Date: 2006/06/08 Thu PM 06:41:54 EDT To: Tomcat Users List users@tomcat.apache.org Subject: Re: HTTPD with Tomcat Aye, Marc, I saw that. I'm not using proxy_balance, and the server.xml file you posted looks almost exactly like mine (the main difference being the port). Currently I'm defining the proxies for AJP in the httpd.conf file as: ProxyPass / ajp://localhost:8009/ ProxyPass /test ajp://localhost:8009/test Use the Location directive inside httpd.conf and then add the ProxyPass statement. Something like Location /test/ ProxyPass ajp://localhost:8009/test/ /Location Access your app - http://localhost/test/ I've tried omitting the trailing foreslash in both the Location and ProxyPass statements but that doesn't seem to work. And both are still producing the requested resource not available error. Could using the Proxy directive affect the results? Cheers, -- Steven Marc Bächinger wrote: Hi Steven I posted one some days ago to this list. Maybe this is helpful: --- forwarded post --- i'm everthing but an expert in this, but i got loadbalancing with ajp working with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is helpful for you. The documentation on the net about configuration of the new built-in ajp support through the proxy module was rather thin. The best howto i found is in german (the config samples maybe helpful even if the rest is german): http://www.linuxforen.de/forums/showthread.php?t=209010 marc my config: in server.xml: Connector port=9002 URIEncoding=UTF-8 maxThreads=25 minSpareThreads=4 maxSpareThreads=10 enableLookups=false acceptCount=100 protocol=AJP/1.3 request.registerRequests=true / Engine name=Catalina defaultHost=localhost jvmRoute=node1 in httpd.conf : --- IfModule mod_proxy_balancer.c Location /balancer-manager SetHandler balancer-manager /Location Proxy balancer://cluster BalancerMember ajp://localhost:9002 route=node1 BalancerMember ajp://localhost:9102 route=node2 /Proxy Location /axis2 ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID /Location /IfModule Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]: Filip, Do you happen to have any examples of your mod_proxy setup? I've been trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat 5.5.17), and have been running into a wall. No matter what I've tried, tomcat always returns a requested resource not available error. Cheers, -- Steven Filip Hanik - Dev Lists wrote: mod_proxy - easy to configure - scales without limitation mod_jk - hard to compile,configure - in our tests, would not scale well at all Differences are: mod_jk supports load balancing and also passing along SSL info to Tomcat. mod_proxy is a regular http proxy, remember to set ProxyPassPreserveHost On, and then set the proxyPort directive on your Connector in server.xml Filip Mann, Bradley wrote: What are the exact differences between mod_proxy and mod_jk? What are the benefits/drawbacks of each? Thanks, Brad Mann Software Engineer - Information Access Services HARRIS Corporation / GCSD (321) 984-6292 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 4:45 PM To: Tomcat Users List Subject: Re: HTTPD with Tomcat you can also make your own life very easy, by switching to mod_proxy, and voila, everything works :) Filip Mann, Bradley wrote: Hello, I am attempting to setup a scenario in which Tomcat is hosting a web application behind HTTPD using the Jakarta Connector. I have installed the following on Solaris 10: Apache HTTPD 2.0.58 Apache Tomcat 4.1.31 Apache Jakarta Tomcat Connector 1.2.15 I am able to access HTTPD's document root, and I am able to access my web application through Tomcat. I am having trouble, however, understanding how to get the two to interact using the connector. I believe I have it setup properly, with mod_jk located in the /modules directory of HTTPD, and with an Include statement at the end of httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under the Server section of server.xml in the /conf directory of Tomcat, I have added a listener as follows: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/apache/modules/mod_jk.so / which points to the location of mod_jk.so. I have added the same line under the Host section, with the added attributes: append=true forwardAll=false My main question is, how do I get my static content from HTTPD to link to my web application under Tomcat. Do I simply add the Tomcat port number (8080) to the links
Re: JNDI datasource failing
Hi, Have you solved it already ??... well JNDI datasource have been driving me nuts for a couple of days, with a similar problem, i.e. the output was the same (but for other JDBC driver...)... It turn out to be the docBase parameter of the Context entry, which HAS TO BE THE EXACT location of the directory where your application resides (in the filesystem). By the way I use the Context entry in my META-INF folder, and my IDE (Netbeans) eventually puts it at runtime in CATALINA_BASE/conf/engine/host/x.XML, in which is the name of my(your) app. Hope this helps you, Jaz -- View this message in context: http://www.nabble.com/JNDI-datasource-failing-t1709052.html#a4785025 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: looking for TOMCAT monitor
5.0.25 should be ok. Do you run a unix box without X11 running by any chance? If you do this might be helpful: http://www.lambdaprobe.org/forum2/thread.jspa?threadID=42 Cheers, Vlad -Original Message- From: segli [mailto:[EMAIL PROTECTED] Sent: Thu 08/06/2006 4:10 PM To: users@tomcat.apache.org Subject: RE: looking for TOMCAT monitor I'm using Tomcat 5.0.25 - would that explain this I guess...? Can't upgrade I'm affraid since it's a productive environment... cheers, -se -- View this message in context: http://www.nabble.com/looking-for-TOMCAT-monitor-t1693458.html#a4774195 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof. Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. If you have received this message in error, please notify us by return and delete the message and any attachments. Further enquiries/returns can be sent to [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.17 protected pages JSP examples with valid user and invalid role results in msg 403.
Hi, I am having problem with Tomcat 5.5.17 jsp example of accessing protected pages (example: http://localhost:8080/jsp-examples/security/protected/) Logging with valid user and role: user/password/role=tomcat/tomcat/tomcat works fine. Logging with a valid user and invalid role (user/password/role=role1/tomcat/role1) results in msg 403 (HTTP Status 403 - Access to the requested resource has been denied). I am using supplied tomcat-users.xml. Before experimenting I made this role (role1) invalid by editing webapps/jsp-examples/WEB-INF/web.xml file like: ... auth-constraint role-nametomcat/role-name !-- role-namerole1/role-name -- /auth-constraint ... After receiving msg 403 applicatin will not work even with the valid user role (msg 403 produced). I found the same problem for Tomcat4 reported at: http://mail-archives.apache.org/mod_mbox/tomcat-dev/200204.mbox/[EMAIL PROTECTED] I also have seen somewhere that it was reported to be fixed for Tomcat4. Did the old problem penetrate to Tomcat 5.5.17 or did I forget to configure something? Regards, Val. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem after migrating to tomcat 5.5.16 from tomcat 5.0.28)
Hello Marc Farrow, Thanks very much for your replies. I saw some similar problem in google and tried one of the solutions. It worked okay. I removed ?Autoreconnect = true in server.xml where I have defined my sql server details and the application is working now. Vijaya -Original Message- From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 6:25 PM To: Tomcat Users List Subject: Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem after migrating to tomcat 5.5.16 from tomcat 5.0.28) Couple of things. First, I have the JNDI working in Tomcat 5.5.9 without the reference tag in my web.xml. Secondly, can you describe more specifically where you are having the problem. Is it with trying to the the JNDI reference or when you actually try to use the reference or actually trying to use the Connection object return? Posting the stack trace might help, if the problem is in Java code. On 6/8/06, Vijaya [EMAIL PROTECTED] wrote: My web.xml is ?xml version=1.0 encoding=UTF-8? . web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 session-config session-timeout 30 /session-timeout /session-config resource-ref descriptionDB Connection/description res-ref-namejdbc/AYS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.action.ActionServlet /servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-filelogin.jsp/welcome-file /welcome-file-list jsp-config taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-menu/taglib-uri taglib-location/WEB-INF/struts-menu.tld/taglib-location /taglib /jsp-config /web-app server.xml is ... ... Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context crossContext=true debug=5 docBase=AtYourService path=/AtYourService reloadable=true Resource auth=Container driverClassName=net.sourceforge.jtds.jdbc.Driver maxActive=100 maxIdle=30 maxWait=1 name=jdbc/AYS password= type=javax.sql.DataSource url=jdbc:jtds:sqlserver://localhost/AtYourService?autoReconnect=true username=sa/ /Context /Host . . Regards, Vijaya -Original Message- From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 6:11 PM To: Tomcat Users List Subject: Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help (Problem after migrating to tomcat 5.5.16 from tomcat 5.0.28) It might be helpful to post your web.xml and context.xml (appname.xml or the server.xml if your context tag is still in there). On 6/7/06, Vijaya [EMAIL PROTECTED] wrote: Hi, I am sorry for being vague in my earlier mail. This is the background of my problem. We developed the portal using Tomcat 5.0.28. In this version we connected to the database (SQL Server) without the JNDI lookup. I.e. get the data source from the request object. Also we configured the struts-config.xml to have the db definitions. Everything worked okay till we moved the application to staging server. The staging server has tomcat 5.5.16 and when we deployed the application as it is, we got a 404 error (Servlet action not available). So I downloaded tomcat 5.5.16 in my development machine as a stand-alone tomcat and I deployed the application in my development machine. The 404 error was fixed when I connected to the DB using JNDI lookup (by making changes to server.xml and application web.xml and the action coded to get the data source using the context). However, I am now getting a Nullpointer exception while connecting to database. Jtds is the third party jdbc driver used to connect to the SQL Server. I am totally frustrated with this problem and do not