Problem with Tomcat 4.1.29 and german umlaut url-encoding
Hi folks, i actually face some strange phenomenon concerning tomcat and URL-encoding of german umlauts. As you may know, some browsers encode german umlauts for usage in the URL with %xx sequences for proper transportation. The problem i have now is, that i got a web application which allows the download of PDF-files, which may contain spaces and german umlauts. If i request a file like that, for instance Tür Testzwecke.pdf, this request comes to Tomcat as F%FCr%20Testzwecke.pdf Tomcat then decodes the spaces (%20) correctly, but it does not decode the %FC and looks for a file F%fcr Testzwecke.pdf, which of course does not exist and causes a 404 error. Since the tomcat is a 4.1.29 out-of-the-box install with no customization, i am quite confused about this, since i would expect Tomcat to decode spaces and umlauts correctly. Did anybody face this problem before or does somebody have a clue about this? thanks for your help in advance, Thilo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: understanding web.xml
Hi Tobias, in Suns official Servlet specification all elements of web.xml are explained widely, so i would suggest, that you study this one. You can get it here: http://java.sun.com/products/servlet/download.html Hope this helps regards, Thilo Tobias Eriksson wrote: Hi I have been searching the web some for information about how to configure / setup; web.xml, but haven't really found anything. I thought there would be something in the TOMCAT documentation, perhaps I wasn't to thorough when I browsed through it. Does anyone have a link to some tutorial or article that explains the web.xml? Regards Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jdbc and tomcat
Hello, the SQL error message does not look like if the driver itself could not be found, it appears more obvious to me, that the connection URL for the database is incorrect. Please check your database connection string, maybe the bug hides in there:-) To your xml problem: Did you also check, that all tags are correctly set with an start-tag and end-/tag? And remember that stand-alone tags always have to be closed with a final / e.g. stand-alone-tag/... HTH, regards, Thilo Hello, I have got a problem with my Servlet which uses a JDBC database connection to a Ms SQL Server There is a getConnection command that should be executed. But this command fails and throws the exception with description: [Microsoft][SQLServer 2000 Driver for JDBC] Unable to connect. Invalid URL. is thrown. I dont know, what went wrong. Why cant the driver be found, although I have all driver jars in my classpath and also in the lib folder in the WEB_INF folder of the corresponding Addressbook-webapp in Tomcat? also I have another problem: Except of the SQL Errors there are other parsing errors , starting with SEVERE... while tomcat is starting up, which I cannot identify. . The message is: The end-tag for element type context-param must end with a '' delimiter. First of all, all my tags of the application ended in '' and secondly I removed the Webapplication folder for the specific webapp that was using a web.xml with context-params and replaced it with another webapp which has all its configuration parameters hard-wired in the code. Also I removed the Context file of the former webapp from conf\Catalina\localhost, but still it exists somewhere and causes errors. Then I tried to clean them up by making a new installation of Tomcat, but I couldn't uninstall the old one. Maybe you have an idea. Help! thanx, Caroline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: My first WebApplication
Hi Sayeed, You should add the servlet to the web.xml under WEB-INF/ with a notation like this: servlet servlet-namesayeed/servlet-name servlet-classcom.wrox.projsp.ch03.myfirstwebapp.sayeed/servlet-class /servlet servlet-mapping servlet-namesayeed/servlet-name url-pattern/servlet/sayeed/url-pattern /servlet-mapping then you should be able to call your servlet by this path: http://localhost:8080/ch03/sayeed HTH, regards, Thilo Hi to all Sir/Madam Please help me someone regarding my first WebApplication (Servlet): I created directories : CATALINA_HOME\webapps\ch03\WEB-IN\classes\com\wrox\projsp\ch03\myfirstwebapp Then into my sayeed class i starated with a first line as: package com.wrox.projsp.ch03.myfirstwebapp and other coding stuff for the java class.. I compile this java file (sayeed) and it compiled sucessfully and saved into: CATALINA_HOME\webapps\ch03\WEB-IN\classes\com\wrox\projsp\ch03\myfirstwebapp \sayeed.class Now after startup my tomcat server i put this into url browser which gives error: http://localhost:8080/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed the error is: type Status report message /ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed description The requested resource (/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.sayeed) is not available. Can anyone please help me? thanx in advance Saeed - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:31 PM Subject: RE: Error Starting Sample Tomcat Webapps Hola, How did you install tomcat? Yoav Shapira Millennium Research Informatics -Original Message- From: Sayeed [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 12:40 PM To: Tomcat Users List Subject: Re: Error Starting Sample Tomcat Webapps Dear Filip thanx for the advice - i put the same command and it gives these message : Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.start(Catalina.java:449) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Catalina.start: sun.misc.InvalidJarIndexException: Invalid index! sun.misc.InvalidJarIndexException: Invalid index! at org.apache.commons.digester.Digester.createSAXException(Digester.java :2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java :2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour ce) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn own Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen t(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.start(Catalina.java:449) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) c:\apache\tomcat\bin plz advice Saeed - Original Message - From: Filip Hanik - Dev [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:10 PM Subject: Re: Error Starting Sample Tomcat Webapps type catalina.bat run RTFM - Original Message - From: Sayeed [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 11:16 AM Subject: Re: Error Starting Sample Tomcat Webapps Dear Filip if I issues catalina.bat in DOS then this is all:
Re: easy debugging
Hi Vamsee, there is a log()-Method defined in the HttpServlet Interface. Just call this.log(your debug msg); from within your servlet, then the message should appear HTH, Thilo Hello list users, I'm using Tomcat on win2k. There is a window which is always open when Tomcat runs. It shows messages like INFO: etc. Is there a way I can write to this window from inside a servlet? I'm just looking for an easy way to debug my servlets. TIA, Vamsee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding ${} syntax in jsp pages
Hi Ess, in order to enable interpretation JSP 2.0 EL expressions, you need to switch your webapp to JSP 2.0. This is done in web.xml by replacing the starting web-app tag by this syntax: web-app 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; version=2.4 After this, restart tomcat, then your web app should be recognized as JSP 2.0 and the command interpretation should work! regards, Thilo Hello, I see some of the examples shipped with 5.0.25 tomcat contains ${} embedded jsp commands, as below: tr td\${1}/td td${1}/td /tr tr td\${1 + 2}/td td${1 + 2}/td /tr tr td\${1.2 + 2.3}/td td${1.2 + 2.3}/td /tr However, as I create a new tomcat application directory (Es. /myexamples) and try to use the same jsp syntax I only get symple html output, without ${} command interpretation. Does someone know the reason? Is it some directive missing in web.xml file? Thanks and best regards Stefano _ Filtri antispamming e antivirus per la tua casella di posta http://www.msn.it/msn/hotmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hi newbie question----help needed
Hi, are sure your tomcat's running at all? You know, that in order to run tomcat on port 80, you have to start it with root privileges! Check this out by running netstat -l . This lists you all open ports on your system Regards, Thilo Hi, I am newbie to JSP and tomcat. I tried to write the MyFirstServlet class and failed to do so. problem1 when I tried to change the port 8080 to 80 in the server.xml then Mozila browser refuses to open the tomcat welcome page.(But the book I refer says to change the port). I compile and did every thing according to the book. But still it gives The requested resource (/ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.MyFirstServlet) is not available. what could be the reason. I went through the previous mail and didn't get any help. All the spellings are correct(including cases as I use Linux) The book stated no need to have web.xml for simple servlets. Thank you for your great suggestion. regards, Jeyakumaran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where is the Real JAVAHOME?
Hello Aris, j2sdk is the full featured Java Development Kit including javac compiler, java interpreter, jdb Debugger , rmic and so on. j2re is the so called Java run time environment. This is like a somewhat slim JDK, which also provides you the Java interpreter, but NOT the compiler. With both version you may run java applications, but you may compile source code only with the jre. Since Tomcat needs the ability to compile JSP pages from source, the j2sdk is the better choice, because otherwise you will receive a ClassDefNot FoundError, when you try to request a JSP pages. Nevertheless, if you only run pre-compiled servlets and have no need for compile operation, jre may suffice also! regards, Thilo Hello! I'm confused... I installed j2sdk1.4.1 in my D drive.. D:\j2sdk1.4.1 But when i take a look at my C drive under program files.. there is C:\program files\java\j2re1.4.1 Both includes \lib and \bin folders... Which of those two directories is the JAVAHOME? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where is the Real JAVAHOME?
sorry, i made an error: of course you may compile source only with the j2sdk NOT with the jre! s*** happens :-) Hello! I'm confused... I installed j2sdk1.4.1 in my D drive.. D:\j2sdk1.4.1 But when i take a look at my C drive under program files.. there is C:\program files\java\j2re1.4.1 Both includes \lib and \bin folders... Which of those two directories is the JAVAHOME? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session invalidation
Hello Ashert, may be you ran into the same prob as me i also had the problem, that URL-rewriting under Tomcat 5 did not work although i explicitly used it. I found out, that URL-rewriting does only work, if your application runs in the root context, looking like that in server.xml: Context path= docBase=myWebapp cookies=false / I was running my app under a named context: Context path=myWebapp docBase=myWebapp cookies=false / After changing the context definition to the first sample, URL-rewriting worked fine hope this helps best regards, Thilo hello, 1. a webapp has a filter, which filters all of the requests to application's servlets. 2. the filter makes a simple check: if (session == null || session.getAttribute(abc) == null) //redirect the request to the login page; else //continue with it as it is 3. if i invalidate the session, and then try to use back button of the browser the filter kicks me to the login page. on tomcat4 this works fine. at least i didn't see any problem ever. 4. on tomcat 5 this logic works fine only with browser whith enabled cookies. using the session tracking with url rewriting doesn't work.works the debugging shows that the flow runs into the code block that must invalidate the session, but it's not invalidated. i still can get back,see the pages and use the data stored in session!:( did u have any expirience with this stuff? thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with ssl
Hello, in the official tomcat docu there is a good chapter about how to configure Tomcat with ssl. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html Check it out! Regards, Thilo Hi, I search a good description to configure tomcat with ssl on port 443 and redirect from port 80. Has anyone a good solution? Regards, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: How to increase memory
Hi Gunnar, if you added these options in CATALINA_OPTS, its not necessary to place it also in JAVA_OPTS. Both variables are attached to 'java' command at the bottom of catalina.bat (you can see this in the bottom of catalina.bat at the line commencing with the %EXECJAVA% statement) But if this command did not increase performance, i guess that your problem is not related to a lack of memory. What type of machine are you using? Regards, Thilo Where do I have to add this? Also in the catalina.bat? I tested set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m in Catalona.bat as mentioned from Thilo Krawietz' email. Still it seems to be very slow. Thank you Gunnar -Ursprüngliche Nachricht- Von: alu, artifex [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Juli 2004 16:59 An: Tomcat Users List Betreff: Re: How to increase memory by setting the environment variable JAVA_OPTS to something like this: -Xms32m -Xmx512m this will cause the vm to allocate 32m at startup and limits the maximum java heap memory size to 512mb. you can set the environment variable by adding the following command somewhere at the beginning of startup.bat: set JAVA_OPTS=-Xms32m -Xmx512m art Gunnar Pörschke wrote: where and how do I increase memory (win2003Srv) for tomcat (4.1.30)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to increase memory
There is no possibility to increase memory quota for tomcat directly in tomcat's server settings. But you can set explicitly the amount of memory the VM, which is instanciated when you startup tomcat You do this in catalina.bat by adding two commandline options to %CATALINA_OPTS or %JAVA_OPTS for instance: set CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx2048m This tells the virtual machine that it must allocate at least 1 Gigabyte and maximum 2 Gigabytes of memory for the VM instance started. HTH, Thilo where and how do I increase memory (win2003Srv) for tomcat (4.1.30)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 sets cookies although i have disabled cookies in server.xml
Hi folks, i actually face a strange phenomenon with the Tomcat session handling mechanism. I want to use URL-rewriting instead of cookies and i used therefore the cookies=false attribute in the Context element. First the entry in the server.xml looked like that: Context path=app docBase=app cookies=false reloadable=false/ With this setting, Tomcat simply ignores the cookies=false attribute and continues to set cookies and leaves the url unrewritten. I then tried a little bit around and changed the server.xml entry to like that: Context path= docBase=app cookies=false reloadable=false/ and voila, Tomcat stops setting cookies and rewrites the url with the jsessionid value, as desired. It seems, that Tomcat only does URL-rewriting, when the path attribute is empty. Did anybody else face this phenomenon? Is it possible, that this might be an implementation bug? I actually use Tomcat 5.0.24 on a Linux RedHat 9 distro machine. Comments are welcome! Best regards, Thilo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
URL-Rewriting + SSL under Tomcat 4.1.12
Hi folks, i've got a problem with the usage of SSL and URL-rewriting together. I am using Tomcat 4.1.12 and whenever i use an SSL-enabled connector under port 443, the method encodeURL() does not append the sessionID any more to the links in the HTML pages. When i instead use a normal http connector under port 80, everything works fine and the jsessionid is appended correctly. Under 4.0.6. this error does not occur. Did anybody face this problem too? What can i do do workaround this (except the possibility too change to 4.0.6., of course :-) ? Thanks in advance, Greetings, Thilo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]