RE: jndi.properties
i think , it is actully related to where you are looking for. i think you can put it anyware as long as the diretory you put it is accessible. http://asahin.net private static final String CONFIG_FILE=resources/jndi.properties; FileInputStream fis = new FileInputStream(CONFIG_FILE); myProperties.load(fis); -Original Message- From: Feris Thia [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 3:35 PM To: users@tomcat.apache.org Subject: jndi.properties Hi, I try to put jndi.properties under the same folder with JSP page. But it's not working. Where should I put it ? -- Regards, Feris PT. Putera Handal Indotama JL. KH. Moh. Mansyur No. 11 Blok B.8-12 Telp. +62-21-631 6688 (Hunting) Fax. +62-21-6330211 Jakarta (10140) - INDONESIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jndi.properties
i never tried it with default ctor, used it as new InitialContext(jndiProperties); using DirectoryFinding methods may help you like below. String realPath = request.getRealPath(request.getContextPath()); That should return the path up to where you have your servlet context. -Original Message- From: Feris Thia [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 3:56 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: jndi.properties Ic so we cannot just load it from the directory where jsp are and use this code ? = InitialContext jndiContext = new InitialContext(); = On 5/3/06, abdurrahman sahin [EMAIL PROTECTED] wrote: i think , it is actully related to where you are looking for. i think you can put it anyware as long as the diretory you put it is accessible. http://asahin.net private static final String CONFIG_FILE=resources/jndi.properties; FileInputStream fis = new FileInputStream(CONFIG_FILE); myProperties.load(fis); -- Regards, Feris PT. Putera Handal Indotama JL. KH. Moh. Mansyur No. 11 Blok B.8-12 Telp. +62-21-631 6688 (Hunting) Fax. +62-21-6330211 Jakarta (10140) - INDONESIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Preload of servlet does not work with Tomcat 5.5.15
hi; i have a servlet with load-on-startup / tag and no mapping is defined and it is working with tomcat 5.0.28 http://asahin.net -Original Message- From: Markus Schönhaber [mailto:[EMAIL PROTECTED] Sent: Monday, April 24, 2006 9:57 AM To: Tomcat Users List Subject: Re: Preload of servlet does not work with Tomcat 5.5.15 Tom Bednarz wrote: I defined the following in the web.xml of my web application: servlet servlet-nameMTWInit/servlet-name servlet-classch.smartsol.mtweb.servlets.MTWInit/servlet-class init-param param-nameMailConfiguration/param-name param-value/WEB-INF/config/Mail.properties/param-value /init-param load-on-startup1/load-on-startup /servlet This servlet is NOT loaded at all. This is true for the following situations: - when running in Eclipse (with MyEclipse IDE) debugger, the breakpoints in the servlets init() function are NEVER hit - when running tomcat as service (under Windows) no log entries are written which means init() is never called Any idea what could be wrong?? WAG: maybe you did overload GenericServlet#init instead of overriding it. But I doubt that anyone can tell for sure with so little information provided. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: iis 6.0 + apache-tomcat 5.0.28
hi; it looks like you have different application versions, please ensure that you have the same java version all around the whole system. http://asahin.net -Original Message- From: Sergio Gonzalez Ramos [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 3:46 PM To: Tomcat Users List Subject: iis 6.0 + apache-tomcat 5.0.28 I'm getting following error Apr 17, 2006 6:28:57 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class listeners.SessionListener java.lang.ClassFormatError: Extra bytes at the end of class file listeners/SessionListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo ader.java:1812) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav a:866) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1319) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1198) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3677) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 59) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Apr 17, 2006 6:28:57 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) I'm trying to setup one iis 6.0 with Tomcat 5.0.28 and mod_jk (isapi_redirector.dll) Can someone tell me what error i'm facing. Regards. Sergio Gonzalez Ramos - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Remote User with request.getRemoteUser()
hi; why dont you try to print all http-headers, so that you can see each header and its corresspoing value. http://asahin.net -Original Message- From: Sergio Stateri Jr [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 6:11 PM To: users@tomcat.apache.org Subject: Remote User with request.getRemoteUser() Hi, I?m having NTLM authentication problems with IIS 6 (over Windows 2003 Server) and Tomcat 5.5.16, using JK1.2 conector: - In a ASP page, the code %=Request.ServerVariable(REMOTE_USER)% prints the Windows logged user, but in Tomcat, the code %=request.getRemoteUser()% prints null and the code %=request.getHeader(IIS-REMOTE-USER)% prints null too. Here?s my workers2.properties from JK2 : [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=D:\Tomcat559\temp\jk2.shm size=1048576 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # Map webapps to the Web server uri space [uri:/embaixador/*] And here?s a piece of my Tomcat?s server.xml : !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / If in ASP the remote user name is printed, why the same code doesn?t work in java ? Another information: The same configuration works fine over Windows 2000 Professional and Windows XP. This error only occurs over Windows 2003 Server. Thanks in advance for any help. Sergio Stateri Jr. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Tomcat over NFS over multiple hosts, want to separate locations of directories
you may try to manually run tomcat via a script, that may help you to assign tomcat variables seperately i run tomcat via a script (guistart.sh) containing that CATALINA_HOME=$ARGELA_RUN_HOME/SANE_GUI_WEB/tomcat export CATALINA_HOME cd $CATALINA_HOME/bin java -Dcatalina.base=$CATALINA_HOME -Dcatalina.home=$CATALINA_HOME -Djava.en dorsed.dirs=$CATALINA_HOME/common/endorsed -Djava. io.tmpdir=$CATALINA_HOME/temp -cp $CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar org.apache.catalina.startup.Bootst rap start -Original Message- From: Mark Demma [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 5:06 AM To: users@tomcat.apache.org Subject: Using Tomcat over NFS over multiple hosts, want to separate locations of directories Hello folks I am currently trying to convert from Resin Pro 3.0.17 to Tomcat 5.5. We have several Solaris 9 machines and we generally place applications in a NFS mounted /usr/dist/ directory, which is RO for the web application servers. I have a local link, /usr/resin - /usr/dist/pkgs/resin which points to /usr/dist/pkgs/resin/ - vers/resin-pro-3.0.17 so that I can easily install a new version of resin by changing that link. I have my RESIN_HOME=/usr/resin, which is the NFS mount and my SERVER_ROOT=/usr/local/resin, which is a local directory. In my resin.conf, I use web-app-deploy path=/w/${mode}/warfiles expand-path=/usr/local/resin/webapps/ to have Resin look on another NFS mounted directory /w for its warfiles, which it expands in the locally mounted /usr/local/resin. This setup allows me to have my resin config files, binaries, shared libraries, etc, on a central NFS server, my warfiles on another NFS server and the only thing I need to have local is the webapps dir where it explodes the war files, and cache and session. I am thus able to turn a machine into a resin server by copying over one rc file, which when invoked creates the /usr/local/resin dir and pulls everything else it needs off of NFS. I've been scouring the web for days trying to figure out how to make Tomcat do the same thing, but can't for the life of me figure out how... the two main problems I run into is the inability to separate the web app deploy path, i.e. where it LOOKS for the warfiles and the expand path, where it expands them. The other problem is wanting to put the conf/ files in a different location from the webapp/ files. $CATALINA_BASE seems to be the extent to which you can separate things, and it wants to put conf, logs, shared, webapps. work. temp together... So my question is how in Tomcat do I put the bin/ common/ conf/ server/ and shared/ directories in one location (NFS mounted RO) the temp/ webapps/ and work / locally ; logs/ (all of them, including catalina.out) in a sepate location NOT in $CATALINA_BASE or HOME; AND put the location Tomcat looks for new .war files in another NFS mounted location. I know I could do it all with sym-links, but god that would be messy. Any suggestions? Mark Demma Senior UNIX Systems Admin PlanetOut Inc.
percent sign in URI
I realized apache2 web server properyl handles % sign in URIs, i need = exact functionality on tomcat 5 too. When I try to pass a parameter containing % sign, the parameter value on = the server seems null. like http://localhost:8080/aSite/aPage?query=hi%everybody Tomcat 5 cannot handle that, Is there a way to do it with tomcat 5. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: percent sign in URI
hi; my friend tried it, reported that it didn't work. abdurrahman -Original Message- From: Aurélien DEHAY [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 11:29 AM To: Tomcat Users List Subject: Re: percent sign in URI Hello. abdurrahman sahin wrote: I realized apache2 web server properyl handles % sign in URIs, i need = exact functionality on tomcat 5 too. When I try to pass a parameter containing % sign, the parameter value on = the server seems null. like http://localhost:8080/aSite/aPage?query=hi%everybody Tomcat 5 cannot handle that, Is there a way to do it with tomcat 5. What happens if you set URIEncoding=UTF-8 to your connector in server.xml file? -- Aurélien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: percent sign in URI
hi David; I am aware of the case. As I stated before Apache2 server properly handles that problem and I need that functionality because our customer's system built on it. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 11:58 AM To: Tomcat Users List Subject: Re: percent sign in URI Hello abdurrahman, Your url is incorrect, replace it with http://localhost:8080/aSite/aPage?query=hi%25everybody According to rfc 1738, 2.2. URL Character Encoding Issues Octets must be encoded ..., if the use of the corresponding character is unsafe, ... The character % is unsafe because it is used for encodings of other characters. Thus, only alphanumerics, the special characters $-_.+!*'(),, and reserved characters used for their reserved purposes may be used unencoded within a URL. There is no details in RFC on how to handle badly shaped urls (like % not followed by 2 hex digits) and thus your urls should not rely upon this. Regards. abdurrahman sahin a écrit : I realized apache2 web server properyl handles % sign in URIs, i need = exact functionality on tomcat 5 too. When I try to pass a parameter containing % sign, the parameter value on = the server seems null. like http://localhost:8080/aSite/aPage?query=hi%everybody Tomcat 5 cannot handle that, Is there a way to do it with tomcat 5. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: percent sign in URI
hi David; I think I'll try your 2nd solution offer. thank you for your help. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 1:16 PM To: Tomcat Users List Subject: Re: percent sign in URI How does your customer system handle this? http://localhost:8080/aSite/aPage?query=I%fear%dead%results badly, obviously :) Possible solutions: 1) You can still try in servlet 'aPage' to grab the request using request.getQueryString() which should returns you query=hi%everybody 2) You can write a servlet filter for /* which will create a new HttpServletRequest Object with parameters you parse in your way from the getQueryString() above 3) You can open tomcat source, patch the url decoder, and use it What ever solution is choosen, customer will be bound to a side effect of error handling in server. abdurrahman sahin a écrit : hi David; I am aware of the case. As I stated before Apache2 server properly handles that problem and I need that functionality because our customer's system built on it. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 11:58 AM To: Tomcat Users List Subject: Re: percent sign in URI Hello abdurrahman, Your url is incorrect, replace it with http://localhost:8080/aSite/aPage?query=hi%25everybody According to rfc 1738, 2.2. URL Character Encoding Issues Octets must be encoded ..., if the use of the corresponding character is unsafe, ... The character % is unsafe because it is used for encodings of other characters. Thus, only alphanumerics, the special characters $-_.+!*'(),, and reserved characters used for their reserved purposes may be used unencoded within a URL. There is no details in RFC on how to handle badly shaped urls (like % not followed by 2 hex digits) and thus your urls should not rely upon this. Regards. abdurrahman sahin a écrit : I realized apache2 web server properyl handles % sign in URIs, i need = exact functionality on tomcat 5 too. When I try to pass a parameter containing % sign, the parameter value on = the server seems null. like http://localhost:8080/aSite/aPage?query=hi%everybody Tomcat 5 cannot handle that, Is there a way to do it with tomcat 5. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]