Tomcat Directory Listing
Hi, i'm using Tomcat3.2.1 standalone. Does anybody know how to deactivate the Directory Listing ? I mean if a browser requests a directory I don't want tomcat to send an overview of all the files contained in this directory. Thanks a lot. Falk
Re: Running Tomcat as a Windows service
Richard Heintze at [EMAIL PROTECTED] wrote: Jim, Ronald and Bryan, Could you folks kindly give me URL for this JavaService? I assume I'll have the same problem -- I'm using a service in the FAQ that runs any old bat file. I looked at the services that exclusively run java programs and then looked at the complexity of tomcat.bat and startup.bat and decided to go with the generic solutions that runs bat files. But this won't work if I log off the server? It's distributed w/ Tomcat 4.0's EXE distributions... And works great... :) Pier
Problems using JavaService
Hi folks, I'm running into a problem trying to use Tomcat as an NT service, using JavaService. From the standard Tomcat 3.2.3, I added the xerces-j_2_2_D6.jar If I run the STARTUP.BAT file in the bin directory, I can run the examples in the webapp directory fine. If I run Tomcat as an NT service, I get Page Cannot Be Displayed. This is the start-up command I'm using... c:\tomcatjavaservice.exe -install Tomcat d:\java\jdk1.3\jre\bin\classic\jvm.dll -Djava.class.path=d:\java\jakarta-tomcat-3.2.3\lib\webserver.jar;d:\java\jak arta-tomcat-3.2.3\lib\jasper.jar;d:\java\jakarta-tomcat-3.2.3\lib\servlet.ja r;d:\java\jakarta-tomcat-3.2.3\lib\xerces-j_2_2_D6.jar -Dtomcat.home=d:\java\jakarta-tomcat-3.2.3 -start org.apache.tomcat.startup.Tomcat -params -config d:\java\jakarta-tomcat-3.2.3\conf\server.xml -stop org.apache.tomcat.startup.Tomcat -params -stop -config d:\java\jakarta-tomcat-3.2.3\conf\server.xml -out d:\java\jakarta-tomcat-3.2.3\logs\stdout.log -err d:\java\jakarta-tomcat-3.2.3\logs\stderr.log There is no indication of the problem in any of the log files. Any help would be greatly appreciated! Thanks, - Steve This message and any attachments are confidential to the intended recipient at the e-mail address to which it has been addressed. If you are not the intended recipient you may not copy, forward, disclose or use any part of this message or its attachments. If received in error please notify the sender immediately by e-mail or contact The Innovation Group plc on +44(0)1489 898300 and then delete this message from your system. Neither the sender nor any office or company in The Innovation Group plc group will be liable for any viruses. Any opinions contained in this message are those of the author and are not given or endorsed by any company in The Innovation Group plc group through which this message was sent unless otherwise expressly stated in this message and the authority of the author in so stating that is verified. The Innovation Group plc, registered office at Yarmouth House, 1300 Parkway, Solent Business Park, Whiteley, Hants PO15 7AE, company number 3256771.
RE: jsp:plugin
adding the name in quotes makes no difference, jsp:plugin name=myApplet type=applet code=MyAppley.class codebase=/test width=350 height=200 /jsp:plugin -Original Message- From: Jan Labanowski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 8:15 PM To: '[EMAIL PROTECTED]' Subject: Re: jsp:plugin In XML you need to put attribute values within quotes: Try jsp:plugin name=myApplet type=applet code=MyApplet.class codebase=/test width=350 height=200 /jsp:plugin On Tue, 7 Aug 2001, James, Stuart wrote: Hi, Can Anybody out there help the issue relates to the JSP:plugin feature. I want access the applet from a client side script, APPLET name=myApplet code=MyApplet.class codebase=/test width=350 height=200 alt=not working /APPLET This applet code allows me to access the object in a script as such, script for=window event=onload myApplet.InvokeMethod(aparameter); /script The problem occurs if I change the code to use the new jsp:plugin mechanism, jsp:plugin name=myApplet type=applet code=MyApplet.class codebase=/test width=350 height=200 /jsp:plugin While the applet is still downloaded, the object can not be accessed via a script. (vbscript or jscript). Looking at the html generated the name parameter is ignored. Thanks to anyone who can assist. Stuart James. ___ Email Disclaimer This communication is for the attention of the named recipient only and should not be passed on to any other person. Information relating to any company or security, is for information purposes only and should not be interpreted as a solicitation or offer to buy or sell any security. The information on which this communication is based has been obtained from sources we believe to be reliable, but we do not guarantee its accuracy or completeness. All expressions of opinion are subject to change without notice. All e-mail messages, and associated attachments, are subject to interception and monitoring for lawful business purposes. ___ Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/
jasper: weird behaviour
Hello therer tomcat users ;) I'm not sure if this is a bug, so I'm posting a description of an unusual problem, and hope that if this is not a bug, somebody will prove that I'm missing something here... I have JSP page that has static content (outside % % tags) in ISO-8859-2, and a few static html pages. When it's completelly up to Tomcat to generate some page (for example redirect request, or internal server error) - it outputs Content-Type: header corectly (whole Linux enviroment is set to pl_PL) like this: Content-Type: text/html;charset=ISO-8859-2 When it sends static html, it outputs: Content-Type: text/html ..but this is corrected by META http-equiv ... tag. However *EVERYTIME* tomcat is sending back output of a JSP page, it is sending this: Content-Type: text/html;charset=ISO-8859-1 which is ok (as defined in JSP spec), but there's *NO* way to change it! I've tried nearly everything, including: % response.setHeader("Content-Type", "text/html;charset=ISO-8859-2"); % or %@ page contentType("text/html;charset=ISO-8859-2"); % All those tags make response.setHeader(...) apear on top of __jspService (inside proper .java file in $TOMCAT_HOME/work), but then... header get's overwritten by tomcat to ISO-8859-1 which scrambles all content and forces user to pick up ISO-8859-2 from browsers encoding menus everytime document is generated, which is really annoying. Bowsers seems to ignore META http-equiv ... tag in favour of server generated Content-Type: header. Thanks to tomcat beeing opensource, I can just play with share/org/apache/jasper/compilser/Compiler.java, and broke spec by setting default encoding to ISO-8859-2, but I feel like that's not the way... Is it a bug in jasper, or am I missing something here? -- Jacek Prucia 7bulls.com S.A.
RE: Problems using JavaService
Hi Again, Just for anyone's information, I've managed to get it working, but I'm not sure how! I replaced the parameter d:\java\jdk1.3\jre\bin\classic\jvm.dll to be d:\java\jdk1.3\jre\bin\hotspot\jvm.dll and now it works fine! Cheers, - Steve -Original Message- From: Steve Harrison [mailto:[EMAIL PROTECTED]] Sent: 08 August 2001 09:39 To: '[EMAIL PROTECTED]' Subject: Problems using JavaService Hi folks, I'm running into a problem trying to use Tomcat as an NT service, using JavaService. From the standard Tomcat 3.2.3, I added the xerces-j_2_2_D6.jar If I run the STARTUP.BAT file in the bin directory, I can run the examples in the webapp directory fine. If I run Tomcat as an NT service, I get Page Cannot Be Displayed. This is the start-up command I'm using... c:\tomcatjavaservice.exe -install Tomcat d:\java\jdk1.3\jre\bin\classic\jvm.dll -Djava.class.path=d:\java\jakarta-tomcat-3.2.3\lib\webserver.jar;d:\java\jak arta-tomcat-3.2.3\lib\jasper.jar;d:\java\jakarta-tomcat-3.2.3\lib\servlet.ja r;d:\java\jakarta-tomcat-3.2.3\lib\xerces-j_2_2_D6.jar -Dtomcat.home=d:\java\jakarta-tomcat-3.2.3 -start org.apache.tomcat.startup.Tomcat -params -config d:\java\jakarta-tomcat-3.2.3\conf\server.xml -stop org.apache.tomcat.startup.Tomcat -params -stop -config d:\java\jakarta-tomcat-3.2.3\conf\server.xml -out d:\java\jakarta-tomcat-3.2.3\logs\stdout.log -err d:\java\jakarta-tomcat-3.2.3\logs\stderr.log There is no indication of the problem in any of the log files. Any help would be greatly appreciated! Thanks, - Steve This message and any attachments are confidential to the intended recipient at the e-mail address to which it has been addressed. If you are not the intended recipient you may not copy, forward, disclose or use any part of this message or its attachments. If received in error please notify the sender immediately by e-mail or contact The Innovation Group plc on +44(0)1489 898300 and then delete this message from your system. Neither the sender nor any office or company in The Innovation Group plc group will be liable for any viruses. Any opinions contained in this message are those of the author and are not given or endorsed by any company in The Innovation Group plc group through which this message was sent unless otherwise expressly stated in this message and the authority of the author in so stating that is verified. The Innovation Group plc, registered office at Yarmouth House, 1300 Parkway, Solent Business Park, Whiteley, Hants PO15 7AE, company number 3256771.
SSL CLIENT-CERT with Tomcat 4.0 beta6
Hy I am using Tomcat 4.0 beta6 and have a problem with the CLIENT_CERT auth method. It seems that the authentication will work right because the username appers in the access log. Since I need the username in my servlet I tried to call the methods getAuthType(), getRemoteUser() and getUserPrincipal() of the class HttpServletRequest, but those calls returned null. Might this be a configuration error? The RequestDumper output looks like that: 2001-08-08 11:56:21 RequestDumperValve[Standalone]: --- 2001-08-08 11:56:21 RequestDumperValve[Standalone]: authType=CLIENT-CERT 2001-08-08 11:56:21 RequestDumperValve[Standalone]: contentLength=-1 2001-08-08 11:56:21 RequestDumperValve[Standalone]: contentType=text/html 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=Date=Wed, 08 Aug 2001 09:56:21 GMT 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=Transfer-Encoding=chunked 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=Server=Apache Tomcat/4.0-b6 (HTTP/1.1 Connector) 2001-08-08 11:56:21 RequestDumperValve[Standalone]:message=OK 2001-08-08 11:56:21 RequestDumperValve[Standalone]: remoteUser=CN=Mike's Test Certificate, OU=Test Unit Name, O=Test Company, L=Test City, ST=Test State, C=AT 2001-08-08 11:56:21 RequestDumperValve[Standalone]: status=200 2001-08-08 11:56:21 RequestDumperValve[Standalone]: === 2001-08-08 11:56:21 RequestDumperValve[Standalone]: REQUEST URI =/servlets/servlet/rse.net.rpc.RPCBrokerServlet 2001-08-08 11:56:21 RequestDumperValve[Standalone]: authType=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: characterEncoding=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: contentLength=316 2001-08-08 11:56:21 RequestDumperValve[Standalone]: contentType=application/octet-stream 2001-08-08 11:56:21 RequestDumperValve[Standalone]:contextPath= 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=host=192.168.20.16 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.1) Gecko/20010607 Netscape6/6.1b1 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=accept=text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, image/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8, text/css, */*;q=0.1 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=accept-language=en-us 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=accept-encoding=gzip,deflate,compress,identity 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=accept-charset=ISO-8859-1, utf-8; q=0.667, *; q=0.667 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=keep-alive=300 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=connection=keep-alive 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=content-length=316 2001-08-08 11:56:21 RequestDumperValve[Standalone]: header=content-type=application/octet-stream 2001-08-08 11:56:21 RequestDumperValve[Standalone]: locale=en_US 2001-08-08 11:56:21 RequestDumperValve[Standalone]: method=POST 2001-08-08 11:56:21 RequestDumperValve[Standalone]: parameter=idtype=client 2001-08-08 11:56:21 RequestDumperValve[Standalone]: parameter=sessionid=Mike0-7281903686629631912 2001-08-08 11:56:21 RequestDumperValve[Standalone]: parameter=request=rpc 2001-08-08 11:56:21 RequestDumperValve[Standalone]: pathInfo=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: protocol=HTTP/1.1 2001-08-08 11:56:21 RequestDumperValve[Standalone]: queryString=request=rpcsessionid=Mike0-7281903686629631912idtype=client 2001-08-08 11:56:21 RequestDumperValve[Standalone]: remoteAddr=192.168.20.16 2001-08-08 11:56:21 RequestDumperValve[Standalone]: remoteHost=192.168.20.16 2001-08-08 11:56:21 RequestDumperValve[Standalone]: remoteUser=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: requestedSessionId=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: scheme=https 2001-08-08 11:56:21 RequestDumperValve[Standalone]: serverName=192.168.20.16 2001-08-08 11:56:21 RequestDumperValve[Standalone]: serverPort=443 2001-08-08 11:56:21 RequestDumperValve[Standalone]:servletPath=null 2001-08-08 11:56:21 RequestDumperValve[Standalone]: isSecure=true 2001-08-08 11:56:21 RequestDumperValve[Standalone]: --- Thanks in advance _ Downloaden Sie MSN Explorer kostenlos unter
File Upload Problem when bigger than 0.97 MB
Hi there, I am facing problem when uploading file bigger than 0.97MB through MultipartPerser the error in log file shows as follows Please help if u have any idea. Best Regards, Kalyan Mitra [EMAIL PROTECTED] =- 2001-08-08 13:28:04 StandardHost[localhost]: Installing web application at context path from URL file:/home/kalyan/jakarta-tomcat-4.0-b5/webapps/ROOT 2001-08-08 13:28:04 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2001-08-08 13:28:04 StandardManager[]: Seeding of random number generator has been completed 2001-08-08 13:28:06 StandardWrapper[:default]: Loading container servlet default 2001-08-08 13:28:06 default: init 2001-08-08 13:28:06 StandardWrapper[:invoker]: Loading container servlet invoker 2001-08-08 13:28:06 invoker: init 2001-08-08 13:28:06 StandardWrapper[:jsp]: Using Jasper classloader for servlet jsp 2001-08-08 13:28:07 jsp: init 2001-08-08 13:28:09 StandardWrapper[:ssi]: Loading container servlet ssi 2001-08-08 13:28:09 ssi: init 2001-08-08 13:28:09 StandardHost[localhost]: Installing web application at context path /manager from URL file:/home/kalyan/jakarta-tomcat-4.0-b5/webapps/manager 2001-08-08 13:28:09 StandardManager[/manager]: Seeding random number generator class java.security.SecureRandom 2001-08-08 13:28:09 StandardManager[/manager]: Seeding of random number generator has been completed 2001-08-08 13:28:09 ContextConfig[/manager]: Configured an authenticator for method BASIC 2001-08-08 13:28:09 StandardWrapper[/manager:default]: Loading container servlet default 2001-08-08 13:28:09 default: init 2001-08-08 13:28:09 StandardWrapper[/manager:invoker]: Loading container servlet invoker 2001-08-08 13:28:09 invoker: init 2001-08-08 13:28:09 StandardWrapper[/manager:jsp]: Using Jasper classloader for servlet jsp 2001-08-08 13:28:09 jsp: init 2001-08-08 13:28:10 StandardWrapper[/manager:ssi]: Loading container servlet ssi 2001-08-08 13:28:10 ssi: init 2001-08-08 13:28:10 StandardHost[localhost]: Installing web application at context path /webdav from URL file:/home/kalyan/jakarta-tomcat-4.0-b5/webapps/webdav 2001-08-08 13:28:10 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom 2001-08-08 13:28:10 StandardManager[/webdav]: Seeding of random number generator has been completed 2001-08-08 13:28:10 ContextConfig[/webdav] Configuration error in application web.xml java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardContext.addChild(StandardContext.java:1194) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:806) at org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419) at org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119) at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1497) at org.apache.crimson.parser.Parser2.content(Parser2.java:1700) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499) at org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:317) at javax.xml.parsers.SAXParser.parse(SAXParser.java:108) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:247) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:820) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:217) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3189) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:413) at org.apache.catalina.core.StandardHost.install(StandardHost.java:641) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155) at
Re: I don't see the output under Linux
I tried to correct the file, but ... nothing... But, I noticed another thing. If I start Tomcat with tomcat run (in /usr/bin) the output is visible on the screen but Tomcat doesn't work properly (tomcat start correctly but if I try to access at 8080 ... it doesn't works) instead, if I try with: ./tomcat start (where tomcat in this case, is the script in /etc/rc.d/init.d/ that run the tomcat daemon --- it run a command like: daemon tomcat start ...) the engine works but not the output. Thanks, thanks for your interest!!! - Original Message - From: Loïc Lefèvre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 4:32 PM Subject: RE: I don't see the output under Linux Okay, this file stands in the conf directory of Tomcat on your LINUX server? If the answer is true, replace workers.tomcat_home=c:\jakarta-tomcat workers.java_home=c:\jdk1.2.2 ps=\ with the good parameters: especially: ps=/ (Path separator for Linux is equals to / not \) Try and tell me... -Message d'origine- De : Stefano Bonnin [mailto:[EMAIL PROTECTED]] Envoyé : mardi 7 août 2001 16:04 À : [EMAIL PROTECTED] Objet : Re: I don't see the output under Linux Can you send your workers.properties file? Yes. This is my workers.properties: ** workers.tomcat_home=c:\jakarta-tomcat workers.java_home=c:\jdk1.2.2 ps=\ worker.list=ajp12, ajp13 worker.ajp12.port=8007 worker.ajp12.host=localhost worker.ajp12.type=ajp12 worker.ajp12.lbfactor=1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp12, ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jasper.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)servlet.jar worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)webserver.jar worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar worker.inprocess.cmd_line=-config worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml worker.inprocess.cmd_line=-home worker.inprocess.cmd_line=$(workers.tomcat_home) worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll # # Setting the place for the stdout and stderr of tomcat # worker.inprocess.stdout=$(workers.tomcat_home)$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)inprocess.stderr worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home) Thanks (I wait your help). - Original Message - From: Loïc Lefèvre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 3:07 PM Subject: RE: I don't see the output under Linux -Message d'origine- De : Stefano Bonnin [mailto:[EMAIL PROTECTED]] Envoyé : mardi 7 août 2001 14:47 À : [EMAIL PROTECTED] Objet : Re: I don't see the output under Linux Yes, if I add this attribute the tomcat.log (when I start tomcat) become: 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( /examples ) 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( /admin ) 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( /cocoon ) 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( ) 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( /test ) 2001-08-07 01:40:57 - ContextManager: Adding context Ctx( /Cocoon ) but no message other this are printed on this file. (All System.out.println are not printed!!) Thanks. - Original Message - From: Loïc Lefèvre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 12:23 PM Subject: RE: I don't see the output under Linux in your server.xml file, add the attibut path to: Logger name=tc_log path=/tmp/tomcat.log here verbosityLevel = INFORMATION / ;) -Message d'origine- De : Stefano Bonnin [mailto:[EMAIL PROTECTED]] Envoyé : mardi 7 août 2001 09:39 À : [EMAIL PROTECTED] Objet : I don't see the output under Linux I am a new linux user and I have just installed Tomcat under linux. I have developed an application and now I am testing it. Tomcat is installed on a linux server and I try to access it (at my application) with a windows 98 PC. I have introduced a System.out.println lines in my application (for the testing phase), but I don't see theirs output. I have tried to do this (every time that tomcat is started): ./tomcat start tomcat.out without success.
RE: I don't see the output under Linux
Just replying to the original question here : if you want the system.out.println logging to appear in a file instead of the console : $TOMCAT_HOME/bin/tomcat.sh start 2logfile 1errorfile All error and normal output to the console will be redirected this way to files. If you want logging to system.out, then the logging appears only when the console in which you started tomcat, not any other console which you open. Mvgr, Martin I have introduced a System.out.println lines in my application (for the testing phase), but I don't see theirs output. I have tried to do this (every time that tomcat is started): ./tomcat start tomcat.out without success.
RE: Virtual Hosts on IIS Tomcat
what I have done is created mulitple virtual hosts on IIS, set up the uriworkermap.properties to send the superset of requested url's to tomcat, and then also set up tomcat with virtual hosts to determine the context and validity of requests coming through for each virtual host. This allows me to have a /servlet directory in each with the directory being isolated to each context. of course if your superset of urls overlaps(/examples for domain1.com handled by tomcat and /examples of doamin2 handled by iis) then you will have problems hope this helps Charlie -Original Message- From: Knaggs, George R [mailto:[EMAIL PROTECTED]] Sent: Friday, August 03, 2001 8:19 PM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Virtual Hosts on IIS Tomcat Mr Shachor / Tomcat-User, I hope you don't mind this email but I've been unable to find any information on how to configure IIS with Tomcat using a Virtual Host where the context path / URI is the root (http://one.domain.com/ and http://two.domain.com/). I have more than one virtual host on this server and the uriworkermap.properties doesn't mention anything about configuring more than one host using the same uri /servlet/*. The tomcat-iis-howto discusses a similar setup but the contexts have different URIs (/examples/* and /webpages/*). I've also had trouble installing the isapi filter for an additional web site using the IIS management console. It doesn't seem to be able load the filter a second time. Is there anything that has to be configured differently for installing the filter on a second web-site on the same web server. Can you please tell me if this is possible and if there is any documentation on how to set this up. I've configured this many times with Apache but I'm locked into using IIS4.0 inorder to use a different ISAPI filter that provides single-signon features used at my company. Any help you can provide would be greatly appreciated. Thanks in advance, George Knaggs __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Deploying .war file
Check the tomcat docs on howto create a .war file using Ant ($TOMCAT_HOME/docs/appdev/index.html). Put the .war in the webapps directory. You don't have to (but you can if you want to override the default settings) add a specific context for your webapp, as it will be added automatically when tomcat starts. Hope this helps a bit. Rgrds, Klaas -Original Message- From: Alan Zaitchik [mailto:[EMAIL PROTECTED]] Sent: maandag 6 augustus 2001 22:48 To: Tomcat-User@Jakarta. Apache. Org Subject: Deploying .war file I know this should be trivial but it is just not working for me... I have a (Tomcat 3.2.3) application consisting of various html and jsp and tld files currently under \webapps\alan\app1. The tags refer to handlers and tei files in \webapps\WEB-INF\classes\alan\app1. The web.xml file in \webapps\WEB-INF does not refer to any of these elements at the moment. Everything works just fine. I want to create an app1.war file for all the above which can be deployed somewhere else entirely, say c:\bob. According to what I read in various places, all I need to do is create a web.xml file that adds a servlet tag for the jsp files (using jsp-file rather than servlet-class), create an app1.war file using the jar utility, and add a context block to server.xml to define a virtual path to c:\bob\app1.war. I did all these but Tomcat (after restart) cannot find my jsp files. I believe I must be specifying something incorrectly. Would the context block be something like: context path=/whatever docBase=c:\bob\app1.war crossContext=false debug=0 reloadable=true trusted=false Also, in the original location I pointed my browser at alan1/app1/fu.jsp and Tomcat found the files easily (since they were under webapps). Is it enough to just add to the web.xml file blocks like servletservlet-namefu/servlet-namejsp-filefu.jsp/jsp-file or must I add something else to web.xml? Perhaps the problem is in the URL I type into the browser address?? Should it be http://host/whatever/fu or http://host/whatever/fu.jsp or http://host/whatever/alan/app1/fu.jsp where /whatever is the virtual path to c:\bob\app1.war defined in server.xml? Actually I tried all these (and other combinations) but without luck... Please excuse the simplicity of this question but I just cannot seem to get the war file working. Alan
RE: How to build tomcat
For Tomcat 3, it's in the README file in the top-level directory in the source distribution. Larry -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 9:08 PM To: '[EMAIL PROTECTED]' Subject: Re: How to build tomcat On Tue, 7 Aug 2001, Sankaranarayanan Ganapathy wrote: Is there a documentation that explains that? Can somebody point me to it? For Tomcat 4, it's in the BUILDING.txt file in the top-level directory of the source distro. This is also online at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/BUILDING.txt Thanx Ganesh Craig
RE: Number of Tomcat users ...
Lars, Tomcat users will do request via HTTP. So, a user will _not_ keep a Tomcat thread busy while his browser is open. You can set the threading settings in the server.xml for your connector(s) (check $TOMCAT_HOME/doc/uguide/tomcat_ug.html). The default settings are suitable for 10-40 concurrent requests. If, for example, your 'average' user does 1 request per 5 seconds, you can handle about 200 max concurrent users. (but watch out with these kind of calculations). So, it is not possible to limit the amount of concurrent users (well, you can in your servlet, by counting the number of sessions) via Tomcat configuration, but you configure the amount of threads which will handle user requests simultaneous users. Rgrds, Klaa -Original Message- From: Lars Nielsen Lind [mailto:[EMAIL PROTECTED]] Sent: maandag 6 augustus 2001 22:32 To: [EMAIL PROTECTED] Subject: Number of Tomcat users ... Hi. Where and how do I specify the max number of simultaneous users for Tomcat? Lars Nielsen Lind
problem make webapp module for apache
Hi, I have some problems to compile the webapp module (servlet engine) for the apache webserver. The compiler miss the following files: mach-o/dyld.h dlfcn.h dl.h Where can I find these header files? Which packages do I have to download? System: SuSE Linux 7.2, Apache 1.3.20 Module: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b6/src/webapp-module-1.0-tc40b6.src.tar.gz Error Message: Making all in dso/unix make[2]: Entering directory `/usr/local/install/webapp/apr/dso/unix' make[3]: Entering directory `/usr/local/install/webapp/apr/dso/unix' /bin/sh /usr/local/install/webapp/apr/libtool --silent --mode=compile cc -g -O2 -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -I../../include -I../../include/arch -I../../include/arch/unix -c dso.c touch dso.lo In file included from dso.c:55: ../../include/arch/unix/dso.h:67: mach-o/dyld.h: No such file or directory make[3]: *** [dso.lo] Error 1 make[3]: Leaving directory `/usr/local/install/webapp/apr/dso/unix' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/install/webapp/apr/dso/unix' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/install/webapp/apr' make: *** [apr-all] Error 2 cheiron:/usr/local/install/webapp # What is mach-o? Thanks in advance. best regards, Steffen -- +--- This message is printed on 100% recycled electrons ---+ Steffen Haase mailto:[EMAIL PROTECTED] Java SmartCard Development http://www.celocom.com http://www.java-club.de Celo Communications GmbH - The provider of secure e-business Weissenfelser Str. 46a D-06217 Merseburg +--- cêlo, âvi, âtum, (latin) 1 ---+ S/MIME Cryptographic Signature
Re[2]: Running Tomcat as a Windows service
Hi, just use HotSpot Server VM. It works fine for me. Dalibor __ Reply Separator _ Subject: RE: Running Tomcat as a Windows service Author: [EMAIL PROTECTED] (Richard Heintze [EMAIL PROTECTED]) at INTERNET Date:7.8.2001 23:14 Jim, Ronald and Bryan, Could you folks kindly give me URL for this JavaService? I assume I'll have the same problem -- I'm using a service in the FAQ that runs any old bat file. I looked at the services that exclusively run java programs and then looked at the complexity of tomcat.bat and startup.bat and decided to go with the generic solutions that runs bat files. But this won't work if I log off the server? --- Jim Seach [EMAIL PROTECTED] wrote: I am also using the JavaService. It was easy to configure and has been very stable. No problems at all. Also, the way it solves the logout problem is by intercepting the Windows logoff message so you don't have to use the 1.3.1 jvm's -Xrs parameter. If you use the -Xrs parameter, you loose the ability to automatically run a shutdown hook. I haven't tested it, but I belive JavaService will still pass the Shutdown message to the jvm, so the shutdown hooks should run. Jim --- Ronald G. Louzon [EMAIL PROTECTED] wrote: If I remember correctly, this is due to a bug in the JDK and you can read all about it in the jakarta tomcat-user archives as well as in the bug reports on the Sun site (www.javasoft.com). I used the Alexandria Software companies Java service wrapper JavaService.exe . It is free, distributable and it works well. I am sure there are other service wrappers out there too. -Original Message- From: Bryan Hendricks [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 10:20 AM To: '[EMAIL PROTECTED]' Subject: Running Tomcat as a Windows service Hello, I installed Tomcat as a Windows (NT) service using jk_nt_service and set the service's startup type as automatic, but when I log off, the service shuts down. Is this a bug (in Tomcat, jk_nt_service, or the JRE) and, if so, do you know if the problem is being addressed? If it's not a bug, are there instructions that outline additional steps required to keep the service running? Thank you. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: web app in root directory
Hi Zhi, I'm not sure why some subfolders are unreachable, though without seeing the uriworkermap file contents its hard to guess. Thanks for rediscovering the case sensitivity issue. I had forgotten about that. Note: The proper way to map the root context is to specify path= instead of path=/. path= establishes the context as the default context, where path=/ makes the context just another web app. However, off the top of my head, I can't name a noticeable side effect of this. This doesn't mean there isn't one. Cheers, Larry -Original Message- From: Zhi Shen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 5:17 PM To: '[EMAIL PROTECTED]' Subject: RE: web app in root directory I have my IIS pointing to TOMCAT_HOME\webapps\myapp and also set server.xml to Context path=/ docBase=webapps/myapp crossContext=true debug=0 reloadable=true /Context But there are some subfolders that are unreachable. I will try to point everything to ROOT and see what happens. -zhi -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 4:49 PM To: '[EMAIL PROTECTED]' Subject: RE: web app in root directory I assume your IIS Home Directory is set to something other than TOMCAT_HOME\webapps\ROOT, such as the IIS default C:\Inetpub\wwwroot. Since IIS will serve static resources, a URL like http:/x.com/images/index.html will look for a file named C:\Inetpub\wwwroot\images\index.html which likely doesn't exist. I'm not familiar with IIS enough to know how well isapi_redirect can take control of the root context. You can try pointing IIS's Home Directory to TOMCAT_HOME\webapps\ROOT, which should allow those missing pages to be found. I can't tell if http://x.com/admin/ showing Tomcat's admin webapp should be expected without seeing the uriworkermap file you are using. If the right statements are present this behavior would be normal. Note, the comments above makes some assumptions about your configuration that haven't actually been specified. For example, I am assuming you are using a version of Tomcat 3.2.x. Cheers, Larry -Original Message- From: Zhi Shen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 3:37 PM To: '[EMAIL PROTECTED]' Subject: RE: web app in root directory I'm using IIS4.0 with Tomcat using isapi_redirect. -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 3:03 PM To: '[EMAIL PROTECTED]' Subject: RE: web app in root directory Since you are not including a port in the URL, it would appear that you are using Tomcat with Apache or some other web server. If so, which one? Both Tomcat and the other web server have their own idea of what the root context is. This can cause resources to not be visible because the wrong root context is being accessed. Please provide more detail about how Tomcat and possibly the other web server are configured. Cheers, Larry -Original Message- From: Zhi Shen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 2:44 PM To: '[EMAIL PROTECTED]' Subject: web app in root directory Hi, I'm interested in putting my web app in the root directory so that people can get to it via http://x.com/index.html instead of http://x.com/myapp/index.html Whenever I change the server.xml file: Context path= docBase=webapps/myapp crossContext=true debug=0 reloadable=true /Context Some of my subdirectories are not found, http:/x.com/images/index.html and also whenever I goto admin http://x.com/admin/ I get the Tomcat admin pages. Does anyone know how to configure this correctly? Thanks in advance.
RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3
I wrote a class around the javac from IBM,... Is this javac from IBM freely redistributable? I believe the javac that comes with Sun's JDK is not. That is the main reason for substituting javac with Jikes for many of us. I don't quitte get that question, as everyone is able to download sun's jdk from their site isn't it?? That's the same for the IBM jdk, with the only difference that you have to register yourself before you can download it. And, if you do not plan to redistribute your application, why not use tools.jar? You mean, the sun's javac compiler in the tools.jar? Mm... didn't thought about that option. Also, do you plan to post your solution in how to - step by step form so that users who encounter the same problem on AIX would benefit? 1. Copy JikesJavaCompiler.java from the Tomcat sources to IBMJavaCompiler.java 2. Remove the packagename from the top of the file, or insert a new package statement. 3. Add the -O option to the commandline String[] in compile() (to 'optimize' compilation) 3. Compile your class put it in a jar (jar -cvf ) 4. Put the jar file in the tomcat/lib directory 5. Add jspCompilerPlugin parameter to web.xml and specify your classname (IBMJavaCompiler) 6. Add jspCompilerPath parameter to web.xml and specify the executable of the compiler ($IBMJDK_HOME/sh/javac) 7. Flush work directory 8. Start tomcat 9. Your jsp's are being compiled with ibm's compiler. If not, check logs/jasper.log for initialization errors for your compiler. That's it. Rgrds, Klaas
cgi-bin
hi, Can anyone point me to a help page, or give some more information on how I can execute a perl script in a standalone Tomcat 4 setup ? Thanks, Christoph
RE: [repost] Re: Limitations in using a different Ajp port than the standard ? (WAS Re: SAAAAAAAM! :))
Hi Vincent, Thanks for finding this issue. There have been a lot of changes from Tomcat 3.2 to 3.3 with respect to classloaders and configuration, most of them improvements. Documenting these changes is still on the todo list. At the current level of implementation, starting two instances of Tomcat has been made more difficult by these changes. One problem is that the ajp12.id file is hardcoded in Http10Interceptor. It is on my todo list to make this configurable. Hopefully that would help deal with your situation. I'll try to deal with the other problems as time permits. Cheers, Larry -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 2:50 PM To: [EMAIL PROTECTED] Subject: Re: [repost] Re: Limitations in using a different Ajp port than the standard ? (WAS Re: SAAAM! :)) ok, as no one is interested by the subject, I'll reply to my own question :) By looking at the source code, I have found a workaround to stop Tomcat 3.3 on a custom AJP12 port and with a ContextManager home different from tomcat.home : Instead of using java -classpath tomcat.jar org.apache.tomcat.Main -stop use: java -classpath stop-tomcat.jar org.apache.tomcatStopTomcat -ajp12 path to ajp file I still find it strange that the behaviour changed as Tomcat 3.2.2 and Tomcat 4.0 behave the same. Only 3.3 is different. I still don't know if it is a bug or a feature ... :) Thanks -Vincent - Original Message - From: Vincent Massol [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Pier P. Fumagalli [EMAIL PROTECTED]; [EMAIL PROTECTED]; Sam Ruby [EMAIL PROTECTED] Sent: Sunday, August 05, 2001 9:24 PM Subject: [repost] Re: Limitations in using a different Ajp port than the standard ? (WAS Re: SAAAM! :)) Hi, I would like to use different ports than the standard Tomcat ones. For the HTTP listener, it works fine. However I am having trouble for the Ajp listener which is used to stop tomcat. The issue is the following : * When I start Tomcat I use my own server.xml file which is located in my own directory (I start Tomcat using the -config switch). In server.xml I also set the ContextManager home to be my own directory. So Tomcat generates an ajp12.id file in _that_ directory (and not into Tomcat home directory, which is normal and fine). The tomcat home directory is set to be the directory where I have installed Tomcat. * No, when I want to stop Tomcat, it seems Tomcat looks for an ajp12.id file but in the ${tomcat.home}/conf and _not_ in the directory defined in the ContextManager home or where my server.xml file is. In other words, it seems it is not possible to start 2 instances of Tomcat and only stop one running instance (the one with the different ajp port) by using only one Tomcat installation ? Is that a bug, a feature or have I forgotten something ? Please note that it only fails on Tomcat 3.3 (I have tried it on 3.3-b1 and on the nighlty build of 2/8/2001). It works fine on Tomcat 3.2.1 and on Tomcat 4.0. Find below my start, stop scripts and relevant portion of server.xml Thanks a lot. -Vincent start script --- target name=start_tomcat_33 java classname=org.apache.tomcat.startup.Main fork=yes jvmarg value=-Dtomcat.home=${tomcat.home.33}/ arg value=-config/ arg value=${out.tomcat33.full.dir}/conf/server.xml/ classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home.33}/lib include name=tomcat.jar/ /fileset /classpath /java /target stop script --- target name=stop_tomcat_33 java classname=org.apache.tomcat.startup.Main fork=yes jvmarg value=-Dtomcat.home=${tomcat.home.33}/ arg value=-stop/ arg value=-config/ arg value=${out.tomcat33.full.dir}/conf/server.xml/ classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home.33}/lib include name=tomcat.jar/ /fileset /classpath /java /target server.xml [...] RequestInterceptor className=org.apache.tomcat.modules.server.Ajp12Interceptor tomcatAuthentication=false port=8777 / - Original Message - From: Sam Ruby [EMAIL PROTECTED] To: Pier P. Fumagalli [EMAIL PROTECTED] Cc: Vincent Massol [EMAIL PROTECTED] Sent: Thursday, August 02, 2001 2:27 AM Subject: Re: SAAAM! :) Vincent, can you take a look at changing the port numbers from 8080 to something unique? Preferably, something controlable via a
RE: Fine tuning my Apache -Tomcat Server
Which connector are you using (ajp12 or ajp13). The last one should be a lot faster (ajp12 is frozen anyway). Also turning of unecessary debugging / logging in this area will speed up the process.. Mvgr, Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:12 PM To: [EMAIL PROTECTED] Subject: Fine tuning my Apache -Tomcat Server Hi, I have Apache and Tomact running on Linux server. The following are the details of the same Apache: Version : Apache_1.3.12-i686 Tomcat: Version: Jakarta-tomcat-3.2.1 Linux: Version :6.2 Java: Version : JDK 1.2.2 Hardware Configuration: Processor : Intel PIII CPU Cycles : 733 M Hz. RAM:256MB Hard Disk : 256 MB Applications : Technology : Java Servlet's Users: 100 users for every 10 minutes (approx) Network : Leased Line Band Width : 2 MegaBytes/Second My Current Problem: There are constant complaints that the server is slow in delivering the response to the users. But all the applications are working fine. Please help me out in fine tuning my Apache -Tomcat Server. Any inputs for improving server performance are highly appreciated. Thanks and Regards Srinivas Chebolu
Re: problem make webapp module for apache
Steffen Haase wrote: Hi, I have some problems to compile the webapp module (servlet engine) for the apache webserver. The compiler miss the following files: mach-o/dyld.h dlfcn.h dl.h Where can I find these header files? Which packages do I have to download? System: SuSE Linux 7.2, Apache 1.3.20 Module: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b6/src/webapp-module-1.0-tc40b6.src.tar.gz Error Message: Making all in dso/unix make[2]: Entering directory `/usr/local/install/webapp/apr/dso/unix' make[3]: Entering directory `/usr/local/install/webapp/apr/dso/unix' /bin/sh /usr/local/install/webapp/apr/libtool --silent --mode=compile cc -g -O2 -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -I../../include -I../../include/arch -I../../include/arch/unix -c dso.c touch dso.lo In file included from dso.c:55: ../../include/arch/unix/dso.h:67: mach-o/dyld.h: No such file or directory make[3]: *** [dso.lo] Error 1 make[3]: Leaving directory `/usr/local/install/webapp/apr/dso/unix' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/install/webapp/apr/dso/unix' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/install/webapp/apr' make: *** [apr-all] Error 2 cheiron:/usr/local/install/webapp # Have you done configure before doing make? What is mach-o? MacOS/X Thanks in advance. best regards, Steffen -- +--- This message is printed on 100% recycled electrons ---+ Steffen Haase mailto:[EMAIL PROTECTED] Java SmartCard Development http://www.celocom.com http://www.java-club.de Celo Communications GmbH - The provider of secure e-business Weissenfelser Str. 46a D-06217 Merseburg +--- cêlo, âvi, âtum, (latin) 1 ---+
RE: Tomcat Directory Listing
In the server.xml file change: RequestInterceptor className=org.apache.tomcat.request.StaticInterceptor debug=0 suppress=false / to specify: suppress=true This will turn off all directory listings. Larry -Original Message- From: Falk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:20 AM To: [EMAIL PROTECTED] Subject: Tomcat Directory Listing Hi, i'm using Tomcat3.2.1 standalone. Does anybody know how to deactivate the Directory Listing ? I mean if a browser requests a directory I don't want tomcat to send an overview of all the files contained in this directory. Thanks a lot. Falk
Using Servlet in different path then /examples/servlets/
Hi, How can I run servlet on my web server on different path than /examples/servlets/ I tried to define: Context path=/ docBase=C:/InetPub/wwwroot crossContext=false debug=0 reloadable=true /Context and its not working. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
RE: Fine tuning my Apache -Tomcat Server
Hemm are you sure for the size of your hard disk? Loïc Lefèvre -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 8 août 2001 16:12 À : [EMAIL PROTECTED] Objet : Fine tuning my Apache -Tomcat Server Hi, I have Apache and Tomact running on Linux server. The following are the details of the same Apache: Version : Apache_1.3.12-i686 Tomcat: Version: Jakarta-tomcat-3.2.1 Linux: Version :6.2 Java: Version : JDK 1.2.2 Hardware Configuration: Processor : Intel PIII CPU Cycles : 733 M Hz. RAM:256MB Hard Disk : 256 MB Applications : Technology : Java Servlet's Users: 100 users for every 10 minutes (approx) Network : Leased Line Band Width : 2 MegaBytes/Second My Current Problem: There are constant complaints that the server is slow in delivering the response to the users. But all the applications are working fine. Please help me out in fine tuning my Apache -Tomcat Server. Any inputs for improving server performance are highly appreciated. Thanks and Regards Srinivas Chebolu
Double loading when loading servlet on startup
Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Re: problem make webapp module for apache
Hi, jean-frederic clere wrote: Have you done configure before doing make? yes, of course. What is mach-o? MacOS/X where can I find it? It seems that I need these header files for compiling the webapp sources. best regards, Steffen
RE: Using Servlet in different path then /examples/servlets/
Try adding a url-pattern element to your web.xml. The servlet spec details the format of web.xml: http://java.sun.com/products/servlet/download.html -- Bill K. -Original Message- From: Yuval [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 8:24 AM To: Tomcat-User (E-mail) Subject: Using Servlet in different path then /examples/servlets/ Hi, How can I run servlet on my web server on different path than /examples/servlets/ I tried to define: Context path=/ docBase=C:/InetPub/wwwroot crossContext=false debug=0 reloadable=true /Context and its not working. Regards, Yuval Domain The Net Technologies Ltd. 6 Weitzman Blvd. Ramat-Hasharon Israel 47211 Tel: 972-3-5474443 Fax: 972-3-5474446 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you
Re: Using Servlet in different path then /examples/servlets/
Yuval wrote: How can I run servlet on my web server on different path than /examples/servlets/ I tried to define: Context path=/ docBase=C:/InetPub/wwwroot crossContext=false debug=0 reloadable=true /Context and its not working. In what way is it not working? What are you trying (e.g. what path)? Are you going against the Tomcat HTTP listener directly (by default on port 8080)? Do you get an error message in response, or in logs? You do have a WEB-INF/web.xml under C:/InetPub/wwwroot, don't you? dwh
Catalina. Resource factory gets re-created on every resource lookup!
Hello I am not sure it is desired behavior so I would like to bring it to your attention New instance of my factory gets created every time I lookup up a resource in the environment. i.e. Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/usorg); causes new instance of my connection pool be created. I can certainly work around the problem (have static hash of connection pools by JNDI name) but I would like to hear your opinion Thank you very much Alex Roytman
taglib problems
I'm having a problem with tags. They seam to work with the example foo.jsp as long as I leave the file alone. But if I cause the file to be updated, I get the following error in my browser window: Error: 500 Location: /examples/jsp/simpletag/foo.jsp No detailed message and this error in the stderr window: java.lang.NoSuchMethodError I'm not making any change to foo.jsp. I get this, for instance, if I load foo.jsp into Notepad, insert a space, then delete the space, then write the file back. Any ideas? Thanks, Tim
Re: File Upload Problem when bigger than 0.97 MB
Kalyan Mitra at [EMAIL PROTECTED] wrote: Hi there, I am facing problem when uploading file bigger than 0.97MB through MultipartPerser the error in log file shows as follows Please help if u have any idea. I don't see any error in the log file you provided... Pier
Re: problem make webapp module for apache
jean-frederic clere at [EMAIL PROTECTED] wrote: Steffen Haase wrote: Hi, I have some problems to compile the webapp module (servlet engine) for the apache webserver. The compiler miss the following files: mach-o/dyld.h dlfcn.h dl.h Where can I find these header files? Which packages do I have to download? [...] Have you done configure before doing make? Something must have gone wrong in configure. Under Linux mach-o shouldn't be defined, unless Suse didn't start integrating the NSMoule Dynamic Linker Loader... What is mach-o? MacOS/X Nope... It's MACH. It's a kernel used by several operating systems INCLUDING OS/X, but not only that. OS/2 is another example... Pier
Re: problem make webapp module for apache
Steffen Haase at [EMAIL PROTECTED] wrote: System: SuSE Linux 7.2, Apache 1.3.20 Module: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b6/src/webapp -module-1.0-tc40b6.src.tar.gz Hint... Use the latest CVS version, instead of this one. This one is known to have bugs. Pier
Re: problem make webapp module for apache
Steffen Haase at [EMAIL PROTECTED] wrote: Hi, jean-frederic clere wrote: Have you done configure before doing make? yes, of course. Upgrade to the latest CVS version, run configure and send me the output of what comes out of it... (Actually, read the whole README coming with the CVS version) What is mach-o? MacOS/X where can I find it? It seems that I need these header files for compiling the webapp sources. You can't FIND it... It's an operating system. Pier
Re: problem make webapp module for apache
Steffen Haase wrote: Hi, jean-frederic clere wrote: Have you done configure before doing make? yes, of course. What is mach-o? MacOS/X where can I find it? It seems that I need these header files for compiling the webapp sources. Finding it will not help. Something else is wrong. At least 2 things: 1 - What is the result of your configure? (There must be something wrong). 2 - On my machine I have: +++ In file included from apr_cpystrn.c:55: ../include/apr.h:281: sys/syslimits.h: No such file or directory make[3]: *** [apr_cpystrn.lo] Error 1 make[3]: Leaving directory `/home/jfclere/webapp/apr/strings' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/jfclere/webapp/apr/strings' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jfclere/webapp/apr' make: *** [apr-all] Error 2 +++ The APR included in webapp is not OK (At least for SuSe 7.2). I have used an other one from CVS (tagged APACHE_2_0_22_dev). It works OK. Could you try using APR from CVS? You have to solve 1 before 2 ;-) best regards, Steffen
Catalina. Jasper generates invalid java code
The problem with this piece of code generated for my JSP by tomcat4.0b6 is that it catches Throwable t and then call pageContext.handlePageException(t) which takse Exception NOT throwable !! as parameter as a result I am getting class cast exception: org.apache.jasper.JasperException: Unable to compile class for JSPnullD:\java\apache\tomcat4\work\localhost\usorg\_0002forgunits_jsp.ja va:225: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null) pageContext.handlePageException(t); ^ 1 error == } catch (Throwable t) { if (out != null out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } ==
Re: problem make webapp module for apache
Hi, jean-frederic clere wrote: Finding it will not help. Something else is wrong. At least 2 things: 1 - What is the result of your configure? (There must be something wrong). no, everything seems to be ok. 2 - On my machine I have: +++ In file included from apr_cpystrn.c:55: ../include/apr.h:281: sys/syslimits.h: No such file or directory make[3]: *** [apr_cpystrn.lo] Error 1 make[3]: Leaving directory `/home/jfclere/webapp/apr/strings' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/jfclere/webapp/apr/strings' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jfclere/webapp/apr' make: *** [apr-all] Error 2 +++ The APR included in webapp is not OK (At least for SuSe 7.2). yes, I had the same error. locate syslimits.h to find the right directory and ln - . sys to create the sys directory for sys/syslimits.h I have used an other one from CVS (tagged APACHE_2_0_22_dev). It works OK. Could you try using APR from CVS? where can I find it? which subproject? Steffen S/MIME Cryptographic Signature
Problems with init-param
Hello! I can not get the init-parameters that I specify in web.xml to work correctly. When I invoke the servlet as http://localhost:8080/pipechain/servlet/se.masystem.pipeline.web.servlet.Log inServlet then in init(ServletConfig): config.getInitParameter(propertyfile); returns null, but if I invoke the servlet with http://localhost:8080/pipechain/login it works! Should not these urls be equivalent? (Tomcat 3.2.2) /Claes (please cc me as I don't subscribe to the list) Below is the relevant fragment from web.xml: servlet servlet-name Login /servlet-name servlet-class se.masystem.pipeline.web.servlet.LoginServlet /servlet-class init-param param-namepropertyfile/param-name param-valuestart.properties/param-value /init-param /servlet servlet-mapping servlet-name Login /servlet-name url-pattern /login /url-pattern /servlet-mapping -- Claes Holmerson PipeChain AB Porfyrvägen 14 +46 (0)46 32 52 42 office phone SE-224 78 LUND +46 (0)709 89 52 42 mobile phone Sweden +46 (0)46 15 10 74 office fax http://www.pipechain.com/
How to get own Realm to work (seemes not to be used)
Hi, I wrote my own Realm, which connects to an EJB via JNDI. The EJB is looking at a database. I modified JDBCRealm and put it in my own package. I configured tomcat 3.2.3 (see above) and it started fine. The realm inited the connection to JBoss. The problem: the Realm is not used. I can access all the protected pages. Has anybody an answer? And who does the console output (see above)? It comes once for each webapp. It's not me in my realm. regards, Thomas my server.xml looks like this: RequestInterceptor className=de.tsystems.JNDIJDBCRealm userNameCol=KENNUNG userCredCol=PASSWORT userTable=IBENUTZER userRoleTable=IBENUTZER roleNameCol=ROLLE / my web.xml like this: security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-patterntest/*/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameTestrolle/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config The console output like this: 2001-08-08 17:36:58 - ContextManager: JNDIJDBCRealm: JDBCRealm has been started succesfully
Logging
In my servlet I use the log() method which logged to servlet.log. I have recently moved my context out of the webapps directory and into my own directory not in tomcat's directory structure. Now, everything works ok except nothing gets logged to servlet.log. Anybody know how to fix this? Jason E. Brawner Silenus Group (248) 735-8077
Re: problem make webapp module for apache
Pier P. Fumagalli wrote: Upgrade to the latest CVS version, run configure and send me the output of what comes out of it... (Actually, read the whole README coming with the CVS version) ok, I'll try it. Where can I find the newest apr sources? (cvs-tree) thanks a lot. Steffen -- +--- This message is printed on 100% recycled electrons ---+ Steffen Haase mailto:[EMAIL PROTECTED] Java SmartCard Development http://www.celocom.com http://www.java-club.de Celo Communications GmbH - The provider of secure e-business Weissenfelser Str. 46a D-06217 Merseburg +--- cêlo, âvi, âtum, (latin) 1 ---+ S/MIME Cryptographic Signature
Missing file, libstd++-libc6.1-1.so.2
Hi All, I just joined the list as I'm new to website admin duties and am trying to bring up a tomcat server on a linux/apache box. My current setup is RedHat 7, Apache 1.3.12, jdk1.3.1, and Tomcat 3.2.3. I've been working on this server with my free time for the last month or so. BTW, JAVA_HOME= /usr/java/jdk1.3.1 TOMCAT_HOME=/var/tomcat Here's my error that's in my tomcat log. /usr/java/jdk1.3.1/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory Indeed this file does not exist and I'm wondering how I should go about fixing that. Apache is operational and has been serving webpages for a while now. I think mod_jk is loading correctly (according to logs) but I have yet to attempt a jsp page as Tomcat does not start for me. Thanks for any help you can offer. Marty
RE: Problems with init-param
The answer really lies in how the spec indicates that instances of servlets are supposed to work. For each seperate URL pattern that a servlet responds to, a different instance is created. Each instance receives its own (seperately defeined) set of init-parameters. The spec never specifies the /servlet/className and this feature is provided by Tomcat only because so many people want the feature. These servlets (created by the servlet invoker) are a seperate instance from your URL pattern defined servlet, and therefore has a different set of parameters. If you really wanted this to work, the one workaround that I can think of right now it to set static variables in the servlet from the init method. Then you would need to make sure that only the correct servlet set the init parameters (like pass a parameter named GoodSet and only if that parameter is defined with a specificed value would you actuall set the static variables). Randy -Original Message- From: Claes Holmerson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 11:51 AM To: '[EMAIL PROTECTED]' Subject: Problems with init-param Hello! I can not get the init-parameters that I specify in web.xml to work correctly. When I invoke the servlet as http://localhost:8080/pipechain/servlet/se.masystem.pipeline.w eb.servlet.Log inServlet then in init(ServletConfig): config.getInitParameter(propertyfile); returns null, but if I invoke the servlet with http://localhost:8080/pipechain/login it works! Should not these urls be equivalent? (Tomcat 3.2.2) /Claes (please cc me as I don't subscribe to the list) Below is the relevant fragment from web.xml: servlet servlet-name Login /servlet-name servlet-class se.masystem.pipeline.web.servlet.LoginServlet /servlet-class init-param param-namepropertyfile/param-name param-valuestart.properties/param-value /init-param /servlet servlet-mapping servlet-name Login /servlet-name url-pattern /login /url-pattern /servlet-mapping -- Claes Holmerson PipeChain AB Porfyrvägen 14+46 (0)46 32 52 42 office phone SE-224 78 LUND+46 (0)709 89 52 42 mobile phone Sweden+46 (0)46 15 10 74 office fax http://www.pipechain.com/ -- --
Re: Double loading when loading servlet on startup
What version of tomcat? Alexander Cherinko wrote: Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Re: problem make webapp module for apache
Steffen Haase wrote: Hi, jean-frederic clere wrote: Finding it will not help. Something else is wrong. At least 2 things: 1 - What is the result of your configure? (There must be something wrong). no, everything seems to be ok. 2 - On my machine I have: +++ In file included from apr_cpystrn.c:55: ../include/apr.h:281: sys/syslimits.h: No such file or directory make[3]: *** [apr_cpystrn.lo] Error 1 make[3]: Leaving directory `/home/jfclere/webapp/apr/strings' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/jfclere/webapp/apr/strings' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jfclere/webapp/apr' make: *** [apr-all] Error 2 +++ The APR included in webapp is not OK (At least for SuSe 7.2). yes, I had the same error. locate syslimits.h to find the right directory and ln - . sys to create the sys directory for sys/syslimits.h I have used an other one from CVS (tagged APACHE_2_0_22_dev). It works OK. Could you try using APR from CVS? where can I find it? which subproject? cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co -r APACHE_2_0_22 apr (password anoncvs, see http://jakarta.apache.org/site/cvsindex.html). APACHE_2_0_22 is better that APACHE_2_0_22_dev... Steffen
Re: Fine tuning my Apache -Tomcat Server
Turn off servlet auto-reloading as well. I would recommend upgrading to 3.2.3, because of security problems and other bug fixes with 3.2.1 and 3.2.2. Just copy the new .jar files from 3.2.3 to your 3.2.1 installation and restart. It's that simple. (It's outlined in the 3.2.3 release notes...) --jeff - Original Message - From: Martin van den Bemt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 7:13 AM Subject: RE: Fine tuning my Apache -Tomcat Server Which connector are you using (ajp12 or ajp13). The last one should be a lot faster (ajp12 is frozen anyway). Also turning of unecessary debugging / logging in this area will speed up the process.. Mvgr, Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:12 PM To: [EMAIL PROTECTED] Subject: Fine tuning my Apache -Tomcat Server Hi, I have Apache and Tomact running on Linux server. The following are the details of the same Apache: Version : Apache_1.3.12-i686 Tomcat: Version: Jakarta-tomcat-3.2.1 Linux: Version :6.2 Java: Version : JDK 1.2.2 Hardware Configuration: Processor : Intel PIII CPU Cycles : 733 M Hz. RAM:256MB Hard Disk : 256 MB Applications : Technology : Java Servlet's Users: 100 users for every 10 minutes (approx) Network : Leased Line Band Width : 2 MegaBytes/Second My Current Problem: There are constant complaints that the server is slow in delivering the response to the users. But all the applications are working fine. Please help me out in fine tuning my Apache -Tomcat Server. Any inputs for improving server performance are highly appreciated. Thanks and Regards Srinivas Chebolu
Re: jasper: weird behaviour
You might be interested in this post from Tomcat-dev. --jeff --- Hi All! Different encodings support in Servlet/JSP is an ancient well-known problem. The setCharacterEncoding() method of HttpServletRequest allows to change request encoding before reading parameters. Thus, servlet is able to change encoding in accordance with its needs. (Small lyrical digression: what does this encoding mean? I'll post my thoughts about it separately) Howevet the problem still exists in JSP (there were several postings about the problem in this maillist). The purpose of this mail is to propose a solution for encodings support in JSP. Problem description === A JSP programmer is not able to change request encoding for incoming JSP request, since "This method [setCharacterEncoding] must be called prior to parsing any post data or reading any input from the request. Calling this method once data has been read will not affect the encoding." (Servlet 2.3 Spec). This happens because request parameters being read inside org.pache.jasper.servlet.JspServlet, before calling generated JSP-servlet. As a result we have the following behaviour of compiled JSP for non-English environments: 1) incoming request being read using 'ISO-8859-1' 2) getParameter() method returns a value in 'ISO-8859-1', but JSP-servlet suppose the return value has JVM default encoding (say "KOI8-R") -- here is ??? instead of real parameter value. Here is a problem. Problem solution There should be a configurable optional parameter for JspServlet (say 'requestEncoding') to change request encoding. According to this parameter JspServlet should call setCharacterEncoding() before processing request. It does not conflict with JSP 1.2 Spec, since there are now any words about default encoding of incoming request over there. I have made neccessary changes to implement this feature in tomcat-4.0-20010807. It works fine with different Cyrillic encodings. (Suppose the same result for the rest of non-Latin1 encodings). I clearly understand that proposed solution is not a panacea and it's a subject to discuss. Regards, Andrey Aristarkhov Diffs are followed (also as attachments). I have also attached a sample JSP for encoding testing. file: org/apache/jasper/EmbededServletOptions.java 147a148,152 * Java platform encoding for incoming request. */ private String requestEncoding; /** 219a225,228 public String getRequestEncoding() { return requestEncoding; } 320a330 this.requestEncoding = config.getInitParameter("requestEncoding"); file: org/apache/jasper/EmbededServletOptions.java 144a145,149 /** * Java platform encoding for incoming request. */ public String getRequestEncoding(); file: org/apache/jasper/servlet/JspServlet.java 422c422,426 String includeUri --- // According to section 4.9 of Servlet 2.3 spec we have to // setCharacterEncoding() before reading any parameter if (options.getRequestEncoding()!=null) request.setCharacterEncoding(options.getRequestEncoding()); String includeUri
RE: Double loading when loading servlet on startup
Got the same problem :(( (on v3.2.3 - NT) -Message d'origine- De : Alexander Cherinko [mailto:[EMAIL PROTECTED]] Envoye : mercredi 8 aout 2001 16:38 A : [EMAIL PROTECTED] Objet : Double loading when loading servlet on startup Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Re: problem make webapp module for apache
Steffen Haase at [EMAIL PROTECTED] wrote: Hi, jean-frederic clere wrote: Finding it will not help. Something else is wrong. At least 2 things: 1 - What is the result of your configure? (There must be something wrong). no, everything seems to be ok. Can you send the output? Pier
Re: problem make webapp module for apache
Steffen Haase at [EMAIL PROTECTED] wrote: Pier P. Fumagalli wrote: Upgrade to the latest CVS version, run configure and send me the output of what comes out of it... (Actually, read the whole README coming with the CVS version) ok, I'll try it. Where can I find the newest apr sources? (cvs-tree) thanks a lot. cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login (password anoncvs) cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co \ jakarta-tomcat-connectors/webapp Pier
RE: Double loading when loading servlet on startup
In the past, the cases of double loading I've seen have all been because an auto-loaded context (created by AutoSetup from the webapps directory) was also manually loaded as a second context, i.e. Context path=/othercontext docBase=webapps/examples ... Each context gets its own instance of servlets. As a result, init() is called twice, once for each context. There isn't enough information below to tell if this is the source of the double-loading. Cheers, Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Double loading when loading servlet on startup Got the same problem :(( (on v3.2.3 - NT) -Message d'origine- De : Alexander Cherinko [mailto:[EMAIL PROTECTED]] Envoye : mercredi 8 aout 2001 16:38 A : [EMAIL PROTECTED] Objet : Double loading when loading servlet on startup Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Re: About JSP Page Encoding
My understanding is that if you want properties files (and resource bundles based on them) to be encoded correctly, you need to use the native2ascii command line tool (comes with the JDK) to encode them properly. Craig On Wed, 8 Aug 2001 [EMAIL PROTECTED] wrote: Hi All Developer I would like to ask a question about Tomcat's JSP page development problems The problems is related to the following set of properties files and contentType I have set the page contentType as TEXT/HTML;charset=UTF-8 and read a properties files which is written by Microsoft Word using Save as encoding text utf-8 the coding that I use to read the resource bundle is as normal. rb = ResourceBundle.getBundle(test); str_text = rb.getString(username_b5); out.print(str_text + BR); But the output is found to be unreadable result. after that my friend tell me to use out.println(new String(rb.getString(test).getBytes(ISO-8859-1), UTF-8)); the result is readable. I would like to ask can I change some JVM default encoding such that I can use the default method to read the properties files. Samuel
Adding contextPpath and realPath to tomcat environment jndi
Hello I would like to propose to add several things to tomcat's context's environment jndi when a context gets created Specifically I am interested in context path, context real path and any other tomcat context runtime info If it will not violate security I would be happy if Context itself can be looked up via jndi. One of the uses of this kind of information will be to help jndi object factories which need this info to read its metadata from WEB-INF directory (i.e. many Object/Relational mappers need access to their metadata to be initialized). It is possible to use Environment entries for this purpose but it will be deployment nightmare because we will need to hardcode real path to context. If you think that this case is well justified it would be great if we could add it to Servlet specs Alex
RE: Double loading when loading servlet on startup
3.2.1 on NT/Linux. I had the same problem on earlier versions. And Loic Lefevre [[EMAIL PROTECTED]] has got the same on NT with v.3.2.3. --Che -Original Message- From: Mike McGuinness [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: Re: Double loading when loading servlet on startup What version of tomcat? Alexander Cherinko wrote: Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
RMI problem with packaged servlets
Hello, I have the following problem: I would use servlets ordered into packages as rmi-servers in Tomcat 3.2.1, but I failed. I followed the advices of Tomcat's app.dev.guide, using the proposed code-layout, but if servlets are put into packages, the stubs could'nt be found. I got the following: (servlets have load-on-startup attribute) 2001-08-08 02:43:26 - ContextManager: Adding context Ctx ( /examples ) 2001-08-08 02:43:26 - ContextManager: Adding context Ctx ( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-08-08 02:43:26 - ContextManager: Adding context Ctx( ) 2001-08-08 02:43:26 - ContextManager: Adding context Ctx ( /test ) 2001-08-08 02:43:26 - ContextManager: Adding context Ctx ( /maxwell ) Failed to connect to RMI registry RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: Managers.PiNewsMgr_Stub Failed to connect to RMI registry RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: Managers.NewspaperMgr_Stub 2001-08-08 02:43:29 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-08-08 02:43:29 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 Could anyone help me? I've already set the tomcat.properties: wrapper.env.copyall = true as well as server.xml: RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" / but none of them helped... Platform: WinNT 4.0 Remarks suggestions more than welcome Gabor
RE: Running Tomcat as a Windows service
As Pier said, it is with the TC4 distribution, and I think this may be the most up-to-date, new, official version, as there was some talk about bringing it under the Jakarta umbrella. Here is the original URL in case there is some documentation that has not yet made it into the distribution: http://www.alexandriasc.com/software/JavaService/index.html Jim --- Richard Heintze [EMAIL PROTECTED] wrote: Jim, Ronald and Bryan, Could you folks kindly give me URL for this JavaService? I assume I'll have the same problem -- I'm using a service in the FAQ that runs any old bat file. I looked at the services that exclusively run java programs and then looked at the complexity of tomcat.bat and startup.bat and decided to go with the generic solutions that runs bat files. But this won't work if I log off the server? --- Jim Seach [EMAIL PROTECTED] wrote: I am also using the JavaService. It was easy to configure and has been very stable. No problems at all. Also, the way it solves the logout problem is by intercepting the Windows logoff message so you don't have to use the 1.3.1 jvm's -Xrs parameter. If you use the -Xrs parameter, you loose the ability to automatically run a shutdown hook. I haven't tested it, but I belive JavaService will still pass the Shutdown message to the jvm, so the shutdown hooks should run. Jim --- Ronald G. Louzon [EMAIL PROTECTED] wrote: If I remember correctly, this is due to a bug in the JDK and you can read all about it in the jakarta tomcat-user archives as well as in the bug reports on the Sun site (www.javasoft.com). I used the Alexandria Software companies Java service wrapper JavaService.exe . It is free, distributable and it works well. I am sure there are other service wrappers out there too. -Original Message- From: Bryan Hendricks [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 10:20 AM To: '[EMAIL PROTECTED]' Subject: Running Tomcat as a Windows service Hello, I installed Tomcat as a Windows (NT) service using jk_nt_service and set the service's startup type as automatic, but when I log off, the service shuts down. Is this a bug (in Tomcat, jk_nt_service, or the JRE) and, if so, do you know if the problem is being addressed? If it's not a bug, are there instructions that outline additional steps required to keep the service running? Thank you. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Double loading when loading servlet on startup
The case: Nt/Linux v3.2.1,2,3. There is one context: Context path=/ts docBase=webapps/ts crossContext=true debug=1 reloadable=true(or false) trusted=false /Context The web.xml piece for this context servlet servlet-nameLoader/servlet-name servlet-classLoader/servlet-class load-on-startup1/load-on-startup /servlet jdb shows double classes named Loader loaded with different instances of org.apache.tomcat.loader.AdaptiveClassLoader12 which have generation field 2 and 4 correspondingly. If I call Class.forName(MyClass) in init method of servlet and MyClass is subclass of thread I have double threads. And so on. gc gets nothing and trying to interrupt threads in servlet's destroy method gets nothing as well. And this occurs only when servlet is marked as load-on-startup. For ordinary servlet there is nothing like this. --Che -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 7:58 PM To: '[EMAIL PROTECTED]' Subject: RE: Double loading when loading servlet on startup In the past, the cases of double loading I've seen have all been because an auto-loaded context (created by AutoSetup from the webapps directory) was also manually loaded as a second context, i.e. Context path=/othercontext docBase=webapps/examples ... Each context gets its own instance of servlets. As a result, init() is called twice, once for each context. There isn't enough information below to tell if this is the source of the double-loading. Cheers, Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Double loading when loading servlet on startup Got the same problem :(( (on v3.2.3 - NT) -Message d'origine- De : Alexander Cherinko [mailto:[EMAIL PROTECTED]] Envoye : mercredi 8 aout 2001 16:38 A : [EMAIL PROTECTED] Objet : Double loading when loading servlet on startup Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Please remove me
Please remove me form this mailing list
RE: Problems with init-param
Per the spec, servlet initialization parameters work like this: * Servlet initialization parameters are tied to servlet definitions in web.xml * The container uses the servlet-mapping settings in web.xml to map whatever request URI comes in to a particular servlet definition. * Therefore, a servlet can only see initialization parameters if it has been explicitly defined *and* mapped. * The way that Tomcat does anonymous servlet invoking (/servlet/{name}) is by defining the invoker servlet, and then mapping the /servlet/* URL pattern to it. Therefore, according to the above rules, any servlet executed through the invoker servlet would see the initialization parameters for the invoker servlet itself. As Randy pointed out, invoker service is totally outside the specification, so you cannot expect identical behavior on all containers. The safe thing to do is use explicit servlet definitions and servlet-mapping mappings, which will always work as described above. Craig McCLanahan On Wed, 8 Aug 2001, Randy Layman wrote: The answer really lies in how the spec indicates that instances of servlets are supposed to work. For each seperate URL pattern that a servlet responds to, a different instance is created. Each instance receives its own (seperately defeined) set of init-parameters. The spec never specifies the /servlet/className and this feature is provided by Tomcat only because so many people want the feature. These servlets (created by the servlet invoker) are a seperate instance from your URL pattern defined servlet, and therefore has a different set of parameters. If you really wanted this to work, the one workaround that I can think of right now it to set static variables in the servlet from the init method. Then you would need to make sure that only the correct servlet set the init parameters (like pass a parameter named GoodSet and only if that parameter is defined with a specificed value would you actuall set the static variables). Randy -Original Message- From: Claes Holmerson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 11:51 AM To: '[EMAIL PROTECTED]' Subject: Problems with init-param Hello! I can not get the init-parameters that I specify in web.xml to work correctly. When I invoke the servlet as http://localhost:8080/pipechain/servlet/se.masystem.pipeline.w eb.servlet.Log inServlet then in init(ServletConfig): config.getInitParameter(propertyfile); returns null, but if I invoke the servlet with http://localhost:8080/pipechain/login it works! Should not these urls be equivalent? (Tomcat 3.2.2) /Claes (please cc me as I don't subscribe to the list) Below is the relevant fragment from web.xml: servlet servlet-name Login /servlet-name servlet-class se.masystem.pipeline.web.servlet.LoginServlet /servlet-class init-param param-namepropertyfile/param-name param-valuestart.properties/param-value /init-param /servlet servlet-mapping servlet-name Login /servlet-name url-pattern /login /url-pattern /servlet-mapping -- Claes Holmerson PipeChain AB Porfyrvägen 14 +46 (0)46 32 52 42 office phone SE-224 78 LUND +46 (0)709 89 52 42 mobile phone Sweden +46 (0)46 15 10 74 office fax http://www.pipechain.com/ -- --
Re: How to get own Realm to work (seemes not to be used)
One problem is with your url-pattern -- it is missing a leading slash on the front. Try /test/* instead of test/*. Craig On Wed, 8 Aug 2001, Amrhein, Thomas wrote: Hi, I wrote my own Realm, which connects to an EJB via JNDI. The EJB is looking at a database. I modified JDBCRealm and put it in my own package. I configured tomcat 3.2.3 (see above) and it started fine. The realm inited the connection to JBoss. The problem: the Realm is not used. I can access all the protected pages. Has anybody an answer? And who does the console output (see above)? It comes once for each webapp. It's not me in my realm. regards, Thomas my server.xml looks like this: RequestInterceptor className=de.tsystems.JNDIJDBCRealm userNameCol=KENNUNG userCredCol=PASSWORT userTable=IBENUTZER userRoleTable=IBENUTZER roleNameCol=ROLLE / my web.xml like this: security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-patterntest/*/url-pattern /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameTestrolle/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config The console output like this: 2001-08-08 17:36:58 - ContextManager: JNDIJDBCRealm: JDBCRealm has been started succesfully
Re: Segmentation violation
Harippriya Sivapatham at [EMAIL PROTECTED] wrote: Hi there, I am getting a segmentation violation in tomcat (the full error message is added to the end of this mail). Tomcat stops when this error occurs. I am getting this error when i call a particular servlet. The error message displays a lot about Threads. So, i just want to note that the servlet that causes this problem does not use any threads. I would really appreciate any help with this. Thanks a lot. Harippriya Here is error message... SIGSEGV 11 segmentation violation si_signo [11]: SEGV si_errno [0]: si_code [1]: SEGV_MAPERR [addr: 0x45a0920] What version of Tomcat are you using? What version of Java Virtual Machine? What operating system? (Kinda hard to tell without those informations) :) Pier
Re: Adding contextPpath and realPath to tomcat environment jndi
On Wed, 8 Aug 2001, Roytman, Alex wrote: Hello I would like to propose to add several things to tomcat's context's environment jndi when a context gets created Sounds like a good discussion for TOMCAT-DEV ... Specifically I am interested in context path, context real path and any other tomcat context runtime info If it will not violate security I would be happy if Context itself can be looked up via jndi. One of the uses of this kind of information will be to help jndi object factories which need this info to read its metadata from WEB-INF directory (i.e. many Object/Relational mappers need access to their metadata to be initialized). It is possible to use Environment entries for this purpose but it will be deployment nightmare because we will need to hardcode real path to context. If you think that this case is well justified it would be great if we could add it to Servlet specs Adding it to the servlet specs would be pretty problematic ... the org.apache.catalina.Context interface is very much specific to Tomcat 4. However, making additional info available to these resource factories (which are already Tomcat-specific anyway) sounds reasonable. Alex, could you put in a Bugzilla report for an enhancement, outlining the specific things you'd like to see available to an object factory? That way the idean won't get lost in the mailing lists. http://nagoya.apache.org/bugzilla/ Alex Craig
Re: Running Tomcat as a Windows service
Jim Seach at [EMAIL PROTECTED] wrote: As Pier said, it is with the TC4 distribution, and I think this may be the most up-to-date, new, official version, as there was some talk about bringing it under the Jakarta umbrella. Here is the original URL in case there is some documentation that has not yet made it into the distribution: http://www.alexandriasc.com/software/JavaService/index.html Correct... We're trying to provide a full-blown service implementation together to solve also Unix daemon problems and restrictions... Pier
Re: JSP encoding problem solution proposal (fwd)
Since the topic of character encoding on requests came up on TOMCAT-USER as well, I thought I'd forward a response I did on TOMCAT-DEV earlier. Read Andrey's message (at the bottom) first for this to make any sense. Craig -- Forwarded message -- Date: Wed, 8 Aug 2001 09:52:53 -0700 (PDT) From: Craig R. McClanahan [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat-Dev [EMAIL PROTECTED] Subject: Re: JSP encoding problem solution proposal Andrey has done a good job of describing the problem with calling request.setCharacterEncoding() in JSP pages. As an alternative to adding a parameter to the JSP servlet (which would not be portable to other containers), I'd like to offer a standards-based approach to this. The basic approach I'm going to suggest is to use a Filter (also new in the Servlet 2.3 API) to do the setCharacterEncoding() call for you. This has many advantages: * It's portable across all 2.3-based containers * You can use different rules for different portions of your webapp * The rules you implement do not have to be as simple as all requests use this character set -- you can base the decision on other aspects of the request (like who the user is, objects in the session, what user agent they are using, and so on). * The rules can be implemented (and updated later) without changing anything about your servlets and JSP pages, because it's done in a separate component. As it happens, I recently added a simple Filter implementation that does this to the examples webapp in Tomcat 4. Check out /WEB-INF/classes/filters/SetCharacterEncodingFilter.java, which you are free to use as the basis for setting character filtering in your own apps. The implementation provided is very simple (use an initialization parameter to set the encoding unconditionally), but you can easily subclass to make more sophisticated policy decisions. Filters are your friend :-). Craig On Wed, 8 Aug 2001, Andrey Aristarkhov wrote: Hi All! Different encodings support in Servlet/JSP is an ancient well-known problem. The setCharacterEncoding() method of HttpServletRequest allows to change request encoding before reading parameters. Thus, servlet is able to change encoding in accordance with its needs. (Small lyrical digression: what does this encoding mean? I'll post my thoughts about it separately) Howevet the problem still exists in JSP (there were several postings about the problem in this maillist). The purpose of this mail is to propose a solution for encodings support in JSP. Problem description === A JSP programmer is not able to change request encoding for incoming JSP request, since This method [setCharacterEncoding] must be called prior to parsing any post data or reading any input from the request. Calling this method once data has been read will not affect the encoding. (Servlet 2.3 Spec). This happens because request parameters being read inside org.pache.jasper.servlet.JspServlet, before calling generated JSP-servlet. As a result we have the following behaviour of compiled JSP for non-English environments: 1) incoming request being read using 'ISO-8859-1' 2) getParameter() method returns a value in 'ISO-8859-1', but JSP-servlet suppose the return value has JVM default encoding (say KOI8-R) -- here is ??? instead of real parameter value. Here is a problem. Problem solution There should be a configurable optional parameter for JspServlet (say 'requestEncoding') to change request encoding. According to this parameter JspServlet should call setCharacterEncoding() before processing request. It does not conflict with JSP 1.2 Spec, since there are now any words about default encoding of incoming request over there. I have made neccessary changes to implement this feature in tomcat-4.0-20010807. It works fine with different Cyrillic encodings. (Suppose the same result for the rest of non-Latin1 encodings). I clearly understand that proposed solution is not a panacea and it's a subject to discuss. Regards, Andrey Aristarkhov Diffs are followed (also as attachments). I have also attached a sample JSP for encoding testing. file: org/apache/jasper/EmbededServletOptions.java 147a148,152 * Java platform encoding for incoming request. */ private String requestEncoding; /** 219a225,228 public String getRequestEncoding() { return requestEncoding; } 320a330 this.requestEncoding = config.getInitParameter(requestEncoding); file: org/apache/jasper/EmbededServletOptions.java 144a145,149 /** * Java platform encoding for incoming request. */ public String getRequestEncoding(); file: org/apache/jasper/servlet/JspServlet.java 422c422,426 String includeUri --- // According to section 4.9 of Servlet 2.3 spec we have to //
AdaptiveClassLoader.getResources( String name )?
is there a version of Tomcat for which AdaptiveClassLoader.getResources is implemented?
Nevermind on missing libstdc++-libc6.1-1.so.2 file
Nevermind on the missing file that I mentioned earlier. It's a problem with RedHat7.0 and the J2SDK. The solution is to upgrade to 7.1 or patch in the missing libraries. Sorry about that. Marty
RE: Double loading when loading servlet on startup
I tried this scenario with Tomcat 3.2.1 and I only get one call to init(). Are you on Windows? If your ts directory is actually named Ts, I think you would get two context's. What does your tomcat log show about contexts being added? Larry -Original Message- From: Alexander Cherinko [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 1:51 PM To: [EMAIL PROTECTED] Subject: RE: Double loading when loading servlet on startup The case: Nt/Linux v3.2.1,2,3. There is one context: Context path=/ts docBase=webapps/ts crossContext=true debug=1 reloadable=true(or false) trusted=false /Context The web.xml piece for this context servlet servlet-nameLoader/servlet-name servlet-classLoader/servlet-class load-on-startup1/load-on-startup /servlet jdb shows double classes named Loader loaded with different instances of org.apache.tomcat.loader.AdaptiveClassLoader12 which have generation field 2 and 4 correspondingly. If I call Class.forName(MyClass) in init method of servlet and MyClass is subclass of thread I have double threads. And so on. gc gets nothing and trying to interrupt threads in servlet's destroy method gets nothing as well. And this occurs only when servlet is marked as load-on-startup. For ordinary servlet there is nothing like this. --Che -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 7:58 PM To: '[EMAIL PROTECTED]' Subject: RE: Double loading when loading servlet on startup In the past, the cases of double loading I've seen have all been because an auto-loaded context (created by AutoSetup from the webapps directory) was also manually loaded as a second context, i.e. Context path=/othercontext docBase=webapps/examples ... Each context gets its own instance of servlets. As a result, init() is called twice, once for each context. There isn't enough information below to tell if this is the source of the double-loading. Cheers, Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Double loading when loading servlet on startup Got the same problem :(( (on v3.2.3 - NT) -Message d'origine- De : Alexander Cherinko [mailto:[EMAIL PROTECTED]] Envoye : mercredi 8 aout 2001 16:38 A : [EMAIL PROTECTED] Objet : Double loading when loading servlet on startup Hi problem is that when I mark servlets as load-on-startup they are loaded twice in jvm. I want this servlet to serve as initializer i.e. to initialize some other classes in its init method. The worst is that that classes are double loaded too. I.e. I want to init class which is Thread subclass to perform periodical custom action. As result I have double threads running in jvm and making the same things! That was obviousely not my real intention. From the other hand when I launch that initializer from common servlet (not loaded on startup) the problem is not present. The most strange thing about it is that in both cases all classes are loaded with the same ClassLoader. I cannot understand is it a bug or just I don't understand something. Please help. --Che
Cant Run Tomcat4.05b under Win ME?
Hi Please help. Im trying to run tomcat4.05b under Win ME. Having installed Jdk1.3.1 into c:\jdk1.3.1 and unpacked the Tomcat 4.05b version into the default C:\jakarta-tomcat-4.0-b5 folder. Then having modified the Environment settings such that: C:\WINDOWSSET COMSPEC=C:\WINDOWS\COMMAND.COM C:\WINDOWSSET windir=C:\WINDOWS C:\WINDOWSSET winbootdir=C:\WINDOWS C:\WINDOWSSET PROMPT=$p$g C:\WINDOWSSET TEMP=C:\WINDOWS\TEMP C:\WINDOWSSET TMP=C:\WINDOWS\TEMP C:\WINDOWSSET PATH=C:\PROGRA~1\MICROS~1\OFFICE;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\Program Files\Mts C:\WINDOWSSET JAVA_HOME=c:\jdk1.3.1 C:\WINDOWSSET CLASSPATH=c:\jdk1.3.1\lib C:\WINDOWSSET TOMCAT_HOME=C:\jakarta-tomcat-4.0-b5 C:\WINDOWSSET JAXP_HOME=C:\JDK1.3.1\JAXP1.1 C:\WINDOWSSET SHELL=c:\windows\command.com /P /E:8192 is returned by a 'command /p' entered at the command prompt When I invoke the startup.bat file, all i get is : out of environment space out of environment space out of environment space out of environment space out of environment space using CLASSPATH: bad command or filename Returned in the command prompt window?? I have upped the /E: value to the max 32786 value and still get this display?? please advise. Phil K
Tomcat Worker Name
Hi, I'm trying to figure out there is any limitation to Tomcat worker name such as size, special character... Thanks. Don Ha __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
start tomcat under apache, different port
Hi I have got tomcat 3.2.3 and mod_jk working with apache 1.3.19 But I don't want to serve the servlets under port 80 where apache is. And I don't want to run tomcat as stand alone. Is it possible to tell mod_jk and tomcat to host the servlets on a secure port other than 80, under apache? and have apache running on port 80 for static files. ie. http://myhost.com/statics/show.html http://myhost.com:XXX/servlets/Hello instead of http://myhost.com/servlets/Hello I understand that this is possible if I don't use mod_jk and run tomcat as stand alone. But I want to use mod_jk and apche as explained above. Thanks -- Sahar Madani Senior Software Engineer
RE: start tomcat under apache, different port
In the conf directory, modify the tomcat.conf , search for port 80, but I think the default is 8080. You can change that to whatever you like from that file. -Original Message- From: Sahar Madani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 2:26 PM To: [EMAIL PROTECTED] Subject: start tomcat under apache, different port Hi I have got tomcat 3.2.3 and mod_jk working with apache 1.3.19 But I don't want to serve the servlets under port 80 where apache is. And I don't want to run tomcat as stand alone. Is it possible to tell mod_jk and tomcat to host the servlets on a secure port other than 80, under apache? and have apache running on port 80 for static files. ie. http://myhost.com/statics/show.html http://myhost.com:XXX/servlets/Hello instead of http://myhost.com/servlets/Hello I understand that this is possible if I don't use mod_jk and run tomcat as stand alone. But I want to use mod_jk and apche as explained above. Thanks -- Sahar Madani Senior Software Engineer
JSP and Connection Pooling
I apologize in advance if this question has been asked and answered, but I couldn't find it in the archives. I want the simplest way to use connection pooling from Tomcat in my JSP pages. I'm trying to avoid using add on products like PoolMan since it seems like it should be easy enough without them. (Tell me if this is incorrect.) A few specific questions: 1. I would like instructions on making this work with ODBC on Win2K (with SQL Server). What do I name the driver? How do I make the connection to Tomcat's pool? Do I need to mess with JNDI? With Struts connection pools, I can just ask for the default pool without specifying a name. Can I do that here? What's a good source (book and/or web site) on JNDI/Connection pool access? Is there an example on the web? Is this answered in an FAQ somewhere? 2. Same question as #1 except on a Linux box without ODBC (obviously). Where do I specify user ID and password? Driver? 3. Same question again using WebSphere. Thanks in advance!
RE: Missing file, libstd++-libc6.1-1.so.2
Hi, Probably installing the compat* library rpms from the redhat cd, which contains the older libraries will solve the problem Mvgr, Martin -Original Message- From: Marty Haught [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 6:03 PM To: [EMAIL PROTECTED] Subject: Missing file, libstd++-libc6.1-1.so.2 Hi All, I just joined the list as I'm new to website admin duties and am trying to bring up a tomcat server on a linux/apache box. My current setup is RedHat 7, Apache 1.3.12, jdk1.3.1, and Tomcat 3.2.3. I've been working on this server with my free time for the last month or so. BTW, JAVA_HOME= /usr/java/jdk1.3.1 TOMCAT_HOME=/var/tomcat Here's my error that's in my tomcat log. /usr/java/jdk1.3.1/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory Indeed this file does not exist and I'm wondering how I should go about fixing that. Apache is operational and has been serving webpages for a while now. I think mod_jk is loading correctly (according to logs) but I have yet to attempt a jsp page as Tomcat does not start for me. Thanks for any help you can offer. Marty
Re: problem make webapp module for apache
Hi Pier, thanks for your help. Pier P. Fumagalli wrote: Finding it will not help. Something else is wrong. At least 2 things: 1 - What is the result of your configure? (There must be something wrong). no, everything seems to be ok. Can you send the output? I checked out the apr (APACHE_2_0_22) and the jakarta-tomcat-connectors sources. I can compile the sources but not linking :( Steffen make -- Compiling sources in /usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/lib... make[1]: Entering directory `/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/lib' Generating pr_warp_defs.h make[1]: Leaving directory `/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/lib' Compiling sources in /usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/apache-1.3... make[1]: Entering directory `/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/apache-1.3' Compiling Apache 1.3 WebApp module *Initialization*:1: warning: `LINUX' redefined *Initialization*:1: warning: this is the location of the previous definition Linking Apache 1.3 WebApp Module /usr/local/install/jakarta/apr/libtool: mod_webapp.lo: command not found make[1]: *** [mod_webapp.so] Error 127 make[1]: Leaving directory `/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/apache-1.3' make: *** [local-all] Error 2 cheiron:/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp # - ./configure --- cheiron:/usr/local/install/jakarta/jakarta-tomcat-connectors/webapp #./configure --with-apxs=/usr/local/httpd/bin/apxs --with-apr=/usr/local/install/jakarta/apr/ loading cache ./config.cache checking for test... (cached) /usr/bin/test checking for true... (cached) /bin/true checking for echo... (cached) /bin/echo checking for grep... (cached) /usr/bin/grep checking for cat... (cached) /bin/cat checking for sed... (cached) /usr/bin/sed checking for rm... (cached) /bin/rm checking sources directory... /usr/local/install/jakarta/jakarta-tomcat-connectors/webapp checking debugging flags... disabled checking Java support... disabled checking Tomcat 4.0 directory... not required checking if apxs is working... ok setting target module to... /usr/local/install/jakarta/jakarta-tomcat-connectors/webapp/apache-1.3 checking APR directory... /usr/local/install/jakarta/apr Building APR configure script Invoking: ./buildconf APR buildconf: buildconf: checking installation... APR buildconf: buildconf: autoconf version 2.13 (ok) APR buildconf: buildconf: libtool version 1.3.5 (ok) APR buildconf: Copying libtool helper files ... APR buildconf: Creating include/arch/unix/apr_private.h.in ... APR buildconf: Creating configure ... Execution of ./buildconf returned 0 Configuring APR Invoking: ./configure --enable-static --disable-shared --disable-threads APR configure: loading cache ./config.cache APR configure: checking host system type... i586-pc-linux-gnu APR configure: checking target system type... i586-pc-linux-gnu APR configure: checking build system type... i586-pc-linux-gnu APR configure: Configuring APR library APR configure: Platform: i586-pc-linux-gnu APR configure: Applying APR hints file rules for i586-pc-linux-gnu APR configure: setting CPPFLAGS to -DLINUX=2 APR configure: adding -D_REENTRANT to CPPFLAGS APR configure: (Default will be unix) APR configure: checking whether make sets ${MAKE}... (cached) yes APR configure: checking for gcc... (cached) gcc APR configure: checking whether the C compiler (gcc ) works... yes APR configure: checking whether the C compiler (gcc ) is a cross-compiler... no APR configure: checking whether we are using GNU C... (cached) yes APR configure: checking whether gcc accepts -g... (cached) yes APR configure: checking how to run the C preprocessor... (cached) gcc -E APR configure: checking for mawk... (cached) gawk APR configure: checking whether ln -s works... (cached) yes APR configure: checking for ranlib... (cached) ranlib APR configure: checking for a BSD compatible install... (cached) /usr/bin/install -c APR configure: checking for rm... (cached) rm APR configure: checking for ar... (cached) ar APR configure: checking for AIX... no APR configure: checking for POSIXized ISC... no APR configure: checking for minix/config.h... (cached) no APR configure: checking whether system uses EBCDIC... (cached) no APR configure: performing libtool configuration... APR configure: checking for ld used by GCC... (cached) /usr/i486-suse-linux/bin/ld APR configure: checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld... (cached) yes APR configure: checking for BSD-compatible nm... (cached) /usr/bin/nm -B APR configure: loading cache ./config.cache within ltconfig APR configure: checking for object suffix... o APR configure: checking for executable
Redirection and Load Balancing
Hi All, Current System Architecture Apache : 3.17 (Custom Build) Tomcat : 3.2.2 (Custom Build) Deployment : war files. Platform : Red Hat Linux 6.2 We are after a method to redirect based on a limit on the number of page hits or the load on the current Web Server. The redirection needs to be performed by Apache or Tomcat not by the web page itself. Currently we are redirecting the user to another Web Server from the current page as the page hits reach a certain limit or the load is too much on the current box. A better way to conduct this is to redirect the call to another Web Server at the Web Server or Servlet Engine level, in our case that's Apache or Tomcat. Its not clear to us where in Apache or Tomcat we can configure things based on page hits or load if its possible to do at all. Many thanks in advance for any help in this area. Regards, George Shafik
RE: Redirection and Load Balancing
You can use mod_jk to load balance between different JVMs running Tomcat. Works well, we use it. The JVMs could then also be on remote machines to either each other, and/or the machine running Apache. mod_jk will preserve sessions for you so that subsequent request go to the right JVM. You'll need to configure the workers.properties, etc. to use the 'loadbalancer' worker. Paul -Original Message- From: George Shafik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:40 PM To: [EMAIL PROTECTED] Subject: Redirection and Load Balancing Hi All, Current System Architecture Apache : 3.17 (Custom Build) Tomcat : 3.2.2 (Custom Build) Deployment : war files. Platform : Red Hat Linux 6.2 We are after a method to redirect based on a limit on the number of page hits or the load on the current Web Server. The redirection needs to be performed by Apache or Tomcat not by the web page itself. Currently we are redirecting the user to another Web Server from the current page as the page hits reach a certain limit or the load is too much on the current box. A better way to conduct this is to redirect the call to another Web Server at the Web Server or Servlet Engine level, in our case that's Apache or Tomcat. Its not clear to us where in Apache or Tomcat we can configure things based on page hits or load if its possible to do at all. Many thanks in advance for any help in this area. Regards, George Shafik
RE: Redirection and Load Balancing
Is it possible to use mod_jk with standalone tomcat ? Thanks for your help Mandar -Original Message- From: Paul Nock [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:44 PM To: [EMAIL PROTECTED] Subject: RE: Redirection and Load Balancing You can use mod_jk to load balance between different JVMs running Tomcat. Works well, we use it. The JVMs could then also be on remote machines to either each other, and/or the machine running Apache. mod_jk will preserve sessions for you so that subsequent request go to the right JVM. You'll need to configure the workers.properties, etc. to use the 'loadbalancer' worker. Paul -Original Message- From: George Shafik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:40 PM To: [EMAIL PROTECTED] Subject: Redirection and Load Balancing Hi All, Current System Architecture Apache : 3.17 (Custom Build) Tomcat : 3.2.2 (Custom Build) Deployment : war files. Platform : Red Hat Linux 6.2 We are after a method to redirect based on a limit on the number of page hits or the load on the current Web Server. The redirection needs to be performed by Apache or Tomcat not by the web page itself. Currently we are redirecting the user to another Web Server from the current page as the page hits reach a certain limit or the load is too much on the current box. A better way to conduct this is to redirect the call to another Web Server at the Web Server or Servlet Engine level, in our case that's Apache or Tomcat. Its not clear to us where in Apache or Tomcat we can configure things based on page hits or load if its possible to do at all. Many thanks in advance for any help in this area. Regards, George Shafik
Re: start tomcat under apache, different port
mod_jk and apache don't use tomcat.conf. this file is used for jserv only. the new file is mod_jk.conf-auto But this is NOT what I am trying to do. Thanks Nael Mohammad wrote: In the conf directory, modify the tomcat.conf , search for port 80, but I think the default is 8080. You can change that to whatever you like from that file. -Original Message- From: Sahar Madani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 2:26 PM To: [EMAIL PROTECTED] Subject: start tomcat under apache, different port Hi I have got tomcat 3.2.3 and mod_jk working with apache 1.3.19 But I don't want to serve the servlets under port 80 where apache is. And I don't want to run tomcat as stand alone. Is it possible to tell mod_jk and tomcat to host the servlets on a secure port other than 80, under apache? and have apache running on port 80 for static files. ie. http://myhost.com/statics/show.html http://myhost.com:XXX/servlets/Hello instead of http://myhost.com/servlets/Hello I understand that this is possible if I don't use mod_jk and run tomcat as stand alone. But I want to use mod_jk and apche as explained above. Thanks -- Sahar Madani Senior Software Engineer -- Sahar Madani Senior Software Engineer Excite@Home http://www.home.net (650)556-5000
RE: Redirection and Load Balancing
At 03:51 PM 8/8/2001, you wrote: Is it possible to use mod_jk with standalone tomcat ? No, mod_jk is an apache binary module. How could tomcat alone use it?
RE: Redirection and Load Balancing
Then is there any mechanism on tomcat standalone for load balancing ? Thanks Mandar -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:02 PM To: [EMAIL PROTECTED] Subject: RE: Redirection and Load Balancing At 03:51 PM 8/8/2001, you wrote: Is it possible to use mod_jk with standalone tomcat ? No, mod_jk is an apache binary module. How could tomcat alone use it?
Re: Redirection and Load Balancing
Sounds great Paul. What sort of environment are you using mod_jk in ? - OS platform - Version of Apache, Tomcat - How many versions of Apache and Tomcat are you running in parallel in order to mirror your Web Site so you can perform your load balancing. - Are all your binaries custom built ? Can you please e-mail me directly all relevant Apache/Tomcat configuration files that I need to alter in order to use mod_jk in the manner you describe. If this is too difficult cut and past the relevant pieces commenting on where they are from into one file. Regards, George Shafik [EMAIL PROTECTED] - Original Message - From: Paul Nock [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 09, 2001 8:44 AM Subject: RE: Redirection and Load Balancing You can use mod_jk to load balance between different JVMs running Tomcat. Works well, we use it. The JVMs could then also be on remote machines to either each other, and/or the machine running Apache. mod_jk will preserve sessions for you so that subsequent request go to the right JVM. You'll need to configure the workers.properties, etc. to use the 'loadbalancer' worker. Paul -Original Message- From: George Shafik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:40 PM To: [EMAIL PROTECTED] Subject: Redirection and Load Balancing Hi All, Current System Architecture Apache : 3.17 (Custom Build) Tomcat : 3.2.2 (Custom Build) Deployment : war files. Platform : Red Hat Linux 6.2 We are after a method to redirect based on a limit on the number of page hits or the load on the current Web Server. The redirection needs to be performed by Apache or Tomcat not by the web page itself. Currently we are redirecting the user to another Web Server from the current page as the page hits reach a certain limit or the load is too much on the current box. A better way to conduct this is to redirect the call to another Web Server at the Web Server or Servlet Engine level, in our case that's Apache or Tomcat. Its not clear to us where in Apache or Tomcat we can configure things based on page hits or load if its possible to do at all. Many thanks in advance for any help in this area. Regards, George Shafik
Re: Missing file, libstd++-libc6.1-1.so.2
The RH website has a note that jdk1.3.1 doesn't work correctly. An upgrade to RH7.1 will resolve the problem. On Wednesday 08 August 2001 06:06 pm, you wrote: Hi, Probably installing the compat* library rpms from the redhat cd, which contains the older libraries will solve the problem Mvgr, Martin -Original Message- From: Marty Haught [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 6:03 PM To: [EMAIL PROTECTED] Subject: Missing file, libstd++-libc6.1-1.so.2 Hi All, I just joined the list as I'm new to website admin duties and am trying to bring up a tomcat server on a linux/apache box. My current setup is RedHat 7, Apache 1.3.12, jdk1.3.1, and Tomcat 3.2.3. I've been working on this server with my free time for the last month or so. BTW, JAVA_HOME= /usr/java/jdk1.3.1 TOMCAT_HOME=/var/tomcat Here's my error that's in my tomcat log. /usr/java/jdk1.3.1/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory Indeed this file does not exist and I'm wondering how I should go about fixing that. Apache is operational and has been serving webpages for a while now. I think mod_jk is loading correctly (according to logs) but I have yet to attempt a jsp page as Tomcat does not start for me. Thanks for any help you can offer. Marty -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers
Problem in Intigration Apache Tomcat
Hi All, I am using Apache and Tomcat in Sun os. It's running nice my problem is that if i use www.mydomain.com apache is responding.For tomcat i need to give www.mydomain.com/domain/servlet/Test but it's not giving result. It's responding only when i call port directly like www.mydomain.com:8080/domain/servlet/Test Apache is running on 80. So what will be the problem. Give me a solution regards sekhar _ For Rs. 2,000,000 worth of Aptech scholarships click below http://clients.rediff.com/clients/aptechsch/index.htm
RE: Such a thing as server startup class?
Hi all: Yes, a good discussion. I puzzled over this for an application I wrote a while ago. After many hours contemplating the servlet spec (2.2), I finally decided that if I created an object and dropped it into the application context, it was guaranteed to live as long as the servlet container. My logic was this: - The servlet container can load/unload servlets at its pleasure - A servlet marked Load-on-startup will be loaded and have its init() method called when the container starts, even if its not mapped to a URL. - Java won't finalize an instance so long as another instance or class has a reference to it. - The application context will maintain a reference to the instance. - If the servlet container destroys the application context, it's probably a sign that I should reinitialize everything anyway. Could some of the folks who are more familiar with the specs and implementation comment on whether this logic is correct and portable to all containers? It worked for the application under Tomcat 3.x, but I've always had nagging doubts. Thanks, Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 8:51 PM To: [EMAIL PROTECTED] Subject: Re: Such a thing as server startup class? On Mon, 6 Aug 2001, Erik Weber wrote: In a servlet 2.2 world, what most people do is declare a servlet to be load-on-startup and initialize things in the init() method of that servlet. This is relying on the container to never unload that servlet for the lifetime of the app (Tomcat doesn't unload anything until shutdown time), but it basically works. Craig McClanahan Good point. If the Servlet were to be unloaded, another instance would need to be loaded right away. Is there any (platform-independent) way to guarantee that at least one instance of a Servlet will always be loaded, even if it's not set up to handle HTTP requests? Sounds like time for my favorite URL reference - where to get the spec so you can look stuff like this up for yourself :-) http://java.sun.com/products/servlet/download.html On this particular issue, there is no such platform-independent API. In fact, the 2.2 and 2.3 specs explicitly remind you that you *cannot* rely on servlet will stay loaded behavior in a portable application. The container is free (as far as the spec is concerned) to unload a loaded servlet any time it feels like doing so. That was one of the primary reasons that application event listeners were added in 2.3 -- to give apps a portable mechanism that does not rely on non-guaranteed assumptions about servlet lifetime, or on container specific implementation features. -Erik Craig
RE: Using Tomcat with MSAccess
For what's happening now, you need to print out the SQL, make sure it's syntactically correct, and print out the exception message that's returned. Don't know if it's just me, but I find that I tend to make really dumb SQL errors For later, you should ask yourself what will happen when Patrick O'Reilly tries to register? Also, when you're doing string comparisons, you should get into the habit of using .equals(passwd) rather than passwd.equals( ) It looks a little strange, but will behave correctly if passwd happens to be null (if for instance your page was called from an HTML file that did not include the passwd field in the form). Cheers, Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: Jeffrey Worst [mailto:[EMAIL PROTECTED]] Sent: Friday, August 03, 2001 10:09 PM To: [EMAIL PROTECTED] Subject: Using Tomcat with MSAccess I'm writing an applet using Tomcat to register new members for a library. Everything works fine until I get to the part where the new information is being inserted into the MSAccess DB. I have commented below where the error occurs. Any help would be appreciated. Thanks, Jeff -- //New member registration import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; import java.sql.*; public class NewMember extends HttpServlet { private Statement statement = null; private Connection connection = null; String url = jdbc:odbc:NewMember; String username=; String password=; public void init( ServletConfig config ) throws ServletException { super.init( config ); try { Class.forName( sun.jdbc.odbc.JdbcOdbcDriver ); connection = DriverManager.getConnection( url, username, password ); } catch ( Exception e ) { e.printStackTrace(); connection = null; } } public void doPost( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { String passwd, member_type, fname, mname, lname, address1, address2, city, zip, country, home_phone, work_phone, email, member_since, remarks; passwd= req.getParameter( passwd ); member_type = req.getParameter( member_type ); fname = req.getParameter( fname ); mname = req.getParameter( mname ); lname = req.getParameter( lname ); address1 = req.getParameter( address1 ); address2 = req.getParameter( address2 ); city = req.getParameter( city ); zip = req.getParameter( zip ); country = req.getParameter( country ); home_phone = req.getParameter( home_phone ); work_phone = req.getParameter( work_phone ); email = req.getParameter( email ); member_since = req.getParameter( member_since ); remarks = req.getParameter( remarks ); PrintWriter output = res.getWriter(); res.setContentType( text/html ); if ( passwd.equals( ) || fname.equals( ) || lname.equals( ) ) { output.println( H3 Please click the back + button and fill in all + fields./H3 ); output.close(); return; } //Below is where the problem occurs. I get the HTML message below of An error occured... //I think the insertIntoDB method is not working. It's being inserted into a MSAccess DB //which has been registered. boolean success = insertIntoDB(' + passwd + ',' + member_type + ',' + fname + ',' + mname + ',' + lname + ',' + address1 + ',' + address2 + ',' + city + ',' + zip + ',' + country + ',' + home_phone + ',' + work_phone + ',' + email + ',' + member_since + ',' + remarks + ' ); if ( success ) output.print( H2Thank you + fname + for registering./H2 ); else output.print( H2An error occurred. + Please try again later./H2 ); output.close(); } private boolean insertIntoDB( String stringtoinsert ) { try { statement = connection.createStatement(); statement.execute( INSERT INTO NewMember values ( + stringtoinsert + ); ); statement.close(); } catch ( Exception e ) { System.err.println( ERROR: Problems with adding new entry ); e.printStackTrace(); return false; } return true; } public void destroy() { try { connection.close(); } catch( Exception e ) { System.err.println( Problem closing the database ); } } }