Re: Problem Compiling A JSP file
My guess, and not Tomcat related at all is you've forgotten to put the package statement in the JspCdBrowse.java file. i.e. package com.web_tomorrow.jspcd; Regards, James Williamson www.nameonthe.net - Original Message - From: Bahman Kalali [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 12:03 AM Subject: Problem Compiling A JSP file I am running Tomcat 4.0.2 Here is the header of my jsp file %@ page import=com.web_tomorrow.jspcd.JspCdBrowse% jsp:useBean id=jspCdBrowse class=com.web_tomorrow.jspcd.JspCdBrowse type=JspCdBrowse scope=session/ jsp:setProperty name=jspCdBrowse property=*/ I have my JspCdBrowse.class file in jspcd dircetoty (E:\Tomcat 4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd) Here is the error I get. org.apache.jasper.JasperException: Unable to compile class for JSPerror: File E:\Tomcat 4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd\JspCdBrowse.class does not contain type com.web_tomorrow.jspcd.JspCdBrowse as expected, but type JspCdBrowse. Please remove the file, or make sure it appears in the correct subdirectory of the class path. E:\Tomcat 4.0\work\localhost\jspcd\browse$jsp.java:3: Class com.web_tomorrow.jspcd.JspCdBrowse not found in import. import com.web_tomorrow.jspcd.JspCdBrowse; ^ 2 errors Any Idea why I am geeting this error? Cheers, --Bahman -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: 100% cpu on one of two processor
May i noe this memory leak problem occurs at which OS? or is it just linux? -Original Message- From: Chris Newland [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 11:51 PM To: Tomcat Users List Subject: RE: 100% cpu on one of two processor Hi, There is a known memory leak in javac (used to compile the JSP pages). This could be causing your Java VM to use up nearly all of its memory and start to perform heavy garbage collection. If you use the -Xms and -Xmx JVM switches (to set the initial and maximum heap sizes respectively) then your server should run for longer but will eventually run out of memory if it is compiling a lot of JSPs. I think it is possible to use a different compiler (such as Jikes or Pizza). e.g. java -Xms64M -Xmx256M classname (or as much memory as you want to allocate) You can set the Tomcat JVM sizes using (in catalina.sh) (this is for Tomcat 4) CATALINA_OPTS= -Xms64M -Xmx256M Hope this helps, Best Regards, Chris Newland -Original Message- From: Guillaume Radenkovic [mailto:[EMAIL PROTECTED]] Sent: 14 March 2002 15:36 To: [EMAIL PROTECTED] Subject: 100% cpu on one of two processor My configuration : Linux Redhat 7.1 Tomcat 3.2.4 PostgreSQL 7.0.x Sometimes, after some time, when JSP compiles on the server, this on can't display the page and on of the two cpu going to 100%. This happens on any JSP page . Need help ! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Bug in djasper4/jasper4 tomcat4-4.0.2-3.noarch.rpm
Hi, there: I have been trying to use the jasper 4 offline compiler, and found it kind of impossible; I'm not good at debugging shell scripts, but it looks like it does not pass the correct arguments to djasper4, and, in any case, djasper4 seems to be buggy too. I have added this as line #71 (sorry, I don't keep the original, so I can't send you a diff) _RUNJAVA=$JAVA_HOME/bin/java and looks like doing djasper4 jspc hola.jsp works correctly now, generating a .java file. Maybe it's been fixed already, but I haven't seen any reference to it in google. See ya! J -- PPSN2002 = http://ppsn2002.ugr.es Home = http://geneura.ugr.es/~jmerelo Tutorial Perl = http://granavenida.com/perl -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
MacOS X - Changing JAVA_OPTS for 8859_1 encoding
Sorry if this is off topic but I know there are OSX, Tomcat users here who may be able to shed some light on my problem. The problem has to do with ASCII characters 128 for locale character support such as tilde, circumflex, etc. while running Tomcat (4.0.3) on MacOS 10.1.3 w/ java version 1.3.1 I have set my JAVA_OPTS env variable to file.encoding=8859_1 but am still having problems with ResultSet values which continue to be MacRoman decoding of 8859_1 chars. I am accessing a MSSQL running on Windows 2000 via a JDirect Type 4 driver. Some of the data has Portuguese and Spanish characters and when I output a ResultSet returned by Tomcat running on the Windows machine everything looks correct. When I output the same ResultSet from Tomcat running on the Macintosh accessing the same database on the Windows machine, I get the characters MacRoman encoded whether or not I have run the startup.sh from a terminal with JAVA_OPTS=file.encoding=8859_1. Actually there is NO difference which seems to indicate that either file.properties is not the correct system env variable or I am not using JAVA_OPTS correctly? So I'm fishing for any ideas of how to fix this problem. If you have any suggestions please mail me off list as well as I am on the digest. Thanks for the help. Steven //* * VTV Learning Corporation *Los Angeles - Boston - Lisbon * (http://www.vtvLearning.com/) */ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Running 2 Tomcat server and making one intranet
Hi Please guide me on the following I need to run two tomcat server for my sch assignment, one being Internet and the other Intranet on the same machine(different ports , 1 8080 the other 9080). Im using 4.0.2. I need to noe the steps for running 2 tomcat servers on the same machine and the configuration. next, how to make 1 of the server accessible only to local intranet and network? den means ppl from internet are able to access the server at abc.abc.abc.abc:8080 but not abc.abc.abc.abc:9080 another way is to make both of the web app running in 1 server, which one can be accessed by internet and the other intranet. Can someone guide me please? Thanks... _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Why No Servlet.jar Available in Tomcat 4.0.3?
Hi, all, I just installed Tomcat 4.0.3 on my linux machine. But I found that there was no servlet.jar under the $TOMCAT_HOME/lib. How can I use servlets without the .jar file? Thanks, Li Bing _.._ .' '-. `. __/__(-. `\ \ /o `o \ \\ \ _\__.__/ ))|| ; .--; || \ (`) || \ _|`---' .' _, _||`\ '`_\ \ '_,.-';_.-`\| \ \_ .' '--'---;` / / |\ |_..--' \ \'-'.' .--'.__/__.-; `` (___...---''` \ _/_\ /ASU\ [EMAIL PROTECTED] \___/ 480-965-9038(L), 602-743-9767(C) http://www.public.asu.edu/~libing
SOAP + SSL ?
Dear, I have some problems with my Tomcat in combination with SOAP and SSL. I did the steps from 1 to 5a (http://xml.apache.org/soap/docs/install/FAQ_Tomcat_SOAP_SSL.html) , but I get this report: Ctx( ): 400 R( /) null Ctx( ): IOException in: R( /) null cert chain Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING ... he is hanging on ;-) what does the tutorial mean with setup some ssl-specific stuff? Please can you help me. I have to do it for school, so every tip is usefull... regards, Pieter Cal * Java 1.4 * Tomcat 3.2.4 - Do You Yahoo!? Yahoo! Sports - live college hoops coverage
RE: 100% cpu on one of two processor
I had the same problem with jdk 1.3.1 and 1.4.0 on Windows 2000 (100 % CPU usage with no result). I'm not sure wether this was due to the memory leak or if there are other problems. (I tried out different combinations of Tomcat, Cocoon and Java Versions. Since I use Tomcat 3.2.4, Cocoon 2.0.1 and jdk 1.3.1_02 everything seems to work well.) May i noe this memory leak problem occurs at which OS? or is it just linux? -Original Message- From: Chris Newland [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 11:51 PM To: Tomcat Users List Subject: RE: 100% cpu on one of two processor Hi, There is a known memory leak in javac (used to compile the JSP pages). This could be causing your Java VM to use up nearly all of its memory and start to perform heavy garbage collection. If you use the -Xms and -Xmx JVM switches (to set the initial and maximum heap sizes respectively) then your server should run for longer but will eventually run out of memory if it is compiling a lot of JSPs. I think it is possible to use a different compiler (such as Jikes or Pizza). e.g. java -Xms64M -Xmx256M classname (or as much memory as you want to allocate) You can set the Tomcat JVM sizes using (in catalina.sh) (this is for Tomcat 4) CATALINA_OPTS= -Xms64M -Xmx256M Hope this helps, Best Regards, Chris Newland -Original Message- From: Guillaume Radenkovic [mailto:[EMAIL PROTECTED]] Sent: 14 March 2002 15:36 To: [EMAIL PROTECTED] Subject: 100% cpu on one of two processor My configuration : Linux Redhat 7.1 Tomcat 3.2.4 PostgreSQL 7.0.x Sometimes, after some time, when JSP compiles on the server, this on can't display the page and on of the two cpu going to 100%. This happens on any JSP page . Need help ! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: help with realm setup
Tony If you use the newly committed JNDIRealm, you can easily arrange that each user has a role whose name is the same as their username. Just set userRoleName to uid (or whatever attribute of the user's directory entry holds the username) and your security constraint below should work. Authorisation by username will is also possible with the original JNDIRealm, if you define a suitable role search, but you couldn't then use LDAP groups for authorisation as well. John. At 22:14 14/03/02, Tony Dahbura wrote: I would like to set up my realm to allow folks in by userid not by rolename. I do not know what the tag for the web.xml file should be The following is a sample security constraint. The role names are working fine, but I need to say if a user is tony or user is x then allow them in, but without the use of roles. security-constraint display-nameExample Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- !-- the following does not work because tony is a userid not a rolename -- !-- what tag should I use to get this to work so userid tony can access the application space? -- role-nametony/role-name role-namemarketing/role-name role-namerole1/role-name /auth-constraint /security-constraint Thanks, Tony -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
tomcat 4, default XML parser, XSLT, Xalan Configuration
I had a simple XML / XSLT transform utility working with tomcat 3.2.3 using the xalan and xerces libraries. I upgraded to tomcat 4.0.3, and now the utility throws configuration exceptions. I'm having trouble getting the details of the exceptions because they're all wrapped up in servlet exception wrappers... I've read some posts with complaints about the inability to use other XML parsers. My problem is, I wouldn't mind using the standard xerces parser that comes with tomcat 4.0 -- I just can't seem to get it to work... I'm assuming that I don't have to change anything in my tomcat installation directory, but that I do have to provide some xslt libraries in my webapps/webapp/WEB-INF/lib directory. Does anyone have an example configuration using xalan XSLT and Tomcat 4? Thanks for your help, Brendan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Problem Compiling A JSP file
Exactly, That was the problem Thanks, --Bahman - Original Message - From: James Williamson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 3:28 AM Subject: Re: Problem Compiling A JSP file My guess, and not Tomcat related at all is you've forgotten to put the package statement in the JspCdBrowse.java file. i.e. package com.web_tomorrow.jspcd; Regards, James Williamson www.nameonthe.net - Original Message - From: Bahman Kalali [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 12:03 AM Subject: Problem Compiling A JSP file I am running Tomcat 4.0.2 Here is the header of my jsp file %@ page import=com.web_tomorrow.jspcd.JspCdBrowse% jsp:useBean id=jspCdBrowse class=com.web_tomorrow.jspcd.JspCdBrowse type=JspCdBrowse scope=session/ jsp:setProperty name=jspCdBrowse property=*/ I have my JspCdBrowse.class file in jspcd dircetoty (E:\Tomcat 4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd) Here is the error I get. org.apache.jasper.JasperException: Unable to compile class for JSPerror: File E:\Tomcat 4.0\webapps\jspcd\WEB-INF\classes\com\web_tomorrow\jspcd\JspCdBrowse.class does not contain type com.web_tomorrow.jspcd.JspCdBrowse as expected, but type JspCdBrowse. Please remove the file, or make sure it appears in the correct subdirectory of the class path. E:\Tomcat 4.0\work\localhost\jspcd\browse$jsp.java:3: Class com.web_tomorrow.jspcd.JspCdBrowse not found in import. import com.web_tomorrow.jspcd.JspCdBrowse; ^ 2 errors Any Idea why I am geeting this error? Cheers, --Bahman -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: tomcat 4, default XML parser, XSLT, Xalan Configuration
Tomcat User List, Okay, I always do this -- post a problem, then post the solution... I just had to: 1. Download the source for the xalan package: http://xml.apache.org/dist/xalan-j/xalan-j_2_3_1-src.tar.gz 2. Remove their xercesImpl.jar 3. Replace it with the xerces.jar that came with tomcat. 4. rebuild xalan.jar 5. place xalan.jar in the tomcat4/common/lib directory. Problem solved. At 09:54 AM 3/17/2002 -0500, you wrote: I had a simple XML / XSLT transform utility working with tomcat 3.2.3 using the xalan and xerces libraries. I upgraded to tomcat 4.0.3, and now the utility throws configuration exceptions. I'm having trouble getting the details of the exceptions because they're all wrapped up in servlet exception wrappers... I've read some posts with complaints about the inability to use other XML parsers. My problem is, I wouldn't mind using the standard xerces parser that comes with tomcat 4.0 -- I just can't seem to get it to work... I'm assuming that I don't have to change anything in my tomcat installation directory, but that I do have to provide some xslt libraries in my webapps/webapp/WEB-INF/lib directory. Does anyone have an example configuration using xalan XSLT and Tomcat 4? Thanks for your help, Brendan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Plz Help me_anyone peoblem in getString
Hi, Is it possible to use jars that are not placed under CATALINA_HOME or any of the web apllication directories. And if so, how ? Thanks, Yuval -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
response.sendRedirect not redirecting
Hi, I have a problem with redirecting. In my JSP page I keep checking for errors, whenever I catch one, I set a variable on the session object and then forward to an error page; this could happen up to 5 times in one page. The weird thing is, redirection works on some pages and does absolutely nothing on some other pages. Execution just passes over response.sendRedirect(../error.jsp); like it doesn't even exist. Please help, this is really frustrating. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 3:45 PM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? The exception seems to be occurring because the Home servlet forwards more than once (to different locations) - first to home.jsp, then later to the Create servlet. It is definitely the fact that it is forwarding to more than one place, that is causing the problem. I know this because if I call the Login servlet and fail the login authorization - this servlet consequently forwards to login.jsp more than once (first - to display the fresh login page, and second - to prompt user to try again). This however does not give me an exception. Given that my Home servlet is like the central servlet, it needs to be capable of forwarding to a variety of places, depending on the activity selected by the user. Ryan - I have looked at create.jsp and, as far as my little mind can see, it does not play with the response object at all. All it does is get a few session attributes and fit them into the page using %= blablabla %. Could that be a problem? This problem is not isolated to the Create example. There are other activities the user can choose which all follow exactly the same forwarding mechanism (except to different servlets), and these give exactly the same exception. Lindsay -Original Message- From: Ryan Daigle [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 13:25 To: 'Tomcat Users List' Subject:RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Are you sure there isn't something in create.jsp that is trying to manipulate the response? I have found that trying to do a jsp:include... after manipulating the session can cause this exception. Is this a possibility? Perhaps you could send the relevant source of create.jsp and the Create servlet? -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 8:26 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? OK here's the sequence of events: [ Note: all forwarding done using RequestDispatcher.forward(req,res) ] 1. User begins by clicking link to Login servlet 2. Login servlet forwards to login.jsp 3. Login.jsp submits request to Login servlet 4. Servlet authorizes user and forwards to Home servlet 5. Home servlet forwards to home.jsp NO EXCEPTIONS YET - EVERYTHING IS OK! 6. User then chooses an action (e.g. create new agent, in my example) from home.jsp and submits request to Home servlet 7. Home servlet processes request and forwards to appropriate servlet (called Create in my example) 8. Create servlet does some stuff and forwards to create.jsp BANG! I GET THIS EXCEPTION (I have included some buildup to this exception): Now in Home servlet - processing request... 2002-03-08 13:19:08 - DecodeInterceptor: Charset from session ISO-8859-1 Now in Create servlet - processing request... Getting list of available types seems to have went OK 2002-03-08 13:19:09 - Ctx(/AgentGenerator) : IllegalStateException in R( /AgentGenerator + /create.jsp + null) - java.la ng.IllegalStateException: Cannot forward because the response has already been committed at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source) at zeus.generator.web.controllers.Home.goToAddress(Home.java:157) at zeus.generator.web.controllers.Home.processRequest(Home.java:120) at zeus.generator.web.controllers.Home.doGet(Home.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source) at org.apache.tomcat.core.Handler.invoke(Unknown Source) at org.apache.tomcat.core.Handler.service(Unknown Source) at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) at org.apache.tomcat.core.ContextManager.internalService(Unknown Source) at org.apache.tomcat.core.ContextManager.service(Unknown Source) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unk nown Source) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown
Re: jndi versus database connection pooling
Nikola Milutinovic wrote: [EMAIL PROTECTED] wrote: I think all servlet tags should be defined prior to defining the servlet-mapping tags. You could be right. I added both ResourceRef and the second Servlet definition at the same time, thinking that itæs OK. I'll test it on Monday. Tested it on Sunday - that was the problem. One must first define all servlets and then their mappings. On Monday, I'll see if this JNDI resource business actually works in my setup. Nix. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: response.sendRedirect not redirecting
add return; just after response.sendR. -Original Message- From: Mostafa Al-Mallawani [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 7:12 AM To: 'Tomcat Users List' Subject: response.sendRedirect not redirecting Hi, I have a problem with redirecting. In my JSP page I keep checking for errors, whenever I catch one, I set a variable on the session object and then forward to an error page; this could happen up to 5 times in one page. The weird thing is, redirection works on some pages and does absolutely nothing on some other pages. Execution just passes over response.sendRedirect(../error.jsp); like it doesn't even exist. Please help, this is really frustrating. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 3:45 PM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? The exception seems to be occurring because the Home servlet forwards more than once (to different locations) - first to home.jsp, then later to the Create servlet. It is definitely the fact that it is forwarding to more than one place, that is causing the problem. I know this because if I call the Login servlet and fail the login authorization - this servlet consequently forwards to login.jsp more than once (first - to display the fresh login page, and second - to prompt user to try again). This however does not give me an exception. Given that my Home servlet is like the central servlet, it needs to be capable of forwarding to a variety of places, depending on the activity selected by the user. Ryan - I have looked at create.jsp and, as far as my little mind can see, it does not play with the response object at all. All it does is get a few session attributes and fit them into the page using %= blablabla %. Could that be a problem? This problem is not isolated to the Create example. There are other activities the user can choose which all follow exactly the same forwarding mechanism (except to different servlets), and these give exactly the same exception. Lindsay -Original Message- From: Ryan Daigle [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 13:25 To: 'Tomcat Users List' Subject:RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Are you sure there isn't something in create.jsp that is trying to manipulate the response? I have found that trying to do a jsp:include... after manipulating the session can cause this exception. Is this a possibility? Perhaps you could send the relevant source of create.jsp and the Create servlet? -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 8:26 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? OK here's the sequence of events: [ Note: all forwarding done using RequestDispatcher.forward(req,res) ] 1. User begins by clicking link to Login servlet 2. Login servlet forwards to login.jsp 3. Login.jsp submits request to Login servlet 4. Servlet authorizes user and forwards to Home servlet 5. Home servlet forwards to home.jsp NO EXCEPTIONS YET - EVERYTHING IS OK! 6. User then chooses an action (e.g. create new agent, in my example) from home.jsp and submits request to Home servlet 7. Home servlet processes request and forwards to appropriate servlet (called Create in my example) 8. Create servlet does some stuff and forwards to create.jsp BANG! I GET THIS EXCEPTION (I have included some buildup to this exception): Now in Home servlet - processing request... 2002-03-08 13:19:08 - DecodeInterceptor: Charset from session ISO-8859-1 Now in Create servlet - processing request... Getting list of available types seems to have went OK 2002-03-08 13:19:09 - Ctx(/AgentGenerator) : IllegalStateException in R( /AgentGenerator + /create.jsp + null) - java.la ng.IllegalStateException: Cannot forward because the response has already been committed at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source) at zeus.generator.web.controllers.Home.goToAddress(Home.java:157) at zeus.generator.web.controllers.Home.processRequest(Home.java:120) at zeus.generator.web.controllers.Home.doGet(Home.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source) at org.apache.tomcat.core.Handler.invoke(Unknown Source) at org.apache.tomcat.core.Handler.service(Unknown Source) at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
RE: Why No Servlet.jar Available in Tomcat 4.0.3?
-Original Message- From: Li Bing [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 2:45 AM To: Tomcat Users List Subject: Why No Servlet.jar Available in Tomcat 4.0.3? Hi, all, I just installed Tomcat 4.0.3 on my linux machine. But I found that there was no servlet.jar under the $TOMCAT_HOME/lib. How can I use servlets without the .jar file? Li, do a search next time. You would have found it at $tomcat_home\common\lib. What is the difference between lib and common/lib? From the readme: common/Classes available to both Catalina internal classes and web applications: classes/ Unpacked common classes lib/ Common classes in JAR files lib/ Classes in JAR files global to web applications HTH Josh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Solaris JNI
Hi, We have a problem using in-house code using TomCat to provide an authenticating server. This code works alright on Linux, SGI, AIX and MacOSX for simultaneous requests. It does not, however, work for Solaris with simultaneous requests (single requests do work). The flow of the server is: TomCat4.0.3 - Java Server - JNI - execve'd SUID program - execve'd applications The Java server passes commands to the JNI program (C). Typically such a command is to run one of the applications. The JNI forks/execve's an SUID control program which sets itself to be the required user and then the required application is itself forked/execve'd. Pipes for stdin (fd0), stdout (fd1) and stderr (fd2) are established via pipe(2) and dup2(2) between the JNI and the SUID control program, and for fd1 and fd2 between the SUID program and the final application. This allows the application to send its stdout/stderr directly back to the JNI. The stdin (fd0) pipe is used by the JNI for sending commands to the SUID program. The JNI code has been designed to be non-blocking using ioctl/fcntl calls throughout. The JNI code uses: pipe(2) fork(2) execve(2) dup2(2) read(2) write(2) waitpid(2) select(2) malloc(2) It also uses various stdio prints and scans plus some dynamic string routines from an in-house library. The offending OS is Solaris 8 (latest patchlevel). Both JDK1.3.1_02 and JDK1.4 have been tried. The C code has been compiled with the latest Sun CC using -D_REENTRANT and -lthread throughout. The code uses BSD-style system calls, it can be converted to POSIX if needed. The symptoms we see are the following 4 SOAP errors: Connection reset by peer: socket write error Error opening socket: null bad record MAC Interrupted system call One of these errors is seen for one of the simultaneous requests, the other request most often succeeds. In previous versions of our code (using sockets for communication rather than fd0) the tomcat server has gone into a CPU-consuming infinite loop state, hence we tried pipe-only as above. The previous socket code also displayed the above errors occasionally though. As our code works alright on 4 out of 5 tested operating systems we assume we're not doing something fundamentally wrong. Any hints as to what we are doing wrong for Solaris would be much appreciated. Alan Bleasby Tim Carver UK MRC HGMP-RC Hinxton Cambridge UK CB10 1SB -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: jndi versus database connection pooling
Well, right now I even do not bother to download them. I just go to jakarta website to read directly there. However, I want to find out the reason for this. Maybe I am missing something that will affect my other applications. You never know. It seems this is a mystery without answears. Bing -Original Message- From: Soefara Redzuan To: [EMAIL PROTECTED] Sent: 3/17/02 12:02 AM Subject: RE: jndi versus database connection pooling Maybe but if it's just the docs that you're missing, why not get them from the Apache site ? http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html Soefara From: Bing Zhang [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: jndi versus database connection pooling Date: Sat, 16 Mar 2002 18:19:13 -0800 I asked this before, but got no answear. Since we are talking about docs, here we go again. I installed tomcat-4.0.1, 4.0.1-manuls and 4.0.1-webapps, all from rpms on RedHat 6.2. However some of key docs under webapps/tomcat-docs are empty, such as jndi-resources-howto.html, class-loader-howto.html, ssl-howto.html, index.html, introduction.html and .. Am I missing something here? Thanks Bing Zhang -Original Message- From: Craig R. McClanahan To: Tomcat Users List Sent: 3/15/02 11:26 PM Subject: Re: jndi versus database connection pooling On Sat, 16 Mar 2002, Soefara Redzuan wrote: Date: Sat, 16 Mar 2002 15:03:10 +0800 From: Soefara Redzuan [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: jndi versus database connection pooling Oh dear, Craig, I'm fairly embarassed. Sorry. You're going to kick yourself ... the required element name is res-ref-name, not resource-ref-name :-). I should have noticed that when I copied my web.xml right next to the previous person's. What is it they say about being so close to a problem to be blinded. But may I suggest that the JNDI docs are updated because it's resource-ref-name in many cases there, for Mail as well as JDBC. http://127.0.0.1:8080/tomcat-docs/jndi-resources-howto.html Well, now I'm somewhat embarrassed, because I wrote the original document that had the wrong element name :-(. However, this was fixed in the Tomcat source code on October 10, 2001, and therefore the correct version was included from release 4.0.1 onwards (current production release is 4.0.3). Which version are you running? Is there anyplace that the wrong version of this document still exists online that we need to fix? Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
FW: Apache-Tomcat webapps, who serves images?
Hi Iam Running tomcat 4.0.3. on windows NT. Installation is successful, and examples work properly. I deployed my application in web-inf/classes Iam getting an error when I run servlet. When code is trying to access the RelConnection.gDefaultConnectionIsOracle, a static member Iam getting the error. java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection (Illegal Variable name ) Relconnection is a public class with all static members and static methods. classpath is set properly. Any help would be appreciated Thanks Uma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: FW: Help help
Hi Aman Thanks for reply I tried the way u suggested Iam getting an error when I run servlet. When code is trying to access the RelConnection.gDefaultConnectionIsOracle, a static member Iam getting the error. java.lang.ClassFormatError: com/CellFusion/Relational/RelConnection (Illegal Variable name ) Relconnection is a public class with all static members and static methods. classpath is set properly to access RelConnection. Any help would be appreciated Thanks Uma Tomcat 4.0.3 has a bug and it does not pick up the jar files automatically from web-inf/lib directory of your application. you have two options: copy your jar files to the global lib directory and erstart Tomcat or Install Tomcat 4.0.4-b1 which does not have this bug. Thanks Aman -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Newbie: Servlet under Windows does not run
I am desperate for help in getting Tomcat to run my servlet. I have read all of the documentation and tried to follow the rules, but Tomcat just does not run the servlet. Under 4.0.3 I get the following log entries: 2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at context path /Census from URL jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/ 2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census 2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number generator class java.security.SecureRandom 2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number generator has been completed 2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container servlet default 2002-03-17 14:52:34 default: init 2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container servlet invoker 2002-03-17 14:52:34 invoker: init 2002-03-17 14:52:34 jsp: init 2002-03-17 14:52:55 StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking servlet org.apache.catalina.INVOKER.Census.CensusQuery as unavailable 2002-03-17 14:52:55 invoker: Cannot allocate servlet instance for path /servlet/Census.CensusQuery javax.servlet.ServletException: Wrapper cannot find servlet class Census.CensusQuery or a class it depends on Tomcat expands my Census.war file as I expect so my class file is at: D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl ass so why can't Tomcat find the class? Based upon the time stamps I believe that the problem was not detected until I actually tried to access the servlet. I believe my init method was not invoked because it generates log entries which do not appear in the file. Jim Cobban [EMAIL PROTECTED] 34 Palomino Dr. Kanata, ON, CANADA K2M 1M1 +1-613-592-9438 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie: Servlet under Windows does not run
what is the package name in the .java file of your censusquery class? matt - Original Message - From: Jim Cobban [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: John W Austin [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 3:20 PM Subject: Newbie: Servlet under Windows does not run I am desperate for help in getting Tomcat to run my servlet. I have read all of the documentation and tried to follow the rules, but Tomcat just does not run the servlet. Under 4.0.3 I get the following log entries: 2002-03-17 14:52:33 StandardHost[localhost]: Installing web application at context path /Census from URL jar:file:D:\jakarta-tomcat-4.0.3\webapps\Census.war!/ 2002-03-17 14:52:34 WebappLoader[/Census]: Deploying class repositories to work directory D:\jakarta-tomcat-4.0.3\work\localhost\Census 2002-03-17 14:52:34 StandardManager[/Census]: Seeding random number generator class java.security.SecureRandom 2002-03-17 14:52:34 StandardManager[/Census]: Seeding of random number generator has been completed 2002-03-17 14:52:34 StandardWrapper[/Census:default]: Loading container servlet default 2002-03-17 14:52:34 default: init 2002-03-17 14:52:34 StandardWrapper[/Census:invoker]: Loading container servlet invoker 2002-03-17 14:52:34 invoker: init 2002-03-17 14:52:34 jsp: init 2002-03-17 14:52:55 StandardWrapper[:org.apache.catalina.INVOKER.Census.CensusQuery]: Marking servlet org.apache.catalina.INVOKER.Census.CensusQuery as unavailable 2002-03-17 14:52:55 invoker: Cannot allocate servlet instance for path /servlet/Census.CensusQuery javax.servlet.ServletException: Wrapper cannot find servlet class Census.CensusQuery or a class it depends on Tomcat expands my Census.war file as I expect so my class file is at: D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl ass so why can't Tomcat find the class? Based upon the time stamps I believe that the problem was not detected until I actually tried to access the servlet. I believe my init method was not invoked because it generates log entries which do not appear in the file. Jim Cobban [EMAIL PROTECTED] 34 Palomino Dr. Kanata, ON, CANADA K2M 1M1 +1-613-592-9438 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Catalina Cookies URL Encoded? Tomcat 3 Not?
Hello, I recenly upgraded to Tomcat 4 and found that some of my cookie parsing code no longer works. It seems that with Tomcat 3 colons come through as colons in my cookie values but in Tomcat 4 they are URL encoded (%3A). Is this standard behavior in Tomcat 4 or a bug? Should I modify my code to URL decode before processing now or expect a bug fix? If this is the appropriate behavior is this conditional behavior, meaning are there situations where URL encoding will not take place? Thank you, Leonard
Re: Catalina Cookies URL Encoded? Tomcat 3 Not?
Leonard, Its a bug in Tomcat 4. We also had to make the work-around you suggested. I depends also on if you use Warp or AJP connectors. There are unfortunately other cookie-related bugs in TC 4 as well. Some due to the fact the the browser manufacturers do not follow the current RFC too well. Anders - Original Message - From: Megliola, Leonard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 22:19 Subject: Catalina Cookies URL Encoded? Tomcat 3 Not? Hello, I recenly upgraded to Tomcat 4 and found that some of my cookie parsing code no longer works. It seems that with Tomcat 3 colons come through as colons in my cookie values but in Tomcat 4 they are URL encoded (%3A). Is this standard behavior in Tomcat 4 or a bug? Should I modify my code to URL decode before processing now or expect a bug fix? If this is the appropriate behavior is this conditional behavior, meaning are there situations where URL encoding will not take place? Thank you, Leonard -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Catalina Cookies URL Encoded? Tomcat 3 Not?
Is there a list of known cookie bugs somewhere? That raises the question of whether there is a bug tracker I can browse through to find this information. Is there? Leonard -Original Message- From: Anders Rundgren [mailto:[EMAIL PROTECTED]] Sent: Sun 3/17/2002 1:35 PM To: Tomcat Users List Cc: Subject: Re: Catalina Cookies URL Encoded? Tomcat 3 Not? Leonard, Its a bug in Tomcat 4. We also had to make the work-around you suggested. I depends also on if you use Warp or AJP connectors. There are unfortunately other cookie-related bugs in TC 4 as well. Some due to the fact the the browser manufacturers do not follow the current RFC too well. Anders - Original Message - From: Megliola, Leonard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 22:19 Subject: Catalina Cookies URL Encoded? Tomcat 3 Not? Hello, I recenly upgraded to Tomcat 4 and found that some of my cookie parsing code no longer works. It seems that with Tomcat 3 colons come through as colons in my cookie values but in Tomcat 4 they are URL encoded (%3A). Is this standard behavior in Tomcat 4 or a bug? Should I modify my code to URL decode before processing now or expect a bug fix? If this is the appropriate behavior is this conditional behavior, meaning are there situations where URL encoding will not take place? Thank you, Leonard -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] winmail.dat Description: application/ms-tnef -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Finding the name of the included page from the request object
Craig, That works, and is exactly what I'm looking for. Thanks a bunch. Alex. Craig R. McClanahan wrote: On Sat, 16 Mar 2002, Alex Muc wrote: Date: Sat, 16 Mar 2002 17:12:02 -0500 From: Alex Muc [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Finding the name of the included page from the request object Hi, I've got the following setup: pageA.jsp jsp:include page=pageB.jsp /jsp:include pageB.jsp @ include file=Header.jsp Header.jsp !-- print out a common page header -- In the Header page, which is STATICALLY, included in pageB, which means we're really only dealing with pageA and pageB, I want to determine the name of pageB from the request (or response) object so that I can customize the page header that I'm displaying. I hope this makes sense. I've looked through the mailing list and the javadocs for a method that will return me the information. That is I'm looking for some method which will return pageB.jsp (or something similar) when called from pageB.jsp and pageA.jsp when called from pageA.jsp but will return pageB.jsp when called within pageB.jsp regardless of whether it is invoked directly by the browser or it is included in pageA.jsp. Unfortunately all the methods that I've tried all return info about pageA.jsp, presumably because that is the one that is actually requested from the client. I've tried the following methods: request.getContextPath() request.getPathInfo() request.getPathTranslated() request.getRequestURI() request.getServletPath() getServletContext().getRealPath(.) These methods all return Strings related to pageA, regardless of whether the methods are called from pageB.jsp which is dynamically included in pageA. So, my question is how can I find out the name of the current page being processed. If I'm in pageB.jsp it should return pageB.jsp (or something similar) regardless of whether pageB.jsp is invoked directly from the client or indirectly through an include in pageA.jsp. The jsp:include action is implemented in terms of RequestDispatcher.include() in the servlet API. If you grab the Servlet 2.3 spec http://java.sun.com/products/servlet/download, and read Section 8.3, you'll see that the container creates some request attributes that define the request to the included page (pageB in your case) rather than the including page. They work for included JSP pages as well. To make it possible to grab the right path no matter whether a page is requested directly or included, you'd use logic like this: String servletPath = request.getAttribute(javax.servlet.include.servlet_path); if (servletPath == null) { servletPath = request.getServletPath(); } Thank you for your help. Alex. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IRC CHANNEL #tomcat @ us.openprojects.net
I purpose a irc channel #tomcat @ us.openprojects.net. See you there :) Hellaenergy _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie: Servlet under Windows does not run
- Original Message - From: Matt Egyhazy [EMAIL PROTECTED] Subject: Re: Newbie: Servlet under Windows does not run what is the package name in the .java file of your censusquery class? The package name in the .java file is Census, just like the file hierarchy says. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Case of paths in JAR created on Windows
I am working on Windows and I notice that when I look inside the .war file I create for my servlet that sometimes the WEB-INF directory in a path appears as WEB-INF and sometimes as web-inf. I know this will not make any difference to the copy of TomCat that I am running on Windows, but it strikes me that if I hand that .war file to a copy of TomCat running on UNIX that it will not deploy correctly. Am I worrying about nothing? I am using jar from jdk1.3.1. Jim Cobban [EMAIL PROTECTED] 34 Palomino Dr. Kanata, ON, CANADA K2M 1M1 +1-613-592-9438 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
exception.getMessage() returns null?
Hi, I'm trying to set up an error page, which looks like this: %@ page isErrorPage=true % html headtitleSe ha producido un error/title/head %@ include file =cabecera.jsp % h1Se ha producido un error/h1 pEndeluego, que a ver si tenemos cuidaico, que se ha producido el siguiente error:br %= exception.getMessage() % (basically cut/paste from the JSP book by Bergsten). I would like it to display an exception thrown from a bean, but it displays null. What can be the problem here? Do I need to set up something else? Besides, exception prints just JasperException or suchlike; I would like it to print the message I included in the RuntimeException Thanks for any info... J -- PPSN2002 = http://ppsn2002.ugr.es Home = http://geneura.ugr.es/~jmerelo Tutorial Perl = http://granavenida.com/perl -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Intermittent page not found errors.
I have a web application under development consisting of several servlets. Every so often, while testing both locally and remotely, the requested page, which could be any of the servlets, is not found. Is this a problem with Tomcat, Apache, or the limited resources on my development system? Google was no help at all, this time. The test system is NT4.0 server SP6a + patches, PII 233, 128MB RAM, Apache 1.3.20, Tomcat 3.2.3 and JDK 1.3.1_02. TIA Alex -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Case of paths in JAR created on Windows
On Sun, 17 Mar 2002, Jim Cobban wrote: Date: Sun, 17 Mar 2002 17:37:10 -0500 From: Jim Cobban [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Case of paths in JAR created on Windows I am working on Windows and I notice that when I look inside the .war file I create for my servlet that sometimes the WEB-INF directory in a path appears as WEB-INF and sometimes as web-inf. I know this will not make any difference to the copy of TomCat that I am running on Windows, but it strikes me that if I hand that .war file to a copy of TomCat running on UNIX that it will not deploy correctly. It will fail to deploy correctly on Windows as well -- Tomcat is case sensitive even on Windows platforms. This is true for all file references -- if your home page is index.html and your browser asks for /INDEX.HTML you're going to get a 404 (not found) error back. The answer is to make sure that you always create WEB-INF directories with all-capital-letter names. That's harder than it sounds (don't bother trying to do it with Windows Explorer, which thinks it is smarter than you are). I do all my web application building with Ant (http://jakarta.apache.org/ant) build tool, using the sample build scripts from the Application Developer's Guide that ships with Tomcat 4, and don't have case problems like this -- Ant creates WEB-INF directories when you ask it to. Am I worrying about nothing? I am using jar from jdk1.3.1. Jim Cobban [EMAIL PROTECTED] 34 Palomino Dr. Kanata, ON, CANADA K2M 1M1 +1-613-592-9438 Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Where do I have to put classes?
You should also review the web.xml file that is there. Without it you wont go very far -Original Message- From: Daniel Hinojosa [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 16, 2002 11:26 PM To: Tomcat Users List Subject: Re: Where do I have to put classes? Ryuji Yokoyama wrote: Hello All! I am a new to Tomcat and have a question. I downloaded and installed Tomcat 4. I think it is working correctly. I can see the welcome page and I can execute the sample Servlets. However, I can't figure out where I should put my Servlet classes. I tired $CATALINA_HOME/web-apps, but I just got an error. Where do I have to put classes? And how can I change the directory? Thanks in advance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Take a look at the sample files that your Tomcat comes with. You will find them in the /WEB-INF/classes directory . -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Where is the examples for Tomcat 4.03 linux/rpm?
Where is the examples for Tomcat 4.03 linux/rpm? __ Find, Connect, Date! http://personals.yahoo.ca -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Another directory question
Hello All! I tried to write a file to current directory by servlet. However, my servlet writes a file to C:\winnt\system32 directory. How can I change the directory? I know I can use relative path in my servlet, but I want to know if it is possible to change the directory or not. I am using Tomcat 4.0.3 under Win2000. Thanks in advance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Settings for users to run their own servlets
Hi, I have succefully set tomcat so that users can run their own servlet in their home directory by accessing: http://www.foo.com:8080/~user/servlet/. I would like apache foward all http://www.foo.com/~user/servlet/* to tomcat using mod_jk but JKMount /*/servletajp is not working, apache will not forward such request, just return 404 error... :( Another problem is, all users' home directory and public_html directory needs to be 755 before tomcat start, otherwise Tomcan't will return 404 error, is there any work around? My current configurations: O.S. Solaris 8 Apache: 1.3.23 Tomcat: 4.0.3 mod_jk Grandy -- This mail sent through http://webmail.comp.polyu.edu.hk -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
manually stopping one application
I have 3 applications in my webapps directory called app1, app2, and app3 when I start tomcat all 3 applications start up as they should and when I shutdown tomcat all 3 applications stop. Is there a way I can send a directive to tomcat to stop app2 while keeping the servlet engine and my other apps running. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Solaris JNI
Hi, Dr T, Dr T It does not, however, work for Solaris Dr T with simultaneous requests (single requests do work). If you declare method which calls jni as synchronized, then this problem might be resolved. Or, you should trace system calls with using truss command to analyze. Dr T TomCat4.0.3 - Java Server - JNI - execve'd SUID program - execve'd Dr T applications truss -fceip PID_OF_Java_Server -o truss.txt and try to send single request/simultaneous requests. Then truss.txt will have enough information. Regards, Watanabe In the message Solaris JNI Pine.SOL.4.44.0203171845080.1264-10@bromine Dr T. Carver [EMAIL PROTECTED] wrote: Dr T Hi, Dr T We have a problem using in-house code using TomCat to provide an Dr T authenticating server. This code works alright on Linux, SGI, AIX and Dr T MacOSX for simultaneous requests. It does not, however, work for Solaris Dr T with simultaneous requests (single requests do work). Dr T The flow of the server is: Dr T TomCat4.0.3 - Java Server - JNI - execve'd SUID program - execve'd Dr T applications Dr T The Java server passes commands to the JNI program (C). Typically such Dr T a command is to run one of the applications. The JNI forks/execve's an SUID Dr T control program which sets itself to be the required user and then Dr T the required application is itself forked/execve'd. Dr T Pipes for stdin (fd0), stdout (fd1) and stderr (fd2) are established Dr T via pipe(2) and dup2(2) between the JNI and the SUID control program, Dr T and for fd1 and fd2 between the SUID program and the final application. Dr T This allows the application to send its stdout/stderr directly Dr T back to the JNI. The stdin (fd0) pipe is used by the JNI for sending Dr T commands to the SUID program. Dr T The JNI code has been designed to be non-blocking using ioctl/fcntl Dr T calls throughout. The JNI code uses: Dr T pipe(2) Dr T fork(2) Dr T execve(2) Dr T dup2(2) Dr T read(2) Dr T write(2) Dr T waitpid(2) Dr T select(2) Dr T malloc(2) Dr T It also uses various stdio prints and scans plus some dynamic string Dr T routines from an in-house library. Dr T The offending OS is Solaris 8 (latest patchlevel). Both JDK1.3.1_02 and Dr T JDK1.4 have been tried. The C code has been compiled with the latest Sun Dr T CC using -D_REENTRANT and -lthread throughout. The code uses BSD-style Dr T system calls, it can be converted to POSIX if needed. Dr T The symptoms we see are the following 4 SOAP errors: Dr T Connection reset by peer: socket write error Dr T Error opening socket: null Dr T bad record MAC Dr T Interrupted system call Dr T One of these errors is seen for one of the simultaneous requests, the Dr T other request most often succeeds. In previous versions of our code (using Dr T sockets for communication rather than fd0) the tomcat server has gone into Dr T a CPU-consuming infinite loop state, hence we tried pipe-only as above. Dr T The previous socket code also displayed the above errors occasionally Dr T though. Dr T As our code works alright on 4 out of 5 tested operating systems we assume Dr T we're not doing something fundamentally wrong. Any hints as to what we are Dr T doing wrong for Solaris would be much appreciated. Dr T Alan Bleasby Dr T Tim Carver Dr T UK MRC HGMP-RC Dr T Hinxton Dr T Cambridge Dr T UK Dr T CB10 1SB Dr T -- Dr T To unsubscribe: mailto:[EMAIL PROTECTED] Dr T For additional commands: mailto:[EMAIL PROTECTED] Dr T Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
URL Length
Dear ALL, When I submit a page , tomcat is appending the sessionID to the URL, which causing me a lot of problem. Please help me, how can I avoid this. Thanks Gurmeet -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: URL Length
When I submit a page , tomcat is appending the sessionID to the URL, which causing me a lot of problem. Please help me, how can I avoid this. By turning the cookies on in your browser. There are only two ways Tomcat (or any other web application server) can support HTTP sessions, either via Cookies or via URL rewriting. Nix.
Re: manually stopping one application
typically, http://yourhost.com:8080/manager/stop?path=/app2 you can also check your docs under tomcatdir/webapps/tomcat-docs At 09:36 PM 3/17/02 -0500, you wrote: I have 3 applications in my webapps directory called app1, app2, and app3 when I start tomcat all 3 applications start up as they should and when I shutdown tomcat all 3 applications stop. Is there a way I can send a directive to tomcat to stop app2 while keeping the servlet engine and my other apps running. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Fw: Tomcat 4.0 and Windows XP
I think I am going to resend this, I didn't see show up the first time... - Original Message - From: Marc Chamberlin To: [EMAIL PROTECTED] Sent: Sunday, March 17, 2002 3:34 PM Subject: Tomcat 4.0 and Windows XP Hate to ask a straightfoward question, but can't seem to find any answers and the FAQ is down I currently am running Tomcat 4.0 under Win98 and am thinking of upgrading to Windows XP Pro. Has anyone encountered any problems or know of any hitches I should be aware of to do this? Has Tomcat 4.0 been tested under Windows XP? Thanks for any/all replies, just trying to forsee any roadblocks! ;-) Marc.. Do you think the software industry will ever make software that is as easy and reliable for a user to use as the automobile industry makes a car easy and reliable for a user to drive? A man said unto the universe - Sir, I exist! However, replied the universe I do not see where that creates in me a sense of an obligation. - Stephen Crane
Re: URL Length
Hi ! See your brouser preferences - Cookies ( must be enabled, otherwise session ID append for URL). - Original Message - From: Gurmeet [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 18, 2002 7:01 AM Subject: URL Length Dear ALL, When I submit a page , tomcat is appending the sessionID to the URL, which causing me a lot of problem. Please help me, how can I avoid this. Thanks Gurmeet -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Problem with run Tomcat 4.0.3 as a service on windows 2000
Hi ! Tomcat 4.x different Tomact 3ÀÞ See windows system reestr HKLM/CurrentControlSet/Services/Apache Tomcat. - Original Message - From: Lev Zak [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 9:48 AM Subject: Problem with run Tomcat 4.0.3 as a service on windows 2000 Hello, My %JAVA_HOME% is D:\jdk1.3.1_01. I unzip jakarta-tomcat-4.0.3.zip into d:\tomcat of my Windows2000 machine. I unzip jk_nt_service.zip into D:\tomcat\jakarta-tomcat-4.0.3\bin. I copied wrapper.properties from tomcat 3.3a to D:\tomcat\jakarta-tomcat-4.0.3\conf\jk. I update the wrapper.properties with the following strings: wrapper.tomcat_home=D:\tomcat\jakarta-tomcat-4.0.3 wrapper.java_home=D:\jdk1.3.1_01 wrapper.tomcat_policy=$(wrapper.tomcat_home)\conf\catalina.policy I successfully run the following command: D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -I jakarta -A D:\tomcat\jakarta-tomcat-4.0.3\conf\jk\wrapper.properties But when I run after this the following command: D:\tomcat\jakarta-tomcat-4.0.3\bin\jk_nt_service.exe -S jakarta I receive the following message: Asked (and given) winsock 1.1 Starting jakarta. jakarta failed to start. If I try to start the jakarta service from Control Panel, I receive the following message: Could not start the jakarta service on Local Computer. Error 1067: The process terminated unexpectedly. But I can successfully start catalina through D:\tomcat\jakarta-tomcat-4.0.3\bin\startup.bat , it means the problem is not a default port. What I did wrong? Sorry about a long letter. Regards. Lev. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify us immediately and delete this communication. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_webapp.so problem
Hi ! recompile mod_webapp.so widthout EAPI, see error message :) - Original Message - From: Xue-Feng Yang [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, March 16, 2002 2:54 PM Subject: mod_webapp.so problem OS: RedHat 7.1 Apache: RedHat default installation, apache-1.3.20-16 Tomcat: 4.01 [warn] Loaded DSO modules/mod_webapp.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) Any suggestion? __ Find, Connect, Date! http://personals.yahoo.ca -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Where do I have to put classes?
At 11:17 PM 3/16/02 -0500, you wrote: Hello All! I am a new to Tomcat and have a question. I downloaded and installed Tomcat 4. I think it is working correctly. I can see the welcome page and I can execute the sample Servlets. However, I can't figure out where I should put my Servlet classes. I tired $CATALINA_HOME/web-apps, but I just got an error. Where do I have to put classes? And how can I change the directory? Thanks in advance. classes go in .../jakarta-tomcat-4.0.1/webapps/ROOT/WEB-INF/classes. try putting them there first. i.e. put Foo.class in the classes directory. access them by http://localhost:8080/servlet/Foo look at the examples in webapps/examples and the web.xml file in webapps/examples/WEB_INF and the server.xml in .../jakarta-tomcat-4.0.1/conf to see how to put stuff in another directory. hth --- ray tayek http://home.attbi.com/~rtayek/ actively seeking telecommuting work orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]