RE: IIS and Tomcat basic configuration questions
No, Tomcat and IIS can be on different machines (the redirector is on the IIS server, but it is simply a DLL). One of the entries in the properties file used to configure the redirector is the name of the machine where Tomcat is running. This is how the redirector knows where to redirect the request to. -Original Message- From: Brantley Hobbs [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 10:48 AM To: [EMAIL PROTECTED] Subject: IIS and Tomcat basic configuration questions Hello all. I'm new to the entire concept of Tomcat and I have a question which I have not found a clear explanation for. Does Tomcat have to be installed on the webserver? In other words, can I not just install the redirect filter (and not Tomcat, per se) on the webserver and have it connect (using ajpv13) to a back-end Tomcat server? I only want to install the redirect filter on the webserver. Does a working JVM need to be in place for the filter to work properly? Brantley Hobbs -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Charting Libraries
I am looking into the ability to add charting capabilities to our intranet app and was wondering if anyone else has experience with any of the available packages. One of the requirements is, of course, that I can create the graphs in Tomcat and send the results to a browser, and I would prefer something open source. This has narrowed my choices to jChart or JFreeChart. Has anyone worked with either of these? Also, does anyone know of any I may have missed? Thanks for any info. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HP-UX 10.20 + Oracle
Your best bet would be the Oracle web site (otn.oracle.com). The only thing that uses DLLs is Windows, so that won't apply to HP-UX or Linux. -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 8:03 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: HP-UX 10.20 + Oracle Hi I am offsite today, so not sure if this will work, anyway. I have tried setting LD_LIBRARY_PATH but it still does not work. I suspect that I have conflicting versions or classes, so my questions are: 1. Where should I get classes12 or classes111 from for HPUX 10.2 and Oracle 8.0.4 (the ones I am using are copied from Linux) 2. I have seen mentioned that an associated DLL is required, which one? and where should it go? Thanks once again John Make sure you have the LD_LIBRARY_PATH environment variable set to $ORACLE_HOME/lib (I think :-\ ) At least you have to on Linux. -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 1:13 PM To: 'Tomcat Users List' Subject: RE: HP-UX 10.20 + Oracle Mark: I tried changing to classes111.jar, but now get this error: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path Also I should point out that I am using Oracle 8.0.4 on HP. Thanks for the suggestions though -Original Message- From: p niemandt [mailto:[EMAIL PROTECTED]] Sent: 07 January 2003 18:25 To: Tomcat Users List Subject: RE: HP-UX 10.20 + Oracle As far as I know you should use ojdbc14.jar for Oracle9: Though previous ones should work, the ojdbc14.jar is recommended / needed for Oracle9. {The classnames are different between classes12.jar and the new ojdbc14.jar} On Tue, 2003-01-07 at 17:57, Wagoner, Mark wrote: I think classes12.jar is for JDK 1.2. You want classes111.jar (if you can find it). -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 12:54 PM To: 'Tomcat Users List' Subject: HP-UX 10.20 + Oracle Hi there, The story so far: I have an intranet application that currently runs on a Linux server (with Oracle 9i - built-in Apache) and W2000 server (with Tomcat 4.x connecting to Oracle 8). It is written in JSP and Java, and works fine. I now want to use HP-UX 10.20 as a server, so I got the only available JDK from HP which is version 1.1.8 and this has forced me to use Tomcat 3.3.1. This is all running now (thanks for the help) and I am now testing the application. I have put in the Oracle classes12.jar and DriverManager.registerDriver seems fine, but DriverManager.getConnection gives the following error (only partial list): java.lang.ClassNotFoundException: java.util.Map at org.apache.tomcat.util.compat.SimpleClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClassInternal(Compiled Code) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java: 358) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:126) at estimating._final.loginvalidate_1._jspService(loginvalidate_1.java:123) Anyone got any ideas? Many thanks as usual. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HP-UX 10.20 + Oracle
I think classes12.jar is for JDK 1.2. You want classes111.jar (if you can find it). -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 12:54 PM To: 'Tomcat Users List' Subject: HP-UX 10.20 + Oracle Hi there, The story so far: I have an intranet application that currently runs on a Linux server (with Oracle 9i - built-in Apache) and W2000 server (with Tomcat 4.x connecting to Oracle 8). It is written in JSP and Java, and works fine. I now want to use HP-UX 10.20 as a server, so I got the only available JDK from HP which is version 1.1.8 and this has forced me to use Tomcat 3.3.1. This is all running now (thanks for the help) and I am now testing the application. I have put in the Oracle classes12.jar and DriverManager.registerDriver seems fine, but DriverManager.getConnection gives the following error (only partial list): java.lang.ClassNotFoundException: java.util.Map at org.apache.tomcat.util.compat.SimpleClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClassInternal(Compiled Code) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:358) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:126) at estimating._final.loginvalidate_1._jspService(loginvalidate_1.java:123) Anyone got any ideas? Many thanks as usual. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HP-UX 10.20 + Oracle
Make sure you have the LD_LIBRARY_PATH environment variable set to $ORACLE_HOME/lib (I think :-\ ) At least you have to on Linux. -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 1:13 PM To: 'Tomcat Users List' Subject: RE: HP-UX 10.20 + Oracle Mark: I tried changing to classes111.jar, but now get this error: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path Also I should point out that I am using Oracle 8.0.4 on HP. Thanks for the suggestions though -Original Message- From: p niemandt [mailto:[EMAIL PROTECTED]] Sent: 07 January 2003 18:25 To: Tomcat Users List Subject: RE: HP-UX 10.20 + Oracle As far as I know you should use ojdbc14.jar for Oracle9: Though previous ones should work, the ojdbc14.jar is recommended / needed for Oracle9. {The classnames are different between classes12.jar and the new ojdbc14.jar} On Tue, 2003-01-07 at 17:57, Wagoner, Mark wrote: I think classes12.jar is for JDK 1.2. You want classes111.jar (if you can find it). -Original Message- From: John Clark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 12:54 PM To: 'Tomcat Users List' Subject: HP-UX 10.20 + Oracle Hi there, The story so far: I have an intranet application that currently runs on a Linux server (with Oracle 9i - built-in Apache) and W2000 server (with Tomcat 4.x connecting to Oracle 8). It is written in JSP and Java, and works fine. I now want to use HP-UX 10.20 as a server, so I got the only available JDK from HP which is version 1.1.8 and this has forced me to use Tomcat 3.3.1. This is all running now (thanks for the help) and I am now testing the application. I have put in the Oracle classes12.jar and DriverManager.registerDriver seems fine, but DriverManager.getConnection gives the following error (only partial list): java.lang.ClassNotFoundException: java.util.Map at org.apache.tomcat.util.compat.SimpleClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClassInternal(Compiled Code) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:358) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:126) at estimating._final.loginvalidate_1._jspService(loginvalidate_1.java:123) Anyone got any ideas? Many thanks as usual. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- p niemandt [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Easy question - Java Beans
If I may jump in...I like to use the Iterator pattern for building select lists. While this may not be the best application for a situation where the list of values is predetermined (such as with states), it works well when reading from a variable list of values such as from a database. In my bean I keep the list of values along with an index of the last one retrieved. My JSP code then contains something like: % while (pageBean.hasMoreStates()) { % option value=%= pageBean.getStateAbbv() %%= pageBean.getStateName() %/option % } % Each call to hasMoreStates increments the counter and returns true if there are still more in the list. The calls to getStateAbbv and getStateName use this counter to get the proper value from the list (usually a property of another object held within an ArrayList). Also, make sure you enclose everything within the loop in curly braces. If I need to pre-select a specific option, I add another call which returns the string selected or an empty string, depending on if the iterator is currently on the proper entry. % while (pageBean.hasMoreStates()) { % option value=%= pageBean.getStateAbbv() % %= pageBean.getStateSelected() %%= pageBean.getStateName() %/option % } % HTH Mark -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 1:58 PM To: 'Tomcat Users List' Subject: RE: Easy question - Java Beans Noel. How would your original select look for the states? I have a variable in the bean for state which is the value (i.e. NY) but not one for the state name (i.e. New York). My select is basic: select name=state option value=NYNew York/option /select In my bean I have private String state; with the getter and setter methods. Thanks. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 6:04 PM To: Tomcat Users List Subject: RE: Easy question - Java Beans Denise, Start with your basic select tag, and then in your code that emits the list of option tags, do something like this: option value=' + stateCode + ' + ((stateCode.equals(currentStateCode)) ? selected : ) + + stateName + /option In other words, emit the option value='NY'New York/option tag, or the option value='NY' selectedNew York/option variant, depending upon whether the option you are about to emit is the currently selected option. --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat as service
That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat as service
Tomcat 4.0.4 and Java 1.4.1_01-b01 in production. Tomcat 4.0.6 and Java 1.4.1_01-b01 for development. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: RE: tomcat as service Please verify the exact version of Java and Tomcat you've got on that machine. Thanks -B [EMAIL PROTECTED] 12/30/02 09:37AM That's funny, I have had it running as a service on Win2K for nearly 3 weeks. Guess I better tell the user's its not working. To answer the original question; no, there are no known issues. I don't use the wrapper, I simply select the Run as service option when I install Tomcat. -Original Message- From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 12:20 PM To: [EMAIL PROTECTED] Subject: Re: tomcat as service That's wonderful and all, but it still doesn't change the fact that Tomcat doesn't run as a service with 1.4.1_01. I also have this problem. -B [EMAIL PROTECTED] 12/26/02 09:49AM We use the Java Wrapper Service with JDK 1.4 to run Tomcat as an NT service. You can find it at: http://wrapper.sourceforge.net/doc/english/index.html In addition to working cross platform (Windows NT and Unix), you can test the service from the command line before and after installing it. They supply sample configurations for Tomcat. Gary Herwig Posedu wrote: hi! i tried to run tomcat as service with jdk14 and i doesnt work. there is no error. with jdk 1.3 there were no problems. is there any nown bug with version 1.4 of jdk thx for helping,.. herwig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin CEO and Founder Cafesoft 858.455.1800 x205 http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: reducing tomcat jasper memory footprint
I don't have an answer to your exact question, but given the numbers you cite I would try to come up with an alternative design. Perhaps you can create one JSP page that uses dynamic includes to incorporate the text of the article? Just a thought. -Original Message- From: Julian Löffelhardt [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 2:37 PM To: Tomcat Users List Subject: reducing tomcat jasper memory footprint Hi, I'm using Apache 1.3.26 and 3 tomcat 4.0.4 instances with AJP13 loadbalancing . Our application is a CMS where all the published articles are generated offline as JSP-Files, one jsp per article. We had hige problems with the memory footprint. Due to the fact that every jsp is generated as a class and there are about 200 new artices per day the permanent segment of the JVM heap gets filled with all the classes, and I get an OutOfMemoryError. My workaround for now is setting -XX:PermSize and --XX:MapPermSize to higher values, but this just delays application hang-up. With 64 megs of permSize our Server had an approx. uptime of 1 day now it's about 3-4 days. Is there any way to unload jsp-Files (unload the class) ? llap, julian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: byte serving PDFs
There is really nothing special about serving a PDF document other than setting the correct MIME type. If you are using Tomcat to serve static PDF files, just make sure the file extension is .PDF and the browser should recognize it properly. If you are dynamically generating the PDF and sending it back as a byte stream, just set the Content Type header to application/pdf and send the data back through the output stream. You will have to do this with a servlet as a JSP page tries to treat everything as text. -Original Message- From: Elizabeth Fisher [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 1:01 PM To: Tomcat Users List Subject: byte serving PDFs Does Tomcat support byte serving of PDFs? -Elizabeth -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: What do these errors mean?
The connection reset by peer error simply means the client closed the connection before all of the output was written. This is usually because the user hit the Stop button or navigated to a different page before the first one was fully loaded. This can also happen if a user double-clicks on a link, since this effectively cancels the first request and starts a second. I can't help with the security fraud error. -Original Message- From: Luca Ventura [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 10:11 AM To: tomcat-user Subject: What do these errors mean? Hello everybody! I have installed Tomcat 4.1.12 as Servlet Container and IIS as Web Server in my Windows 2000 machine. I use the ISAPI filter to redirect requests from IIS to Tomcat: in particular I use the JK connector isapi_redirector.dll you can find at: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0 /bin/win32/ After some time IIS and Tomcat working I have read Tomcat's log files to check that all works properly and I have seen these strange errors: In iis_redir.log: //this is the log file for the ISAPI filter isapi_redirector.dll. [Mon Dec 02 09:47:03 2002] [jk_uri_worker_map.c (586)]: In jk_uri_worker_map_t::map_uri_to_worker, found a security fraud in '/www.myserver.com/myurl/tmp/mainbody.jsp.htm' In catalina_log.2002-12-02.txt: //this is the log file ( 2nd december 2002) for the Tomcat's Cataline engine. It is in /logs folder of Tomcat. 2002-12-02 13:11:32 Ajp13Processor[8009][6] process: invoke java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:126) at org.apache.ajp.Ajp13.send(Ajp13.java:525) at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501) at org.apache.ajp.Ajp13.finish(Ajp13.java:395) at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551) at java.lang.Thread.run(Thread.java:536) WHAT DO THESE TWO ERRORS MEAN? HOW CAN AVOID THEM? The strange thing is that when the second error occurs Tomcat suspends itself and it doesn't accept requests any more: so I must restart the service WHY? :-( I hope someone can help me. Thanks everybody in advance! Luca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.x as NT service
It is even easier to run 4.x as a service. It is one of the options when you run the Tomcat installer. -Original Message- From: Richard Hartley [mailto:r.hartley;umist.ac.uk] Sent: Tuesday, November 12, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.x as NT service Hi Is it possible to set up jakarta-tomcat-4.0.5 as a windows service? There is documentation detailing how to do this for Tomcat 3.x, but not it seems for Tomcat 4.x. Thanks R Hartley -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: JDBC Error with Tomcat 4.0.6
I'm by no means a SQL Server expert, but based on the error I would guess the driver is not communicating with the server. Can you connect to the database from the Tomcat server but outside of Tomcat (using some query tool)? -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 05, 2002 3:20 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: JDBC Error with Tomcat 4.0.6 anyone? All, I need a little help with this one. I'm porting an app to Tomcat 4.0.6 from WebSphere 4.03 and I'm getting a JDBC Error, java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I've included a bit about my app to see if anyone can help me figure out where my misconfiguration is. Am I using the right driver for SQL Server 2000? (I'm using msutil.jar, mssqlserver.jar and msbase.jsr, the native drivers) Should I be using a different class? Is my JDBC URL not formed properly? I guess I need help from a SQL Server/Tomcat guru... Thanks! John Server.xml file snippet : validationQuery select top 100 * from Subscriber url jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse password tibco_pass maxActive 12 maxWait 5000 driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver username tibco_user Web.xml file snippet: DB Connection jdbc/indemand javax.sql.DataSource Container Partial Stack trace: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnectionPool .java:174) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionForTib co(ConnectionFactory.java:59) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(Conne ctionFactory.java:40) at com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(DatabaseUt ility.java:123) - Do you Yahoo!? HotJobs - Search new jobs daily now - Do you Yahoo!? HotJobs - Search new jobs daily now -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: How to Capture Error Msgs/Exceptions when Tomcat Die.
I think it is called stderr.log. You may also want to check the Window's Event Log. If the OS experienced a problem with the service and had to kill it, it should have recorded an event. I would check both the Application Log and the System Log. -Original Message- From: CHAO,KENT (HP-Boise,ex1) [mailto:kent_chao;hp.com] Sent: Monday, November 04, 2002 10:28 AM To: 'Tomcat Users List' Subject: RE: How to Capture Error Msgs/Exceptions when Tomcat Die. I checked $TOMCAT_HOME\logs\. There is no such file - jvm.stderr. May I ask how to configure the system to have this file generated? thx. Kent -Original Message- From: Bill Barker [mailto:wbarker;wilshire.com] Sent: Saturday, November 02, 2002 12:19 AM To: [EMAIL PROTECTED] Subject: Re: How to Capture Error Msgs/Exceptions when Tomcat Die. By default, jk_nt_service sends errors to $TOMCAT_HOME/logs/jvm.stderr. You could try looking there first. CHAO,KENT (HP-Boise,ex1) [EMAIL PROTECTED] wrote in message news:14562BDD08E0FC4C93D7C92B249AC94D02954B4E;xboi21.boise.itc.hp.com... I am new to this group. I posted this question a few days ago, but didn't get any responses. Maybe I did something wrong. So I re-posted this question. Symptom: I have a Tomcat application, running with Apache (1.3.26) and Tomcat (3.3) in W2k with sp3. I experienced Tomcat died several times (freq: once a week), while Apache remained running. Question 1: Where I can capture the last exception or other error messages before Tomcat died? I need to find out what caused Tomcat to die first, before I can take steps to fix the problem. Does any one experience similar situation? When I said Tomcat died, I mean: In W2k service mode, it simply stopped. In non-service mode and in the same command window, a prompt was displayed and no more log4j messages on display. The application did generate Log4j messages in log files at ~\tomcat\logs. I cannot find any Exceptions at end of file. Any suggestions are welcome. thx in advance. Kent -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Warning running startup.bat
Sounds like the executable is corrupt. If you run java -version do you get an error? You may need to reinstall the JDK. -Original Message- From: Paul Abrilla [mailto:APCXU;CUNYVM.CUNY.EDU] Sent: Wednesday, October 30, 2002 11:15 AM To: [EMAIL PROTECTED] Subject: Warning running startup.bat I downloaded installed j2sdk 1.4.1 and jakarta tomcat 4.0. I have setup the envinronment variables. However when I run the c:\jakarta-tomcat-4.0\bin\startup.bat, i get the popup window: c:\j2sdk1.4.1\bin\java.exe is not a valid Win32 application Why do I get this message? Any advise will be appreciated. Thanks in advance. /Paul Acknowledge-To: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat Scalability - Long
We have a similar hardware setup (PIII 1GHz 512M) but running Tomcat 4.0.4 on Win2k/IIS and accessing a DB2 database on a separate iSeries server. The system is used by our sales reps in the US and Canada (about 30) over a VPN, so it can see activity at any time. It never really gets hammered but traffic seems to come in spurts with the highest load I have seen of about 5 simultaneous users and the longest session (although we don't use session objects) of about 45 minutes. Keep in mind that I have never actually monitored the traffic, just made mental notes as I was reviewing the log files. So far the only time we have had to restart the machine is to install another MS security patch. The longest continual uptime has been a little over 19 days (the server has only been in production about 10 weeks) and the memory used by Tomcat seems to hover right around 24M. Response time is always in the sub second range, except for a few database queries that seem to take a little longer (still need to do some SQL tuning). I don't know if you can call this solid information, but so far I have not seen anything to worry about scalability wise. -Original Message- From: Brandon Cruz [mailto:bcruz;norvax.com] Sent: Thursday, October 24, 2002 3:36 PM To: Tomcat Users List Subject: Tomcat Scalability - Long Does anyone have any solid information about the scalability of Tomcat? It seems very limiting to me, but that is hopefully due to improper configuration. Here is our situation and what seems to be happening under a small amount of stress. ---About our Environment--- PIII 1.0Ghz 512 Meg Ram Linux RedHat 7.1 MySQL Database Apache 1.3.x mod_jk - logging turned all the way down Tomcat 3.2.4 - contexts *are* reloadable right now SUN JDK 1.3.1_01 ---About our Application--- Our Application is a content management tool that reads and writes to the MySQL Database and reads and writes files. All the pages within this application are served by Tomcat 3.2.4. About 80-120 people per day log into this application and spend anywhere from 10 minutes to one hour working on the application. At any given time there are between 15 and 50 active database connections. ---What we are seeing--- Tomcat needs to be restarted every few days. If we don't restart it, it seems tomcat eventually locks up and does not respond at all. No errors or anything are reported, it just will not respond. Apache continues to work during this time and all static HTML pages are accessible. CPU - The processor usage seems to slowly increase as time goes on. After about one day, it seems one java process uses 30% of available CPU or more, depending on whether users are performing operations or not. When nobody is doing anything, the processer still seems to be sitting around 30% until tomcat is restarted. This seems to cap after three to five days and not increase too much more. RAM - This slowly increases and never stops increasing. We do not have any special parameters set for the VM when it starts, but this does not seem to matter. The RAM gets up to about 135 MB after four or five days, but would continue to grow if tomcat were not allowed. Can anyone explain this behavior, talk about the scalability of Tomcat, or provide any similar working solutions that perform better than this? Is it normal, should we just throw more hardware at it? Are there configuration parameters that can be used to increase performance, such as set reloadable=false in all contexts? Would we get better performance if we upgraded to 4.x, or would that just be more work for little improvement? -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Digested Passwords and Oracle 8.1.7
I don't think you are supposed to be able decrypt the passwords. In fact, I would hope that you can't or Oracle would have a big problem. -Original Message- From: Graham Lounder [mailto:lounder;caris.com] Sent: Tuesday, October 22, 2002 8:28 AM To: [EMAIL PROTECTED] Subject: Digested Passwords and Oracle 8.1.7 Hey all! I was wondering if any has ever tried to use a Tomcat Realm directly to Oracle's Username/Password table. I found the table in SYSTEM.DBA_USERS which has the username and encrypted password. The problem is, I have no way of digesting the password. Does anyone know the algorithm Oracle uses to encrypted their passwords? I've checked MD5 and SHA but they don't seem to be it. I tried MD2 but it Tomcat doesn't seem to like it. Any Ideas? Thanks in advance, Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4263 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Oracle jdbc driver not found
Tomcat does not use the classpath and, since you are using JDK 1.4, you only need ojdbc14.jar (the zip files are for older versions of Java). Put the jar file in the WEB-INF/lib directory of your web app. Tomcat will automatically load it from there. -Original Message- From: Eddie Liang [mailto:eliang;edge.com] Sent: Friday, October 18, 2002 11:58 AM To: 'Tomcat Users List' Subject: Oracle jdbc driver not found Hello, I have a problem for creating a simple database connection with JSP, tomcat 4.0.4, jdk1.4. I set the oracle jdbc driver ( class111,zip, class12.zip, ojdbc14.jar) in the classpath. Tomcat still complaint the driver is not found. Here is the error that I got. Does anybody know I need to configure something in the tomcat? Thank you org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. An error occurred between lines: 35 and 58 in the jsp file: /JSP/com/imedge/admin/test.jsp Generated servlet error: C:\Tomcat 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\test$jsp.java:101: Class oracle.jdbc.driver.OracleDriver not found. DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); ^ 1 error, 1 warning at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Here is my source code: !-- Developed and Documented by Krishna Veeramachaneni -- html head titleIMEDGE Content Management Services Administrator/title link href=/JSP/com/imedge/admin/style.css rel=stylesheet type=text/css script language=JavaScript src=/JSP/com/imedge/admin/validation.js/script script language=JavaScript src=/JSP/com/imedge/admin/CascadeMenu.js/script script language = JavaScript !-- hide me // show me -- /script /head % /* Java code to retrieve family name and description if any */ % body link=#99 vlink=#00 alink=#00 ID=Bdy leftmargin=0 rightmargin=0 topmargin=0 bgcolor=beige % include file=/JSP/com/imedge/admin/Banner.jsp % % include file=/JSP/com/imedge/admin/FamilyMenu.jsp% % page import=javax.servlet.* % % page import=java.sql.* % % /* Java code to retrieve family name and description if any */ // Load the Oracle JDBC driver DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection (jdbc:oracle:thin:sunlab2:1521:chcity, xyzz, xyzxc); // Create a Statement Statement stmt = conn.createStatement (); // Select the ENAME column from the EMP table ResultSet rset = stmt.executeQuery (select table_name from user_tables); // Iterate through the result and print the employee names while (rset.next ()) System.out.println (rset.getString (1)); % /body /html Eddie Liang -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Oracle jdbc driver not found
If you are using the ROOT context for your app then, yes. If you don't know what I mean by ROOT context then you probably are so the answer is still yes. ;o) There should be a classes and a lib directory there by default. If not, go ahead and create one. -Original Message- From: Eddie Liang [mailto:eliang;edge.com] Sent: Friday, October 18, 2002 12:13 PM To: 'Tomcat Users List' Subject: RE: Oracle jdbc driver not found Mark, Thanks for the quick reply. When you said WEB-INF/lib directory, is that mean %catalina_home%\webapps\ROOT\WEB-INF\lib? If there is not lib subdirectory under %catalina_home%\webapps\ROOT\WEB-INF\, could I create one and put ojdbc14.jar in it? Thank you Eddie Liang Database Architect Phone: 630-810-9669 x253 -Original Message- From: Wagoner, Mark [mailto:MWagoner;wild-flavors.com] Sent: Friday, October 18, 2002 11:03 AM To: 'Tomcat Users List' Subject: RE: Oracle jdbc driver not found Tomcat does not use the classpath and, since you are using JDK 1.4, you only need ojdbc14.jar (the zip files are for older versions of Java). Put the jar file in the WEB-INF/lib directory of your web app. Tomcat will automatically load it from there. -Original Message- From: Eddie Liang [mailto:eliang;edge.com] Sent: Friday, October 18, 2002 11:58 AM To: 'Tomcat Users List' Subject: Oracle jdbc driver not found Hello, I have a problem for creating a simple database connection with JSP, tomcat 4.0.4, jdk1.4. I set the oracle jdbc driver ( class111,zip, class12.zip, ojdbc14.jar) in the classpath. Tomcat still complaint the driver is not found. Here is the error that I got. Does anybody know I need to configure something in the tomcat? Thank you org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. An error occurred between lines: 35 and 58 in the jsp file: /JSP/com/imedge/admin/test.jsp Generated servlet error: C:\Tomcat 4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\test$jsp.java:101: Class oracle.jdbc.driver.OracleDriver not found. DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); ^ 1 error, 1 warning at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Here is my source code: !-- Developed and Documented by Krishna Veeramachaneni -- html head titleIMEDGE Content Management Services Administrator/title link href=/JSP/com/imedge/admin/style.css rel=stylesheet type=text/css script language=JavaScript src=/JSP/com/imedge/admin/validation.js/script script language=JavaScript src=/JSP/com/imedge/admin/CascadeMenu.js/script script language = JavaScript !-- hide me // show me -- /script /head % /* Java code to retrieve family name and description if any */ % body link=#99 vlink=#00 alink=#00 ID=Bdy leftmargin=0 rightmargin=0 topmargin=0 bgcolor=beige % include file=/JSP/com/imedge/admin/Banner.jsp % % include file=/JSP/com/imedge/admin/FamilyMenu.jsp% % page import=javax.servlet.* % % page import=java.sql.* % % /* Java code to retrieve family name and description if any */ // Load the Oracle JDBC driver DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection (jdbc:oracle:thin:sunlab2:1521:chcity, xyzz, xyzxc); // Create a Statement Statement stmt = conn.createStatement (); // Select the ENAME column from the EMP table ResultSet rset = stmt.executeQuery (select table_name from user_tables); // Iterate through the result and print the employee names while (rset.next ()) System.out.println (rset.getString (1)); % /body /html Eddie Liang -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Java Question
A service will start without a user logged in (if the startup mode is set to Auto) and continue to run after they log out. Anything in the startup folder doesn't start until the user logs in and is terminated when the log out. -Original Message- From: Gaull, Kathy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 2:43 PM To: '[EMAIL PROTECTED]' Subject: Java Question What is the difference or what does it gain me to run and install the jk_nt_service.exe if I am required to use JDK 1.3 vs just putting the tomcat app in the Windows Startup menu? Kathy Gaull COUNTRYSM Insurance Financial Services Web Services Phone: (309)821-5441 Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: jdbc ClassNotFound error
Put your class file in /usr/local/tomcat/webapps/ROOT/WEB-INF/classes Put classes.jar in /usr/local/tomcat/webapps/ROOT/WEB-INF/lib Tomcat will look in WEB-INF/lib for your jar files, not on the classpath (in fact, you can remove the reference from you classpath). -Original Message- From: Julie Jordan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:27 AM To: [EMAIL PROTECTED] Subject: jdbc ClassNotFound error This is my first pass with trying to establish a jdbc Oracle connection with Tomcat.. So please be kind. 1. I have created a myfilename.class and html page (calling class) and placed them into /usr/local/tomcat/webapps/ROOT 2. I also set up my Oracle jdbc in the java file and placed the Oracle classes.jar files into the same directory 3. I added this directory to my CLASSPATH. 4. I've restarted Tomcat. 5. But when I try to view the html page it won't load my applet, I get: Java.lang.ClassNotFoundException:myClassfilename Any help is GREATLY appreciated. BTW: using Oracle 8.1.5(thin driver), Tomcat 3.3.1, mod_jk, JSDK2.0, Java2 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat as service - space in path in wrapper.properties - workaround
An even easier solution is to select the NT Service option when installing Tomcat. Then you don't even need jk_nt_service. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 1:02 PM To: [EMAIL PROTECTED] Subject: Tomcat as service - space in path in wrapper.properties - workaround I didn't see this specific topic or workaround in the archives so thought I would share - since it seems like this could be a fairly common problem. I hope it saves someone a little time troubleshooting. _Situation_: Attempting to run tomcat 4.0.4 as a service on NT4.0 SP6 using jk_nt_service.exe. May apply to other versions of Tomcat and Windows as well. _Symptoms_: Command jk_nt_service -i tomcat -a wrappers.properties adds the service just fine, but attempting to start the service with command jk_nt_service -s tomcat or from NT Services panel fails. _Most Likely Cause_ (Of course you may have other problems that I don't know about, but this one will definitely hang you up): Spaces in your path definitions. For example, I originally had the setting: wrapper.tomcat_home=d:\Program Files\Apache Tomcat 4.0 Quoting the path with double or single quotes will not rectify the problem either. _Workaround_: Use Dir -X to find the short (DOS 8.3) names of your directories and use those instead. For example, my new path setting is: wrapper.tomcat_home=d:\PROGRA~1\APACHE~1.0 This will eliminate the spaces and the service will start happily. If this doesn't solve your problem, then you've got something else wrong and I can't help you. Good Luck Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JDBCRealm question
The UnsatisfiedLinkError is usually an indication that LD_LIBRARY_PATH is not set properly (if on *nix) and/or ORACLE_HOME is not set correctly. If you are on Windows, also add %ORACLE_HOME%\bin to your path. -Original Message- From: Koes, Derrick [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 10:13 AM To: '[EMAIL PROTECTED]' Subject: JDBCRealm question According to the directions in the documentation, you should put the jar that contains the JDBC driver in common/lib if you need it for authentication as well as for your webapp. If I do this, I cannot use startup.bat because I get: Exception during startup processing java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1410) However, if I add it to server/lib and in my webapp's lib I get an exception stating that it was already loaded by another classloader when my webapp tries to use it. I'm using the famous Oracle classes12.jar for Oracle 9i release 1. Has anyone had similar problems? How do you make tomcat see the ocijdbc9 library in the shared mode? Thanks, Derrick This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem running Tomcat 4.0.4 under JDK 1.4.1
I got this same error when I moved from 1.3.1 to 1.4.0, so I don't think it is something in the JDK. Unfortunately, I can't remember exactly how I fixed it. I *think* it was because I still had an old version of the JRE floating around on the machine. But like I said, I'm not sure anymore. I did get it working, so I guess the good news is there is a fix. :} -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 12:09 PM To: Tomcat Users List Subject: RE: Problem running Tomcat 4.0.4 under JDK 1.4.1 Hi, That's the coolest error I've seen in a while ;) Do you get it using JDK 1.4.0? 1.4.1 is not final yet, so it may be a packaging issue with the 1.4.1 version you're using. What's the output of java -version? Yoav Shapira Millennium ChemInformatics -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 11:51 AM To: 'Tomcat Users List' Subject: Problem running Tomcat 4.0.4 under JDK 1.4.1 Hi all, I've upgraded to jdk 1.4.1 and Tomcat 4.0.4 and now my jsp pages give the following error... org.apache.jasper.JasperException: Unable to compile class for JSPerror: Invalid class file format in C:\mmsdev\tools\win32\jdk1.4.1\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand. error: Class java.lang.Object not found in class com.tecnomen.mms.relay.Alarms. 2 errors at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary( JspS e rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl et.j a va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio n FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC h ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j a va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j a va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 66) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato rBas e .java:531) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 64) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j ava: 2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 47) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:18 0 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve . java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:17 0 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:46 8) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j ava: 5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor. java : 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java :112 5 ) at java.lang.Thread.run(Thread.java:536) It works under JDK 1.3.1 and Tomcat 4.0.1, unfortunaly I upgrade
RE: REPOST:Connection refused problem
Well, it sounds like you have several problems but it is hard to diagnose with the information supplied. What is an 'X' database? Are you using a JDBC driver to connect to it? The IOException about the LOG/BAN files is not a Tomcat message. Is your servlet trying to do some sort of logging? The message /proj_GR:running:0 in the manager app tells you that the servlet is loaded. The 0 means there are no active sessions. -Original Message- From: Nagpal, Vikas [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 9:21 AM To: '[EMAIL PROTECTED]' Subject: REPOST:Connection refused problem Hi Everybody, We are trying to connect with our 'X' database with the help of servlets. We are using the socket connection to the server and try to match the sequence we paste in our User Interface and correspondingly generate the graph of the matched sequence. But somehow we not able to connect with the database. It flashes the following error message: Error in JCS:: java.net.ConnectionException: Connection refused: connect Besides we have an IOEXCEPTION generated: cannot close the LOG/BAN files java.io.IOEXCEPTION stream closed. Where JCS is the server we have generated ourselves to connect to the 'X' database.I am pretty certain that the EXCEPTION in the servlet code is causing the ERROR. We are not able to DEBUG this EXCEPTION. Can anyone DEBUG this. Since we are serving our application using TOMCAT I would like to know what we need to do to start a new instance of our application. When we LIST after RELOADING(using the MANAGER tool) we get: /proj_GR:running:0 is the NUMBER on the right side to do anything with the instance. To resolve we have tried importing packages like java.net.* and java.io.*. Can someone DEBUG this EXCEPTION. Thanks in advance Vikas. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Simple WAR files
I would use an IDE like Netbeans or Forte to get started. It will do most of this for you, including packaging the entire app into a WAR file. Once you go through the process within the IDE it starts to make much more sense. -Original Message- From: James [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 11:28 AM To: Tomcat List Subject: Simple WAR files Hi, I have read the documentation for writing web applications and distributing them in WAR files, but now I am just more confused than ever. I'm looking for a simple step by step tutorial on making WAR archives and making them redistributable. I know this so far: - Directory structure; WEB-INF, WEB-INF/classes, etc and what they are used for - How to write servlets and JSPs, no worries there... So now I need to know, what are the basic steps to make a very simple, almost HelloWord.war type of application? How do I write an application descriptor, and what do I do with it to make an application WAR file? What are all the references to asking an administrator to assign a context path? (I have no administrator, only my home computer and myself!) Thanks, James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Simple WAR files
Personal preference I suppose. I, personally, almost gave up trying to teach myself Java using the notepad/javac/System.out.println routine. Once I was able to step through the code in the debugger (and get something to actually work) I started to appreciate Java. I guess I need that instant gratification. ;o) I would hate to guess how long it would have taken me to get my first servlet to work using the manual method. But different people learn in different ways. -Original Message- From: Peter T. Abplanalp [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 11:50 AM To: 'Tomcat Users List' Subject: Re: Simple WAR files -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Aug 30, 2002 at 11:41:19AM -0400, Wagoner, Mark wrote: I would use an IDE like Netbeans or Forte to get started. It will do most of this for you, including packaging the entire app into a WAR file. no offense but i recommend /not/ doing this. the ide's do a lot of stuff behind the scenes that you may not understand. if you really want to understand the process, do it manually. once you can do simple things manually, you can switch to an ide because you now know what the ide is doing under the covers. Once you go through the process within the IDE it starts to make much more sense. once you start creating large complicated applications, ide's make sense because they take some of the manual labor out of the process. - -- Peter Abplanalp Email: [EMAIL PROTECTED] PGP: pgp.mit.edu -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9b5QbggA8sH0iRXQRApgqAJ9ZZQX3XaRO7QJFEZ0GRnsidiOKBgCeJXZv MX2oP1nBGhQVcZC4oWi493Y= =MmIF -END PGP SIGNATURE- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DistributedManager Qustion
Server A has a catastrophic failure and dies (or some idiot unplugs it). ROTFL - I was doing a customer install once and left for the night. When the cleaning lady came in she needed to plug in her vacuum cleaner. Guess where she found the outlet. Oddly enough, this was at a hospital. Sorry I can't actually answer the question, but you brought back a painful memory. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: OFF-TOPIC: Pointers to CallableStatement docs?
When you say it returns a status, do you mean it is a function (I work primarily with Oracle, so if this does not apply to MS I apologize)? If so, you need to make the call something like: CallableStatement stmt = conn.prepareCall({call ? = proc(?,?, ... )}); -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 12:18 PM To: '[EMAIL PROTECTED]' Subject: OFF-TOPIC: Pointers to CallableStatement docs? Hello - I think there is a java-user list, or even a jdbc-interest list, but I'd rather not subscribe when all I need is one quick pointer, so I am hoping someone on this list can get me started. I'm having quite a bit of difficulty working with stored procedures in my classes and servlets. The database is MS SQL Server 2000. I've read every single doc I can find, both at Sun, through Google, and even through the driver vendor's documentation. I even scammed some code from a JDBC 3.0 book (the only one I could find) at Border's, with still no luck. Can anyone point me to a resource that explains how to setup stored procedures in a CallableStatement correctly? I understand about registering the output parameters and setting the input types, and I understand that the parameters in a CallableStatement are numbered from left to right starting at 1. I've seen the examples at Sun, etc. but they're not much help. The problem is that all of the examples I can find deal with very simple, very rudimentary stored procedures, like finding the average of two numbers, or whatever. Our stored procedures are more involved than that. Example: a stored procedure used to validate logins. It has 5 input parameters, and 5 output parameters. It returns a status. According to the docs I have read so far, that means I should have a CallableStatement with 11 question marks (?) in it (5 + 5 + 1 = 11). but that doesn't work, and I have tried every combination of inputs, outputs, input/outputs, etc. that I can think of, to no avail. Any help or pointers to resources that explain stored procedures and CallableStatements in more in-depth fashion would be greatly appreciated. - John John Turner [EMAIL PROTECTED] | 248-488-3466 Advertising Audit Service http://www.aas.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: OFF-TOPIC: Pointers to CallableStatement docs?
I don't know if it is possible in your case, but have you tried changing the parameter types within the stored procedure to something simple, like all strings? I always just try to get SOMETHING to work, then go from there. ;o) I think I recall Oracle having problems with booleans a while back so I reverted to integers (1 and 0). Maybe this is actually a JDBC thing, in which case you may be experiencing the same issue. From the little bit of DB/2 work I have done I know IBM's error messages will lead you to believe the number of parameters do not match, when in fact the problem is the parameter types. Again, just something to test. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 12:53 PM To: 'Tomcat Users List' Subject: RE: OFF-TOPIC: Pointers to CallableStatement docs? Right. My setup looks like this: cstmt = sConn.prepareCall({? = call sp_validate_pwd(?,?,?,?,?,?,?,?,?,?)}); Basically, there are 5 inputs (username, password, IP address, browser type, and referer) and I'm supposed to get a return status back (bad or good) and 5 outputs: 3 booleans and 2 strings (isValid, isExceeded, isEnabled, name, and title). I've tried everything I can think of...only having 6 question marks, having all 11, only using 5, etc. to no avail. I enabled debug logging on the driver, and I get messages that say parameter my_parameter not registers as output or not registered as input, even when they are, and regardless of how I use the set*() and registerOutParameter() methods. Very confusing. I'd love to find a complete stored procedures How-To somewhere that addresses complex stored procedures instead of the basic tutorials that do simple math or just insert a row. Thanks for the reply. John -Original Message- From: Wagoner, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 12:31 PM To: 'Tomcat Users List' Subject: RE: OFF-TOPIC: Pointers to CallableStatement docs? When you say it returns a status, do you mean it is a function (I work primarily with Oracle, so if this does not apply to MS I apologize)? If so, you need to make the call something like: CallableStatement stmt = conn.prepareCall({call ? = proc(?,?, ... )}); -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 12:18 PM To: '[EMAIL PROTECTED]' Subject: OFF-TOPIC: Pointers to CallableStatement docs? Hello - I think there is a java-user list, or even a jdbc-interest list, but I'd rather not subscribe when all I need is one quick pointer, so I am hoping someone on this list can get me started. I'm having quite a bit of difficulty working with stored procedures in my classes and servlets. The database is MS SQL Server 2000. I've read every single doc I can find, both at Sun, through Google, and even through the driver vendor's documentation. I even scammed some code from a JDBC 3.0 book (the only one I could find) at Border's, with still no luck. Can anyone point me to a resource that explains how to setup stored procedures in a CallableStatement correctly? I understand about registering the output parameters and setting the input types, and I understand that the parameters in a CallableStatement are numbered from left to right starting at 1. I've seen the examples at Sun, etc. but they're not much help. The problem is that all of the examples I can find deal with very simple, very rudimentary stored procedures, like finding the average of two numbers, or whatever. Our stored procedures are more involved than that. Example: a stored procedure used to validate logins. It has 5 input parameters, and 5 output parameters. It returns a status. According to the docs I have read so far, that means I should have a CallableStatement with 11 question marks (?) in it (5 + 5 + 1 = 11). but that doesn't work, and I have tried every combination of inputs, outputs, input/outputs, etc. that I can think of, to no avail. Any help or pointers to resources that explain stored procedures and CallableStatements in more in-depth fashion would be greatly appreciated. - John John Turner [EMAIL PROTECTED] | 248-488-3466 Advertising Audit Service http://www.aas.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DB2 and servlet ??? Help !!!
I think you are attempting to output the value if there is nothing in the result set. if(!rs.next()) The .next() method will return true if it was able to fetch a row. You are saying, if there is no row then... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 1:57 PM To: Tomcat Users List Subject: RE: DB2 and servlet ??? Help !!! Hello John firstnme is the correct column name... What bugs me is if you see my servlet code which I am again attaching... I try to put try and ctach every where possible so that I can at least printStackTrace() . But to my surprise...I am not getting any exception...or stack trace... instead I am getting simple HTML output ... I am attaching what 1. I see in browser 2. servlet code BROWSER OUTPUT --- paramater passed is 012 Count is0 Found the JDBC driver Driver is properly loaded and registered Connection URL is good Retrieve some data from the database... Received results: Count is0 God Please help --SERVLET CODE- import java.sql.*; import java.lang.*; import java.io.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Ndb2Websphere extends HttpServlet { Statement stmt; ResultSet rs; int count =0; public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/html); ServletOutputStream out = res.getOutputStream(); String emp = req.getParameter(empnumber); out.println(paramater passed is +emp + BR); out.println(BRBRCount is+ count); try{ Class.forName(COM.ibm.db2.jdbc.net.DB2Driver); out.println(BRFound the JDBC driver BR); } catch( Exception e) { //e.printStackTrace(); out.println(\nDriver class not found exception); } finally { out.println(BRDriver is properly loaded and registered ); } try{ Connection con = null; String url; out.println(BRConnection URL is good); try{ con = DriverManager.getConnection (jdbc:db2://10.3.13.34/SAMPLE,db2admin,db2pwd); } catch( Exception e4) { e4.getMessage(); e4.printStackTrace(); } // retrieve data from the database out.println(BRRetrieve some data from the database...); try{ stmt = con.createStatement(); rs = stmt.executeQuery(SELECT empno from db2admin.employee); } catch( Exception e5) { e5.getMessage(); e5.printStackTrace(); } out.println(BRReceived results:); try{ if(!rs.next()) { count = count +1; String a = rs.getString(1); out.println( empno is + a ); out.println(BRBRWhile Count is+ count); } } catch( Exception e6) { e6.printStackTrace(); } out.println(BRBRCount is+ count); rs.close(); stmt.close(); con.close(); } catch (SQLException e1) { e1.getMessage(); e1.printStackTrace(); } catch( Exception e) { e.getMessage(); e.printStackTrace(); } finally { out.println(BRGod Please help); } } public void doPost (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doGet(req,res); } } Nishant Awasthi Turner, JohnTo: 'Tomcat Users List' JTurner@AAS.[EMAIL PROTECTED] com cc: (bcc: Nishant
RE: Newbie Question about logging
Take a look at Log4j http://jakarta.apache.org/log4j/docs/index.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 7:15 AM To: [EMAIL PROTECTED] Subject: Newbie Question about logging Hi All, I have just started using 1.4 and using the application log files. These are great for build errors etc but how can I get my servlets to write runtime errors to that log (ie ORA errors). At the moment my catches just write to System.out.println as I hoped the logs would receive standard err? Any help is very much appreciated. Ben Wrigley -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: jk_nt_service.exe with Tomcat V4.0.3
I don't know if it is compatible or not, but it is not necessary. The Tomcat 4.x installer includes a run as service option during installation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 7:14 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: jk_nt_service.exe with Tomcat V4.0.3 Hi Folks Is jk_nt_service.exe compatible with Tomcat V4.0.3? There is no copy in the V4.0.3 directory structure. There is the copy in the V3.3.1 directory. Is that version specific? Thanks for any help, Charlie. Charles Collin Software Engineer eSolutions ITS BT Ignite Solutions Tel: +44 (01442) 208756 FAX: +44 (01442) 208757 Mobile: +44 (07764) 144289 e-mail: [EMAIL PROTECTED] Address: pp 421, Anzani House, Trinity Avenue, FELIXSTOWE, Suffolk, IP11 4XB, UK. British Telecommunications plc Registered office: 81 Newgate Street London EC1A 7AJ Registered in England no. 180. This electronic message contains information from British Telecommunications plc which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Auto Start Tomcat
CRON is to run jobs at a scheduled time. The init scripts are what starts processes at boot up. Just a word of warning; being a fairly recent Windows-to-Linux convert myself, be prepared to read and reread the docs before you get it working. ;-) -Original Message- From: Wynn Ricks [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 9:19 AM To: Tomcat Users List Subject: RE: Auto Start Tomcat I have heard of it but am new to the Linux world like this is day 5. say that the box looses power for some reason will CRON start TomCat when the server is done restarting without anybody logging into the machine? -Original Message- From: Adrian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 7:02 AM To: Tomcat Users List Subject: Re: Auto Start Tomcat Ever heard of cron ? - Original Message - From: Wynn Ricks [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 7:57 AM Subject: Auto Start Tomcat Can anybody out there please tell me how to AutoStart Tomcat in the background on a RedHat Linux box without having to log in and start the service manually? Thanks for any help in advance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: I really need help.
You might check to make sure IIS is NOT trying to perform authentication. On the properties sheet for the site, allow anonymous access and disable IIS authentication. HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 2:50 PM To: [EMAIL PROTECTED] Subject: I really need help. Hi all, IIS Tomcat4 using FORM-BASED authentication I am using form-based authentication. Tomcat pulls up the login page (defined in form-login-page) and then authenticate fine. However, the same link will show access-denied error if the page is requested through IIS 5.0. Can anyone suggest what could be wrong and what I can check for? All other unsecured jsp are ok. I am quite desperate. Thanks so much. Bao-Ha Dam Bui [EMAIL PROTECTED] S. Jude Medical, Inc 651.765.1018 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: I really need help.
Right under the Anonymous Access section is a Authenticated Access section. You want to deselect all of these. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 3:21 PM To: [EMAIL PROTECTED] Subject: RE: I really need help. How would I disable IIS authentication? I already allowed anonymous access. Thanks. Bao-Ha Dam Bui [EMAIL PROTECTED] S. Jude Medical, Inc 651.765.1018 -Original Message- From: Wagoner, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 1:53 PM To: 'Tomcat Users List' Subject: RE: I really need help. You might check to make sure IIS is NOT trying to perform authentication. On the properties sheet for the site, allow anonymous access and disable IIS authentication. HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 2:50 PM To: [EMAIL PROTECTED] Subject: I really need help. Hi all, IIS Tomcat4 using FORM-BASED authentication I am using form-based authentication. Tomcat pulls up the login page (defined in form-login-page) and then authenticate fine. However, the same link will show access-denied error if the page is requested through IIS 5.0. Can anyone suggest what could be wrong and what I can check for? All other unsecured jsp are ok. I am quite desperate. Thanks so much. Bao-Ha Dam Bui [EMAIL PROTECTED] S. Jude Medical, Inc 651.765.1018 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Details on IIS/Tomcat Question
I couldn't help noticing that the extension_uri in the Registry entry has isapi_redirect.dll instead of isapi_redirectOR.dll. I finally noticed that the instructions say to download the Tomcat 3.3 isapi_redirect.dll! Then why is there a file with a different name in the Tomcat 4.0.3 area, and what's THAT supposed to be for? Anyway, I downloaded isapi_redirect.dll, and substituted it for the other file in the ISAPI Filters config. I get a RED arrow. Why should that be? Your are correct, the registry entry is wrong. Switch back to the 4.0 DLL and change the registry value to isapi_redirector.dll. This may not fix all the problems but at least you should get a green arrow again. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problems in redirecting requests from IIS to Tomcat 4
If I recall... Go to the Properties page of the web server and select the Directory Security tab. Click the Edit button for Anonymous Access and Authentication Control. Select Anonymous Access and un-select everything under Authenticated Access. HTH -Original Message- From: Luca Ventura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 8:38 AM To: tomcat-dev; tomcat-user Subject: Problems in redirecting requests from IIS to Tomcat 4 Hello everybody! I have installed Internet Information Services (IIS) as Web Server and Apache Tomcat 4.0 as plug-in of IIS to support JSP-Servlets (to do this I installed an ISAPI filter in IIS that redirects all my JSP-servlet requests to Tomcat). All works fine when I am on localhost but if I use another domain for my Web Server (e.g: www.mydomain.com) I have the following problem: when I try to connect to a site that must be redirected to Tomcat 4 (because it contains JSP pages or servlets), IIS ask me a login or a password to access to it. For example: i try to connect to the url http://www.mydomain.com/mysite; and mysite is a web application defined in webapps folder of tomcat (the document folder is in webapps\mysite\web-inf). What can I do to avoid IIS asks me a password or a login? I want that all users that connects to my site are redirected to Tomcat without asking any login and password I think the problem it isn't in Tomcat's configuration but in IIS's configurationbut I can be wrong. I hope someone can help me...thanks i advance! Luca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: access to HttpHeader
request.getHeader() response.setHeader() -Original Message- From: Ekkehard Gentz [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 9:01 AM To: Tomcat Users List Subject: access to HttpHeader hi, is there a way to have access to the HttpHeader from Tomcat ? I want to set cache-controls and expires thanks ekkehard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Access-Control for Tomcat-Webserver (Version 4.0.1)
Since you are using WARP exclusively, you can remove the Tomcat-Standalone service from your server.xml file. After you restart Tomcat, it will no longer be listening for HTTP requests. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:01 PM To: '[EMAIL PROTECTED]' Subject: Access-Control for Tomcat-Webserver (Version 4.0.1) Hi List, we have built up a closed Intranet for our employees with an TOmcat (4.0.1), Apache and WARP-Connector - Configuration and Apache access-control, using the LOCATION - directive from Apache. Our Intranet - Content is served by a Tomcat-servlet. The only problem we have, is that you can still reach the content of the CMS-servlet under port 8080 from outside our business unit, because this port is the standard-tomcat HTTP-Server and the apache-access-control doesnt work in this case. Within the closed intranet we need this tomcat-http-server for testing, so I need an access-control feature like the Location-directive in apache, closing the port 8080 is not a solution so far. Does anybody know what to to? Thanks for Your help! Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company Postfach 1661 85705 UNTERSCHLEISSHEIM Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Access-Control for Tomcat-Webserver (Version 4.0.1)
Sorry, I guess I should have read your question more closely. :o/ If you are on Linux you can block the request using IPTables when the source is outside your intranet. Otherwise, you may have to write a filter that examines the server port and requesting IP address. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:38 PM To: 'Tomcat Users List' Subject: AW: Access-Control for Tomcat-Webserver (Version 4.0.1) Hi Mark, I cannot remove the standalone-service, because I need it for testing. Due to a bug I am not able to see changes out of my CMS-Servlet via WARP-Connector and Apache immediately. I just can see it under Port 8080 / Tomcat-Standalone-Server until I restart Tomcat in the night. We will work on this bug and in the meantime we need another access-control-solution. Thanks for reply. Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company Postfach 1661 85705 UNTERSCHLEISSHEIM Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -Ursprüngliche Nachricht- Von: Wagoner, Mark [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 6. Juni 2002 18:13 An: 'Tomcat Users List' Betreff: RE: Access-Control for Tomcat-Webserver (Version 4.0.1) Since you are using WARP exclusively, you can remove the Tomcat-Standalone service from your server.xml file. After you restart Tomcat, it will no longer be listening for HTTP requests. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:01 PM To: '[EMAIL PROTECTED]' Subject: Access-Control for Tomcat-Webserver (Version 4.0.1) Hi List, we have built up a closed Intranet for our employees with an TOmcat (4.0.1), Apache and WARP-Connector - Configuration and Apache access-control, using the LOCATION - directive from Apache. Our Intranet - Content is served by a Tomcat-servlet. The only problem we have, is that you can still reach the content of the CMS-servlet under port 8080 from outside our business unit, because this port is the standard-tomcat HTTP-Server and the apache-access-control doesnt work in this case. Within the closed intranet we need this tomcat-http-server for testing, so I need an access-control feature like the Location-directive in apache, closing the port 8080 is not a solution so far. Does anybody know what to to? Thanks for Your help! Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company Postfach 1661 85705 UNTERSCHLEISSHEIM Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Access-Control for Tomcat-Webserver (Version 4.0.1)
Here are a couple: http://netfilter.samba.org/documentation/ http://www.linuxguruz.org/iptables/howto/iptables-HOWTO.html Note that IPTables is for kernel version 2.4.x, 2.2.x used IPChains (you can find documentation on IPChains at these sites also). HTH -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 1:43 PM To: 'Tomcat Users List' Subject: AW: Access-Control for Tomcat-Webserver (Version 4.0.1) Can You give me an hint how to configure the IPTables or where to read about this? Thanks. Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company LFK-Lenkflugkoerpersysteme GmbH Postfach 1661 85705 UNTERSCHLEISSHEIM Telefon: +49 89 3179-8460 Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -Ursprüngliche Nachricht- Von: Wagoner, Mark [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 6. Juni 2002 19:17 An: 'Tomcat Users List' Betreff: RE: Access-Control for Tomcat-Webserver (Version 4.0.1) Sorry, I guess I should have read your question more closely. :o/ If you are on Linux you can block the request using IPTables when the source is outside your intranet. Otherwise, you may have to write a filter that examines the server port and requesting IP address. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:38 PM To: 'Tomcat Users List' Subject: AW: Access-Control for Tomcat-Webserver (Version 4.0.1) Hi Mark, I cannot remove the standalone-service, because I need it for testing. Due to a bug I am not able to see changes out of my CMS-Servlet via WARP-Connector and Apache immediately. I just can see it under Port 8080 / Tomcat-Standalone-Server until I restart Tomcat in the night. We will work on this bug and in the meantime we need another access-control-solution. Thanks for reply. Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company Postfach 1661 85705 UNTERSCHLEISSHEIM Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -Ursprüngliche Nachricht- Von:Wagoner, Mark [SMTP:[EMAIL PROTECTED]] Gesendet am:Donnerstag, 6. Juni 2002 18:13 An: 'Tomcat Users List' Betreff:RE: Access-Control for Tomcat-Webserver (Version 4.0.1) Since you are using WARP exclusively, you can remove the Tomcat-Standalone service from your server.xml file. After you restart Tomcat, it will no longer be listening for HTTP requests. -Original Message- From: Bührle, Martin, FCI1 [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:01 PM To: '[EMAIL PROTECTED]' Subject: Access-Control for Tomcat-Webserver (Version 4.0.1) Hi List, we have built up a closed Intranet for our employees with an TOmcat (4.0.1), Apache and WARP-Connector - Configuration and Apache access-control, using the LOCATION - directive from Apache. Our Intranet - Content is served by a Tomcat-servlet. The only problem we have, is that you can still reach the content of the CMS-servlet under port 8080 from outside our business unit, because this port is the standard-tomcat HTTP-Server and the apache-access-control doesnt work in this case. Within the closed intranet we need this tomcat-http-server for testing, so I need an access-control feature like the Location-directive in apache, closing the port 8080 is not a solution so far. Does anybody know what to to? Thanks for Your help! Gruesse Martin Buehrle _ Martin Buehrle, FCI1 EADS - European Aeronautic Defence and Space Company Postfach 1661 85705 UNTERSCHLEISSHEIM Telefax: +49 89 3179-8927 eMail: [EMAIL PROTECTED] _ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4 install / config
There are documents on the Apache website: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html Although if you are new to Tomcat I would suggest you work with it in stand-alone mode for a while. Several people have reported that Tomcat by itself is a fairly robust web server. You can always add Apache later without effecting your app. No sense making things more complicated from the start. -Original Message- From: Eric Etkin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:28 AM To: 'Tomcat Users List' Subject: RE: Tomcat 4 install / config Has anyone implemented tomcat 4 to hang off the back of Apache. Apache is more industrial strength from my experience. I want to run apache, and use Tomcat to process the JSP. Eric Etkin Susquehanna Bancshares Inc. 26 North Cedar Street Lititz, PA 17543 Telephone: (717) 625-6360 Mail Code: PA-SBI (IT/DATASEC) -Original Message- From: Doug Borenstein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:21 AM To: Tomcat Users List Subject: Re: Tomcat 4 install / config I believe it will create a conflict if both servers are running and using the same port. If Tomcat is being run as a standalone server, it will handle static pages and .jsp. If you want to utilize apache for static pages, you will have to use a connector. the web.xml file in Tomcat should have the proper configuration statements commented out. Several lines will also need to be added to apaches httpd.conf file, depending on which connector you are using, and which module in apache(mod_jk or mod_webapp). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [REPOST] Tomcat 3.2.3 running as a service in Win2k
If at all possible, I would move to Tomcat 4. The installation program has a run as service option. That way it is configured for you. -Original Message- From: Evans, Sean [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 3:23 PM To: '[EMAIL PROTECTED]' Subject: [REPOST] Tomcat 3.2.3 running as a service in Win2k To all, I have been attempting to get Tomcat 3.2.3 to run a service in Win2k without any luck. The service installs but will not start and generates no error. The servlet will run standalone on the same machine and seems to be working correctly. This is the first time I have ever worked with Tomcat as the previous version of my application did not use servlets. I have gone over what scant documentation that comes with Tomcat and also what was provided by my application vendor which was also fairly thin many times and re-configured till my eyes hurt. What is the trick with this? Help Thanks in advance Sean Evans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Unsatisfied link error with Oracle OCI on Solaris
Did you verify your ORACLE_HOME environment variable? If this is not set, the Oracle client cannot find the necessary files. -Original Message- From: Mark Schmeets [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: Unsatisfied link error with Oracle OCI on Solaris I have been having a problem using the Oracle OCI driver with Tomcat 4.x. This all seemed to work fine on 3.2.X When I switched I received an unsatisfied link error no ocijdbc9. On NT I am able to overcome this by moving the classes12.jar into WEB-INF/lib along with the ocijdbc9.dll. That works. When I move the thing to Solaris and substitute the libocijdbc9.so for the dll, it fails. I have been unable to come up with anything that works for Solaris. Any suggestions? Mark __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: IIS and Tomcat: I am stuck with this for last two days : Can somebody help
The default registry entries have a typo. Check the value for: HKEY_LOCALMACHINE\Software\Apache Software Foundation\Jakarta Isapi Redirector\1.0\extension_uri The default value is isapi_redirect.dll, but the DLL name is isapi_redirector.dll. Also check the name of your worker.properties file. The documentation uses workers.properties and worker.properties interchangeably. Pick one or the other and make sure everything is configured to use this name. -Original Message- From: Sankaranarayanan (Ganesh) Ganapathy [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: IIS and Tomcat: I am stuck with this for last two days : Can somebody help Hi All, I am using win2k professional, IIS 5.0 and Tomcat4.0.3 I want to configure IIS and tomcat. I followed the instructions and setup the ISAPI filer on IIS. I see a green arrow against the ISAPI filter. When I send in a request I see the following entry made in the IIS log: 07:30:30 127.0.0.1 GET /jakarta/isapi_redirect.dll 500. i dont see any entries in my redirector log though I have increased the log level to info Subsequently the tomcat ISAPI redirector is not forwarding the request to my tomcat worker (I am monitoring for any activity on the port on which tomcat ajp connector is listening). The trouble shooting section in doc says http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-iis-howto.html If the number following GET /... is 500, check the following: Make sure the virtual directory created was called jakarta. Make sure that the extension_uri setting is correct. Check the workers.properties file and make sure the port setting for workers used is the same as the port specified in the server.xml for the ajp13 or ajp12 connectors, normally this ports are 8007 for ajp12 and 8009 for ajp13. I check all three and all of them are fine, infact apache works my tomcat ajp connector using the same workers.properties file. Has anybody got this configuration to work? Any pointers to what I should do further will be greatly appreciated. Thanx Ganesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbie Alert! - including a a JavaScript src file in a servlet
Your browser cannot view files under the WEB-INF directory. Create one under ROOT (e.g., scripts) and point the source attribute at that (src=/scripts/code_lib.js). Just make sure you put your file there, too. ;0) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 1:13 PM To: [EMAIL PROTECTED] Subject: Newbie Alert! - including a a JavaScript src file in a servlet Hopefully this is the correct forum to post a question such as this: I have a servlet in which I would like to write out some script tags to indlude a JavaScript src file in the outputted HTML. My application is in /ROOT/WEB-INF/class/code_lib, the .js file (code_lib.js) I would like to include is within this directory as well, and I am trying to include it this way: out.println(script language=\JavaScript\ src=\code_lib.js\); out.println(/script); So, in the resulting html we have htmlheadscript langauge = JavaScript src=code_lib.js/script/head... When I run the servlet the generated page cannot find the .js file. Where should I put files I want to include in the outputted html (such as .js and .css files)? Can this even be done? Dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Yet Another IIS/Tomcat Problem
I found the problem and it appears to be a bug, or at least a default configuration/documentation problem. I followed the AJP Connector documentation (at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html) to have Tomcat create the iis_redirect.reg file but it seems the entry created for extension_uri does not match the actual name of the dll (downloaded from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/win32 /). The name added to the registry is isapi_redirect.dll but the name of the file is isapi_redirector.dll. There also seems to be confusion about the worker.properties file. The AJP Connector documentation refers to the file as worker.properties but the entry created for worker_file in iis_redirect.reg is workers.properties. The Tomcat IIS How-To (at http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-iis-howto.html, outdated but there doesn't appear to be one for 4.0) refers to this file as workers.properties. I realize (now) that the name of the file does not matter as long as the registry entry is correct, but this confusion certainly does not help. Finally, and one I have yet to figure out, there is also conflicting information about the names of a couple of entries within the worker(s).properties file. In the Tomcat Worker How-To (at http://jakarta.apache.org/tomcat/tomcat-3.3-doc/Tomcat-Workers-HowTo.html, again outdated but the only one I could find) it refers to workers.tomcat_home and workers.java_home. But the AJP Connector documentation calls these worker.tomcat_home and worker.java_home. As I said, I have yet to figure out which of these is correct as it doesn't seem to matter what I use. It seems to work either way. As far as I can tell they are both wrong or the entries are ignored entirely. This has certainly been a learning experience. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 4:53 PM To: [EMAIL PROTECTED] Subject: RE: Yet Another IIS/Tomcat Problem i had this same problem and also posted to this list with no replies. i followed the tomcat docs to the letter to no avail. someone posted the following url regarding setting up tomcat as a service on NT i followed this ( except or the service part ) including the iis_redirect.dll download and now everything works just fine. http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/#4 -Original Message- From: Wagoner, Mark [mailto:[EMAIL PROTECTED]] Sent: May 14, 2002 15:39 To: Tomcat User List (E-mail) Subject: Yet Another IIS/Tomcat Problem I have Tomcat 4.0.3/isapi_redirect.dll mostly working on a Win2k server but get the following in the log file: [...] [jk_isapi_plugin.c (439)]: HttpFilterProc [/home] is a servlet url - should redirect to ajp13 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/home] is points to the web-inf directory then I get a 500 error in the browser. Nothing appears in the Tomcat access logs, so it appears the request is never handed off. The page works fine if I go directly to Tomcat on port 8080 (using the HTTP 1.1 connector). Searching the archives I found this problem has been reported before and changing localhost to the IP address fixed it. However, I made this change in my worker.properties file but it did not help. Is this where the change should be made or is there something else? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Yet Another IIS/Tomcat Problem
I have Tomcat 4.0.3/isapi_redirect.dll mostly working on a Win2k server but get the following in the log file: [...] [jk_isapi_plugin.c (439)]: HttpFilterProc [/home] is a servlet url - should redirect to ajp13 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/home] is points to the web-inf directory then I get a 500 error in the browser. Nothing appears in the Tomcat access logs, so it appears the request is never handed off. The page works fine if I go directly to Tomcat on port 8080 (using the HTTP 1.1 connector). Searching the archives I found this problem has been reported before and changing localhost to the IP address fixed it. However, I made this change in my worker.properties file but it did not help. Is this where the change should be made or is there something else? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat on Win98
I doubt Win98 can handle it. I know NT workstation places a limit on 10 simultaneous network connections (this is one of the differences between workstation and server). My guess is 98 is the same if not less. -Original Message- From: Marc Chamberlin [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: Tomcat on Win98 Hi, I am running the Tomcat 4.0 server under Win98 and so far I have used it under a light load condition, i.e. only a few users access it at any one time. But, I have recently set up a set of JSP questionaires coupled to a data base, and I am about to be hit by an onslaught of 60 to 100 users hitting my server simultaniously So, my question is, is there anything I need to do to prepare for this heavier usage? Do I need to, for example, increase or control memory allocation for Tomcat? And if so, how? (It use to be that Tomcat was started via a .bat file and I knew how to manage memory for them, but now the distribution supples a different shortcut which directly invokes the Tomcat server via calling java.exe on and a bootstrap.jar file so now I am not sure how) I did find a Startup.bat and a Shutdown.bat file in the bin directory of the distribution, and wonder if I should use these instead of the supplied shortcuts... For these, I could set the memory properties directly, if the Auto settings didn't work properly... Sorry if this is a dumb question (I am not a Windows expert) or has been already asked/answered, and yes I have already tried to RTFMs but am still confused ;-) 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Log the amount of time taken to complete a request...
If you are using the default server.xml file, the entries are being written using the common pattern. This is defined as: %h %l %u %t %r %s %b where %b is the number of bytes sent in the reponse, excluding headers. According to the docs, there is no pattern attribute to record the total time required to process the request. -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 12:32 PM To: Tomcat Users List Subject: Re: Log the amount of time taken to complete a request... Hmm I think it's response time. Here is more access log entries. 127.0.0.1 - - [03/May/2002:12:30:09 -0500] GET /people.jsp HTTP/1.0 200 20106 127.0.0.1 - - [03/May/2002:12:30:44 -0500] GET /people.jsp HTTP/1.0 200 7168 127.0.0.1 - - [03/May/2002:12:30:44 -0500] GET /people.jsp HTTP/1.0 200 7168 127.0.0.1 - - [03/May/2002:12:30:47 -0500] GET /people.jsp HTTP/1.0 200 7168 127.0.0.1 - - [03/May/2002:12:30:47 -0500] GET /people.jsp HTTP/1.0 200 7168 127.0.0.1 - - [03/May/2002:12:30:47 -0500] GET /people.jsp HTTP/1.1 200 20129 127.0.0.1 - - [03/May/2002:12:30:47 -0500] GET /people.jsp HTTP/1.0 200 20106 127.0.0.1 - - [03/May/2002:12:30:55 -0500] GET /people.jsp HTTP/1.0 200 20106 127.0.0.1 - - [03/May/2002:12:31:02 -0500] GET /people.jsp HTTP/1.0 200 8192 127.0.0.1 - - [03/May/2002:12:31:02 -0500] GET /people.jsp HTTP/1.1 200 20129 127.0.0.1 - - [03/May/2002:12:31:06 -0500] GET /people.jsp HTTP/1.0 200 20106 peter Christopher Moon wrote: I think that is the size in bytes of the request. If I am wrong that would be excellent! Thanks Chris -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 10:59 AM To: Tomcat Users List Subject: Re: Log the amount of time taken to complete a request... I thought it already does in the access log. 127.0.0.1 - - [11/Apr/2002:14:21:44 -0500] GET /test.jsp?A=meB=thisC=test HTTP/1.0 200 17317 Isn't the number after 200 the response in milliseconds? peter Christopher Moon wrote: Good Morning, Is it possible for Tomcat to log the amount of taken to complete a request. With Apache you can use %T in your custom log directive. Is there anything similar in Tomcat? Thanks Chris -- 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] -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Log the amount of time taken to complete a request...
On the Tomcat site: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/valve.html -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: RE: Log the amount of time taken to complete a request... Where might a guy find the meanings of those values and any others that are available? I am guessing... h = host l = Hmm, no clue here. u = user t = time request was made r = request s = response (200=ok, 404=not found, etc) b = size in bytes Larry [EMAIL PROTECTED] 05/03/02 10:44AM If you are using the default server.xml file, the entries are being written using the common pattern. This is defined as: %h %l %u %t %r %s %b where %b is the number of bytes sent in the reponse, excluding headers. According to the docs, there is no pattern attribute to record the total time required to process the request. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: A bit off topic
You can't do it directly, but using a loop and JavaScript's literal initializer you can create the JS code to do it. (Note: this is not the most efficient way to do it, you should use a StringBuffer to build the variable.) String jsVar = [ + array[0]; for (int i = 1; i array.length; i++) jsVar = jsVar + , + array[i]; out.println(var jsArray = + jsVar + ];; There is nothing special to do on the client side. Just make sure the line is output within the HEAD section of the page and your array (called jsArray) will be declared and populated when the page is loaded in the browser. -Original Message- From: Richard Johnstone [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: A bit off topic I know this is a bit off topic but I can't seem to get an answer from anywhere. Has anyone been able to load a Java array from a servlet into a javascript array within the HTML page generated by the servlet? Is it possible? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How select a printer to print
This is more a general Java question than a Tomcat question. Perhaps you should do a search for enumerating printers through JNI. -Original Message- From: Jack Li [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 10:47 AM To: 'Tomcat Users List' Subject: RE: How select a printer to print I might not describe my problem well. My users need to select a printer on the web server. I need to write a jsp page to list all the printers on the server and let them to choose one. How can I do it? Jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 4:30 PM To: Tomcat Users List Subject: Re: How select a printer to print First if the users use the browser to view webpages spewed out by Tomcat, then they will only see the printers installed on their machines. If you have a java app, you could probably use JNDI to expose the printers (I think...I've never done that though). But as I said, web users will only see printers local to them. RS Jack Li [EMAIL PROTECTED] on 04/23/2002 01:30:34 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To:'[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject:How select a printer to print Hello, My users need to select a printer from a list of printers installed on web server. How to get the list of printers and select a printer to print the report? I have JDK1.3 and Tomcat 4 Thanks, Jack Li -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Want to grab SQL stmt from executing servlet
If the database is Oracle there is a system table called V$SQLAREA that holds this information. -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 10:17 AM To: [EMAIL PROTECTED] Subject: Want to grab SQL stmt from executing servlet Hello, I have the need to parse out a query from a running .jar file. The .jar is a servlet that does some queries to a local DB. I want to grab the querystring that is being sent to the DB somehow when I am running the servlet. Is there anyway to achieve this goal?? -- 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: Configuration information
You can put these as init-param entries in web.xml. If I have a large number of them and/or the administrator may need to edit them, I put them in a properties file and create an init-param entry that points to this file. I trust someone editing the properties file more than the deployment descriptor. :-) -Original Message- From: Danilo Luiz Rheinheimer [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: Configuration information Hi, I am posting again this question from another beginner Tomcat user. I see no answers to it and how I have the exactly same problem here is it : I'm new to tomcat and was just wondering where other developers put configuration key value pairs in there tomcat apps. For example, if I wanted to read in a version number and display it on one of my pages. Or if my app connects to multiple databases. Where could I put the connection information? Can you put that kind of stuff in the web.xml file? Are there built in conveniences to do this? Danilo Luiz Rheinheimer Florianopolis/SC Brasil Sony Clié 615C mailto:[EMAIL PROTECTED] -- 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: Configuration information
Typically, my servlets read these values and pass them to the various beans when they use them. This is usually passed to the constructor but it depends on the situation. -Original Message- From: Danilo Luiz Rheinheimer [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 10:57 AM To: Tomcat Users List Subject: RE: Configuration information At 10:37 12/4/2002 -0400, you wrote: You can put these as init-param entries in web.xml. If I have a large number of them and/or the administrator may need to edit them, I put them in a properties file and create an init-param entry that points to this file. I trust someone editing the properties file more than the deployment descriptor. :-) And how do you access it on the beans code ? Danilo Luiz Rheinheimer Florianopolis/SC Brasil Sony Clié 615C mailto:[EMAIL PROTECTED] -- 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: Restricting access by machine
Can you use request.getRemoteAddr() and use the machine's IP address? -Original Message- From: Iain Darroch [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 11:22 AM To: Tomcat Users List Subject: RE: Restricting access by machine I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- 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: Includes disappearing
Do you have flush=true? I have to include this attribute in the code while I am developing it in Forte (since it is still using the old JSP spec) but found if I don't remove it in production (since Tomcat 4 uses the new spec), I will occasionally have the same problem. -Original Message- From: Marcelo Mathias Lima [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 1:37 PM To: Tomcat Users List Subject: Re: Includes desappearing It is not a (my) program error... there is nothing different on the log... It only occurs on Mozilla and in some pages. Only some parts of the jsp are returned... I think it is a poltergeist problem... {:o) [EMAIL PROTECTED] wrote: You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- 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] -- 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: Working Directory
I place my properties files in the WEB-INF directory and do the following to find them - String webInfFolder = getServletContext().getRealPath(/WEB-INF) -Original Message- From: Sanjay Bahal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 11:34 AM To: tomcat Subject: Working Directory I am trying to read a properties file from my servlet. It always comes back saying file not found. I have tried placing the file in classes/web-inf/context-path. Ideally I would like to lace it in my classes directory- How do I achieve it. Thanks Sanjay __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.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]
RE: Newbie installation question
Actually, the default on Linux is 8180 for some reason. You should still check your server.xml file to make sure that is what it is set to, however. -Original Message- From: Lawrence, Gareth [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 3:46 PM To: 'Tomcat Users List' Subject: RE: Newbie installation question Zoe, The default port is 8080 :-) Check out localhost:8080 and let us know if your still getting a problem. G. -Original Message- From: Zoe Adams [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 March 2002 8:39 a.m. To: [EMAIL PROTECTED] Subject: Newbie installation question Hi, This is a very newbie question I'm afraid. I have attempted to install a standalone Tomcat 4 as an RPM under RedHat Linux 7.1 but just can't get it to work. These are the steps I've followed: - Installed jdk-1.3.1_02.i386.rpm - Installed regexp-1.2-1.noarch.rpm - Installed servletapi4-4.0.2-3.noarch.rpm - Installed xerces-j-1.4.4-2.noarch.rpm - Installed tomcat4-4.0.2-3.noarch.rpm - Set JAVA_HOME=/usr/java/jdk1.3.1_02 in /etc/tomcat4/conftomcat4.conf - Set CATALINA_HOME=/var/tomcat4 in /etc/profile I then go into /etc/init.d and type tomcat4 start and I see the following: Using CATALINA_BASE: /var/tomcat4 Using CATALINA_HOME: /var/tomcat4 Using CATALINA_TMPDIR: /var/tomcat4/temp Using JAVA_HOME: /usr/java/jdk1.3.1_02 But if I try to browse to http://localhost:8180 http://localhost:8180/ I get the message could not connect to host localhost (port 8180). Where am I going wrong? I have read the documentation but am still none the wiser. I've installed Tomcat4 under Windows and it all went without a hitch, but Linux has me stumped. If anyone can offer any suggestions or point me to some good online help, then I'd be very grateful. Thanks, Zoe Adams * http://www.snapherup.com http://www.snapherup.com/ Tell us exactly who you're looking for and we'll tell you exactly who matches -- 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: Newbie installation question
If you do a ps -aux, does it show a Java process running? -Original Message- From: Zoe Adams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 3:50 PM To: 'Tomcat Users List' Subject: RE: Newbie installation question Tried localhost:8080, but still get the same message. In /var/tomcat4/conf/server.xml it has port 8180 as an attribute in the connector tag. Port 8080 isn't mentioned anywhere. -Original Message- From: Lawrence, Gareth [mailto:[EMAIL PROTECTED]] Sent: 27 March 2002 20:46 To: 'Tomcat Users List' Subject: RE: Newbie installation question Zoe, The default port is 8080 :-) Check out localhost:8080 and let us know if your still getting a problem. G. -Original Message- From: Zoe Adams [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 March 2002 8:39 a.m. To: [EMAIL PROTECTED] Subject: Newbie installation question Hi, This is a very newbie question I'm afraid. I have attempted to install a standalone Tomcat 4 as an RPM under RedHat Linux 7.1 but just can't get it to work. These are the steps I've followed: - Installed jdk-1.3.1_02.i386.rpm - Installed regexp-1.2-1.noarch.rpm - Installed servletapi4-4.0.2-3.noarch.rpm - Installed xerces-j-1.4.4-2.noarch.rpm - Installed tomcat4-4.0.2-3.noarch.rpm - Set JAVA_HOME=/usr/java/jdk1.3.1_02 in /etc/tomcat4/conftomcat4.conf - Set CATALINA_HOME=/var/tomcat4 in /etc/profile I then go into /etc/init.d and type tomcat4 start and I see the following: Using CATALINA_BASE: /var/tomcat4 Using CATALINA_HOME: /var/tomcat4 Using CATALINA_TMPDIR: /var/tomcat4/temp Using JAVA_HOME: /usr/java/jdk1.3.1_02 But if I try to browse to http://localhost:8180 http://localhost:8180/ I get the message could not connect to host localhost (port 8180). Where am I going wrong? I have read the documentation but am still none the wiser. I've installed Tomcat4 under Windows and it all went without a hitch, but Linux has me stumped. If anyone can offer any suggestions or point me to some good online help, then I'd be very grateful. Thanks, Zoe Adams * http://www.snapherup.com http://www.snapherup.com/ Tell us exactly who you're looking for and we'll tell you exactly who matches -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: AW: Multiple users share java bean?
Are you sure you really want independent instances of the bean, or just the ability to keep the variable values separate by user? If it is the latter, then just use local variables in your bean methods. -Original Message- From: Chenming Zhao [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 2:06 PM To: Tomcat Users List Subject: Re: AW: Multiple users share java bean? What's the meaning of JMS? I'm not sure my problem is just what you said. I want to get independent instance or the same bean for each user. So they can work independently, and won't influence with each other. Thanks. - Original Message - From: peter lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 1:32 PM Subject: Re: AW: Multiple users share java bean? One common technique to solve this is to use JMS. All beans that are instances of the same user listen to the same topic. when one instance of the user's bean is updated, the other instances are notified. Each bean then goes to the database to refresh itself. peter lin Chenming Zhao wrote: In fact, it's a good and difficult topic. Now I haven't still understood it completely. I have a question about my application. I describe the work what I need to finish. First the jsp file gets a user name, then pass it to java bean. And the bean get some values from the database accoding to the user name, then get a result and save it to database. The idea of synchronized objects cannot work. I want to acitvate independent instance of java bean for any user. How can I do? Is there any good book or material? Or maybe you can show me some simple example? Thanks. -- 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] -- 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: AW: Multiple users share java bean?
Are your sure loginname is getting set properly? Try including the value in your JSP output (right before the call to mb.test()) just to make sure. -Original Message- From: Chenming Zhao [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 3:05 PM To: Tomcat Users List Subject: Re: AW: Multiple users share java bean? - Original Message - From: Wagoner, Mark [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 2:12 PM Subject: RE: AW: Multiple users share java bean? Are you sure you really want independent instances of the bean, or just the ability to keep the variable values separate by user? If it is the latter, then just use local variables in your bean methods. It seems that couldn't work. The value of such variables can be updated by another user's when there are two or more users calling the same java bean almost at the same time. Here is my main work. First jsp write uname (when a user login the website, there is a user name uname) to the bean and activate it, and get the result or save it to the database. Jsp file: jsp:useBean id=mb class=mybean.test scope=page / ???How about the scope value? session or request or page? jsp:setProperty name=mb property=uname value=%=loginname) %/ pThe result is: %= mb.test() %/p Bean code: public class test { String uname= ; public synchronized int test() { int real=0; int eventCounter=0; int numEvents; // connect to the database and get the numEvents according to the uname. .; while(eventCounter=numEvents) { real=eventCounter; // wait for 0.01 second try{wait(10);} catch(InterruptedException e){}; eventCounter++; } return real; } public synchronized void setUname(String sec) { uname= sec; } } For user1, numEvents=100; and user2, it's 120. So I want to run them at the same time, and hope to get resuls 100 and 120 respectively. But in fact I got both 100 or 120. Have any idea? If my description is not clear, tell me please. -Original Message- From: Chenming Zhao [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 2:06 PM To: Tomcat Users List Subject: Re: AW: Multiple users share java bean? What's the meaning of JMS? I'm not sure my problem is just what you said. I want to get independent instance or the same bean for each user. So they can work independently, and won't influence with each other. Thanks. - Original Message - From: peter lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 1:32 PM Subject: Re: AW: Multiple users share java bean? One common technique to solve this is to use JMS. All beans that are instances of the same user listen to the same topic. when one instance of the user's bean is updated, the other instances are notified. Each bean then goes to the database to refresh itself. peter lin Chenming Zhao wrote: In fact, it's a good and difficult topic. Now I haven't still understood it completely. I have a question about my application. I describe the work what I need to finish. First the jsp file gets a user name, then pass it to java bean. And the bean get some values from the database accoding to the user name, then get a result and save it to database. The idea of synchronized objects cannot work. I want to acitvate independent instance of java bean for any user. How can I do? Is there any good book or material? Or maybe you can show me some simple example? Thanks. -- 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] -- 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] -- 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: Urgent Re: Newbie: Servlet under Windows does not run
Did you add a Census context to your server.xml file? -Original Message- From: Jim Cobban [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 9:51 AM To: Tomcat Users List Subject: Urgent Re: Newbie: Servlet under Windows does not run I am really desperate. I need to be able to demonstrate this servlet by Tuesday evening and Tomcat still refuses to run it. Essentially all that I have done is copy the examples from a book and change the names to protect the innocent. The first few lines of the .java file are: package Census; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class CensusQuery extends HttpServlet { I then compile this class and create the .war file with the following .bat file: set PATH=C:\jdk1.3.1\bin;%PATH% set CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH% javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more jar cf Census.war *.html WEB-INF When the .war file is deployed by Tomcat the class file is located at: D:\jakarta-tomcat-4.0.3\webapps\Census\WEB-INF\classes\Census\CensusQuery.cl ass All of this looks completely according to the documentation I have read. What am I doing wrong so that Tomcat cannot find the class? -- 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: Urgent Re: Newbie: Servlet under Windows does not run
What URL are you using to get to the servlet? -Original Message- From: Jim Cobban [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 12:47 PM To: Tomcat Users List Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run - Original Message - From: Wagoner, Mark [EMAIL PROTECTED] Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run Did you add a Census context to your server.xml file? No. I looked at the way the examples used that file, and it seemed that it was used only to override the default behavior. For example they change where logs go in that context. -- 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: Urgent Re: Newbie: Servlet under Windows does not run
Are you absolutely sure the problem is with CensusQuery and not a referenced class? It could be that Tomcat can't find another class that is referenced by CensusQuery, so it cannot load CensusQuery Try stripping (or commenting) out all of the code except for a println call. This will show you if the servlet is actually being located or not. -Original Message- From: Jim Cobban [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 1:34 PM To: Tomcat Users List Subject: Re: Urgent Re: Newbie: Servlet under Windows does not run - Original Message - From: Wagoner, Mark [EMAIL PROTECTED] Subject: RE: Urgent Re: Newbie: Servlet under Windows does not run What URL are you using to get to the servlet? I have tried a very wide range of URLs. According to all of the documentation the one that should work is http://localhost/servlet/Census.CensusQuery That is using the class name. However when that failed I also tried /servlet/Census/CensusQuery, and /servlet/CensusQuery. Since in my web.xml file, which I posted earlier, the name of the servlet, as opposed to the class, was Census1901 I also tried /servlet/Census1901. I have also tried using URL mapping specified in the WEB-INF/web.xml file. In any event the bottom lime is that when I request the above URL TomCat does go looking for my class. It just can't seem to find it! I know that I must be doing something wrong, because nobody else seems to be having any difficulty running servlets, but this is driving me crazy. I have been trying everything I can think of for more than a week and TomCat keeps claiming that it can't find the class. I have read the documentation over and over again. I have gone with a fine tooth comb through the examples trying to see what they are doing that is different from what I am doing. I just don't understand why this is so bloody difficulty. Just to put every bit of the documentation of this problem in one place: The first few lines of my servlet are: package Census; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class CensusQuery extends HttpServlet { which I compile using the following .bat file: set PATH=C:\jdk1.3.1\bin;%PATH% set CP=D:\jakarta-tomcat-3.3a\lib\common\servlet.jar;WEB-INF\classes;%CLASSPATH% javac -d WEB-INF/classes -classpath %CP% ConnectionPool.java | more javac -d WEB-INF/classes -classpath %CP% DBResults.java | more javac -d WEB-INF/classes -classpath %CP% DriverUtilities.java | more javac -d WEB-INF/classes -classpath %CP% DatabaseUtilities.java | more javac -d WEB-INF/classes -classpath %CP% ServletUtilities.java | more javac -d WEB-INF/classes -classpath %CP% CensusQuery.java | more jar cf Census.war *.html WEB-INF The .war file this produces contains: D:\MyPrograms\JavaProgs\CensusServletjar -tf Census.war META-INF/ META-INF/MANIFEST.MF CensusQuery.html WEB-INF/ WEB-INF/classes/ WEB-INF/classes/Census/ WEB-INF/classes/Census/ConnectionPool.class WEB-INF/classes/Census/DBResults.class WEB-INF/classes/Census/DriverUtilities.class WEB-INF/classes/Census/DatabaseUtilities.class WEB-INF/classes/Census/ServletUtilities.class WEB-INF/classes/Census/CensusQuery.class WEB-INF/web.xml The web.xml file is: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameMy Web Application/display-name description This is version X.X of an application to perform a wild and wonderful task, based on servlets and JSP pages. It was written by Dave Developer ([EMAIL PROTECTED]), who should be contacted for more information. /description servlet servlet-name Census1901 /servlet-name servlet-class Census.CensusQuery /servlet-class init-param param-nameDbVendor/param-name param-valuemysql/param-value /init-param init-param param-nameUrl/param-name param-valuelocalhost/param-value /init-param init-param param-nameDbName/param-name param-valueCensus/param-value /init-param init-param param-nameUserName/param-name param-valueanonymous/param-value /init-param init-param param-namePassword/param-name param-valuenone/param-value /init-param init-param param-nameInitConnections/param-name param-value10/param-value /init-param init-param param-nameMaxConnections/param-name param-value10/param-value /init-param /servlet !-- servlet-mapping servlet-name Census1901 /servlet-name url-pattern /Census /url-pattern /servlet-mapping -- /web-app and the relevant lines of the log file under TomCat 4.0.3 are: 2002-03-17 14:52:33 StandardHost[localhost]: Installing web
RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem?
Is it possible to change the Create servlet to a simple class that accepts the request as a parameter? Since it does not manipulate the response object, there is no need to pass it. Also, you can then call Create using a regular method invocation, rather than using forward. It may require some work, but you could eliminate the double forward issue. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 8:45 AM 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(Unknown Source) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source) at
RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem?
You don't need to forward back to the original servlet. Each call is done as a stack, so when the JSP returns, control comes back to the Create servlet. When the Create servlet returns, control comes back to the Home servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 9:27 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Yep that's right. Only one forward getting done per request. The main controller servlet (e.g. Home) forwards to another more specific controller servlet (e.g. Create), which then forwards to a JSP. Then later, that servlet forwards back (?? Maybe this isn't wise?) to the main controller servlet. A whole lot of forwarding going on. -Original Message- From: Ryan Daigle [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 13:56 To: 'Tomcat Users List' Subject:RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? My impression of this situation was that at runtime there was only one request forward happening. The Home servlet may have more than one forward call, but at runtime only one gets executed (per request), right? So within each servlet only one forward happens, but a string of servlets has more than one forward total. Is this correct? Ryan Daigle Java Developer Health Decisions, Inc. 1512 E. Franklin St, Suite 200 Chapel Hill, NC 27514 (919) 967-2399 ext: 251 [EMAIL PROTECTED] http://www.healthdec.com -Original Message- From: Wagoner, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 8:58 AM To: 'Tomcat Users List' Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Is it possible to change the Create servlet to a simple class that accepts the request as a parameter? Since it does not manipulate the response object, there is no need to pass it. Also, you can then call Create using a regular method invocation, rather than using forward. It may require some work, but you could eliminate the double forward issue. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 8:45 AM 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
RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem?
Actually, the way forward works came as a surprise to me as well. And I only figured it out after a few days of testing and head-scratching. :) Since the session is held in the request object, changes made to it should be available to the original Home servlet by calling request.getSession after the forward call returns. Obviously I'm not real familiar with what you are trying to do, but there may be a way you can eliminate the last forward back to the home servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Don't think JSP is failing. It's quite a simple JSP and has been looked at exhaustively! Yes, I am setting session attributes in Create servlet, for use by create.jsp. I am only using the session object and the request throughout my application. The only time I ever knew I was using the response object was when I used response.sendRedirect(), but I don't use this anymore. I use the RequestDispatcher. There are no jsp:include or jsp:forward tags being used anywhere, and my servlets do not contribute anything to the response (apart from forwarding it around). Mark - your words of wisdom interest me. I thought that... when I invoke requestDispatcher.forward(), then control never returns (to the line following this invocation). So how do I go about returning to the Home servlet from the Create servlet. Surely I need to forward, because the session has changed? I have a lot to learn here I think, but I feel I'm getting closer to the holy grail - getting rid of this exception! -Original Message- From: Attila Szegedi [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 13:56 To: Tomcat Users List Subject:Re: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? I guess you JSP is failing with an uncaught exception. At that point, Tomcat would try to send a 500 Internal Server Error response code, but it can't since a 200 OK status code has already been sent (that is, the output committed) to the client. -- Attila Szegedi home: http://www.szegedi.org - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2002. március 8. 14:45 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 -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem?
Because the Home servlet holds an object reference to the session, it acts as a pointer to the actual object data. If another servlet obtains a pointer to the same object and modifies the data, the changes will be reflected in the first servlet without having to re-get the reference. However, as a precaution I don't like to hold object references between calls like this. Maybe I'm just anal... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 10:06 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? OK. I never knew the forward call actually returned - ever. I will experiment with this. I'm nearly ready to go away and stop pestering you all, but one more question... Say the Home servlet gets the session object from the request. It later forwards the request to the Create servlet, which essentially modifies the session. Then, when the forward call returns, will the Home servlet's session object be the old one or the updated one? Or will it have to do request.getSession() all over again in order to get latest session. Cheers, Lindsay -Original Message- From: Wagoner, Mark [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 14:52 To: 'Tomcat Users List' Subject:RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Actually, the way forward works came as a surprise to me as well. And I only figured it out after a few days of testing and head-scratching. :) Since the session is held in the request object, changes made to it should be available to the original Home servlet by calling request.getSession after the forward call returns. Obviously I'm not real familiar with what you are trying to do, but there may be a way you can eliminate the last forward back to the home servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: RE: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? Don't think JSP is failing. It's quite a simple JSP and has been looked at exhaustively! Yes, I am setting session attributes in Create servlet, for use by create.jsp. I am only using the session object and the request throughout my application. The only time I ever knew I was using the response object was when I used response.sendRedirect(), but I don't use this anymore. I use the RequestDispatcher. There are no jsp:include or jsp:forward tags being used anywhere, and my servlets do not contribute anything to the response (apart from forwarding it around). Mark - your words of wisdom interest me. I thought that... when I invoke requestDispatcher.forward(), then control never returns (to the line following this invocation). So how do I go about returning to the Home servlet from the Create servlet. Surely I need to forward, because the session has changed? I have a lot to learn here I think, but I feel I'm getting closer to the holy grail - getting rid of this exception! -Original Message- From: Attila Szegedi [mailto:[EMAIL PROTECTED]] Sent: 08 March 2002 13:56 To: Tomcat Users List Subject:Re: How can I resolve this IllegalStateException: Response has a lrea dy been committed problem? I guess you JSP is failing with an uncaught exception. At that point, Tomcat would try to send a 500 Internal Server Error response code, but it can't since a 200 OK status code has already been sent (that is, the output committed) to the client. -- Attila Szegedi home: http://www.szegedi.org - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2002. március 8. 14:45 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
RE: client side object to server side
I have been developing an app that needs to send large amounts (~kilobytes) of structured data between the server and the client. I have been working on a framework to facilitate this by using JavaScript's object notation. Essentially, I have a JavaScript function that converts a JavaScript object or array into it's string representation. This string is then placed in a hidden field and posted to the servlet. The servlet then reads the field and decomposes the string into an object hierarchy composed of strings, floats and Booleans either singularly (addressable by name) or in an array. The client-side is very small. It consists of a single JavaScript function that creates the string. The servlet-side piece requires several class files which I have placed in a package. At this time there is very little (read: no) documentation and it is probably not the most efficient code, but for the most part it works. The only known current limitation is the inability to handle nulls. Please keep in mind that for small amounts of data, this would be overkill. By the time you define the structure of the objects being passed you could have written and debugged the code to add a dozen or so hidden fields and process them in the servlet. But in my case I need to pass an object that contains multiple, variable-length arrays, some containing another object. Trying to do this by adding hidden fields through the DOM was getting ugly, so I came up with this. If you or anyone else is interested I could post both the client and server side code, but I would need to tie up a few loose ends before subjecting myself to a code review. :0) I also need to write up a page or two of documentation (something I need to do anyway), so it may take a day or two. Mark -Original Message- From: Henry [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 2:11 AM To: [EMAIL PROTECTED] Subject: client side object to server side I have defined some client side objects using javascript, these objects' number and value varies during the interaction with users. But when the user submit the form, I want an easy way to send the objects to the server (servlet, say). I am wondering this is doable by having a hidden field which the value is the object (rather than a string or a number)? thanx in advance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: NEED HELP TO DEFINE ENTRY POINT FOR MY APPLICATION
I would use a servlet rather than a JSP, since it will not have a UI. You then point all of your servlet-mappings in the web.xml file to this servlet. -Original Message- From: Gurmeet [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 06, 2002 9:32 AM To: Tomcat Users List Subject: NEED HELP TO DEFINE ENTRY POINT FOR MY APPLICATION Hi, I want to define a entry point for my application. i.e. all requests to my application be recieved by a JSP, which then redirects to the requested resource. How do I do that? Thanks in advance. Gurmeet -Original Message- From: Gustavo Souza [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 06, 2002 7:10 PM To: [EMAIL PROTECTED] Subject: Just a test hello, just a test 1º message to the list thanks -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Getting multiple instances of my servlet, although it doesn't implement SingleThreadModel
I don't think this is exactly true. I have an app using the mediator design pattern, in which there is only one servlet handling all requests (all of my servlet mappings point to the same servlet). It in turn hands the requests off to various classes and/or JSP pages for actual processing. Within this servlet's init method is where I create my connection pool, configure Log4j logging, etc. I have never seen any case of init being called more than once. -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 6:38 AM To: 'Tomcat Users List' Subject: RE: Getting multiple instances of my servlet, although it doesn't implement SingleThreadModel Basically, Tomcat will create a separate instance for each unique URL that the servlet responses to. (Technically, every time you define the servlet in the web.xml there is a separate instance, and another instance is created when you use the ServletInvoker to invoke the servlet by /servlet/className.) Randy -Original Message- From: Scott Shorter [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:34 PM To: 'Tomcat Users List' Subject: Getting multiple instances of my servlet, although it doesn't implement SingleThreadModel All, I have a servlet that loads on startup, per the load-on-startup/ tag in web.xml. It does *not* implement SingleThreadModel. Unfortunately, two instances start up every time Tomcat starts - I can tell because I have a System.out.println call in init(). I need for there to be only one instance. What other settings could be causing multiple instances to happen? Thanks in advance, Scott -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Debugging JSPs and Servlets
Take a look at Log4j http://jakarta.apache.org/log4j/docs/index.html It has been the greatest debugging tool I have found. -Original Message- From: Nitin Vira [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:47 PM To: Tomcat Users List Subject: Debugging JSPs and Servlets Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Thanks, Nitin -- 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: triggering JSP page recompilation
You don't have to touch all the files. Just the JSP that contains the include directive. Tomcat uses the date of the JSP file to determine if it needs to be recompiled. If it does, then it will re-read any included files. -Original Message- From: Guillermo Payet [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:22 PM To: Tomcat Users List Subject: Re: triggering JSP page recompilation If I not mistaken, with %@ include file=...%, the file is included during compilation time. Tomcat will auto-reload the including file only if it has been changed. I guess you could use jsp:include instead. The JSP engine will include this file whenever the including jsp is called. I want to include those files at compilation time... the individual included files are not meant to be stand alone, and will not compile on their own. There's a switch to turn this on/off on GNUJSP, but on Tomcat I'm force to touch all files. Thanks --G -- 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: triggering JSP page recompilation
You really want to use the dynamic directive if the file being included is another JSP file. Otherwise you will get the source of the included JSP in the output, not the output of the included JSP. That came out pretty clear. :-) -Original Message- From: Clay Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:38 PM To: Tomcat Users List Subject: Re: triggering JSP page recompilation use jsp:include then. what you're doing now just statically includes the contents of what you include in the class file when it recompiles. the jsp:include should do this dynamically. -CLay On Fri, 1 Feb 2002, Guillermo Payet wrote: You don't have to touch all the files. Just the JSP that contains the include directive. Tomcat uses the date of the JSP file to determine if it needs to be recompiled. If it does, then it will re-read any included files. Therefore... I have to touch all files, since all JSP files include the file that was modified. As I mentioned before, GNUJSP keeps a record of what files include what, and if told to, recompiles all including files when an included file changes. I wonder if there is a way to make Tomcat act this way. We have 4 people working on a project that has about 50 JSP pages, and they all include header, footer, menu, and other JSP included files. Having one person do a touch *.jsp whenever he tweaks lib/header.jsp is a bit disruptive. --G -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: IllegalStateException in releasePageContext
Do you happen to have include directives with flush=true. If so, take the flush attribute out. This helped me, anyway. -Original Message- From: Robert Winningham [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: IllegalStateException in releasePageContext I have upgraded from Tomcat 3.2.2 to Tomcat 4.0.1, and I am now receiving many errors in my error log (one for each time a user hits a .jsp page.) This is causing my logs to grow VERY quickly. I did not receive these types of errors in 3.2.x. The errors are all in the following format: 2002-01-25 08:07:55 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.getWriter (ResponseFacade.java:159) (pc 11) at org.apache.jasper.runtime.JspWriterImpl.initOut (JspWriterImpl.java:166) (pc 12) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer (JspWriterImpl.java:158) (pc 39) at org.apache.jasper.runtime.JspWriterImpl.flush (JspWriterImpl.java:205) (pc 8) at org.apache.jasper.runtime.PageContextImpl.release (PageContextImpl.java:176) (pc 24) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext (JspFactoryImpl.java:198) (pc 1) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext (JspFactoryImpl.java:193) (pc 32) at org.apache.jsp.eppersonal$jsp._jspService (eppersonal$jsp.java:270) (pc 1207) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:107) (pc 3) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,java x.servlet.ServletResponse) (HttpServlet.java:853) (pc 30) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service (JspServlet.java:199) (pc 33) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:382) (pc 60) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:474) (pc 326) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,java x.servlet.ServletResponse) (HttpServlet.java:853) (pc 30) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:247) (pc 248) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) (pc 98) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:243) (pc 352) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) (pc 87) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) (pc 18) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:943) (pc 6) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:201) (pc 261) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) (pc 87) at org.apache.catalina.valves.CertificatesValve.invoke (CertificatesValve.java:246) (pc 48) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) (pc 55) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) (pc 18) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:943) (pc 6) at org.apache.catalina.core.StandardContext.invoke (StandardContext.java:2344) (pc 26) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:164) (pc 99) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) (pc 87) at org.apache.catalina.valves.ErrorDispatcherValve.invoke (ErrorDispatcherValve.java:170) (pc 3) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) (pc 55) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:170) (pc 3) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) (pc 55) at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:462) (pc 3) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) (pc 55) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) (pc 18) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:943) (pc 6) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:163) (pc 92) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) (pc 87) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) (pc 18) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:943) (pc 6) at org.apache.catalina.connector.http.HttpProcessor.process (HttpProcessor.java:1011) (pc 363) at
RE: Log messages
Log4j will do both of these. You essentially replace your println() calls with log4j calls. -Original Message- From: Brown Bay [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 2:09 PM To: Tomcat Users List Subject: Re: Log messages With respect to logging, I have a program that has System.out.println that are definied in certain places. If I disable logging for that context, they goto catalina.out. Is there a way for me to 1. disable logging into catalina.out or for that matter anywhere at all, so that those System.out's never get written anywhere or just get lost. 2. be able to set a limit on the size of the file, ie. the file should not be more than 50KB, Thanks. Brown. - Original Message - From: Yoav Shapira [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, January 25, 2002 1:06 PM Subject: Re: Log messages Hi, Look at log4j: http://jakarta.apache.org/log4j We've been using it for a while, both for development and production logging, and it's just great. Most of JSR47 (java.util.logging) is based on log4j, and it's also used by several commercial and/or big products like JBoss. Yoav James Adams wrote: Is there a class I can use to write log messages to the Tomcat log files ? Can anyone explain how this is done ? Also I have looked a wee bit at java.util.logging - can this also be used, or is it a better solution ? Thanks for any suggestions. -James Adams -- 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] -- 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: Invoking a process on the server from a servlet
The problem is due to NT (or 2000) not allowing the Tomcat service to interact with the desktop. If you bring up Task Manager, you will probably see your invoked process running, but it can't create window. In fact, the only way you will now be able to get rid of it will be to kill it in Task Manager. I don't know of any way around this. -Original Message- From: Stephen Clarke [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 10:42 AM To: tomcat Subject: Invoking a process on the server from a servlet I have the following code in my servlet, where 'out' is the HttpServletResponse object. Runtime t = Runtime.getRuntime(); try { Process proc = t.exec( c:\\TaskInfo.exe ); out.write( invoked ); } catch ( java.io.IOException ioe ) { out.write( ioe.toString() ); } What I'm getting is invoked in the browser window, but nothing visibly happens on my local machine( ie. server). I was hoping TaskInfo would start up. What I really want to do is open a file in notepad to tell me a visitor has just arrived. Am I barking up the wrong tree altogether. Should I generate an event and listen for it in another app running as a listener in the background, or is there just no way of invoking a process on localhost from a servlet. Thanks. If this is the wrong place to be asking these questions, please let me know. -- cf -- 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: Invoking a process on the server from a servlet
If you want the messages to appear real-time, I think the previous suggestion to send a TCP message to a waiting listener app would be you best bet. This app could just sit there with an open window that scrolls any messages that it receives. -Original Message- From: Stephen Clarke [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 11:08 AM To: Tomcat Users List Subject: Re: Invoking a process on the server from a servlet - Original Message - From: Wagoner, Mark [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, January 22, 2002 3:45 PM Subject: RE: Invoking a process on the server from a servlet The problem is due to NT (or 2000) not allowing the Tomcat service to interact with the desktop. If you bring up Task Manager, you will probably see your invoked process running, but it can't create window. In fact, the only way you will now be able to get rid of it will be to kill it in Task Manager. I don't know of any way around this. OK. Can you tell me for sure that trying to generate an event and 'hear' it in another infinitely looping application won't work? Personally, I've never generated my own events before so I am guessing wildly. Thanks, sc -- 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]
JSP Won't Compile Under Tomcat 4
I am trying to move an app from Tomcat 3.3 to 4.01 and am running into a really strange problem. Everything works fine except for my error page, which won't compile. I get the following: 2002-01-18 09:08:18 ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 18 in the jsp file: /error.jsp Generated servlet error: D:\Tomcat\work\localhost\_\error$jsp.java:64: Class org.apache.jsp.PrintWriter not found. exception.printStackTrace(new PrintWriter(out)); ^ 1 error I just installed Tomcat on the Windows NT box and selected all the options except for the source code. Tomcat 3.3 is on the same box and, as I said, it works fine under that. Is there some classpath setting I have to make? Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: JSP Won't Compile Under Tomcat 4
I'm not importing it because I am not using directly. Tomcat is throwing the error when it is invoking its internal JSP compiler. To be honest, I don't even know which JAR file the org.apache.jsp package is in. -Original Message- From: Justin Rowles [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 9:17 AM To: 'Tomcat Users List' Subject: RE: JSP Won't Compile Under Tomcat 4 An error occurred at line: 18 in the jsp file: /error.jsp Generated servlet error: D:\Tomcat\work\localhost\_\error$jsp.java:64: Class org.apache.jsp.PrintWriter not found. exception.printStackTrace(new PrintWriter(out)); ^ 1 error Is PrintWriter found in the org.apache.jsp package? If not, where is it? Now, have you imported it? Justin. -- You're only jealous cos the little penguins are talking to me. *** For more information on Ordnance Survey products and services, visit our web site at http://www.ordnancesurvey.co.uk *** -- 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: JSP Won't Compile Under Tomcat 4
Well, that helped. Although just importing the package wasn't enough. I had to change the scriptlet in the JSP to specifically say java.io.PrintWriter. Now I am getting an IllegalStateException, but at least one hurdle is over. I still can't understand why none of this was necessary under Tomcat 3. -Original Message- From: Justin Rowles [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 9:32 AM To: 'Tomcat Users List' Subject: RE: JSP Won't Compile Under Tomcat 4 I'm not importing it because I am not using directly. Tomcat is throwing the error when it is invoking its internal JSP compiler. Hmm... interesting. Yes, Tomcat is throwing the error when it tries to compile the .java file that it has genereated. There is, however, a source file called error.jsp from which it has generated the .java file, and this presumably references PrintWriter without importing its class from its package. To be honest, I don't even know which JAR file the org.apache.jsp package is in. But that was my point - PrintWriter is *not* found in the jsp package, it's found in the java.io package so if you want to use PrintWriter you must import java.io.PrintWriter or java.io.*. Hope that helps, Justin. -- You're only jealous cos the little penguins are talking to me. *** For more information on Ordnance Survey products and services, visit our web site at http://www.ordnancesurvey.co.uk *** -- 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: Session Tracking throughout apps
Unfortunately, I think the answer to your question is it depends. You could code the controller servlet to handle all of the requests, in which case you would want to make it as small and fast as possible. Possibly get the session info, request a login if there is no session (if that is a requirement) determine the next servlet and pass on the request. You can also have different servlets for each of your request types (message board, etc.) and, as long as they are all in the same context, they will have access to the same session information. The mappings for these would go in the application's web.xml file rather than the server.xml file. There would be one context entry in server.xml which contains all of the different servlet mappings. If your apps are really totally unrelated other than sharing session info, the multiple servlet mappings may be the most flexible. If there is a good deal of processing that has to be performed with each request regardless of the target servlet (such as getting a JDBC connection) then the single controller is probably better. -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 2:47 PM To: Tomcat Users List Subject: Session Tracking throughout apps Hello list. I'm not sure if this is a tomcat question or a java (servlet) question so try not to get too angry if this is on the wrong board. I am setting up my environment to use a controller servlet that brokers all the requests that come in for the site. About 80% of my site are pages that will be served up this way, through the controller. But the other 20% are seperate applications - message boards, photo uploads, contests with registration. What I am slightly confused about is, should the requests for these apps also go through the controller servlet? And if so I don't know how yet - but I will find out. If not (which is my current level of knowledge) then each one gets its own mapping in server.xml and its own directory structure. If this is the case, how do I maintain session across the rest of the site and these side apps? I am pretty new to java hence my confusion. Can I just pass the session object from one to the other? Is there something special I have to implement? Any help would be greatly appreciated. And if this post is in the wrong place just say so and I will find the appropriate java list to post to. Thanks. Charlie Harvey -- 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]