url-pattern in web.xml -- looking for explanations and best practice

2005-05-11 Thread Tim Diggins
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

Re: Can a client recapture a session in Tomcat 4.1

2005-05-12 Thread Tim Diggins
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

Re: Cannot access Tomcat from remote box

2005-05-13 Thread Tim Diggins
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

Re: Sessions and keep-alives

2005-05-13 Thread Tim Diggins
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

Re: Sessions and keep-alives

2005-05-13 Thread Tim Diggins
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

Re: Sessions and keep-alives

2005-05-14 Thread Tim Diggins
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

Re: delete temporary content after session timeout

2005-05-14 Thread Tim Diggins
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

Re: DeployTask Not Found - Configuration Problem with Ant and Tomcat

2005-05-18 Thread Tim Diggins
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

Tomcat and 1.5 Was: Tomcat on XP

2005-05-19 Thread Tim Diggins
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

Re: Tomcat vs Apache

2005-05-19 Thread Tim Diggins
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

Re: Tomcat vs Apache

2005-05-19 Thread Tim Diggins
(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

Re: Java and Java 1.5 on same machine

2005-05-20 Thread Tim Diggins
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

5.5 FreeBSD Port

2005-05-20 Thread Tim Diggins
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

Re: Tomcat vs Apache

2005-05-20 Thread Tim Diggins
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

Re: 5.5 FreeBSD Port

2005-05-23 Thread Tim Diggins
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...

Re: Client Authentication certificates

2005-05-23 Thread Tim Diggins
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

Re: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Tim Diggins
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

Re: welcome file handling

2005-05-26 Thread Tim Diggins
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

Re: Are we required to move to Tomcat 5.5 in order to move to JDK 1.5

2005-05-26 Thread Tim Diggins
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

Re: Showing Tomcat Icon rather than DOS icon

2005-05-26 Thread Tim Diggins
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

Re: my build structure..opinions wanted

2005-05-27 Thread Tim Diggins
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

Re: [OT]: Adding content/JSPs on the fly: file.separtor

2005-05-29 Thread Tim Diggins
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

Re: Confusion Land

2005-06-03 Thread Tim Diggins
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.

Re: percent in URL makes tomcat chocke

2005-06-08 Thread Tim Diggins
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

Re: Problem for loading files under WEB-INF/classes

2005-06-10 Thread Tim Diggins
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

Re: Tomcat keeps growing in size on Win32

2005-06-14 Thread Tim Diggins
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

Re: Concurrent login detection - how?

2005-06-14 Thread Tim Diggins
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

tomcat list ant task queries

2005-06-23 Thread Tim Diggins
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

Re: tomcat list ant task queries

2005-06-24 Thread Tim Diggins
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

Re: Properly setting src attribute for an img tag in a JSP

2005-06-28 Thread Tim Diggins
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

Re: tomcat default page

2005-06-29 Thread Tim Diggins
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

Re: Convert URL path from directory/ to directory/index.htm (Spring related)

2005-06-29 Thread Tim Diggins
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,

Re: Tomcat hang everyday

2005-06-29 Thread Tim Diggins
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.

Re: How to upload and Deploy from script?

2005-06-29 Thread Tim Diggins
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

Re: Remote deployment

2005-06-30 Thread Tim Diggins
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

Re: Automatic deploy with ant and Tomcat 4.1.31

2005-07-01 Thread Tim Diggins
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

Re: error while building with jakarta-ant-1.5.1

2005-07-01 Thread Tim Diggins
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

Re: [OT] Recommend a UK Tomcat host

2005-07-08 Thread Tim Diggins
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

Re: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated

2005-07-11 Thread Tim Diggins
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

Re: Request too long

2005-07-18 Thread Tim Diggins
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

Re: Unable to use Python/CGI from Tomcat....

2005-07-19 Thread Tim Diggins
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