Re: Unable to use Python/CGI from Tomcat....
Is it worth writing a quick ksh script to validate your hypothesis that the environment (and specifically LD_LIBRARY_PATH) isn't being passed through? additionally (as a crap workaround) you could create a quick script which would set the LD_LIBRARY_PATH path and then invoke python, and use that in your shebang line... also, might it not be an idea to a have a specific instance of CGIServlet that has executable=python, rather than piping to ksh and then to python? (ie why bother with the shebang line, if you don't really need it...) just a few ideas, FWIW... Tim Ed Hillmann wrote: I'm attempting to set up our Tomcat server to run ViewCVS, which is a Python application. I've set up Python on my Solaris 8 box. I've noticed that to start python, I need to include a library (libgdbm.so.3) in my LD_LIBRARY_PATH. Which I do, and Python starts up fine. I've copied the cgi script into the appropriate directory in my Tomcat server. CGI is enabled, because we have other scripts being executed from within Tomcat. But whenever I attempt to call the new Python script, I get the error... 2005-07-19 14:14:32 cgi: runCGI (stderr):ld.so.1: /ct/ctapp/python241/bin/python: fatal: libgdbm.so.3: open failed: No such file or directory Which looks a lot like the error I get if that library is not in my LD_LIBRARY_PATH. I've mucked around with startup.sh to displayed that the processes starting the Tomcat JVM does have this library in it's environment. But whatever is executing the CGI script from within the JVM is not passing along the environment variables. The servlet definition in my web.xml looks like... servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valuecgi-bin/param-value /init-param init-param param-nameexecutable/param-name param-value/usr/bin/ksh/param-value /init-param init-param param-namepassShellEnvironment/param-name param-valuetrue/param-value /init-param load-on-startup5/load-on-startup /servlet So, because passShellEnvironment is true, I expected the shell environment to be passed along to the cgi script. It doesn't seem to be. Am I missing something else? Surely I can't be the first one to come up against this? Thanks for any help, Ed Do you Yahoo!? Messenger 7.0 beta: Free worldwide PC to PC calls http://au.beta.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request too long
Are you doing get or post? Yair Zohar wrote: Hello, I'm building a web application on tomcat 4.1.18 which is connected to apache 2 web server by ajp13 connector. I get the response : Server Error The following error occurred: [code=HTTP_REQUEST_TOO_LONG] The HTTP request is too long. Contact your system administrator. when I press the submit button of a form with an html textarea with large amount of text. When I reduce the amount of text in the textarea it works fine. I assume it's a tomcat response because the apache usually gives an error number. Does anyone know if there is a place, in the conf files, to rise the maximal length of the request accepted by tomcat? Or, does anyone know a solution for this problem? Thanks ahead, Yair. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
I don't know the answer, but can you confirm you are either: 1) using jdk 1.5 or 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5) as the compatibility package (as I understand it) addresses xml parser versioning/instantiation issues. -- Tim Craig Dixon wrote: I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Recommend a UK Tomcat host
I was just about to recommend postive-internet. They are very good - customer support is good, and they are real tecchies - they understand respond well if you give a technical support query in technical language (often not the case!). I've really only heard good things about them, and have had a good overall experience of them for the past couple of years. That said, I've never used tomcat with them. (But use them for python/php stuff). The only problem I heard with them is that they don't do much variety in products - namely the leap between z-hosting (shared) and deducated/managed servers is quite a hike in price -- Tim Darren Carman wrote: Not sure if they use tomcat or not (the tomcat piccie is displayed in one of their images) but you could ask. I am not with them any more but had 1st class service while I was. http://www.positive-internet.com/products.html -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 08 July 2005 09:45 To: 'Tomcat Users List' Cc: 'Struts Users Mailing List' Subject: [OT] Recommend a UK Tomcat host Apologies for the repost to the Tomcat list but I am getting desperate. Can anyone recommend a UK based Tomcat hosting solution? I have been let down by my current ISP (nameonthe.net) which has gone out of business. Your help is greatly appreciated. TIA Mark - 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: Automatic deploy with ant and Tomcat 4.1.31
the tomcat deploy task doesn't build the war, it only deploys it, so unlikely that it is at fault. Have you checked the war manually to ensure it unzips normally with some zip util? also the unzipping is not really done by the deploy task - but is something that tomcat does at some point as part of its process of deploying a war. --Tim Peter Verhoye wrote: Hi, I'm trying to use an Ant build script to deploy/install a war file to a local Tomcat server. I've found and read the documentation. The task I use is as follows: target name=tomcat.install description=Installs the Web Application depends=package echo message=Installing ${tomcat.app.name} .../ install url=${tomcat.manager.url} username=${tomcat.manager.username} password=${tomcat.manager.password} path=/${tomcat.app.name} config=file:${basedir}/${assemble}/META-INF/context.xml war=file:${basedir}/${artifacts}/${war.file}/ /target Now, the war file to be installed is copied in the local work folder of the manager application but the unzipping of the war file does not work well. It seems only the WEB-INF directory gets unzipped, the other files/folders are nowhere to be seen. Anyway offer any help? Thanks in advance, Peter - 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: error while building with jakarta-ant-1.5.1
are you sure that you're using the right tools.jar (ie corresponds to the one you're building with)? Could conceivalby be on your classpath in multiple places, so check classpath in order (like javac will) Is there a strong reason for using ant 1.5.1 rather than current release of 1.6.5? And why not use a binary release anyway, given that it is (I think...) a pure java package... -- Tim shyama wrote: Hi Bernhard, Thanks though. My classpath is containing /java/lib/tools.jar. Please let me know if it needs some other .jar files to build. Thanks BS -Original Message- From: Bernhard Slominski [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 3:09 PM To: 'Tomcat Users List' Subject: AW: error while building with jakarta-ant-1.5.1 It looks like the tools.jar is missing in your classpath, this is not part of the JRE but the jdk and located under you jdk directory under the lib subdirectory. Cheers Bernhard -Ursprüngliche Nachricht- Von: shyama [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 1. Juli 2005 11:13 An: tomcat-user@jakarta.apache.org Betreff: Reg:error while building with jakarta-ant-1.5.1 Hi All, While Iam building my project on itanium platform, the following errors have been reported. Can anyone help me out ? Thanks, BS == ... Bootstrapping Ant Distribution ... Compiling Ant Classes Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. ... Copying Required Files ... Building Ant Distribution Buildfile: build.xml bootstrap: prepare: check_for_optional_packages: build: /Tomcat/jakarta-ant-1.5.1/src/main/org/apache/tools/ant/taskde fs/optiona l/Javah.java:349: cannot resolve symbol symbol : constructor Main (java.lang.String[]) location: class com.sun.tools.javah.Main = new com.sun.tools.javah.Main(cmd.getArguments()); ^ /Tomcat/jakarta-ant-1.5.1/src/main/org/apache/tools/ant/taskde fs/optiona l/Javah.java:350: cannot resolve symbol symbol : method run () location: class com.sun.tools.javah.Main main.run(); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. 2 errors BUILD FAILED Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remote deployment
Hi - Have you read the Application Developers Guide? http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/ contains a great overview of best practices a very useful build.xml http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/build.xml.txt as for docs of the tasks themselve, I think the only reliable online documentation is the javadocs for catalina-ant, which dictate how to use the various tasks (the tasks translate into classes). for the deploy task: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/ant/DeployTask.html and if you don't want to create a war file, then you'll have to get the files to the server first and then use the localWar, otherwise you can use a local war file:// url which will upload them. (typically localWar is quick and dirty for use on your local development machine, then war it up - very easy with the build.xml above - and use the war style of the deploy task.) -- Tim Vernon wrote: I need to use the Ant to do remote deployment on TC, not using war file format if possible. I have done some search on the web and don't find the information I need. My development box is Window XP and the deployment box is Linux. Can any one point out an online documentation in this regard? Thanks. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat default page
Are you aware that what is show at http://www.mydomain.com:8080 is the output of the ROOT webapp? You can change this webapp as you like (ofr example to one that just displays an single error page for example). IMHO, best to change this using a deployment method rather than editing the expanded root webapp in place. Some suggestions for mechanisms are at (diddn't find a similar page in the tomcat docs): http://www.oreillynet.com/cs/user/view/cs_msg/62284 -- Tim Tony Smith wrote: I would like to try both... --- Brereton, Stephen [EMAIL PROTECTED] wrote: Do you mean to display another page, or to stop the access via port 8080? -Original Message- From: Tony Smith [mailto:[EMAIL PROTECTED] Sent: 28 June 2005 22:39 To: Tomcat Users List Subject: tomcat default page I install tomcat on my machine and my webapp can be accessed as http://www.mydomain.com:8080/myapp/index.jsp. If I type http://www.mydomain.com:8080, the default tomcat page will be displayed. How can I change this page to something else, or forbid it? Thanks, __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. This email represents the personal views of the author/sender. The author/sender has no authority or delegation to bind the City of York Council by this e-mail and the City of York Council accepts no responsibility whatsoever for its contents. Please note that any reply to this email may be screened. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Convert URL path from directory/ to directory/index.htm (Spring related)
Hi Andy - Control of what to handle in tomcat and how to forward is fairly limited. (someone posted the relevant parts of the servlet spec) What I do is have tomcat forward all requests to spring, except for ones I really want tomcat's default servlet to handle (static stuff like images, css), so I have the following in the web.xml servlet-mapping servlet-namedefault/servlet-name url-pattern*.gif/url-pattern /servlet-mapping servlet-mapping servlet-namedefault/servlet-name url-pattern*.png/url-pattern /servlet-mapping servlet-mapping servlet-namedefault/servlet-name url-pattern*.css/url-pattern /servlet-mapping servlet-mapping servlet-namemy_spring_dispatcher/servlet-name url-pattern//url-pattern /servlet-mapping The control you have on url-mapping is much finer in spring - so why not do everything you want there... This __does__ mean you have to handle 404 etc type problems within spring (but again, quite easy to have a catch-all handler for these). I only do the default mappings so spring doesn't need to handle obviously static resouces. hth Tim Andy wrote: Hi, Is there anyway to get Tomcat to convert a request such as myserver.com/directory into myserver.com/directory/index.htm. The reason for this is that in Spring you have to specify a wild card to match against the URL path in order to invoke the DispatcherServlet, if this wild card is *.htm then a requested without index.htm in it results in a 404 from Tomcat. i.e. myserver.com/directory - gives a 404 response myserver.com/directory/index.htm - invokes Spring to deal with the request Perhaps this is an issue I can solve within Spring but thought I'd try the Tomcat angle first. This is what I have in my web.xml for Spring - servlet servlet-nameabc/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-cl ass load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameabc/servlet-name url-pattern*.htm/url-pattern /servlet-mapping Thanks, Andy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat hang everyday
are you using mysql in your webapp? (timeout on connections) Rajasekar wrote: Hi, I am using tomcat5.0 with java1.5.0. Every i have to restart the my tomcat, it is working the day full. but when i come to office nextday i have to restart. What could be the problem? and how can I resolve it. If anyone give me the solutions i would appricate. Rajasekar V.R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to upload and Deploy from script?
check out ant (another apache project) and the tomcat tasks for ant (catalina-ant). lots of stuff in google, in jakarta.apache.org and in archives of this forum on those! -- Tim Matteo Turra wrote: I would like to automate the deploy process. There is a method to perform the upload via script like via browser tomcat manager does? I read tomcat manager docs and seems that command issue via http in form of http://{host}:{port}/manager/deploy?{parameters} the war parameters is a path of a war file located in the computer where the tomcat is running. How can I write a script (i.e.: wget http://{host}:{port}/manager/deploy?{parameters}) to upload the war from remote computer? Matteo. _ Matteo TURRA mail: [EMAIL PROTECTED] Analisi sviluppo WEB tel: +39 051 61.11.430 KION Srl web: www.kion.it Via Cristoni, 86 tel: +39 051 61.11.411 40033 Casalecchio di Reno (BO) fax: +39 051 57.04.23 ITALIA _ - 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: Properly setting src attribute for an img tag in a JSP
Hi Ryan - the problem you're having is not one I've had (and it doesn't sound very familiar). Some ideas for looking at though: How are you deploying your application? Are you just editing your files in place? Does this problem go away when your restart tomcat? Have you checked the logs? Have you got any security on your webapp? Are you running this on windows and have some slight case-mismatch (I notice your contextpath is capitalised - it makes life easier to use all lower case, everywhere, in URLS, unless you've got a really good reason). Try recreating the problem with a brand new webapp. Try changing the src of a your image to a literal absolute src (http://localhost:8085/Company/img/image.jpg). Trye changing the img src... to a href..., at least that way you'll be able to see the request in process... check the logs for each. BTW The reason you can see it after one successful load is probably that it is then in the cache of your browser (or more scarily, an upstream caching-proxy) - there are usually settings in your browser control panel. after you get some of the results of these diagnostic moves, you could come back to the list for more. -- Tim Ryan Champlin wrote: All, Can someone at least let me know what the proper way to set the src attribute on an img tag is? I've currently used relative ../img/image.jpg and also the following: img src=%=request.getContextPath()%/img/image.jpg/ When using either I'm seeing the same URL show up at the browser when getting properties on the unfound image. I'm able to load that image in the browser using that path only after I've taken the file name off and see the directory listing. Then I'm able to put the image name back in and access the image. This is really getting frustrating as I can't get a single image to show up in any of my JSP's. I even tried creating a simple HTML page, not a JSP, with an img tag and that image can't be found either. Same type of case as mentioned in my previous post. It can't load the image from that URL. But as soon as I hack off the file name and get the directory listing I can then readd the file name and the file will load in the browser. Any clue?? I'm completely stuck on this one. Ryan -Original Message- From: Anoop kumar V [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 4:34 PM To: Tomcat Users List Subject: Re: img tag's src not working for image files in a JSP in tomcat 5.5 Even I faced this frustrating problem recently - I couldnt really solved it and just switched images - (I created a new image and it somehow worked). I am just trying to get u a workaround (not exactly a cause analysis of your problem) - HTH -Anoop On 6/27/05, Ryan Champlin [EMAIL PROTECTED] wrote: I've tried clearing my browser cach and tried both Firefox and IE. Neither seem to be able to access those images at that location. So I don't think it's the browser necessarily. Not using SSL and don't have any security in place for this application. Ryan -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 3:46 PM To: Tomcat Users List Subject: Re: img tag's src not working for image files in a JSP in tomcat 5.5 Sounds like a browser caching issue or maybe some referrer checking getting in the way although I don't how that would be setup in Tomcat. Are you using SSL or have any other types of constriants in place? Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com On 6/27/05, Ryan Champlin [EMAIL PROTECTED] wrote: All, I've read quite a few articles on this issue and tried all the solutions given and none of them seem to be working. I'm using Netbeans 4.1 with Tomcat 5.5. My application is using the MVC patter so I have a controller that is using the request dispatcher to forward a request to a JSP page. Basically I have an application at the context /Company. I have all my images in a folder called img and all my JSP's in a folder called jsp. I've tried using relative paths to the image directory and the images don't show up in the browser however if I look at the URL it seems right. I right-clicked to get properties and copied the URL: http://localhost:8085/Company/img/image.jpg If I paste that into a browser I get a 404 error from Tomcat. However, if I take off the image name and do: http://localhost:8085/Company/img I get a listing of the image files. If I click on the link for the image image.jpg it opens the file in the browser and I see the URL as: http://localhost:8085/Company/img/image.jpg which is exactly the same as what I had manually typed in. Doesn't make any sense to me as to why it works one way and not the other. Possibly a permissions issue? Can anyone shed some light on why I can't get my image files to show up in my JSP pages? Thanks, Ryan - To
Re: tomcat list ant task queries
Karasek-XID, Nicolas wrote: Hi Tim, To prevent the Undeploy task failing to stop the process you can wrap it in a TryCatch task from ant contrib. Take a look at http://ant-contrib.sourceforge.net/ superb -- what a great task/project, totally changes my view of ant. many thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat list ant task queries
Hi - (using ant to deploy an application for testing purposes) Is there a way to use the list anttask to put the list of installed tasks into a property? That way I could make a very flexible reload target which would check if the context was already in the list, and if it was then undeploy it, and then finally deploy it (otherwise the undeploy task generates an error which stops the process). Or is there another (better) way to do this? thanks in advance Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat keeps growing in size on Win32
By the way, having read the bug report discussion, I think it's a bit misleading to say that File.deleteOnExit HAS a memory leak - it's more accurate to say that __by definition__, it IS a memory leak for a long running system. But at the same time, it only leaks a fixed amount of memory in proportion to the number of times it is called, (not how long ago the last call was). -- Tim -Original Message- From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 12:14 AM To: Tomcat Users List Subject: Re: Tomcat keeps growing in size on Win32 Tomcat really uses File.deleteOnExit()? This method has a known memory leak (not only on win32) for quite some time. See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513817 - 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: Concurrent login detection - how?
And I presume you'd need to get/persist this java object to a database, if you fancied scaling beyond a single application server? (Or am I missing something?) Andre Van Klaveren wrote: This will prevent users from having more than one session at a time for sure. You would probably want to remove the id from the list when a duplicate is detected to prevent users from having to wait for their initial session to timeout in the event that they closed their browser without properly logging out. You would also need to keep the session id in this list so that you can invalidate the session that is related to the id. This of course would drop the original session and in the event that two people were using the same ID it would become a nuisence for the first user to login (they would loose their session). You would want to make sure to log this event for auditing purpose as well. Did I miss anything? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem for loading files under WEB-INF/classes
If they are under WEB-INF/classes then should be in your classpath, unless something is really wrong, so you can access them using getClass().getResourceAsStream(/full/path/from web-inf_class) or getClass().getResourceAsStream(relativepath_from_class). or use getClass().getResource(). if that isn't working, then I'm stumped. Tim Vincent wrote: I want to load some files that I've placed in the WEB-INF/classes directory of my project (particularly the file log4j.properties). The problem is that I always have the same errors logged in stdout tomcat's log file : java.io.FileNotFoundException... The files are well-placed, and curiously my webapp can read a ressource bundle file that I provide for i18n, which is in this same directory. I believed that Tomcat automatically place files under WEB-INF/classes into the path of the webapp. I'm wrong ? What's the problem exactly ? Thank you for your help. Note: Running Tomcat 5.5.9 under Windows XP or Windows 2000, JVM 1.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]
Re: percent in URL makes tomcat chocke
I think tomcat is behaving correctly... You may have missed out an important fact about URLs... check out http://www.w3.org/Addressing/rfc1630.txt Universal Resource Identifiers in WWW THE PERCENT SIGN The percent sign (%, ASCII 25 hex) is used as the escape character in the encoding scheme and is never allowed for anything else. URL-escaping is different from html/sgml-escaping (e.g. #37; ) give that %3a is an escape for :, then if something is asking for http://oberon/apt/./g++_4%3a3.3.5-3_i386.deb then (I think) they are really asking for http://oberon/apt/./g++_4:3.3.5-3_i386.deb so maybe you could handle a that in your tomcat webapp? hope this indicates some directions to try... Tim Holger Klawitter wrote: Omar Adobati wrote: maybe u can try to replace the % symbol with the ASCII value, that is #37; found at http://www.lookuptables.com/ It's not about that *I* can't load that file. *apt-get* needs to be able to do it. I already tried to use urlrewrite, but the filter are already too late down the filter chain, the %3a in ...g++_4%3a3.3... is already translated. Furthermore the + signs are being translated into spaces by the rewrite engine. With Kind Regards / Mit freundlichem Gruß Holger Klawitter (listen at klawitter dot de) - 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: Confusion Land
Have you tried reloading the webapp / restarting tomcat? If you're new to tomcat, then I suggest you give a few more details of where the webapp is, and where the jsp page is, and/or how you deployed the web-app, just in case these give a clue. Thomas Polliard wrote: It is located there. Sorry the location is as you wrote. I was unclear. WEB-INF/classes/com/polliard/db/ Contains RaidDB.class Thanks -- Thomas Polliard Sr. Systems Administrator, AOL [EMAIL PROTECTED] -Original Message- From: Scott Dudley [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 2:52 PM To: Tomcat Users List Subject: Re: Confusion Land Unless I misunderstood, RaidDB.class should be located in directory WEB-INF/classes/com/polliard/db and not WEB-INF/classes/com/polliard/db/RaidDB. Thomas Polliard wrote: So I am running Tomcat 5.5.9 I have a jsp page that imports com.polliard.db.RaidDB; It also has a line that invokes a new instance of this class RaidDB rdb = new RaidDB(); The code works on Jetty but when used with Tomcat I am getting the error RaidDB cannot be resolved or is not a type. Any Ideas??? The class is located in the WEB-INF/classes/com/polliard/db/RaidDB directory under the deployed application. Any help would be great. -- Thomas Polliard Sr. Systems Administrator, AOL [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]: Adding content/JSPs on the fly: file.separtor
Hi - I think it would be better to use java.io.File.separator (which will be identical to file.separator, but is clearer and compile-time checked for typos (as opposed to the string file.separator )). Tim egan0019 wrote: When building file path strings, should one always use the System.getProperty(file.separator) return value? Is this to differentiate between Windows(\) and unix/linux/solaris(/ separators? I haven't seen that property before. And, are there any other things I should know about to make my file system accessing code portable? Yes, I am new to java. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my build structure..opinions wanted
BTW: (long reply... apologies - much of this reflection on current development of most use to myself and my company, but just in case of use to someone else, I hit send anyway... ) --- I think it's best not to deviate TOO far from the model shown in Application Developers Guide in the tomcat docs (really, this is a fantastic starting point I think - http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html or the 5.5 version ). I started using the sysdeo tomcat plugin for eclipse, but no longer use it as I know exactly where I am with explicit ant tasks. The build task in the application developers guide build.xml, does build to an explicit and separate build folder and then compiles copies across stuff from the web and src folders. (Note that it cleverly copies across any non-java files from the src folder hierarchy to the build/web/WEB-INF/classes hierarchy, meaning that you keep the source for your classpath located .properties (etc) files in the src directory - where it should be) Practically speaking I actually don't have a separate build directory, instead I build to the web/WEB-INF/classes directory but I do copy across properties files from the web/WEB-INF/src directory... I deploy my build directory directly to my localhost tomcat and reload it (using the tomcat reload ant-task (optional tasks which require catalina-ant.jar*) - this does the manager stuff for you. The advantage of having the non classpath items not being copied is particularly valuable when you are trying to tweak velocity templates - there's no need to reload the whole webapp simply to correct some typos in your velocity scripts) - again I'm not unit testing view outputs, at present, so this point of view may change as well I do use the dist task (building a war file) and deploying a war when I'm deploying the webapp to a different (shared) machine (and often I have a version/iteration-specific context name (like projectname-vX so that I know which (repository version or iteration number) version is being shown). hth Tim *Note: It's worth having machine-specifc properties (the localhost tomcat manager url, user and password) in a separate build.local.properties (NOT in the build.xml file), which is then NOT committed to your repository (as it will vary from machine to machine) - then ideally your ant tasks will check that these properties are around and if not throw up a helpful message. Kenneth Jensen wrote: I have this target in my build-file. This makes Eclipse transfer my webapp in a jar file to the Tomcat server, which then automatically reloads it. target name=deploy depends=jar description=Deploy webapp to server copy file=${jarfile} todir=${webappdir}/WEB-INF/lib / exec executable=/usr/bin/scp arg file=${jarfile}/ arg value=tomcat.mydomain.dk:${webappdir}/WEB-INF/lib/ /exec /target --- Cheers, Kenneth On 5/27/05, Steve Kirk [EMAIL PROTECTED] wrote: Don't leave the source on the production server, but it's fine in development. Strictly speaking your source files are inaccessible by web clients if they are under WEB-INF, but better safe than sorry. Why not store the src in another folder altogether - eclipse won't care where it is presumably, and this is slightly better practice. The other approach is to build a jarfile from a build script (e.g. using ant), then copy the jar to the webapps/ directory, TC will auto-deply it. Some would say this is the only way to do it. However it does slow things down when you are making frequent small changes to code. For my money, the value of a jar is ease of portability, which is a factor if you are writing for true cross-container support. I built classes direct to classes/ for a long time, then made the effort to switch to jar deployment in development, after being persuaded by people on this list. I'm glad I've done both, but to be honest I think I do prefer building to classes, as it's quicker and I can't see a disadvantage to it during dev. Your approach that sounds a quite practical solution to me. Does eclipse precompile JSPs for you too? One other thing to watch is that logging.properties and properties files go in the classes/ folder, so if you use these, be careful that eclipse does not delete them when rebuilding your classes. -Original Message- From: gabor [mailto:[EMAIL PROTECTED] Sent: Friday 27 May 2005 13:16 To: tomcat-user@jakarta.apache.org Subject: my build structure..opinions wanted hi, i'm starting a project using jsp + javaBeans.. i've worked with java a lot, but i have not much experience with web applications.. for now my idea is that the application will be using javabeans, and jsp for displaying the data... i use eclipse for the development, which nicely compiles every source file automatically when i edit them. that's why i came up with the following idea: i'll create a directory in tomcat/webapps (let's call it 'mywebapp').
Re: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5
I'm not an expert, but I believe (from experience previous googling) that tomcat 5.0.x will respond with an exception (IncorrectClassFileFormat or something) when it encounters class files compiled with jdk1.5, and that thus yes you need 5.5. There are some recent threads about migrating from 5.0 to 5.5, in particular I recall discussion of change of default logging library. -- Tim Raverkar, Sachin (Sachin) wrote: Hi all, We are currently using Tomcat-5.0.28 and JDK 1.4.2_03. We need to move onto JDK 1.5. We would build our war file using JDK 1.5. Can we continue to use Tomcat-5.0.28 with JDK 1.5? Do you see any problem? Are there any known issues? Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 1.5] and later, are we required to move to Tomcat 5.5 in order to move to JDK 1.5? - Sachin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: welcome file handling
Don't know about the difference, but a couple of potential workarounds: 1) could be to have your welcome page just be the default index.jsp and have it just contain a redirect to the relevant page (but this will mean a response-request roundtrip for your user). 2) alternatively you could include a base href=(absolute url) in the body of your frameset, but this would add a dependency on your server name, port, and context path in your html (yuck), but you could get around this with something from JSTL (which I don't know so well, but something like %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % c:url value=dir1/dir2/index.jsp/). Tim Jureczky Bálint wrote: Hello All, We had problems with welcome-file handling after Tomcat upgrade. The welcome file points to page like /dir1/dir2/index.jsp. The page is found despite the fact that the servlet specification says leading / is not allowed, this is valid in all Tomcat versions I know. The exact problem is that the behavior when I try to access webapp/dir1 via browser is different in tomcat versions 4.1.29 and 5.0.28. In 5.0.28 the pages in the frames are not displayed, they are not found in 4.1.29. index.jsp uses framesets and relative paths to reference the elements of the frame. I had the idea that maybe the mechanism how the welcome files are displayed (redirect / forward) is changed, between the versions. Do you know what is the difference which causes this behavior? Do you know any workaround? Thank you, Balint Jureczky - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5
And, oops, I'm sorry for spreading the original FUD - Following this thread, I've just tried again to get everything working on tc5.0/jdk1.5 and hey-presto, everything ok - guess I must've had TC running on jdk1.4 after all... But planning to migrate to 5.5 anyway. thanks everyone T Steve Kirk wrote: Yes sorry, david is correct, I got it backwards. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday 26 May 2005 12:59 To: Tomcat Users List Subject: Re: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5 Small correction -- 5.5 needs the compat package to work on jdk l.4, not 5.0 needs it to work on jdk 1.5. I've used TC 5.0 jdk 1.5 together no problem. --David Steve Kirk wrote: You can run 5.0.28 on jdk1.5 but you need to add a compatibility package which is available from the tc downloads page. Basically it adds 3 jars to fix issues with xml compatibility with the 1.4 vm. I haven't done it myself (I upgraded both at once) but google some of these words and you can read all about it. PS if you do go to 5.5 and have DBCP, be sure to change your context.xml to the new format required by TC5.5. I spent nearly 3 days working that out. -Original Message- From: Raverkar, Sachin (Sachin) [mailto:[EMAIL PROTECTED] Sent: Thursday 26 May 2005 08:58 To: tomcat-user@jakarta.apache.org Subject: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5 Hi all, We are currently using Tomcat-5.0.28 and JDK 1.4.2_03. We need to move onto JDK 1.5. We would build our war file using JDK 1.5. Can we continue to use Tomcat-5.0.28 with JDK 1.5? Do you see any problem? Are there any known issues? Since Tomcat 5.5 is designed to run on J2SE 5.0 [JDK 1.5] and later, are we required to move to Tomcat 5.5 in order to move to JDK 1.5? - Sachin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing Tomcat Icon rather than DOS icon
If you make a SHORTCUT to a batch file, then it you can change its icon (both of the shortcut-icon and of the window it launches) by rightclicking the shortcut, properties, Shortcut tab: Change icon (a shortcut to a batch file gives some similar controls to what a PIF used to give, can also change the color background of the monitor etc.). Tim Steve Kirk wrote: Jack, You accidentally replied direct to me rather than to the list. It's best to reply to the list so that everyone gets to see the answer. I'm replying to you via the list now. If you mean by the run bar/pc bar the bar at the top of the window that TC runs in, then I think what you are trying to do is what used to be done via a PIF file. These no longer exist in more recent versions of windows AFAIK. Sorry, not sure how to do it. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Thursday 26 May 2005 13:43 To: Steve Kirk Subject: Re: Showing Tomcat Icon rather than DOS icon I perhaps should say that I have the Tomcat icon on the Start menu with no difficulties. The problem is the run bar. Thanks, again. On 5/26/05, Dakota Jack [EMAIL PROTECTED] wrote: That works if you are talking about changing the icon for a file. How does that work here. What file are you talking about right clicking on? Right clicking on the bar on the window won't do this. Thanks for helping. On 5/26/05, Steve Kirk [EMAIL PROTECTED] wrote: Right click, choose properties, click change icon, browse to tc dir, choose tomcat.exe. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Thursday 26 May 2005 08:47 To: Tomcat Users List Subject: Showing Tomcat Icon rather than DOS icon How can I write my Tomcat startup script to show the Tomcat icon on a PC bar rather than the DOS icon? Thanks -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - 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: 5.5 FreeBSD Port
Ronald Klop wrote: If you have issues about jdk 1.5 on bsd being flaky, please post them on [EMAIL PROTECTED] By the way, I should have said alpha rather than flaky -- I haven't seen it to be flaky, just (perhaps wrongly) inferred it would be from its announced alpha status... (http://www.eyesbeyond.com/freebsddom/java/jdk15.html) Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Client Authentication certificates
Hi Mark - I saw it, and... don't know the answers for the second two (don't fully understand the questions) , but yes, you can create your own Certificate Authority, no problem -- however your clients will each then either have to click-through various warning dialogues each time, or they will have to add the root certificate to their list of trusted certificate authorities. How exactly to do this various from browser to browser (and OS to OS sometimes)... --Tim Mark Benussi wrote: Morning all.. I have a web app and for certain areas of the site I wish to restrict access to a Client Authentication certificate. I want to generate a root Certificate for my company domain and then sub domains for a variety of customers. Then I wish to be able to generate certificates for certain users within these sub domains. My questions are: Can I build a root certificate that is not signed by someone like Verisign or any other trusted root? (This is a cost issue). Can I implement the Client Authentication on a server which does not have SSL implemented? Can I implement the Client Authentication on a server which already has an SSL certificate, signed by someone like Verisign and effectively run both? Would appreciate your thoughts and also any pointers on where to start digging. TIA Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java and Java 1.5 on same machine
Hi Didier - I think it might be better to leave the body of the scripts as they are but reassign the environment variables at the beginning of the script (shell-dependant obviously). You might even (?) want to unset JAVA_HOME/CATALINA_HOME globally and re-assign it on a script-by-script basis... Tim -- Dakota Jack wrote: Just use different ports. On 5/19/05, Didier McGillis [EMAIL PROTECTED] wrote: How can Java 1.4.2 and Java 1.5 co-exist on one server. I need to run Tomcat 55 with Java 1.5 and my development Tomcat with java 1.4.2 on the same machine. I have just installed Java 5 and Tomcat 5.5.9 for evaluation and testing before migrating to the newer versions. However I only have one test machine and that is also used for the existing development server and so therefore has Tomcat 5.0.18 and Java 1.4.2. Even though I went in to the profile and added JAVA5_HOME and CATALINA55_HOME and JRE5_HOME, and substituted those in the catalina.sh file. When I run startup.sh it will show JRE5_HOME as java1.5... but doing a ps will show that its actually using java1.4. - 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]
5.5 FreeBSD Port
Hi - I was just wondering if anyone out there had installed 5.5 on FreeBSD? I've been using 5.0 on BSD, which was easy to install, as there is a portfile defined. Was wondering whether to wait for /try to hack my own portfile, or just install 5.5 manually (the instructions seem fairly straightforward). (and yes, I know jdk1.5 is a bit flaky on BSD, I'm going to use the linux 1.5jdk and see what happens... for development at least). thanks Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
Hi - thanks for that, I hadn't realised that the servlet-name default would still work in my webapp's web.xml. So I can reverse the logic as you suggest. Works great. Tim Parsons Technical Services wrote: Look here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/default-servlet.html If you override the mapping by putting your own reference to the default in your web.xml for the app, you should be able to map it the way you want and then have a mapping to your servlet with the / path. Or have your Spring dispatcher catch everything and parse the path to redirect the static stuff. Haven't tried this myself, just some thoughts. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and 1.5 Was: Tomcat on XP
Is it generally a good idea to develop on 1.5 - I actually like working in 1.5 (generics, annotations, etc. all good stuff, despite some of the implementation weirdness), but have avoided doing servlet stuff in 1.5 to date, as I'm not sure if it's a good idea... My project doesn't go live till December, so does it seem reasonable to go with 1.5? Or will that seriously limit options if, for example I need to switch containers or something (e.g. to Resin Pro) in case of performance issues. Any thoughts helpful here (hate having to hold myself back with type-unsafe collections, but it's much more of a pain to go from generic code to non-generic than the other way around, I think). Thanks Tim Woodchuck wrote: you need to get at least the Java 1.5 run-time environment (aka JRE 5.0) Tomcat 5.5.x does not work with Java 1.4 unless you install a compatibility patch since you are developing, i recommend you install the JDK 1.5 and update your JAVA_HOME to point to 1.5 instead of 1.4 hth, woodchuck --- Jobish P [EMAIL PROTECTED] wrote: Hi, I am not getting the tomcat home page while trying to run tomcat in Windows XP. I had set the JAVA_HOME and CATALINA_HOME path variables and stopped other servers(IIS ans apche) running in the system. But I couldn't see anything by typing http://localhost:8080. The utilitie's that I used are tomcat 5.5.9.exe and j2sdk1.4.2_07. Any thoughts ? It will be of great help if any of you could help in this regard. cheers, -Jobish P All men by nature desire to know- Aristotle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
This has been a great and informative thread... I'm wondering now, how to accomplish what I want to do in Tomcat alone, rather than looking for a Tomcat+Apache solution (sounds simpler). The issue is that I want ALL directory-like urls resolved by a particular servlet (which is a Spring dispatcher servlet, but never mind that), but I would like very few kinds of static files (which I could name explictly *.gif, *.png, *.css or put under a static place) served statically (ie by the default servlet. The problem is that the url-pattern for a directory-like urls covers all urls. Is there a way to do the reverse of normal, state that you want a particular url-pattern (e.g. /static/*) to go to the default servlet , and everything else (e.g. /*) to go to a particular servlet. If so, how do I indicate the default servlet in my web.xml? (And I've already had recommendations from people to change the URLs for the dynamic stuff to something else, but that's not what the client/customer/user/design wants -- the url is very much part of the user interface in this application). thanks Tim Fritz Schneider wrote: Chris, Earlier versions of Tomcat were quite a bit slower than Apache when delivering static pages. For high volume work the preferred solution was to have Apache listening on port 80, and when it received a request for a page from in a J2EE context, to forward it to Tomcat, listening on 8080. A similar connector is used for Microsoft IIS. Tomcat had a major rewrite for Tomcat 5, and the performance difference on static pages is now minor. An Apache-to-Tomcat connector is now used for the following reasons (and probably a few more): 1) History. We started out that way, and there's no reason to change. 2) Expansion. We have been running Apache (or IIS) and we need to add a J2EE container. 3) Load balancing. We have too many requests for a single server, so we have Apache take the incoming requests and dole them out to three or four Tomcat servers. 4) Management. We have a lot of customers. Some need CGI, some need PHP, and some need J2EE. I hope this helps, Fritz -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 9:39 AM To: Tomcat Users List Subject: Re: Tomcat vs Apache Apache is not a J2EE container - you are off-roading on this one ;-) Thanks. That was pretty much what I wanted to find out. BTW, I keep hearing of people using Apache and Tomcat in conjunction. How does that work? Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs Apache
(Er, and sorry I just realised I posted __some__ of this as part of a question on the list last week, but the question I have is now posed more concretely and wasn't answered then)! Tim Diggins wrote: This has been a great and informative thread... I'm wondering now, how to accomplish what I want to do in Tomcat alone, rather than looking for a Tomcat+Apache solution (sounds simpler). The issue is that I want ALL directory-like urls resolved by a particular servlet (which is a Spring dispatcher servlet, but never mind that), but I would like very few kinds of static files (which I could name explictly *.gif, *.png, *.css or put under a static place) served statically (ie by the default servlet. The problem is that the url-pattern for a directory-like urls covers all urls. Is there a way to do the reverse of normal, state that you want a particular url-pattern (e.g. /static/*) to go to the default servlet , and everything else (e.g. /*) to go to a particular servlet. If so, how do I indicate the default servlet in my web.xml? (And I've already had recommendations from people to change the URLs for the dynamic stuff to something else, but that's not what the client/customer/user/design wants -- the url is very much part of the user interface in this application). thanks Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DeployTask Not Found - Configuration Problem with Ant and Tomcat
Hi Robert - I'm not sure why having the the catalina-ant.jar in your ant libs folder didn't work, but here's an extract from my build.xml, which works for me. (obviously you need to set $tomcat.home somewhere - I tend to do it in a properties file which I DON'T commit to my SCM repos, as it tends to change from development machine to development machine) path id=tomcat.classpath fileset dir=${tomcat.home}/server/lib includes=catalina-ant.jar / /path taskdef name=deploy classname=org.apache.catalina.ant.DeployTask classpath refid=tomcat.classpath / /taskdef best Tim Robert Sinner wrote: I am sending this message as it was bounced back to me I apologize if for some reason you receive it twice. I am trying to install tomcat on red hat enterprise server 8 with ant and apache. However when trying to run ant (to compile a simple servlet I get the following error). Using the simple build file I get the following error trying to run the ant. I have searched everything I could find on google, and almost certain its a classpath issue, however I have tried to alter the classpath in several ways to make what I think are the appropriate jars visible and I am at a loss. The error is /build.xml:146: taskdef class org.apache.catalina.ant.DeployTask cannot be found I have installed the following Apache/2.0.46 already in place Jdk1.5.0-03 tar Tomcat 5.5.9 tar mod_jk 1.2.10 built so and placed under apache shared objects Also installed ant version 1.6.3 CATALINA_HOME=/usr/local/jakarta-tomcat ANT_HOME=/usr/local/apache-ant-1.6.3 JAVA_HOME=/usr/java/jdk1.5.0_03 I have already copied the catalina-ant jar from $CATALINA_HOME/server/lib to $ANT_HOME/lib, I also tried copying the catalina-deployer.jar from the tomcat deployer into the same location. If I comment out the taskdefs in the build.xml I can get ant to build. Here are the lines that are causing failure in to build.xml taskdef name=deploy classname=org.apache.catalina.ant.DeployTask/ taskdef name=list classname=org.apache.catalina.ant.ListTask/ taskdef name=reload classname=org.apache.catalina.ant.ReloadTask/ taskdef name=undeploy classname=org.apache.catalina.ant.UndeployTask/ If I comment them out then I can run ant. However in order to allow them to be there I have tried several things, like copying catalina-ant.jar to $ANT_HOME/lib and placing it in the classpath environment variable also I tried adding classpath element to each of these tasks, like taskdef name=deploy classname=org.apache.catalina.ant.DeployTask classpath pathelement location=/usr/local/apache-ant-1.6.3/lib/catalina-ant.jar/ pathelement location=/usr/local/apache-ant-1.6.3/lib/catalina-deployer.jar/ /classpath /taskdef However the error persists, as I mentioned I googled this and found that I should just copy the Catalina-ant.jar and Catalina-deployer.jar to apache lib directory however this is not solving my problem. Thanks in advance for any help, RS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sessions and keep-alives
Well, unless I misunderstood, the requirement is to keep the session for webappA alive as long as the session for webappB is alive, so if webappB is to be alive, then it must have new pages from the server (no need for a refresh there. Then the webappB's pages (views) could include a reference to the (uncachable) gif which will be on the webappA's site (and which will require, and thus keep alive, a session). On the other hand, this might engender some kind of coupling between the two webapps, so maybe not the best solution (the whole thing doesn't feel like the best solution), but one __could__ get around this by passing in some optional parameter giving the url of the gif that needs to be included on every page, thus decoupling the two apps. Anyway, I may well have totally misunderstood the situation, so probably, nuff said on the area. Frank W. Zammetti wrote: I'm curious how this would work? If I open a page with an invisible GIF, there's no way (without scripting and such) to have the GIF refresh, right? Or is there something I'm missing? You can set a meta refresh on the page, but not the GIF itself, as far as I know anyway. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: delete temporary content after session timeout
that sounds very useful, not something I've done before -- can I ask a few questions - 1) how does one bind that into Tomcat -- declare a session listener in (I presume) web.xml? 2) as I'm using Spring Framework, is this still relevant (or is there a spring-specific way of binding in a session listener --- sorry, ought to ask that on a spring list...) 3) can you recommend the best reference material / sites on managing sessions (standard tomcat docs seem to have nothing on sessions I can find.) Tim Frank W. Zammetti wrote: Write a SessionListener... it has two methods, one that fires when a session is created, one when it is destroyed. That should do the trick for you. That's not a Tomcat-specific solution either, so it should be rather portable should you ever need to move to another app server. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot access Tomcat from remote box
Hi Vincent - one more idea... Have you checked Tomcat's server.xml for what port it thinks it should be serving from? I recently installed tomcat 5.0 on a FreeBSD box from a BSD-package* and either because of the way the BSD-package was configured, or because of some other check, Tomcat ended up serving from 8180. So of course the box refused a connection on 8080. Tim *actually a BSD port but that's just too confusing... --- Am Freitag, 13. Mai 2005 00:35 schrieb Vincent Yau: Today, I got hold of 2 boxes that I need to setup tomcat. Both are Linux. One with Kernel 2.4, the other is 2.6.10. I have a 3rd box with Tomcat up and running that I setup a few months ago (version 5.0.28). So I downloaded Tomcat 5.0.28 on box boxes earlier today. They ran fine with a local browser accessing it. However, no other box on the network can access it. I got Connection Refused when trying to load the front page from any other machine (http://thatbox:8080). There is no firewall on either machine. I have tried ping, ssh, scp, httpd and all traffic goes through fine on both boxes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sessions and keep-alives
Hi Patrick - If not an iframe, why not a gif... There's nothing (in principle I think*) stopping you having a jsp page that returns a (tiny, invisible) gif (with the right mimetype) and with appropriate expires/cache-control headers to make sure that it gets got each time. That's the way some web-counters work, for example, and I can't see it would create a problem... (I don't however know whether you can maintain two session cookies at the same time... Would work however with a param-based session). --Tim * I have done this in similar kinds of situations with python php, but not tomcat. Patrick Lacson wrote: I've considered iframes, but unfortunately not an option for us. From what I understand AJAX can make async calls to the HTTP server from the webapplication only, not on behalf of another. So if the popup application is webapp B, and the parent webapp A, how can I call the webapp A server from webapp B for the keep-alive? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sessions and keep-alives
I'd just include this invisible gif on every page (request) of webapp B. (bone-headed solution, but why get more tricksy until you need it). -- Tim Patrick Lacson wrote: Interesting solution Tim.. so webapp B would invoke this invisible gif from webapp A on an interval basis? -P On 5/13/05, Tim Diggins [EMAIL PROTECTED] wrote: Hi Patrick - If not an iframe, why not a gif... There's nothing (in principle I think*) stopping you having a jsp page that returns a (tiny, invisible) gif (with the right mimetype) and with appropriate expires/cache-control headers to make sure that it gets got each time. That's the way some web-counters work, for example, and I can't see it would create a problem... (I don't however know whether you can maintain two session cookies at the same time... Would work however with a param-based session). --Tim * I have done this in similar kinds of situations with python php, but not tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a client recapture a session in Tomcat 4.1
Using IP sounds a bit scary as a lookup - think of all the users with equivalent IP addresses (because of NATing routers/firewalls, etc.). Plus it would be a strikes me it would be a nightmare to test... But, if instead you wanted to have a session that wasn't linked to tomcat's notion of a session, you could (maybe) build a separate Session management that was stored in a regular (non-session) cookie -- it would then persist across sessions in the same browser... Tim Arup Vidyerthy wrote: I am not sure if this can be done... I guess you could build framework where the user's session id and ip is logged (unless they logout) and then when the user comes back you could use the old session. I have never tried this but this personally but I dont see why it should not work. Arup -Original Message- From: Millies, Sebastian [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 15:57 To: tomcat-user@jakarta.apache.org Subject: Can a client recapture a session in Tomcat 4.1 Can a client recapture his Tomcat session after he has accidentally closed the browser, provided that the session object still exists on the server? Would this be a browser-specific thing? After all, I guess I'd need to tell the browser to persist the session cookie or some such thing. Or would it work browser-independently using URL-rewriting? If there is such a mechanism, does it pose any security concerns (e. g. through Tomcat reusing a session-id for a totally different session?) We're on Tomcat 4.1. Would the answer be any different for Tomcat 5.0? Thanks for any enlightenment or additional pointers-. -- Sebastian -- Sebastian Millies, IDS Scheer AG Postfach 10 15 34, 66015 Saarbrcken Zi D1.16, [EMAIL PROTECTED] fon +49-681-210-3221, fax +49-681-210-1311 - 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]
url-pattern in web.xml -- looking for explanations and best practice
Hi- I'm trying to configure my tomcat 5.0.28 webapp so that one servlet (a Spring dispatcher as it happens, but that's irrelevant) receives virtually everything except standard static non-text file patterns (*.css, *.png, *.gif, etc.) which I want served up statically. I've been trying various options for url-pattern within servlet mapping and have been getting very confused... Some questions therefore... 1) Is there a definition / documentation of what the syntax for a url-pattern is? I've tried and tried googling and looking, but can't find such a thing (I'm not sure that it's standardised across different containers, but there seems to be no definition in the tomcat docs that I could find). Obviously, if anyone can refer me to this, then I don't need the other questions answered! 2) is there any way to say - if a url includes a ~ (tilde character) then route it to a particular servlet. The following give errors: url-pattern*~*/url-pattern url-pattern~//url-pattern url-pattern~*/url-pattern But oddly the following doesn't: url-pattern*.~/url-pattern *error looks like: 11-May-2005 15:13:07 org.apache.catalina.startup.ContextConfig applicationConfig SEVERE: Parse error in application web.xml java.lang.IllegalArgumentException: Invalid url-pattern ~/*.* in servlet mapping at org.apache.commons.digester.Digester.createSAXException(Digester.java :2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java :2566) -- 3) is there any way to specify NO extension (like a request for directory) and exclude things with an extension? 4) is there any way to specify what you want to go to the default (static) servlet and then state a sink for anything else (invert the default-specific servlet mapping in other words). 5) is there some obvious best practice I'm missing here (excluding making my urls less interpretable). Many thanks Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]