Re: File system resource for static content
Hi. Not a direct answer, but did you look at the webdav app ? At least for ideas. Robert Drescher wrote: [...] I want a servlet to perform file uploads and to store the files in the local filesystem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5 manager deploy context descriptor
On Sat, Dec 13, 2008 at 1:27 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat 5.5 manager deploy context descriptor Is there a way to see, if my context.xml is actually loaded anywhere? You might want to try loading LambdaProbe (http://www.lambdaprobe.org/). You can also use JConsole, if you start Tomcat with the -Dcom.sun.management.jmxremote option. Under the MBeans tab, follow this branch: Catalina - WebModule - //[host]/[contextPath] - none - none - Attributes. There you will find a good bit of information about the webapp, including various Context parameters and servlet information from web.xml (double-click on the bolded array items in the rightmost column to open them up). There's also a Catalina - Resource branch that has information about any Resource elements in use. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Thank you for the JConsole tip. That was the tool I was looking for. I'll have a look at my context. Anni
File system resource for static content
Hello users, I'm trying to find the best practice way for implementing the following: I want a servlet to perform file uploads and to store the files in the local filesystem. This part is not that hard to do as i'm currently writing into the javax.servlet.context.tempdir. The problem is that i need to store the files in a directory, that will be accessible from the web. My tutor at university gave me the hint that this is best done with a resource which points to a local directory and that's mapped to the webapp. So I imagine that http://localhost:8080/WebTest/Upload is my servlet mapping and that http://localhost:8080/WebTest/files/ points to this resource. But all my research in the documentation did not bring any success. I know that i can specify resources in the context.xml, but not how I specify the path on the local system or how to do the mapping... If anyone already did this and can provide me with configuration examples, I'd very much appreciate it. I am using Tomcat 5.5 on Linux (not the pre-packaged), the application is deployed as war, my context.xml is located in META-INF ?xml version=1.0 encoding=UTF-8? Context privileged=true antiResourceLocking=false antiJARLocking=false path=WebTest / - My web.xml is the following: - ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; descriptionTest Internetapplikationen/description servlet descriptionController Servlet/description display-nameController Servlet/display-name servlet-nameController/servlet-name servlet-classorg.agility.webtest.control.Controller/servlet-class /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/Controller/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app -- Thank you very much for your help Robert
Re: service.bat install failure (Windows, v 6.0.18)
Disclaimer: the following results were obtained by using Unix tools to extract the official zip and targz binary downloads. On 12.12.2008 21:31, andrew wrote: * If you want to use Tomcat as a Windows service, use the .zip Tomcat * distribution, not the .tar.gz distribution. I think it is worth elaborating some though. If anyone out there has influence on the build and/or documentation, I hope you will read further. 1. Rainer Jung suggested that the behavior difference I see between the two distros could be expained by line-ending differences/incompatibilities (particularly in config files). This does NOT appear to be true in my case. I've looked at the .xml files in the /conf directory, and they have *nix style line endings in BOTH distros. Sorry, I wanted to get one possible factor out of your problem. I double checked. In fact it looks like Rémy switched his release procedure from a Windows based to a Linux based machine. With 6.0.14 the files were basically Windows files, except for those that were explicitely fixed to Unix-style using ant immediately before putting them into the targz. 6.0.18 seems to be build on *nix, so all files are basically *nix types and the previous switch to *nix for certain files has not been replaced to a switch to Windows type for those. That's why you now have *nix type files for config etc. It slipped my attention. The only files with special treatment in the bin distribution are bat and sh files, which we set to their native line ends, and binary formats, which remain unchanged, independently form the build platform. All other files seem to be *nix (like config files). Most of them (but not all), where Windows type at least until 6.0.14. 3. From what I am seeing, it appears that the .zip and .tar.gz archives were actually created from different source trees, as oposed to just being different compressions of the same source. The differences are minor, but not attributable to tar version incompatibilities, for example. If that is true, then I suggest NOT adding files with extension .exe to the .tar.gz build/distribution. Doing so seems like an implicit confirmation that the distro is meant to be run on Windows. From what i can see inside the official downloads, the contents are the same except for LICENSE and conf/context.xml, which both have no line at after the las line in the zip version, and do it in the targz version. This most likely comes form the fact, that for historical reasons both files are run through fixcrlf before putting into the targz archive. So it looks like the files are identical in source (in terms of the code repository=subversion path and revision), but yes, they are not exactly identical in the archive (two files with an additional end of line). For those of you who think that I deserved this for being silly enough to extract the .tar.gz distro on Windows in the first place, well, maybe. I'll definitely use .zip in the future whenever there is an option. But keep in mind that I've used tar quite a bit on Windows -- I haven't seen anything like this before. When I first downloaded Tomcat, I remember thinking it was really cool that it could be offered as a platform independent Binary Distribution thanks to Java. And man, the failure mode is subtle -- I didn't see it until after a month of use. The result of the release process at the moment looks like you can really use whatever archive format you like on both platforms. I can't se a relevant difference in the extracted files. It is questionable though, whether contining *nix config files, license files etc. is the best way of delivering Tomcat for the Windows platform. It does work technically, but it might mean some anoyance for the users (e.g. when using notepad to edit those files). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: AW: AW: java.io.IOException: Stream closed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan, Schuster Stefan wrote: As far as I can tell, the XML-Beans generated code works well - even if The stream is closed after reading, this should be no problem as the next request will submit a new stream, right? Yes, your servlet can close an input stream when it's done reading (even if the request is one of several keep-alive requests). You better make sure you're done reading it, though ;) Generally, I don't ever close servlet input streams (or readers). The container will clean up after input streams after the request processing has been completed by your servlet. I find that such cleanup adds confusion to your servlet code and doesn't add any benefit. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklFJRgACgkQ9CaO5/Lv0PCI1ACeJIKLuvS28oyEvlku55jiAf4+ 0Y0An0nwvNMKdlq3qPQsrl+oKilOVI7O =goca -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Restricting IP address and redirecting
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Flemion, Flemion Shafeeq wrote: We restrict IP addresses to our application using RemoteAddressValve. But we have a requirement of redirecting the request to a customized html static page when we get request from such denied IP's. How do i do this. Is it possible to customize this class to do this redirection and deploy it in the tomcat application? Instead of using RemoteAddressValve, you could use http://tuckey.org/urlrewrite/ to redirect all banned IPs to your preferred page. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklFJYsACgkQ9CaO5/Lv0PBPZACgkUz73sRIRHnl0bocDr+RTo2V s08AnRwlpYJVQcEv8AFhLpKKSHNcxtKC =XSHu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: ThreadPool vs HeapSize
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Billy, Billy Ng wrote: I am using Tomcat 5.5 on Linux 64-bit. The server always has lots of hits so I increase the maxThreads from 300 to 500 in server.xml. From the thread monitor, I saw mostly about 350 threads were used. Is this steady use or peak use? You should always prepare to meet peak use rather than steady use. But I notice the # of threads dropped to 70 when the garage collection kicked in. Perhaps many of those 350 threads were allocated, but not actually serving requests. Currently, the heap size max and min is 768MB. Should I increase the heap size when I increase the maxThreads? There's no particular reason to increase the heap size when increasing maxThreads. Threads themselves take a tiny bit of memory, but that shouldn't concern you. If each request uses a lot of memory, then you will want to increase the heap accordingly. If you're getting away with 500 threads and a sub-gigabyte heap, I think you're doing fine (of course, I know nothing else about your setup!). Are you concerned that the number of threads drops? If you want to make sure that you have some threads laying around ready to process a sudden surge of traffic, try setting the minSpareThreads attribute on your Connector. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklFJrcACgkQ9CaO5/Lv0PBcSwCfXaXZfdODO1Xt1uCjQTy+KW4B gf0AoKb0yC/Q8K/yQ7k9g9Eeys4xliJN =Z/+i -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question on JVM memory in tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kees Jan, Kees Jan Koster wrote: JVM Free memory: 38.13 MB Total memory: 111.18 MB Max memory: 1365.37 MB As David pointed out, this is probably measured against the committed memory, not the max memory. I believe that committed and total are identical. From the above info, it looks like the JVM is using about 70MB of it's own heap. If you asked top or ps what the JVM was using, it would say 111MB + whatever non-heap memory has also been allocated. [OT from here on out] I just wrote a small post about memory leaks http://java-monitor.com/forum/showthread.php?t=150 In that post I also talk about the difference between maximum memory and committed memory. Note that in the memory usage graph you show, the leak is certainly not easy to spot. In fact, that memory graph looks perfectly healthy to me: lots of little GCs and a full GC every 18 hours or so. The reason the memory curve looks good to me is that, after every full GC, the amount of used memory is lower than the previous full GC. Unless you have the graph labeled incorrectly, this graph looks good to me. PS MarkSweep overtakes PS Scavenge late on the 12th because the JVM is doing a full GC, rather than the frequent incremental GCs that it always does. This does not signal an impending out of memory situation. I have a graph that looks pretty much just like yours: used memory bounces between 30MiB and 160MiB with a fixed maximum of 192MiB, incremental GCs all the time which makes the long-view of the graph seem fuzzy, and full GCs every 30 hours or so. The full GC takes the used memory from ~160MiB all the way down to maybe 40MiB (that's a lot of garbage!). This went on for 6 weeks until I decided to stop graphing it because I was convinced that my new memory settings were sufficient (I had recently run out of memory when running with the default 64MiB heap). I *do* recommend setting the min and max heap sizes to the same value: this allows the JVM to used fixed generation sizes and not waste its time re-allocating and re-arranging the whole heap whenever it's going to expand it. If you don't need a huge heap, why even set it as the maximum? If /do/ need a huge heap, why not allocate it all at once? You could hook your Tomcat up to Java-monitor. Java-monitor tracks you memory usage over two days, so you can see how the memory usage develops over time. The graphs in the post are made with Java-monitor. Or you could use a spreadsheet and not publish your usage data to the world. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklFK+MACgkQ9CaO5/Lv0PAeAwCfRnv0VhQtaEoMFqbyXGyMoc5U PogAoIYWJ5h6jd1Uk9O8T+ZRZ+jRISnd =4ZJH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
The problem with this approach is that when you upgrade the war file the files will be deleted. I believe It is better to save the files outside the web app and deliver them either with a symbolic link from within your war file or using a reader servlet. Yuval Perlov www.r-u-on.com On Dec 14, 2008, at 7:17 PM, Steve Ochani wrote: Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello users, I'm trying to find the best practice way for implementing the following: I want a servlet to perform file uploads and to store the files in the local filesystem. This part is not that hard to do as i'm currently writing into the javax.servlet.context.tempdir. The problem is that i need to store the files in a directory, that will be accessible from the web. My tutor at university gave me the hint that this is best done with a resource which points to a local directory and that's mapped to the webapp. So I imagine that http://localhost:8080/WebTest/Upload is my servlet mapping and that http://localhost:8080/WebTest/files/ points to this resource. I do something very similar using apache commons upload project. I have a separate files directory in my webapp directory and I use the following code to initialize a path to save my uploaded files: ServletContext sc = getServletContext(); String path = sc.getRealPath(/files); I can then access a file in the that files directory via http://server:8080/appname/files/filename -Steve O. But all my research in the documentation did not bring any success. I know that i can specify resources in the context.xml, but not how I specify the path on the local system or how to do the mapping... If anyone already did this and can provide me with configuration examples, I'd very much appreciate it. I am using Tomcat 5.5 on Linux (not the pre-packaged), the application is deployed as war, my context.xml is located in META-INF ?xml version=1.0 encoding=UTF-8? Context privileged=true antiResourceLocking=false antiJARLocking=false path=WebTest / - My web.xml is the following: - ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; descriptionTest Internetapplikationen/description servlet descriptionController Servlet/description display-nameController Servlet/display-name servlet-nameController/servlet-name servlet-classorg.agility.webtest.control.Controller/servlet-cla ss /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/Controller/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app -- Thank you very much for your help Robert - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Setting /WebContent as ROOT for an application
To add to what Alan said: If I create a new Eclipse Dynamic Web Project, and name it MyWebApp during the project setup, in the first window it has a drop down for Target Runtime. That should be your installed Tomcat on your desktop development machine; Windows in my case. It starts out with None so click the New button next to it and select, for example, Apache Tomcat v6.0, and then in the next window use the Browse button to navigate to where Tomcat is installed (C:\Program Files\Apache Software Foundation\apache-tomcat-v.0.18 for me). You can leave the rest alone and click Finish. Next in Eclipse, do Window - Show View - Servers. That creates a Servers view window (tab) somewhere. Click on its tab to bring it forward, then right click in the Servers window and select New - Server (strange that we have to do this again, but at least it's abbreviated this time), and select Tomcat v6.0 Server (or whatever you selected when you created the project). Then you get the Add and Remove Projects window; double click on MyWebApp to move it to the right into Configured projects, and click Finish. As per the DOS tree command my Eclipse project folder/file structure is then | .classpath | .project | +---.settings | .jsdtscope | org.eclipse.jdt.core.prefs | org.eclipse.jst.common.project.facet.core.prefs | org.eclipse.wst.common.component | org.eclipse.wst.common.project.facet.core.xml | org.eclipse.wst.jsdt.ui.superType.container | org.eclipse.wst.jsdt.ui.superType.name | +---build | \---classes +---src \---WebContent +---META-INF | MANIFEST.MF | \---WEB-INF | web.xml | \---lib You can ignore .classpath, .project, and .settings. If you check your project into Subversion, I recommend telling it to ignore those files; some people prefer checking them in. I completely ignore the contents of the build folder; whenever you do a clean in Eclipse it wipes and removes that folder. The folder of interest for me is the WebContent folder; its layout and contents is what will ultimately be in Tomcat as /usr/local/tomcat/webapps/MyWebApp (sorry, switching to Unix parlance there). This means that any jar files your project needs go in WebContent/WEB-INF/lib. Also, you should create the folder WebContent/WEB-INF/classes and put in it those things that need to be on the classpath, for example, your logging config file (e.g., logback.xml or log4j.xml, or log4j.properties if you prefer that confusing format), and any other properties files and whatnot. It's instructive to do as Alan says and do the Eclipse export to war and then list the war file with a zip program to see what it's going to look like when Tomcat explodes it. Static jsp files will go directly in the WebContent folder (e.g., index.jsp). Dynamic jsp files will probably go in some subdirectory of WEB-INF; for example, I use Spring and I've configured it to look for the views in WEB-INF/views/jsp, with even more folders in that if I'm using something like Tiles. Back in Eclipse, in the Servers tab/window, is an entry for Tomcat, and the controls for that are at the top of the tab; the green circle arrow starts Tomcat and when it's started the red square stops it. In theory, and perhaps in practice, you can edit your .java files and do a compile/build in Eclipse and Tomcat will automatically reload them. I'm superstitious from back in the day when that didn't always work and try to remember to stop Tomcat before I do a build. This implies that I have Eclipse configured to not automatically build when I do a Save on a file. If Tomcat does get wedged in Eclipse; for example, changes stop showing, you can simply delete the Tomcat instance from Eclipse by right clicking on it in the Servers window/tab and selecting Delete, then re-add it and add your project to it. Note that when you start and run Tomcat from within Eclipse it's not deploying your project to your installed Tomcat; it's using the installed Tomcat's jar files and copying/creating its own Tomcat configuration files into your project space and running it all in there. It's all rather magical and, surprisingly, given all the apparent black magic, works quite nicely. It gets even more black magical if you use Maven and use the m2eclipse Maven plugin for Eclipse, but I think it's really worth it to climb that mountain because it gives you a great base for a consistent and maintainable project structure. Alan Chaney wrote: In Eclipse, assuming you have the WTP tools installed, you create a 'Dynamic Web Project.' This has a folder structure of which the essence is: MyApp src com mypackage Abc.java build com mypackage Abc.class WebContent index.html (or jsp or whatever) WEB-INF web.xml
Re: File system resource for static content
Exactly. Since we are supposed to write an application that's running without extracting the war, Steves approach was my first try, but it's not working that way :( Also, symlinks are a good way in posix systems, but then the app is not platform independent anymore. The approach of a reader servlet sounds good, but how can I implement this to include the files into a jsp then? In other words, if /App/Reader is my reader servlet, can I include an image into jsp with img src=/App/Reader?file=image.jpg /? 2008/12/14 Yuval Perlov yu...@r-u-on.com The problem with this approach is that when you upgrade the war file the files will be deleted. I believe It is better to save the files outside the web app and deliver them either with a symbolic link from within your war file or using a reader servlet. Yuval Perlov www.r-u-on.com On Dec 14, 2008, at 7:17 PM, Steve Ochani wrote: Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello users, I'm trying to find the best practice way for implementing the following: I want a servlet to perform file uploads and to store the files in the local filesystem. This part is not that hard to do as i'm currently writing into the javax.servlet.context.tempdir. The problem is that i need to store the files in a directory, that will be accessible from the web. My tutor at university gave me the hint that this is best done with a resource which points to a local directory and that's mapped to the webapp. So I imagine that http://localhost:8080/WebTest/Upload is my servlet mapping and that http://localhost:8080/WebTest/files/ points to this resource. I do something very similar using apache commons upload project. I have a separate files directory in my webapp directory and I use the following code to initialize a path to save my uploaded files: ServletContext sc = getServletContext(); String path = sc.getRealPath(/files); I can then access a file in the that files directory via http://server:8080/appname/files/filename -Steve O. But all my research in the documentation did not bring any success. I know that i can specify resources in the context.xml, but not how I specify the path on the local system or how to do the mapping... If anyone already did this and can provide me with configuration examples, I'd very much appreciate it. I am using Tomcat 5.5 on Linux (not the pre-packaged), the application is deployed as war, my context.xml is located in META-INF ?xml version=1.0 encoding=UTF-8? Context privileged=true antiResourceLocking=false antiJARLocking=false path=WebTest / - My web.xml is the following: - ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; descriptionTest Internetapplikationen/description servlet descriptionController Servlet/description display-nameController Servlet/display-name servlet-nameController/servlet-name servlet-classorg.agility.webtest.control.Controller/servlet-cla ss /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/Controller/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app -- Thank you very much for your help Robert - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
On Sun, Dec 14, 2008 at 11:29 AM, Robert Drescher robert.dresc...@gmail.com wrote: In other words, if /App/Reader is my reader servlet, can I include an image into jsp with img src=/App/Reader?file=image.jpg /? Of course, it's just a URL. Better, just make it img src=/App/Reader/image.jpg / (or /App/images/image.jpg, or whatever). HTH, -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
The image would work because it is a separate hit (not embedded). For general info, if you did want to embed you would use jsp:include You can also have the servlet map to something like /files/* and parse the path to find out which file is being requested - this makes the file url feel more native than /reader?file=fff One more thing, since you are serving the file and not the web container, you need to handle the Content-Type tag on your own. I am not aware of anyway to access tomcat's internal table but creating something of your own should not be a big issue (see this table http://www.iangraham.org/books/html4ed/appb/mimetype.html) . For an exercise this isn't a must but some browsers will take issue with the server not reporting content-type correctly. Yuval Perlov www.r-u-on.com On Dec 14, 2008, at 9:29 PM, Robert Drescher wrote: Exactly. Since we are supposed to write an application that's running without extracting the war, Steves approach was my first try, but it's not working that way :( Also, symlinks are a good way in posix systems, but then the app is not platform independent anymore. The approach of a reader servlet sounds good, but how can I implement this to include the files into a jsp then? In other words, if /App/Reader is my reader servlet, can I include an image into jsp with img src=/App/Reader?file=image.jpg /? 2008/12/14 Yuval Perlov yu...@r-u-on.com The problem with this approach is that when you upgrade the war file the files will be deleted. I believe It is better to save the files outside the web app and deliver them either with a symbolic link from within your war file or using a reader servlet. Yuval Perlov www.r-u-on.com On Dec 14, 2008, at 7:17 PM, Steve Ochani wrote: Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello users, I'm trying to find the best practice way for implementing the following: I want a servlet to perform file uploads and to store the files in the local filesystem. This part is not that hard to do as i'm currently writing into the javax.servlet.context.tempdir. The problem is that i need to store the files in a directory, that will be accessible from the web. My tutor at university gave me the hint that this is best done with a resource which points to a local directory and that's mapped to the webapp. So I imagine that http://localhost:8080/WebTest/Upload is my servlet mapping and that http://localhost:8080/WebTest/files/ points to this resource. I do something very similar using apache commons upload project. I have a separate files directory in my webapp directory and I use the following code to initialize a path to save my uploaded files: ServletContext sc = getServletContext(); String path = sc.getRealPath(/files); I can then access a file in the that files directory via http://server:8080/appname/files/filename -Steve O. But all my research in the documentation did not bring any success. I know that i can specify resources in the context.xml, but not how I specify the path on the local system or how to do the mapping... If anyone already did this and can provide me with configuration examples, I'd very much appreciate it. I am using Tomcat 5.5 on Linux (not the pre-packaged), the application is deployed as war, my context.xml is located in META-INF ?xml version=1.0 encoding=UTF-8? Context privileged=true antiResourceLocking=false antiJARLocking=false path=WebTest / - My web.xml is the following: - ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; descriptionTest Internetapplikationen/description servlet descriptionController Servlet/description display-nameController Servlet/display-name servlet-nameController/servlet-name servlet-classorg.agility.webtest.control.Controller/servlet-cla ss /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/Controller/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app -- Thank you very much for your help Robert - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To
Weblogic Remote EJB from Tomcat
There are various posts, but among them I can't find an answer. I hope there is one. I am Trying to do a Weblogic EJB t3 lookup from a web app running in Tomcat 5.5. After deploying WL 10.3 jars in Tomcat's common/lib area, I can authenticate with WL's security Realm, but when I do an InitialContext.lookup, I get this: (Yes, the same web app deploys and runs properly in WL's own servlet container) weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74) weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:439) weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:395) weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380) javax.naming.InitialContext.lookup(InitialContext.java:392) com.fasttrack.utilities.EJBUtilities.lookup(EJBUtilities.java:499) com.fasttrack.utilities.EJBUtilities.lookup(EJBUtilities.java:471) com.fasttrack.tspd.webnav.LoginBean.login(LoginBean.java:95) org.apache.jsp.Login_jsp._jspService(Login_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:619) By the way I already tried IIOP instead of T3 and got a NPE somewhere else deep down -- View this message in context: http://www.nabble.com/Weblogic-Remote-EJB-from-Tomcat-tp21003970p21003970.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
Hi. What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpeg ? Who wins ? Worse, they do it at the same time.. ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
André Warnier wrote: Hi. What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpeg ? Who wins ? Worse, they do it at the same time.. ;-) Ooops, I meant abc.jpg both times of course. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
On Sun, Dec 14, 2008 at 12:45 PM, André Warnier a...@ice-sa.com wrote: What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpg ? Who wins ? Hopefully, everyone wins, since the Klever Koder has checked first to be sure an existing file isn't being overwritten :-) -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
That seems like the usual race condition problem to me. Hopefully one of them will get an error, at worst, and it won't silently overwrite the file with the one from whoever won the race. André Warnier wrote: André Warnier wrote: Hi. What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpeg ? Who wins ? Worse, they do it at the same time.. ;-) Ooops, I meant abc.jpg both times of course. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
I had to do something like that myself. Here's a little method that creates a folderpath for each unique session. public File getTempDir(HttpSession hsess) { String path = hsess.getServletContext().getRealPath(/); // / context root of the application return new File(path, hsess.getId()); } Hope this gets you started. - Peter -- View this message in context: http://www.nabble.com/File-system-resource-for-static-content-tp20999639p21004662.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File system resource for static content
Ok, thanks to all, I finished my Reader Servlet. I created a work dir which has to be included into the webapps.policy so that webapps can read and write to it. My reader servlet accepts a param file so far, since i haven't figured out how to do the mapping and parsing to do the /WebApp/files/filename.jpg so far. But that should be a quick fix. Anyhow, the path is stored in a context-param so all I need to do to port the application is set the path in the web.xml and set the policies to allow read/write access. And yes, i create subdirectories for each user and each picture will get a random file name. Since I maintain user objects which organize all the pictures each user uploads, it's no problem to find it again. Since this is only a test project for University, this stays in-memory, but apparenty, for a real deployment, the whole thing will be done with JDBC. But again, thanks for your help, recommendations and advices Robert
Re: File system resource for static content
On Sun, Dec 14, 2008 at 1:47 PM, Robert Drescher robert.dresc...@gmail.com wrote: My reader servlet accepts a param file so far, since i haven't figured out how to do the mapping and parsing to do the /WebApp/files/filename.jpg so far. But that should be a quick fix. see HttpServletRequest.getPathInfo() -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
unable to login to second application because of password digest issues
Hi. I added a second application, but am unable to login to it because of password digest issues. Stepping into RealmBase.java this is what I find: When I log in to the primary application (under ROOT) the password is test and the password saved in the database is the sha1 which is a743f6004188c384dbf566c0811ca0c978e07a9b. In JDBCRealm.digest, which is called by authenticate, there is a line return (HexUtils.convert(md.digest())); Incidentally, the second call to md.digest() returns a new result, although there is a call to md.reset() at the start of the try block. When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) a743f6004188c384dbf566c0811ca0c978e07a9b String This matches what's in the database. Of course when I let the debugger continue the login fails because the code itself calls md.digest which returns a new result. So if I did not add that expression to the watch window, the login would work. And this is the case. Now onto my second application. The login is also test, although the username, table name, and column names are different. However, When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) 5fd0b97a45856c5581c1022c2e59ea00670e1040 String This does not match the value in the database, so the login fails. In fact, if I don't add any breakpoints and let the code run, the login fails, and my guess is that's because digest returns the wrong value. By contrast, for the ROOT application, digest returns the right value and the login succeeds -- as long as there are no breakpoints and watch variables. Incidentally, in both cases, the next call to HexUtils.convert(md.digest()) yields HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String And the value remains the same even for the next call to HexUtils.convert(md.digest()). Strange problem. Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat6, bottleneck, concurrent requests, windows xp
kazukin6 schrieb am 13.12.2008 um 18:15:33 (-0800): 1) there is maxThreads=100 in context.xml 2) sending 100 simultaneous requests to one servlet, for example ab.exe -n 100 -c 100 {address} 3) in the servlet's own log for performance it shows around only 200-500 ms per request 4) in the ab.exe log it shows around 7 seconds(!) per request It doesn't, at least not in the log you're showing here. full log of ab.exe is Concurrency Level: 100 Time taken for tests: 16.656 seconds That's the time taken altogether. Complete requests: 100 Failed requests:0 Write errors: 0 Everything fine. Total transferred: 2770200 bytes HTML transferred: 2742700 bytes Requests per second:6.00 [#/sec] (mean) Time per request: 16656.250 [ms] (mean) This is the total time divided by, well, request: You have only one request in this sense, because you send all of your total 100 requests in parallel. To verify, try: ab -n 100 -c 10 http://localhost/ That should get you about a tenth of the time taken altogether. Time per request: 166.563 [ms] (mean, across all concurrent requests) Transfer rate: 162.42 [Kbytes/sec] received Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
HTTP Status 404 with Apache Tomcat/5.5
Hi all: When I browse http://localhost:8180/geant2-java-rrd-ma the following is returned: HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/5.5 What's the problem ! How can I to solve the problem? thanks!
Re: unable to login to second application because of password digest issues
Nevermind, I figured it out. In the second request to login, there was an extra line, so the password was actually test\r\n. --- On Sun, 12/14/08, removeps-gro...@yahoo.com removeps-gro...@yahoo.com wrote: From: removeps-gro...@yahoo.com removeps-gro...@yahoo.com Subject: unable to login to second application because of password digest issues To: users@tomcat.apache.org Date: Sunday, December 14, 2008, 2:55 PM Hi. I added a second application, but am unable to login to it because of password digest issues. Stepping into RealmBase.java this is what I find: When I log in to the primary application (under ROOT) the password is test and the password saved in the database is the sha1 which is a743f6004188c384dbf566c0811ca0c978e07a9b. In JDBCRealm.digest, which is called by authenticate, there is a line return (HexUtils.convert(md.digest())); Incidentally, the second call to md.digest() returns a new result, although there is a call to md.reset() at the start of the try block. When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) a743f6004188c384dbf566c0811ca0c978e07a9b String This matches what's in the database. Of course when I let the debugger continue the login fails because the code itself calls md.digest which returns a new result. So if I did not add that expression to the watch window, the login would work. And this is the case. Now onto my second application. The login is also test, although the username, table name, and column names are different. However, When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) 5fd0b97a45856c5581c1022c2e59ea00670e1040 String This does not match the value in the database, so the login fails. In fact, if I don't add any breakpoints and let the code run, the login fails, and my guess is that's because digest returns the wrong value. By contrast, for the ROOT application, digest returns the right value and the login succeeds -- as long as there are no breakpoints and watch variables. Incidentally, in both cases, the next call to HexUtils.convert(md.digest()) yields HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String And the value remains the same even for the next call to HexUtils.convert(md.digest()). Strange problem. Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: HTTP Status 404 with Apache Tomcat/5.5
Hsuan- could you post your .\WEB-INF\web.xml .\META-INF\Applicationcontext.xml Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: hs...@nchc.org.tw To: users@tomcat.apache.org Subject: HTTP Status 404 with Apache Tomcat/5.5 Date: Mon, 15 Dec 2008 09:18:11 +0800 Hi all: When I browse http://localhost:8180/geant2-java-rrd-ma the following is returned: HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/5.5 What's the problem ! How can I to solve the problem? thanks! _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
RE: HTTP Status 404 with Apache Tomcat/5.5
From: hsuan [mailto:hs...@nchc.org.tw] Subject: HTTP Status 404 with Apache Tomcat/5.5 What's the problem ! How can I to solve the problem? http://marc.info/?l=tomcat-userm=122823060425367w=2 http://www.catb.org/~esr/faqs/smart-questions.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: unable to login to second application because of password digest issues
MessageDigester.digest() returns an array of bytes this will produce a DataType conversion error to/from String without constructing a new String datatype the bigger problem is digest does 'padding' so the only way to get back the original string is: keep the MessageDigest in a local instance variable then revert the padding to the local string with MessageDigest.reset() //then finally produce a String representation of the original contents with MessageDigest.toString() HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Sun, 14 Dec 2008 17:24:45 -0800 From: removeps-gro...@yahoo.com Subject: Re: unable to login to second application because of password digest issues To: users@tomcat.apache.org Nevermind, I figured it out. In the second request to login, there was an extra line, so the password was actually test\r\n. --- On Sun, 12/14/08, removeps-gro...@yahoo.com removeps-gro...@yahoo.com wrote: From: removeps-gro...@yahoo.com removeps-gro...@yahoo.com Subject: unable to login to second application because of password digest issues To: users@tomcat.apache.org Date: Sunday, December 14, 2008, 2:55 PM Hi. I added a second application, but am unable to login to it because of password digest issues. Stepping into RealmBase.java this is what I find: When I log in to the primary application (under ROOT) the password is test and the password saved in the database is the sha1 which is a743f6004188c384dbf566c0811ca0c978e07a9b. In JDBCRealm.digest, which is called by authenticate, there is a line return (HexUtils.convert(md.digest())); Incidentally, the second call to md.digest() returns a new result, although there is a call to md.reset() at the start of the try block. When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) a743f6004188c384dbf566c0811ca0c978e07a9b String This matches what's in the database. Of course when I let the debugger continue the login fails because the code itself calls md.digest which returns a new result. So if I did not add that expression to the watch window, the login would work. And this is the case. Now onto my second application. The login is also test, although the username, table name, and column names are different. However, When I put HexUtils.convert(md.digest()) into the debug watch, I get HexUtils.convert(md.digest()) 5fd0b97a45856c5581c1022c2e59ea00670e1040 String This does not match the value in the database, so the login fails. In fact, if I don't add any breakpoints and let the code run, the login fails, and my guess is that's because digest returns the wrong value. By contrast, for the ROOT application, digest returns the right value and the login succeeds -- as long as there are no breakpoints and watch variables. Incidentally, in both cases, the next call to HexUtils.convert(md.digest()) yields HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String HexUtils.convert(md.digest()) da39a3ee5e6b4b0d3255bfef95601890afd80709 String And the value remains the same even for the next call to HexUtils.convert(md.digest()). Strange problem. Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
Server returned HTTP response code: 408 for URL: https...j_security_check
Server returned HTTP response code: 408 for URL: https...j_security_check In my testing I get the following error: Server returned HTTP response code: 408 for URL: https://localhost:6143/mywebservice/action/j_security_check 408 = request time out. So the question is how can a client authenticate themselves? Do you have to figure out a JSESSION id somehow? The code is public static void main(String[] args) { BufferedReader responseReader = null; try { URL url = new URL(https://localhost:6143/mywebservice/action/j_security_check;); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(POST); connection.setUseCaches(false); connection.setAllowUserInteraction(false); connection.setDoOutput(true); PrintWriter requestParamsWriter = new PrintWriter(connection.getOutputStream()); requestParamsWriter.print(j_username=junkuserj_password=test); requestParamsWriter.flush(); requestParamsWriter.close(); requestParamsWriter = null; responseReader = new BufferedReader(new InputStreamReader(connection.getInputStream())); while (true) { String line = responseReader.readLine(); if (line == null) break; System.out.println(line); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (responseReader != null) responseReader.close(); } catch (Exception e) { e.printStackTrace(); } } } - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: Server returned HTTP response code: 408 for URL: https...j_security_check Server returned HTTP response code: 408 for URL: https://localhost:6143/mywebservice/action/j_security_check You're not allowed to reference j_security_check directly. The URL must refer to a protected resource (as declared in your web.xml), at which point Tomcat will internally call up the j_security_check. if the authentication succeeds, the original request will then be reattempted automatically. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
But how does this work through code? My initial request is to http://localhost/mywebservice/file.do; (and all this is through Java code similar to below). Tomcat redirects the request to the login page specified in web.xml http://localhost/mywebservice/login.html;. Then either Tomcat returns this page to the user, or invokes a servlet that constructs the page and returns is to the user. Then it seems Tomcat remembers the original request. Now the user sees a login page with the j_username and j_password form fields. In code, they get the output stream and it instructs them to login, though my page does not have the form fields in it. So in code the client constructs a login request. The request input stream is set to j_username=usernamej_password=password. But to what URL should the above response be posted? I would imagine that it should be to http://localhost/mywebservice/j_security_check; because the login page is typically like this form action=j_security_check ../form. A browser does not know about Tomcat protocols, so it would I imagine send the request to j_security_check. Then I imagine that Tomcat intercepts the request and validates the login, and then forwards to the original page (which must have remembered). So it makes sense to me that through code one may make requests to j_security_check. Just this would not not a recommended practice to users typing something into the address bar. So any ideas on how to make https requests through code? --- On Sun, 12/14/08, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check To: Tomcat Users List users@tomcat.apache.org Date: Sunday, December 14, 2008, 7:20 PM From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: Server returned HTTP response code: 408 for URL: https...j_security_check Server returned HTTP response code: 408 for URL: https://localhost:6143/mywebservice/action/j_security_check You're not allowed to reference j_security_check directly. The URL must refer to a protected resource (as declared in your web.xml), at which point Tomcat will internally call up the j_security_check. if the authentication succeeds, the original request will then be reattempted automatically. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat6, bottleneck, concurrent requests, windows xp
Hi, Michael ! I suppose Connection Times (ms) table section actually describes individual requests? And Percentage of the requests served within a certain time (ms) as well? For me it seems that concurrency is hardly working at all, but threads are blocked (or waiting) somewhere outside of doGet Servlet's method, cause doGet performance doesn't not differ to that extend (although there is some waiting issues inside obviously) I made 3 new measurements for different concurrency levels (100, 10, 1) Servlet's doGet overall method execution time is counted this way static long overall doGet(request, response) { long start = System.currentTimeMillis(); // here goes logic … //synchronized{ overall += System.currentTimeMillis() - start; } } Concurrency = 100 === ab.exe - n 100 -c 100 {address} ab.exe execution time=7.641 seconds overall doGet servlet execution =8067 === Concurrency Level: 100 Time taken for tests: 8.234 seconds Complete requests: 100 Failed requests:0 Write errors: 0 Total transferred: 2770200 bytes HTML transferred: 2742700 bytes Requests per second:12.14 [#/sec] (mean) Time per request: 8234.375 [ms] (mean) Time per request: 82.344 [ms] (mean, across all concurrent requests) Transfer rate: 328.53 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 16 70 33.3 63 172 Processing: 500 4097 2098.4 41417719 Waiting: 141 3700 2115.9 37197344 Total:547 4168 2097.3 42667734 Percentage of the requests served within a certain time (ms) 50% 4266 66% 5344 75% 5984 80% 6344 90% 7109 95% 7500 98% 7672 99% 7734 100% 7734 (longest request) Concurrency = 10 === ab.exe - n 100 -c 10 {address} ab.exe execution time=8.094 seconds overall doGet servlet execution =7206 === Concurrency Level: 10 Time taken for tests: 8.094 seconds Complete requests: 100 Failed requests:0 Write errors: 0 Total transferred: 2770200 bytes HTML transferred: 2742700 bytes Requests per second:12.36 [#/sec] (mean) Time per request: 809.375 [ms] (mean) Time per request: 80.938 [ms] (mean, across all concurrent requests) Transfer rate: 334.24 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 31 75 29.0 78 141 Processing: 172 695 149.0734 891 Waiting: 109 344 143.7328 719 Total:250 770 156.38131000 Percentage of the requests served within a certain time (ms) 50%813 66%828 75%844 80%875 90%922 95%953 98% 1000 99% 1000 100% 1000 (longest request) Concurrency = 1 === ab.exe - n 100 -c 1 {address} ab.exe execution time=10.578 seconds overall doGet servlet execution=4672 === Concurrency Level: 1 Time taken for tests: 10.578 seconds Complete requests: 100 Failed requests:0 Write errors: 0 Total transferred: 2770200 bytes HTML transferred: 2742700 bytes Requests per second:9.45 [#/sec] (mean) Time per request: 105.781 [ms] (mean) Time per request: 105.781 [ms] (mean, across all concurrent requests) Transfer rate: 255.74 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 16 24 8.1 31 47 Processing:63 81 8.8 78 109 Waiting: 63 67 7.6 63 94 Total: 94 105 9.0109 125 Percentage of the requests served within a certain time (ms) 50%109 66%109 75%109 80%109 90%109 95%125 98%125 99%125 100%125 (longest request) Michael Ludwig-6 wrote: kazukin6 schrieb am 13.12.2008 um 18:15:33 (-0800): 1) there is maxThreads=100 in context.xml 2) sending 100 simultaneous requests to one servlet, for example ab.exe -n 100 -c 100 {address} 3) in the servlet's own log for performance it shows around only 200-500 ms per request 4) in the ab.exe log it shows around 7 seconds(!) per request It doesn't, at least not in the log you're showing here. full log of ab.exe is Concurrency Level: 100 Time taken for tests: 16.656 seconds That's the time taken altogether. Complete requests: 100 Failed requests:0 Write errors: 0 Everything fine. Total transferred: 2770200 bytes
HTTP Status 500 problem with tomcat5.5
Hi all : When I using http://localhost:8180/geant2-java-rrd-ma/ to browser ,it's show the error message as follows : HTTP Status 500 - _ type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Exception in JSP: /index.jsp:77 74: 75:java.text.DateFormat dateFormat = new java.text.SimpleDateFormat(EEE MMM dd HH:mm:ss zzz ); 76:java.util.Date now= new java.util.Date(); 77:java.util.Date date= dateFormat.parse(now.toString()); 78:String confPath = WEB-INF/classes/perfsonar/conf/; 79:String ServicePropertiesPath = confPath+ service.properties; 80:ServletContext sc = getServletContext(); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra pper.java:451) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 55) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.servlet.ServletException: Unparseable date: Mon Dec 15 11:39:35 GMT+08:00 2008 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:841) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:774) org.apache.jsp.index_jsp._jspService(index_jsp.java:239) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 31) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.text.ParseException: Unparseable date: Mon Dec 15 11:39:35 GMT+08:00 2008 java.text.DateFormat.parse(DateFormat.java:335) org.apache.jsp.index_jsp._jspService(index_jsp.java:127) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 31) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) 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 logs. _ Apache Tomcat/5.5 What's happening!! How can I to solve the problem ? Regards, vicky
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check The request input stream is set to j_username=usernamej_password=password. Good so far. But to what URL should the above response be posted? It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. form action=j_security_check ../form. Again, note that the method should be POST (which your code does seem to be doing). A browser does not know about Tomcat protocols, so it would I imagine send the request to j_security_check. Correct, but that's accepted by Tomcat only when a login form has just been returned to the client. There's no indication in your code that the j_security_check is being sent as a response to a login form, nor is the required JSESSIONID cookie being returned. So any ideas on how to make https requests through code? This isn't tied to HTTPS, just form login. The SSL negotiation is completely separate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to start tomcat server 6x
Partha Goswami wrote: Actually, If anyone use Tomcat in Solaris Zones, then, /usr/local or /usr all is come read only mode, by default. so, Its need to know, Which oS On Sat, Dec 13, 2008 at 6:32 PM, David Smith d...@cornell.edu wrote: I think the important message is here: /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system In particular the phrase Read-only file system suggests the disk/partition tomcat is installed on was mounted read-only instead of read-write. Fix that and you should be good to go. --David Partha wrote: Hi there, I am unable to restart apache-tomcat-6.0.18.When i try to run the startup.sh it gives the following error: Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.18 Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.18 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp Using JRE_HOME: /usr touch: cannot touch `/usr/local/apache-tomcat-6.0.18/logs/catalina.out': Read-only file system /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system When i try to change the permissions of catalina.out, it gives the message that the file is read only. Any pointers in this regard would be of great help. Thanks and Regards, Partha. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com Thanks a lot for everyone who has replied. Hi Partha, I have tried running the command chmod 777 /usr/local but it didn't allow me to change the permissions.It said I have Read-only permission. I am trying to access a remote server which is set up on a windows box through Secure Shell Client(SSH). I am logged in as root. Please provide some pointers. Thanks and Regards, Partha. -- View this message in context: http://www.nabble.com/Unable-to-start-tomcat-server-6x-tp20988232p21008378.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. Thanks, this seems to be the issue. There is a call to org.apache.catalina.connector.Request.setRequestedSessionId(String id) from parseSessionCookiesId? How does the client get the JSESSIONID? When the server generates the login page does it have to call response.addCookie? From where should the servlet get the session id? How does the client read the cookie? Thanks. --- On Sun, 12/14/08, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check To: Tomcat Users List users@tomcat.apache.org Date: Sunday, December 14, 2008, 9:02 PM From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check The request input stream is set to j_username=usernamej_password=password. Good so far. But to what URL should the above response be posted? It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. form action=j_security_check ../form. Again, note that the method should be POST (which your code does seem to be doing). A browser does not know about Tomcat protocols, so it would I imagine send the request to j_security_check. Correct, but that's accepted by Tomcat only when a login form has just been returned to the client. There's no indication in your code that the j_security_check is being sent as a response to a login form, nor is the required JSESSIONID cookie being returned. So any ideas on how to make https requests through code? This isn't tied to HTTPS, just form login. The SSL negotiation is completely separate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
Nevermind, I see that JSESSIONID is added to the response automatically from Tomcat. The code System.out.println(connection.getHeaderField(Set-Cookie)); prints JSESSIONID=56136B3CE4CC657DD36C226E264A97AD; Path=/mywebservice; Secure So now I think I just have to include that cookie in every request. Will write back if it does not work. --- On Sun, 12/14/08, removeps-gro...@yahoo.com removeps-gro...@yahoo.com wrote: From: removeps-gro...@yahoo.com removeps-gro...@yahoo.com Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check To: Tomcat Users List users@tomcat.apache.org Date: Sunday, December 14, 2008, 9:18 PM It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. Thanks, this seems to be the issue. There is a call to org.apache.catalina.connector.Request.setRequestedSessionId(String id) from parseSessionCookiesId? How does the client get the JSESSIONID? When the server generates the login page does it have to call response.addCookie? From where should the servlet get the session id? How does the client read the cookie? Thanks. --- On Sun, 12/14/08, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check To: Tomcat Users List users@tomcat.apache.org Date: Sunday, December 14, 2008, 9:02 PM From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check The request input stream is set to j_username=usernamej_password=password. Good so far. But to what URL should the above response be posted? It should be a POST request to /[webapp]/j_security_check, and include the JSESSIONID cookie set by the server when the login page was returned. form action=j_security_check ../form. Again, note that the method should be POST (which your code does seem to be doing). A browser does not know about Tomcat protocols, so it would I imagine send the request to j_security_check. Correct, but that's accepted by Tomcat only when a login form has just been returned to the client. There's no indication in your code that the j_security_check is being sent as a response to a login form, nor is the required JSESSIONID cookie being returned. So any ideas on how to make https requests through code? This isn't tied to HTTPS, just form login. The SSL negotiation is completely separate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Server returned HTTP response code: 408 for URL: https...j_security_check
From: removeps-gro...@yahoo.com [mailto:removeps-gro...@yahoo.com] Subject: RE: Server returned HTTP response code: 408 for URL: https...j_security_check How does the client get the JSESSIONID? It's normally sent as a cookie; if the client has disabled cookies, the login page servlet or JSP should call Response.encodeURL() to get it added to the URL as a parameter. When the server generates the login page does it have to call response.addCookie? I think Tomcat does that automatically, but I'm not positive. Look at the doc for the cookies attribute of the Context parameter: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html From where should the servlet get the session id? It doesn't have to, Tomcat handles it automatically for form login. The servlet or JSP can use the HTTPSession.getId() to retrieve it if desired. How does the client read the cookie? By parsing the response headers or parameters. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to start tomcat server 6x
Oh, Then, type # uname -a and post out put here On Mon, Dec 15, 2008 at 10:34 AM, Partha parthat...@gmail.com wrote: Partha Goswami wrote: Actually, If anyone use Tomcat in Solaris Zones, then, /usr/local or /usr all is come read only mode, by default. so, Its need to know, Which oS On Sat, Dec 13, 2008 at 6:32 PM, David Smith d...@cornell.edu wrote: I think the important message is here: /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system In particular the phrase Read-only file system suggests the disk/partition tomcat is installed on was mounted read-only instead of read-write. Fix that and you should be good to go. --David Partha wrote: Hi there, I am unable to restart apache-tomcat-6.0.18.When i try to run the startup.sh it gives the following error: Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.18 Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.18 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp Using JRE_HOME: /usr touch: cannot touch `/usr/local/apache-tomcat-6.0.18/logs/catalina.out': Read-only file system /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system When i try to change the permissions of catalina.out, it gives the message that the file is read only. Any pointers in this regard would be of great help. Thanks and Regards, Partha. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com Thanks a lot for everyone who has replied. Hi Partha, I have tried running the command chmod 777 /usr/local but it didn't allow me to change the permissions.It said I have Read-only permission. I am trying to access a remote server which is set up on a windows box through Secure Shell Client(SSH). I am logged in as root. Please provide some pointers. Thanks and Regards, Partha. -- View this message in context: http://www.nabble.com/Unable-to-start-tomcat-server-6x-tp20988232p21008378.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com
RE: HTTP Status 500 problem with tomcat5.5
From: hsuan [mailto:hs...@nchc.org.tw] Subject: HTTP Status 500 problem with tomcat5.5 Much better post this time - you actually supplied real information, but you didn't tell us the JVM you're using, nor the platform you're running on. org.apache.jasper.JasperException: Exception in JSP: /index.jsp:77 75:java.text.DateFormat dateFormat = new java.text.SimpleDateFormat(EEE MMM dd HH:mm:ss zzz ); 76:java.util.Date now= new java.util.Date(); 77:java.util.Date date= dateFormat.parse(now.toString()); javax.servlet.ServletException: Unparseable date: Mon Dec 15 11:39:35 GMT+08:00 2008 This is very odd; I've tried your code in a stand-alone program without any problem: import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; class TestDate { public static void main(String[] args) throws ParseException { DateFormat dateFormat = new SimpleDateFormat(EEE MMM dd HH:mm:ss zzz ); Date now = new Date(); Date date = dateFormat.parse(now.toString()); System.out.println(date.toString()); date = dateFormat.parse(Mon Dec 15 11:39:35 GMT+08:00 2008); System.out.println(date.toString()); } } Try running the above test program on your JVM to see what happens. Make sure the spaces in your date format really are spaces and not some other non-printing character. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to start tomcat server 6x
Partha Goswami wrote: Oh, Then, type # uname -a and post out put here On Mon, Dec 15, 2008 at 10:34 AM, Partha parthat...@gmail.com wrote: Partha Goswami wrote: Actually, If anyone use Tomcat in Solaris Zones, then, /usr/local or /usr all is come read only mode, by default. so, Its need to know, Which oS On Sat, Dec 13, 2008 at 6:32 PM, David Smith d...@cornell.edu wrote: I think the important message is here: /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system In particular the phrase Read-only file system suggests the disk/partition tomcat is installed on was mounted read-only instead of read-write. Fix that and you should be good to go. --David Partha wrote: Hi there, I am unable to restart apache-tomcat-6.0.18.When i try to run the startup.sh it gives the following error: Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.18 Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.18 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp Using JRE_HOME: /usr touch: cannot touch `/usr/local/apache-tomcat-6.0.18/logs/catalina.out': Read-only file system /usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: Read-only file system When i try to change the permissions of catalina.out, it gives the message that the file is read only. Any pointers in this regard would be of great help. Thanks and Regards, Partha. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com Thanks a lot for everyone who has replied. Hi Partha, I have tried running the command chmod 777 /usr/local but it didn't allow me to change the permissions.It said I have Read-only permission. I am trying to access a remote server which is set up on a windows box through Secure Shell Client(SSH). I am logged in as root. Please provide some pointers. Thanks and Regards, Partha. -- View this message in context: http://www.nabble.com/Unable-to-start-tomcat-server-6x-tp20988232p21008378.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com Hi Partha, The output when i have executed the command uname -a is Linux superbook 2.6.9-67.0.7.ELsmp #1 SMP Wed Feb 27 04:48:20 EST 2008 i686 i686 i386 GNU/Linux Thanks a lot for taking out your time and for helping me to resolve this issue. Thanks and Regards, Partha. -- View this message in context: http://www.nabble.com/Unable-to-start-tomcat-server-6x-tp20988232p21008695.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Want to disable automatically generated Context element
Hi All, I have a requirement to disable one default functionality in tomcat which is mentioned as below, URL: http://tomcat.apache.org/tomcat-6.0-doc/config/host.html Section: Automatic Application Deployment Description snippet: If you are using the standard Host implementation, the following actions take place automatically when Catalina is first started, if the deployOnStartup property is set to true (which is the default value): Any subdirectory within the application base directory will receive an automatically generated Context element, even if this directory is not mentioned in the conf/server.xml file. I want to keep default setting deployOnStartup = true, but disable automatically generating Context element for any subdirectory within the application base directory Simply setting autoDeploy = false did not help me. Also I did not find any workaround till now for this. Can anybody help? Thanks. -- View this message in context: http://www.nabble.com/Want-to-disable-%22automatically-generated-Context-element%22-tp21009387p21009387.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org