Re: Running JSP's w/ Apache and Tomcat
Sorry I'm not Dave Subha Gowri K V wrote: Hi Dave, We saw your reply to one of the queries posted in tomcat's forum. Your reply was - * " What you want to do is to override the root context. Put this in your server.xml file: Context path="" docBase="/usr/local/apache/htdocs" debug="0" reloadable="true" /Context Now, you'll also have to create a WEB-INF and it's corresponding subdirectories (lib, classes, ets) under /usr/local/apache/htdocs, as well as add a section to your Apache httpd.conf file to disallow access to that directory like this: Location "/WEB-INF" AllowOverride None Order deny,allow deny from all /Location Then you should be set to go! Coming from JServ/GnuJSP, this took a while to figure out myself. -Dave * This still has not solved our problem. We want to deploy all our .jsp and servlet class files under htdocs. We were successful in creating a context for jsp files(by adding a new context in server.xml pointing to htdocs). However, we have not been able to fetch the servlet class files from htdocs too. we are not getting what you mean by location tag. Please get back to us asap. Thanks in advance. Subha
Newbie
Hi, I am a newbie to Tomcat. I want to use it for developing JSP and Java Servlets. My existing development platform has this configuration, Windows 2000 Professional Server IIS 5.0 Which version of Tomcat should I use. I have downloaded versions 3.1 and 4.0 Tried Tomcat 4.0 but that works independently. Is there anyway to make it part of IIS. Or how to bind Tomcat with IIS. I will be thankful if you can point me to an appropriate resource. Any response to this query will be highly appreciated. Regards, Waqas Pitafi
RE: Newbie
Read the tomcat-IIS document under the documents section -Original Message- From: Waqas Pitafi [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 12:31 AM To: [EMAIL PROTECTED] Subject: Newbie Hi, I am a newbie to Tomcat. I want to use it for developing JSP and Java Servlets. My existing development platform has this configuration, Windows 2000 Professional Server IIS 5.0 Which version of Tomcat should I use. I have downloaded versions 3.1 and 4.0 Tried Tomcat 4.0 but that works independently. Is there anyway to make it part of IIS. Or how to bind Tomcat with IIS. I will be thankful if you can point me to an appropriate resource. Any response to this query will be highly appreciated. Regards, Waqas Pitafi
Re: Auto start servlets in Tomcat 3.2
Well i'm using en entry in web.xml i the servlert node. load-on-startup1/load-on-startup where the numbers reflect the start-up sequence. Hope this helps. "Paul Mendelson" [EMAIL PROTECTED] on 12/03/2000 02:44:31 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: Clifford Okoro/Harrow/Ladbrokes) Subject: Auto start servlets in Tomcat 3.2 I am trying to have a servlet start automatically in Tomcat 3.2. In Tomcat 3.1 I created a servlet entry in web.xml and everything went fine. In Tomcat 3.2 they provide a sample web.xml file but it refers to a class, org.apache.tomcat.servlets.InvokerServlet, that does not seem to be part of Tomcat anymore. My questions are: is web.xml still the proper way to introduce servlets that should start when Tomcat starts? If web.xml is the vehicle, what is the correct syntax for the block: servlet servlet-name invoker /servlet-name !-- org.apache.tomcat.servlets.NoInvokerServlet -- servlet-class org.apache.tomcat.servlets.InvokerServlet /servlet-class /servlet OR When I take out that section my servlets don't run at all? Thanks in advance, Paul __ This communication and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received it in error please notify the sender or [EMAIL PROTECTED] or telephone +44 (0)20 8868 8899. The unauthorised use, disclosure, copying or alteration of this message is forbidden. Ladbrokes Limited will not be liable for direct, special, indirect or consequential damage as a result of any virus being passed on, or arising from alteration of the contents of this message by a third party. Please note that in replying to this mail, you are granting the right for that reply to be forwarded to any other individual and to be read by a surrogate in the event that the intended recipient is out of the office or is no longer employed by the company. Any views expressed by an individual within this message do not necessarily reflect the views of the firm.
Re: bug in tomcat 3.2 final??
Carlos, what JVM are you using? I have resolved this problem with JDK1.1.8 ( if you can, try ). Pier Paolo. - Original Message - From: Carlos To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 9:37 AM Subject: Re: bug in tomcat 3.2 final?? yes the tomcat turn off.i am using the rmijdbc driverthe logs i have not now- Original Message -From: "Craig R. McClanahan" [EMAIL PROTECTED]To: [EMAIL PROTECTED]Sent: Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 final?? Landaluze Produktions IS - Carlos wrote: i am pùt the tomcat 3.2 final in linux Is ti very well but if i want to connect to a DB (MSsql server), in other pc.. if there is not the odbc object created in the MSsql server pc thetomcat crass!! turn off. the tomcat doesn't not show there normal error message it turn off. Are you sure Tomcat itself is really crashing? It would show some sort ofstack trace or error message to system output of the window where it was startedin this case. The only reason that Tomcat itself would crash would be due to bugs in the JdbcOdbcDriver (which has native code in it, so bugs here can indeed crashthe JVM). It sounds like you are encountering such a bug. I would recommendusing a different driver -- the JdbcOdbcDriver is not designed for robustproduction use. You can check out available drivers on the JDBC Drivers page at http://java.sun.com/products/jdbc. my answer is: if the sql server pc in that moment is off, and in from the tomcat thereis a query to the sql server it'll turns off always?? this is not notmal i am using in the linux a jdbc dfriver to connect to the windows SQLserver thanks Carlos Craig
Re: bug in tomcat 3.2 final??
the JDK1.3 for linux - Original Message - From: Pier Paolo Bortone To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 10:26 AM Subject: Re: bug in tomcat 3.2 final?? Carlos, what JVM are you using? I have resolved this problem with JDK1.1.8 ( if you can, try ). Pier Paolo. - Original Message - From: Carlos To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 9:37 AM Subject: Re: bug in tomcat 3.2 final?? yes the tomcat turn off.i am using the rmijdbc driverthe logs i have not now- Original Message -From: "Craig R. McClanahan" [EMAIL PROTECTED]To: [EMAIL PROTECTED]Sent: Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 final?? Landaluze Produktions IS - Carlos wrote: i am pùt the tomcat 3.2 final in linux Is ti very well but if i want to connect to a DB (MSsql server), in other pc.. if there is not the odbc object created in the MSsql server pc thetomcat crass!! turn off. the tomcat doesn't not show there normal error message it turn off. Are you sure Tomcat itself is really crashing? It would show some sort ofstack trace or error message to system output of the window where it was startedin this case. The only reason that Tomcat itself would crash would be due to bugs in the JdbcOdbcDriver (which has native code in it, so bugs here can indeed crashthe JVM). It sounds like you are encountering such a bug. I would recommendusing a different driver -- the JdbcOdbcDriver is not designed for robustproduction use. You can check out available drivers on the JDBC Drivers page at http://java.sun.com/products/jdbc. my answer is: if the sql server pc in that moment is off, and in from the tomcat thereis a query to the sql server it'll turns off always?? this is not notmal i am using in the linux a jdbc dfriver to connect to the windows SQLserver thanks Carlos Craig
mod_jk auto-conf omission?
The auto generated file "uriworkers.properties-auto" appears in my conf directory when I start Tomcat. I just made a symlink from it to workers.properties, and this worked. Great. But I'm having a bunch of tomcats running in our development environment, each running on a different port. This doesn't work that great. The problem is that the uriworkers-thing doesn't specify the portnumber automatically. If I just add one line specifying it, it works. Is this how it's supposed to be? Seems to me that it would be nice if this got picked up from server.xml (where I do specify the port).. Also, the auto generated files specify the ajp12. Isn't ajp13 one of the "nice things" about mod_jk? Is there a easy way to use ajp13 instead? Thanks! -- Mvh, Endre
Oracle
Does anyone know what the default 'sys' password is for Oracle 8.0.5 An answer to this question would be greatly appreciated Thanks Adam
Config ?
Hi, First time poster SO be gentle... hope you can help me. My question is regarding the configuration of Tomcat. We have a serlvet that is doing a transformation of an XML message using an XSL... below is an example... processor.process(new XSLTInputSource("TestXML.xml"), new XSLTInputSource("TestXSL.xsl"), new XSLTResultTarget(res.getWriter())); The problem is that for this to work the TestXML.xml and the TestXSL.xsl have to be located in the TOMCAT bin directory OR for me to pass in the full path I know about the server.xml config file and how to set-up "context path" to find serlvets in other directories... Is there some sort of configuration for this ? i.e to locate a file in another directory other than the TOMCAT bin ? Thanks and Regards Bryan
RE: More Tomcat problems.
Title: More Tomcat problems. Hello to everybody. I am using a try-catch pair. I have something like this. try { Class.forName("org.gjt.mm.mysql.Driver"); Connection dbcon=DriverManager.getConnection("jdbc:mysql://isle:3306/footballtest", "username", "password"); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (SQLExepction sqle) { sqle.printStackTrace(); } but Tomcat just crashes when the:Connection dbcon=DriverManager.getConnection("jdbc:mysql://isle:3306/footballtest", "username", "password"); line is encountered. I have to say here that the above code works fine if I use simple class to obtain connection with the database. Any more suggestions. Thank you. Panos -Original Message-From: Dave Smith [mailto:[EMAIL PROTECTED]]Sent: 02 October 2000 21:49To: [EMAIL PROTECTED]Subject: Re: More Tomcat problems. Panagiotis, Are you using a try block around the code to catch SQLExceptions in your development setup? This is what is happening: you are throwing an exception without a handler. The jvm just unwinds to the top and drops you out. Try using something like this in the JSP: %@ page errorPage="error-page.jsp" % or else debug the connection code in an IDE first. Regards, Dave - Original Message - From: Panagiotis Konstantinidis To: [EMAIL PROTECTED] Sent: Thursday, November 30, 2000 12:45 PM Subject: More Tomcat problems. Hello there again, this is the second message I am sending regarding problems with Tomcat. In my previous message Kief answered solved my question correctly, so I would really appreciate if he could answer again this one. It seems that I have exactly the same problem. I am running a JSP file (lets say myFile.jsp) that open a conenction with the database on the server. The code is like the following: % . String url = the url string; String user = the user string; String password = the password string; Class.forName("org.gjt.mm.mysql.Driver"); Connection con = DriverManager.getConnection(url, user, password); . % When the line Connection con = DriverManager.getConnection(url, user, password); is encountered then Tomcat just goes off (and I get the error message from Apache "Internal Server Error."). Just like that, with no error messages or anything. This is really weird because I have downloaded and installed the latest versions of both Apache (v1.3.14) and Tomcat (v3.2) and I have included the JDBC driver .jar file in my classpath. I have looked in the "tomcat.log" file and there are no error messages. I have looked in the "error.log" file in the Apache directory and I get the error message (for one more time): [Thu Nov 30 17:47:39 2000] [error] [client 192.168.0.25] Premature end of script headers: c:/work/tomcat/jakarta-tomcat-3.2-b7/webapps/panos/myFile.jsp. I cannot think of anything to do so if somebody knows more about that please help. Thank you. Panos
RE: To Parse JSP has HTML ?
It does, thanks. For information : web-app servlet-mapping servlet-name jsp /servlet-name url-pattern *.htm /url-pattern /servlet-mapping /web-app works. but I try the html with web-app servlet-mapping servlet-name jsp /servlet-name url-pattern *.htm /url-pattern /servlet-mapping /web-app and it does not works eithers. --- Saurabh Shukla [EMAIL PROTECTED] wrote: try using .htm instead of .html it will work. Shuklix -Original Message- From: Charles Sabourdin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 9:29 PM To: [EMAIL PROTECTED] Subject: To Parse JSP has HTML ? Dear All, I would like to parse files (*.html) with jsp tag. In order to hide that my web site use jsp. I thought I only had to use this tag in the web.xml of my web app. web-app servlet-mapping servlet-name jsp /servlet-name url-pattern *.html /url-pattern /servlet-mapping /web-app Apparently, my html are parse with no analyse. I use RedHat 6.2 (jdk1.3 of sun) Tomcat 3.2 beta 6. could anyone correct my statment. please. thank you. __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Class Not Found in Init exception
Hi, Can anyone tell me why I get this error message. I am running tomcat with IIS. Thanks, Nagaraj. Context log: path="/test" Class Not Found in init java.lang.ClassNotFoundException: blank.html at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava:450) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java:141) at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:294) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:156) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) at java.lang.Thread.run(Unknown Source)
Re: More on JSP in XML format -- This, is a very excellent post!
"Michael G. Anderson C.T.O" wrote: This, is a very excellent post! Anne and Bill Moore wrote: Pierre Delisle wrote: I have now found a bug with scriplets. The character in a scriptlet are being parsed as if it were markup rather than being treated as Java syntax less than symbol. For example the scriptlet % for(int i=0; i6; i++) out.println(i); % works as expected in standard format jsp. The xml format scriplet shown below produces an exception org.apache.jasper.compiler.ParseException The content beginning "6" is not legal markup jsp:scriptlet for(int i=0; i6; i++) out.println(i); /jsp:scriptlet The above is not valid XML, you cannot use within a section of XML, unless it is within a CDATA section or is the start of a start tag. Bap.
JDBCRealm code change pls.
Can I request that in both the methods; * public synchronized boolean authenticate(String username, String credentials) * public synchronized String[] getUserRoles(String username) the code } catch( SQLException ex ) { // Log the problem for posterity log(sm.getString("jdbcRealm.authenticateSQLException", username)); be changed to include a log of log ("SQLException: "+ex.getMessage()); to assist in tracking down a wide range of database errors (meta-data out of date, priviledge denied by database, missing spellings of table and column names) Many thanks Scott, Esq.
RE: tomcat.log file not found
Title: tomcat.log file not found No it is not, I have already looked there (several times) but it isnot in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message-From: G.Nagarajan [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 13:06To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 1:49 PMTo: '[EMAIL PROTECTED]'Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
Re: ServerSocketFactory
You might need the JSSE package Mathew Thomas wrote: When I run build.sh for tomcat, I get the error message that when trying to compile SSLSocketFactory, Class javax.net.ServerSocketFactory is not found in import. ServerSocketFactory does exist but it appears to be in a misplaced package/directory. Any ideas?? Mathew
RE: tomcat.log file not found
Title: tomcat.log file not found I have already tried to find it (in Windows) through the Start... Search... For Files or Folders... but in vein. It is not anywhere. -Original Message-From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 13:54To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found The message 'Starting tomcat. Check logs/tomcat.log for error messages' is purely informational. If there were any errors, they would be logged in a file of this name. But to find the file, on windows, right click on my computer, select Find (Search on Win2000), and enter tomcat.log in the filename box and let it go. On Unix, try 'find / -name tomcat.log -print | tee tmpy' (the tee command sends the output to both stdout and tmpy. This is useful, because if you are not root, then you will get lots of messages to stderr about can't read directory, so you can just 'cat tmpy' to find all the stuff that went to stdout. Regards, Paul -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 08:42 AMTo: '[EMAIL PROTECTED]'Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it isnot in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message-From: G.Nagarajan [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 13:06To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 1:49 PMTo: '[EMAIL PROTECTED]'Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
RE: tomcat.log file not found
Title: tomcat.log file not found Hi, The message "check for error messages" does not mean that there are errors. It is just an informative message. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 2:42 PMTo: '[EMAIL PROTECTED]'Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it isnot in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message-From: G.Nagarajan [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 13:06To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 1:49 PMTo: '[EMAIL PROTECTED]'Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
RE: JDBCRealm code change pls.
done in 3.3, thanks Saludos , Ignacio J. Ortega -Mensaje original- De: Scott Hamilton [mailto:[EMAIL PROTECTED]] Enviado el: martes 5 de diciembre de 2000 5:30 Para: [EMAIL PROTECTED] Asunto: JDBCRealm code change pls. Can I request that in both the methods; * public synchronized boolean authenticate(String username, String credentials) * public synchronized String[] getUserRoles(String username) the code } catch( SQLException ex ) { // Log the problem for posterity log(sm.getString("jdbcRealm.authenticateSQLException", username)); be changed to include a log of log ("SQLException: "+ex.getMessage()); to assist in tracking down a wide range of database errors (meta-data out of date, priviledge denied by database, missing spellings of table and column names) Many thanks Scott, Esq.
Pitfalls and Gotcha's?
Hi, We have a small JSP application we are running with Apache/Tomcat that we want to put out on the internet. Does anyone know of any obvious pitfalls or gotcha's or where I can look for documentation of such? Thanks Best Regards, Won Hong Product Manager Firekey, Inc. 443-572-5564 [EMAIL PROTECTED]
Problem with cart example (bean usage)
Things seem to be working very well with Tomcat 3.2 in a shared environment, however the cart example is giving me some problems: http://tomcat.spinweb.net/examples/jsp/sessions/carts.html If I try to add anything I get the following exception: org.apache.jasper.compiler.CompileException: /usr/local/apache/sites/tomcat.spinweb.net/htdocs/examples/jsp/sessions/carts.jsp(30,0) Bad file argument to include at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:107) at org.apache.jasper.JasperException.(JasperException.java:73) at org.apache.jasper.compiler.CompileException.(CompileException.java:73) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(Compiled Code) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Compiler.compile(Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code) at org.apache.jasper.servlet.JasperLoader12.loadJSP(Compiled Code) at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) I have tried to discern the source of this problem, but I am not sure what is causing it. Does anyone have any suggestions on this? Duane Gran spinweb.net
mod_jk for EAPI?
hi, i use apache 1.3.14 + mod-ssl 2.7.2 + openSSL 0.96 on NT 4.0 SP 5, everything works fine. now i want to use tomcat 3.2 and therfor i use mod_jk.dll to enable apache communicating with tomcat. This works fine as well but leavs the errormessage [Mon Dec 04 14:26:45 2000] [warn] Loaded DSO modules/mod_jk.dll uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) in apache's error.log everytime apache is starting. (it doesn't crash til now, but it isn't the correct solution, right?, and btw, i could imagine, i'am not the only one having this problem) now my question: is it possible to make some -DEAPI-Binary-Version of mod_ssl.dll available at tomcats download-site? or is there any howto on integrating an ssl-aware apache with tomcat on win32? i recompiled for instance mod_jserv for win32 (ApacheModuleJServ.dll) with MS Visual C++ 6.0 with no problems, but the normal version, not the -deapi one. a little recommendation, how to recompile mod_jk for the EAPI wold probably allready help me! so i would be really grateful for all recommendations or hints, many thanks in advance! basti
RE: tomcat.log file not found
Panos, It has been my experience that you have to turn it on manually. In server.xml make sure that it is listed for tc_log like the following: Logger name="tc_log" path="logs/tomcat.log" verbosityLevel = "INFORMATION" / Duane Gran http://www.spinweb.net -- Tomcat hosting On Mon, 4 Dec 2000, Panagiotis Konstantinidis wrote: Ok, but am I supposed to have a file called "tomcat.log" (whether there are errors or not) or it is only created if there is an error? Thank you Panos -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 14:25 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found Hi, The message "check for error messages" does not mean that there are errors. It is just an informative message. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:42 PM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it is not in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 13:06 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 1:49 PM To: '[EMAIL PROTECTED]' Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
RE: tomcat.log file not found [Virus checked]
I was having this problem as well. I fixed it by forcing the tomcat to be logged as in Logger name="tc.log" path="logs/tomcat.log" verbositylevel="INFORMATION" / Note the 'path' attribute. Seems to work for now :-) Clifford Panagiotis Konstantinidis [EMAIL PROTECTED] on 12/04/2000 02:34:53 PM Please respond to [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] cc: (bcc: Clifford Okoro/Harrow/Ladbrokes) Subject: RE: tomcat.log file not found [Virus checked] Ok, but am I supposed to have a file called "tomcat.log" (whether there are errors or not) or it is only created if there is an error? Thank you Panos -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 14:25 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found Hi, The message "check for error messages" does not mean that there are errors. It is just an informative message. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:42 PM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it is not in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 13:06 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 1:49 PM To: '[EMAIL PROTECTED]' Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos Title: tomcat.log file not found Ok, but am I supposed to have a file called "tomcat.log" (whether there are errors or not) or it is only created if there is an error? Thank you Panos -Original Message-From: G.Nagarajan [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 14:25To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found Hi, The message "check for error messages" does not mean that there are errors. It is just an informative message. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 2:42 PMTo: '[EMAIL PROTECTED]'Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it isnot in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message-From: G.Nagarajan [mailto:[EMAIL PROTECTED]]Sent: 04 December 2000 13:06To: [EMAIL PROTECTED]Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message-From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]]Sent: Monday, December 04, 2000 1:49 PMTo: '[EMAIL PROTECTED]'Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on?
Re: More on JSP in XML format -- This, is a very excellent post!
Bap wrote: "Michael G. Anderson C.T.O" wrote: This, is a very excellent post! Anne and Bill Moore wrote: Pierre Delisle wrote: I have now found a bug with scriplets. The character in a scriptlet are being parsed as if it were markup rather than being treated as Java syntax less than symbol. For example the scriptlet % for(int i=0; i6; i++) out.println(i); % works as expected in standard format jsp. The xml format scriplet shown below produces an exception org.apache.jasper.compiler.ParseException The content beginning "6" is not legal markup jsp:scriptlet for(int i=0; i6; i++) out.println(i); /jsp:scriptlet The above is not valid XML, you cannot use within a section of XML, unless it is within a CDATA section or is the start of a start tag. Bap. sorry, "The above is not well-formed XML"
RE: Exception in thread main
It appears there is an error in the sample build.bat file. In the second set CP line you should add %CP%; to pick up the classpathes from the first line. -Original Message- From: Penney, William [mailto:[EMAIL PROTECTED]] Sent: Friday, December 01, 2000 9:11 AM To: [EMAIL PROTECTED] Subject: Exception in thread "main" Need Help, Build.bat is giving me the following error: Exception in thread "main" java.lang.NoClassDefFoundError: Files\JavaSoft\Jaxp1/0/1\jaxp/jar;d:\Program I assume it's looking for sun's XML parser which I have installed in D:\Program Files\JavaSoft\Jaxp1.0.1. Any help would be appreciated. Bill Penney
RE: tomcat.log file not found
I met the same problem. I don't have tomcat.log either. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 9:35 AM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found Ok, but am I supposed to have a file called "tomcat.log" (whether there are errors or not) or it is only created if there is an error? Thank you Panos -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 14:25 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found Hi, The message "check for error messages" does not mean that there are errors. It is just an informative message. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:42 PM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it is not in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 13:06 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 1:49 PM To: '[EMAIL PROTECTED]' Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
RE: tomcat.log file not found
Title: RE: tomcat.log file not found Thank you everybody for helping me people. I have added the path=logs/tomcat.log in my server.xml file and all the messages go into tomcat.log file instead of the screen. Thanks again. Panos -Original Message- From: Wang, Jianming [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 15:02 To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found I met the same problem. I don't have tomcat.log either. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 9:35 AM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found Ok, but am I supposed to have a file called tomcat.log (whether there are errors or not) or it is only created if there is an error? Thank you Panos -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 14:25 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found Hi, The message check for error messages does not mean that there are errors. It is just an informative message. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:42 PM To: '[EMAIL PROTECTED]' Subject: RE: tomcat.log file not found No it is not, I have already looked there (several times) but it is not in there. It is not in the tomcat/logs, actually it is not on my hard disk!! I can't seem to find it anywhere. -Original Message- From: G.Nagarajan [mailto:[EMAIL PROTECTED]] Sent: 04 December 2000 13:06 To: [EMAIL PROTECTED] Subject: RE: tomcat.log file not found tomcat.log is usually in c:\tomcat\logs\, if you have installed tomcat in c:\. -Original Message- From: Panagiotis Konstantinidis [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 1:49 PM To: '[EMAIL PROTECTED]' Subject: tomcat.log file not found And something else Sometimes when I am starting Tomcat I get an error message: Starting tomcat. Check logs/tomcat.log for error messages but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
Problem with WAP Gateway and Tomcat standalone
Hi there, We're developing a WAP application and because URL Rewriting using encodeURL() doesn't work properly when using Tomcat with Apache (see archive of this list), we have to use Tomcat to run as standalone on port 8080. WML pages are shown correct in different WML browsers, but when viewing on a real phone (using a WAP gateway), the page doesn't display. Strange thing is, when using Tomcat with Apache, the same Servlet returning the same WML deck works fine on real phone. So when using Apache, URL Rewriting doesn't work and in standalone mode, access to the servlet through WAP gateway doesn't work. What to do? I checked the HTTP headers of both (standalone and Apache) and the only difference is, that Tomcat uses HTTP/1.0 and Apache uses HTTP/1.1 . Has anyone encountered the same problem or does anyone know a solution for this? Thanks Ingo Herschmann
Re: password and login to admin context
"Craig R. McClanahan" wrote: It didn't make the docs in the last-minute rush, but there are two things you need to do if you want to use the administration app under Tomcat 3.2: * In "$TOMCAT_HOME/conf/server.xml", change the entry for the administration application so that it says trusted="true" Where exactly? Can you send me the part that needs to be changed, I cannot locate anything that seems like the administration application. Christian
VAJ and Tomcat 3.2
Hi, Tomcat 3.2 runs inside Visual Age for Java, but after (trying) a re-start I get this message: FATAL:java.net.SocketException: Address already in use java.net.SocketException: Address already in use Seems that the 8080 port never get's released... Has anyone succesfully gotten 3.2 to work inside vaj? Haven't tested for VAJ 3.5 yet, only 3.02 for linux. Regards Stein
RE: password and login to admin context
Context path="/admin" docBase="webapps/admin" crossContext="true" debug="0" reloadable="true" trusted="true" /Context -Original Message- From: Christian Rauh [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 5:00 PM To: [EMAIL PROTECTED] Subject: Re: password and login to admin context "Craig R. McClanahan" wrote: It didn't make the docs in the last-minute rush, but there are two things you need to do if you want to use the administration app under Tomcat 3.2: * In "$TOMCAT_HOME/conf/server.xml", change the entry for the administration application so that it says trusted="true" Where exactly? Can you send me the part that needs to be changed, I cannot locate anything that seems like the administration application. Christian
Tomcat and IIS 5
Title: tomcat.log file not found Hi! I have some problems with Tomcat 3.2 and IIS5. When I try to access the example pages I get a "Not Found 404" error: Not Found (404)Original request: /jakarta/isapi_redirect.dllNot found request: /jakarta/isapi_redirect.dll The tomcats log looks like that: 2000-12-04 06:12:44 - ContextManager: Adding context Ctx( /examples )2000-12-04 06:12:44 - ContextManager: Adding context Ctx( /admin )Starting tomcat. Check logs/tomcat.log for error messages2000-12-04 06:12:44 - ContextManager: Adding context Ctx( /dcfa )2000-12-04 06:12:44 - ContextManager: Adding context Ctx( /sbs )2000-12-04 06:12:44 - ContextManager: Adding context Ctx( /andromeda )2000-12-04 06:12:48 - ContextManager: Adding context Ctx( )2000-12-04 06:12:50 - ContextManager: Adding context Ctx( /test )2000-12-04 06:12:52 - PoolTcpConnector: Starting HttpConnectionHandler on 80802000-12-04 06:12:52 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 80072000-12-04 06:13:28 - Ctx( ): 404 R( + /jakarta/isapi_redirect.dll + null) null2000-12-04 06:13:32 - Ctx( ): 404 R( + /jakarta/isapi_redirect.dll + null) null The IIS log looks like that: #Software: Microsoft Internet Information Services 5.0#Version: 1.0#Date: 2000-12-04 12:31:22#Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status cs(User-Agent) 2000-12-04 17:13:28 192.168.10.10 - 192.168.10.21 80 GET /jakarta/isapi_redirect.dll - 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+5.0)2000-12-04 17:13:32 192.168.10.10 - 192.168.10.21 80 GET /jakarta/isapi_redirect.dll - 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+5.0) I have followed the tomcat-iis-howto.html step by step. In the troubleshooting section there is only one solution for my problem: ... If the number following GET "/..." is 200 or 403, make sure you have checked Execute Access for the jakarta virtual directory in the Advanced Options of the Personal Web Manager. The virtual directory has definetly execute access. Does anybody know another solutions for this problem? thanks, Adrian.
Re: bug in tomcat 3.2 final??
I try to explore your problems but I encountered another problem. Can you help me? I have installed jdk1.3 on Linux and I have the DB on MSSQLServer7.0, can you tell me about the sintax of connect string? For example: withmySQL I write: jdbc:mysql://hostname:port/dbname and with MSSQLServer? jdbc:odbc: ...??? and after, how it continue? Missing am I anything in linux configuration? Help me. Thanks in advance. - Original Message - From: Carlos To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 10:45 AM Subject: Re: bug in tomcat 3.2 final?? the JDK1.3 for linux - Original Message - From: Pier Paolo Bortone To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 10:26 AM Subject: Re: bug in tomcat 3.2 final?? Carlos, what JVM are you using? I have resolved this problem with JDK1.1.8 ( if you can, try ). Pier Paolo. - Original Message - From: Carlos To: [EMAIL PROTECTED] Sent: Monday, December 04, 2000 9:37 AM Subject: Re: bug in tomcat 3.2 final?? yes the tomcat turn off.i am using the rmijdbc driverthe logs i have not now- Original Message -From: "Craig R. McClanahan" [EMAIL PROTECTED]To: [EMAIL PROTECTED]Sent: Monday, December 04, 2000 2:06 AMSubject: Re: bug in tomcat 3.2 final?? Landaluze Produktions IS - Carlos wrote: i am pùt the tomcat 3.2 final in linux Is ti very well but if i want to connect to a DB (MSsql server), in other pc.. if there is not the odbc object created in the MSsql server pc thetomcat crass!! turn off. the tomcat doesn't not show there normal error message it turn off. Are you sure Tomcat itself is really crashing? It would show some sort ofstack trace or error message to system output of the window where it was startedin this case. The only reason that Tomcat itself would crash would be due to bugs in the JdbcOdbcDriver (which has native code in it, so bugs here can indeed crashthe JVM). It sounds like you are encountering such a bug. I would recommendusing a different driver -- the JdbcOdbcDriver is not designed for robustproduction use. You can check out available drivers on the JDBC Drivers page at http://java.sun.com/products/jdbc. my answer is: if the sql server pc in that moment is off, and in from the tomcat thereis a query to the sql server it'll turns off always?? this is not notmal i am using in the linux a jdbc dfriver to connect to the windows SQLserver thanks Carlos Craig
Performance problems with tomcat 3.2 and Sun's JDK1.3 for Win32
Has Anybody else had performance problems when running Tomcat 3.2 (b8 or final release) using Sun's 1.3 JDK/JRE? I have experienced response times of 40 seconds for a jsp page. The problem seems to come in the JSP part. The request is processed initially in a controlling servlet and then forwarded to a JSP layout page. Here other JSP pages are included to build up the response page. From the log files I can see that after about 1 second of execution, processing is halted for about 4 seconds and then continues for another second. This cycle continues until the response is eventually returned to the browser. After switching JDK's to Sun's JDK 1.2.1 the response time was about 1.5 seconds for the same page. Any clues? ciao Duncan TecSys Infopartners S.A. 4, rue Jos Felten, L-1508 Howald Luxembourg [EMAIL PROTECTED] Tel: +352 40116 3303 Fax: +352 40116 2331
Problem compiling mod_jk.so
Hello all, I have a problem someone may be able to help with. I tried to compile mod_jk.so seperate from my apache source, and after enabling it in got the error about it being a garbled module. So then I tried to compile it with the apache source tree (as a previous post recommended, I think) and had configure enable it, which worked fine, but when I try to execute apache it fails with the following message: Syntax error on line 238 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/mod_jk.so into server: /usr/local/apache/libexec/mod_jk.so: undefined symbol: map_name_at It looks like this function is defined in jk_map.h, but I am unsure of how to get apache to see it. Any suggestions? About all I could think of was putting it into the apache include dir, but this did not work. Thanks in advance for your help. Craig B.
RE: formbased security
Can I manually stick the username/passwd into the server container? So the user is not asked? for example they log into my app...then they can browser around with out being asked to 'login' again... Also can I keep the user/passwd list in a database instead of the tomcatusers.xml file? -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 4:43 PM To: [EMAIL PROTECTED] Subject: Re: formbased security John de la Garza wrote: arg! I meant insufficient...sorry I wondered if that's what you really meant :-) Is there more than the servlet 2.2 spec? You might look into some of the new books and articles coming out that talk about servlet 2.2. Or, you could ask specific questions on issues that are not clear. Form based login started making sense for me after I understood the basic philosophy. Have you ever accessed a web site that uses BASIC security to pop up a username/password dialog box? And then, after you were successfully authenticated, the server gave you the requested page? Form based login should feel very much like that from the user's perspective. The first time he or she tries to access a protected page, the login page will be shown first -- once they log on successfully, the originally requested page will be shown. It's not any more or less secure than BASIC authentication -- but form based login lets you customize the look and feel of the login page, where BASIC authentication does not. Craig McClanahan
Re: formbased security
John de la Garza wrote: Can I manually stick the username/passwd into the server container? So the user is not asked? for example they log into my app...then they can browser around with out being asked to 'login' again... Well, that is what actually happens. Once you log on, your identity is recognized until you exit your browser (or the server is restarted). Also can I keep the user/passwd list in a database instead of the tomcatusers.xml file? There are comments in the "conf/server.xml" file illustrating how you can replace the SimpleRealm interceptor (that processes "conf/tomcat-users.xml") with one that uses JDBC to access a database. Examples of configuration for several different databases are included. Craig McClanahan
Re: How can I make tomcat 3.2 work with SSL ?
[EMAIL PROTECTED] wrote: Please reply to me directly a I am not a member of the mailing list. Do I have to compile tomcat 3.2 source to have the SSL feature working or the download binary will work ? Tomcat 3.2 final has the SSL-specific parts of Tomcat already compiled. However, you will still need to download and install the Java Secure Sockets Extension (JSSE) package appropriate for your country from http://java.sun.com in order to set up SSL connections. Thanks in advance. - Ashish Craig McClanahan
newbie:: classpath settings
Hi all, I'm very pleased with tomcat 3.2. Running servlets and JSP works fine. Just a little question I have a servlet calling try{ Object myBean = Beans.instantiate(null, "my.package.MyClass"); } The servlet is in the directory: /webapps/foo/WEB-INF/classes my.package.MyClass is there as well. The nullparam is the classloader and shouldfall back on the system class-loader. I read somewhere that the /webapps/foo/WEB-INF/classespath is not the system class-loader but a specific tomcat-classpath. Should I put the /webapps/foo/WEB-INF/classes on the CLASSPATH environment variable ? Or is there a more appropriate way in the workers.properties. Or would people recommend to create a ClassLoader and use this object in the Beans.instantiate ? Any help is appreciated. Marco
Re: Solution!! Re: [C2] [TC 4.0m4+] ClassCastException
Must be a ClassLoader problem - that would explain the bad cast. This should not happen though. I'm X-posting to [EMAIL PROTECTED] Sorry if this is a FAQ. Stuart Roebuck [EMAIL PROTECTED] wrote: For all those who have been frustratedly putting up with my posts about not getting Cocoon 2 working under the latest Tomcat release, I am hughly relieved to say that it now works. But I now lay the challenge of trying to work out why the following patch solves the problem! Index: ./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java === RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v retrieving revision 1.1.2.21 diff -u -r1.1.2.21 WildcardURIMatcherFactory.java --- ./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java2000/11/30 21:41:49 1.1.2.21 +++ ./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java2000/12/04 12:00:20 @@ -52,7 +52,7 @@ public String generateMethodSource (NodeIterator conf) throws ConfigurationException { return "ArrayList list = new ArrayList();" + - "String uri = ((HttpServletRequest) objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" + + "String uri = ((org.apache.cocoon.environment.http.HttpRequest) objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" + "if (uri.startsWith(\"/\")) uri = uri.substring(1);" + "if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match (list, uri, pattern)) {" + "return list;" + As you can see, I have simply replaced the casting of objectModel.get(Cocoon.REQUEST_OBJECT) to a HttpServletRequest with a cast to a org.apache.cocoon.environment.http.HttpRequest. My debugging seemed to prove that the original object was an org.apache.cocoon.environment.http.HttpRequest, but such an HttpRequest should inherit from HttpServletRequest, as at least one person on the group has already said, so the original cast should be completely valid. However, this has done the trick. Everything now works! Why? ... answers on a postcard. _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
Re: More on JSP in XML format
Anne and Bill Moore wrote: ... I have now found a bug with scriplets. The character in a scriptlet are being parsed as if it were markup rather than being treated as Java syntax less than symbol. For example the scriptlet % for(int i=0; i6; i++) out.println(i); % works as expected in standard format jsp. The xml format scriplet shown below produces an exception org.apache.jasper.compiler.ParseException The content beginning "6" is not legal markup jsp:scriptlet for(int i=0; i6; i++) out.println(i); /jsp:scriptlet As "Bap" replied, you must make sure you "escape" content that can be interpreted by XML. Remember, this is an XML document that is being submitted to an XML parser. By doing this: jsp:scriptlet ![CDATA[ for(int i=0; i6; i++) out.println(i); ]] /jsp:scriptlet It should work fine. When you asked me to report bugs I was not sure if you mneant for me to enter them to bugrat - I created Bug Report #511 with synopsis "Error in parsing scriptlet when jsp is in xml format " to describe this problem. Yes, bugrat is the preferred way to submit bug reports. If just submitted to the mailing list, they unfortunately run the chance to fall through the cracks. -- Pierre
Servlet Reloading Problems
Hi All.. Can anybody tell me why it takes my installation of Tomcat anything up to 10 minutes to reload servlets?? The servlets load fine when you restart Apache. OS - Sun Microsystems Inc. SunOS 5.7 Tomcat - 3.2 Any help would be great and really appreciated!!! Thanks Jenova __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Re: formbased security
John de la Garza wrote: What I meant was how can I never have them see the tomcat login...I want to validate the manually from my own code? I have a web based app that the user must log into...I want log the user in to tomcat once they are logged into to application. What I meant about being asked twice was that they would be asked to login to my app...then asked once to log into tomcat's thing.. If you want the user to experience a single login, you need to choose one approach or the other -- either have your application do it all, or have Tomcat do it all. In the former case, your application would need to do it's own checking (on every request) that the user is still logged in, and redirect them to the login page if needed. You would not have an security-constraint or login-config entries in your web.xml file. For Tomcat-managed security, you would install such directives, and set up your users and roles appropriately (by default in the "conf/tomcat-users.xml" file). You can customize the look and feel of the login page if you choose form-based authentication. See the servlet specification http://java.sun.com/products/servlet/download.html for more information on this. Craig McClanahan
Re: newbie:: classpath settings
"Ensing, Marco" wrote: Hi all, I'm very pleased with tomcat 3.2. Running servlets and JSP works fine. Just a little questionI have a servlet callingtry{ Object myBean = Beans.instantiate(null, "my.package.MyClass");}The servlet is in the directory: /webapps/foo/WEB-INF/classesmy.package.MyClass is there as well. The null param is the classloader and should fall back on the system class-loader.I read somewhere that the /webapps/foo/WEB-INF/classes path is not the system class-loaderbut a specific tomcat-classpath. Should I put the /webapps/foo/WEB-INF/classes on the CLASSPATH environment variable ? Or is there a more appropriate way in the workers.properties.Or would people recommend to create a ClassLoader and use this object in the Beans.instantiate ? Any help is appreciated.Marco What is the precise filename your bean class is loaded in? It should be in "/webapps/foo/WEB-INF/classes/my/package/MyClass.class in order to be loaded correctly by the Beans.instantiate() method. In general, you should *never* put WEB-INF/classes (or jar files in WEB-INF/lib) on the classpath. Tomcat builds a customized class loader that makes these classes available to a web application automatically, and falls back to the system class loader if you specify a class that is not found there. Craig McClanahan
Finally got IIS and tomcat working. Last question
I finally got tomcat working with IIS. My only question now is that in order to view jsp pages, I have to type in http://myip:8080/examples/jsp/index.html. If I do not do this, then the jsp doens't work. It seems that I have two web servers running. One on the default port that you are lead to when you type in http://www.myaddress.com and one when you type in http://www.myaddress.com:8080 I want to just use the first one.How is this done?
RE: formbased security
I am using tomcat as standalone webserver. When I send simple GET request I am always getting HTTP 1.0 request back. How do I get HTTP 1.1 response? I am using Tomcat 3.1, I placed jsptest.jsp file under /tomcat/ROOT folder and requesting this file using telnet. Thank you -Original Message- From: John de la Garza [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 1:45 PM To: [EMAIL PROTECTED] Subject: RE: formbased security Thanks! You've been super helpful, just wanted to let you know I really appreciate it and have got alot out of your quick responses! I normally don't get support this good, even we it is billed at $100 a question. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 11:04 AM To: [EMAIL PROTECTED] Subject: Re: formbased security John de la Garza wrote: What I meant was how can I never have them see the tomcat login...I want to validate the manually from my own code? I have a web based app that the user must log into...I want log the user in to tomcat once they are logged into to application. What I meant about being asked twice was that they would be asked to login to my app...then asked once to log into tomcat's thing.. If you want the user to experience a single login, you need to choose one approach or the other -- either have your application do it all, or have Tomcat do it all. In the former case, your application would need to do it's own checking (on every request) that the user is still logged in, and redirect them to the login page if needed. You would not have an security-constraint or login-config entries in your web.xml file. For Tomcat-managed security, you would install such directives, and set up your users and roles appropriately (by default in the "conf/tomcat-users.xml" file). You can customize the look and feel of the login page if you choose form-based authentication. See the servlet specification http://java.sun.com/products/servlet/download.html for more information on this. Craig McClanahan
Re: Finally got IIS and tomcat working. Last question
When you're using port 8080 you're not using IIS, you're using tomcat... looks like you don't have tomcat working with IIS. (I can't help anymore since I don't use IIS) Karim Amin wrote: I finally got tomcat working with IIS. My only question now is that in order to view jsp pages, I have to type in http://myip:8080/examples/jsp/index.html. If I do not do this, then the jsp doens't work. It seems that I have two web servers running. One on the default port that you are lead to when you type in http://www.myaddress.com and one when you type in http://www.myaddress.com:8080 I want to just use the first one. How is this done?
RE: VAJ and Tomcat 3.2
Bien vu ;-)
Tomcat - mod_jk - Configuration : Need some help please
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi folks, Okay, I'm kind of new to this java stuff, so please bear with me. I think I have it almost done but have reached a stumbling block which I cannot resolve by searching through the archives. I'm sure its a simple one, but It's got me stumped. FOR--- Solaris 2.6 Apache 1.3.12 Tomcat 3.2 mod_jk JDK 1.3 I have my apache set up to use virtual hosts. I have the tomcat set up pretty much stock, with the exception that I added ajp13(i'm not using it in my apache configuration though) and I commented out the /examples, /admin, etc. now all i have in my server.xml file for context is Context path="/java" docBase ="/export/home/cci/public_html/java" croseContext="true" debug="0" reloadable="true" /Context then in my httpd.conf file i have VirtualHost 111.111.111.111 ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/cci/public_html ServerName my.domain.com DirectoryIndex index.cgi index.pl index.html index.shtml Directory /export/home/cci/public_html Options All /Directory Directory /export/home/cci/public_html/cgi-bin Options All /Directory AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /export/home/cci/public_html/logs/error_log TransferLog /export/home/cci/public_html/logs/access_log Directory "/export/home/cci/public_html/java" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /java/servlet/* ajp12 JkMount /java/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/java/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/java/META-INF/" AllowOverride None deny from all /Location /VirtualHost If I http to my virtualhost:8080 the stock tomcat screen comes up. If I http to my virtualhost:8080/java then I get the directory index of the /export/home/cci/public_html/java(as I would expect). I have created a quick jsp to test my setup which just does the basic html tags and then does a % out.println("test") % if I go to http://my.domain.com/java i get the same directory listing as I would expect. the problem is that when i click on test.jsp, i get the following output.(for either the servername:8080/java or the virtual host). Error: 500 Location: /java/test.jsp Internal Servlet Error: javax.servlet.ServletException: sun/tools/javac/Main at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at
ContextManager:SocketException reading request, ignored???
I just finished building the production release of Tomcat 3.2. Everything seems to work but I keep getting the following Java exception. I have been told this is caused by the client disconnecting too soon. But I am the only one accessing the server, and I know for sure that I did not hit the "stop" button on the browser. I even tried the binary release of Tomcat 3.2 but got the same results. This seems to occur when I request a URL for a directory that gets translated to an "index.html". For example, if I go to "http://localhost:8080/examples", I will also get the Java exception when I click on either "jsp" or "servlets" (both get translated to it respective index.html) but not when I click on "images" (which gives a directory listing since there is no index.html). I can generate the Java exception by placing an "index.html" under the "images" directory. Is there anyway for me to get rid of these error messages. Even though they are harmless, if too many of them show up, they will "crowd" out the harmful ones that require attention. Besides, they would increase the size of the log file unnecessarily. Bill 2000-12-04 03:42:46 - ContextManager: SocketException reading request, ignored - java.net.SocketException: Connection reset by peer at java.net.PlainSocketImpl.socketAvailable(Native Method) at java.net.PlainSocketImpl.available(PlainSocketImpl.java:429) at java.net.SocketInputStream.available(SocketInputStream.java:141) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479)
RE: Tomcat - mod_jk - Configuration : Need some help please
You need to have tools.jar (in the JDK/lib dir) in your classpath for Tomcat, since it uses javac to complile the JSPs. Good luck. -MC -Original Message- From: Bill Long [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 4:02 PM To: [EMAIL PROTECTED] Subject: Tomcat - mod_jk - Configuration : Need some help please *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi folks, Okay, I'm kind of new to this java stuff, so please bear with me. I think I have it almost done but have reached a stumbling block which I cannot resolve by searching through the archives. I'm sure its a simple one, but It's got me stumped. FOR--- Solaris 2.6 Apache 1.3.12 Tomcat 3.2 mod_jk JDK 1.3 I have my apache set up to use virtual hosts. I have the tomcat set up pretty much stock, with the exception that I added ajp13(i'm not using it in my apache configuration though) and I commented out the /examples, /admin, etc. now all i have in my server.xml file for context is Context path="/java" docBase ="/export/home/cci/public_html/java" croseContext="true" debug="0" reloadable="true" /Context then in my httpd.conf file i have VirtualHost 111.111.111.111 ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/cci/public_html ServerName my.domain.com DirectoryIndex index.cgi index.pl index.html index.shtml Directory /export/home/cci/public_html Options All /Directory Directory /export/home/cci/public_html/cgi-bin Options All /Directory AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /export/home/cci/public_html/logs/error_log TransferLog /export/home/cci/public_html/logs/access_log Directory "/export/home/cci/public_html/java" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /java/servlet/* ajp12 JkMount /java/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/java/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/java/META-INF/" AllowOverride None deny from all /Location /VirtualHost If I http to my virtualhost:8080 the stock tomcat screen comes up. If I http to my virtualhost:8080/java then I get the directory index of the /export/home/cci/public_html/java(as I would expect). I have created a quick jsp to test my setup which just does the basic html tags and then does a % out.println("test") % if I go to http://my.domain.com/java i get the same directory listing as I would expect. the problem is that when i click on test.jsp, i get the following output.(for either the servername:8080/java or the virtual host). Error: 500 Location: /java/test.jsp Internal Servlet Error: javax.servlet.ServletException: sun/tools/javac/Main at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
mod_jk.so == apxs:Break: Command failed with rc=16777215
Hi All, It's been a long battle to make "mod_jk.so" and it failed with rc=16777215. My system has apache-1.3.14 perl5.6 java1.3 tomcat3.2. Tomcat3.2 was built successfully. I tried to build "mod_jk.so" which failed. Can anyone tell me what might had happened from the following log? Thanks. # /usr/local/apache/bin/apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include -I/usr/java/include/solaris -c *.c ../jk/*.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c mod_jk.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_ajp12_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_ajp13.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_ajp13_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_connect.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_jni_worker.c ../jk/jk_jni_worker.c:764: warning: #warning --- ../jk/jk_jni_worker.c:765: warning: #warning NO JAVA 2 HEADERS! SUPPORT FOR JAVA 2 FEATURES DISABLED ../jk/jk_jni_worker.c:766: warning: #warning --- gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_lb_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_map.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_msg_buff.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_nwmain.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_pool.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_sockbuf.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_uri_worker_map.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_util.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=16777215 Scott Liu
Tomcat Win stdErr
I am using JNI code to access some C code. Something is going wrong and Tomcat dies. I know this sounds very vague. it happens on Win2k, and I see very briefly some messages in the Tomcat startup cmd window. But I can't find it anywhere in a log or error file. Where does the System.err. go ? Also what are valid debug levels Context path="/examples" docBase = "webapps/examples" crossContext="false" debug="0" -??? reloadable="true" /Context
Re: mod_jk.so == apxs:Break: Command failed with rc=16777215
On Mon, 4 Dec 2000, Scott Liu wrote: Hi All, It's been a long battle to make "mod_jk.so" and it failed with rc=16777215. My system has apache-1.3.14 perl5.6 java1.3 tomcat3.2. Try: http://www.ccl.net/cca/software/UNIX/apache/ for the log of what I was doing... Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/
tools for Stress Testing
Title: tools for Stress Testing Hi all, I am just wondering if there is a way to do a stress testing on my jsp/servlet pages even I am using the session tracking in my application. for example, I have: 1.jsp for user logon checking 2.jsp for loading data from database 3.jsp for business data calculation 4.jsp for modifying data to database The application works like: when user passed 1.jsp, there will be a set of data in their session, hold by Java data Beans, from database. Base on those data, 3.jsp will performance a certain business logic, then 4.jsp will write data to database. I want to build a set of benchmark/stress testing for all those *.jsp pages. How long it will take? How's the response performance? ... How could I do this? Is there any this kind of tools? By using Tomcat, how can I let tomcat know that I am in the session, and performance certain data set for me? Regards, Chris
RE: Tomcat Win stdErr
My experience has been that certain errors inside a native method can easily bring the JVM down, such as using a string which happens to be null without first testing for this condition. In cases like this, the best you can do is log the input to your native method and see what it was being fed just before it took the JVM down. -Original Message- From: Ensing, Marco [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:43 PM To: [EMAIL PROTECTED] Subject: Tomcat Win stdErr I am using JNI code to access some C code. Something is going wrong and Tomcat dies. I know this sounds very vague. it happens on Win2k, and I see very briefly some messages in the Tomcat startup cmd window. But I can't find it anywhere in a log or error file. Where does the System.err. go ? Also what are valid debug levels Context path="/examples" docBase = "webapps/examples" crossContext="false" debug="0" -??? reloadable="true" /Context
RE: tomcat.log file not found
I believe the standard out-of-the-box server.xml config has a comment that says !-- if you don't want messages on screen, add the attribute path="logs/tomcat.log" to the Logger element below -- Logger name="tc_log" verbosityLevel = "INFORMATION" / simply adding in path="logs/tomcat.log" as an attribute of this Logger element should create you a file. Scott, Esq. And something else Sometimes when I am starting Tomcat I get an error message: "Starting tomcat. Check logs/tomcat.log for error messages" but I cannot find such file. I have looked everywhere (even in other drives) but I cannot find the file tomcat.log. I have to say here that Tomcat does not crash after this error message but keeps on working normally. Any ides about what is going on? Thank you. Panos
RE: tools for Stress Testing
Take a look at JTop. Mark G. Franz -Original Message- From: Chris Chen [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 12:06 PM To: '[EMAIL PROTECTED]' Subject: tools for Stress Testing Hi all, I am just wondering if there is a way to do a stress testing on my jsp/servlet pages even I am using the session tracking in my application. for example, I have: 1.jsp for user logon checking 2.jsp for loading data from database 3.jsp for business data calculation 4.jsp for modifying data to database The application works like: when user passed 1.jsp, there will be a set of data in their session, hold by Java data Beans, from database. Base on those data, 3.jsp will performance a certain business logic, then 4.jsp will write data to database. I want to build a set of benchmark/stress testing for all those *.jsp pages. How long it will take? How's the response performance? ... How could I do this? Is there any this kind of tools? By using Tomcat, how can I let tomcat know that I am in the session, and performance certain data set for me? Regards, Chris
Re: Oracle
system/manager sys/change_on_install Christoph Kukulies wrote: On Mon, Dec 04, 2000 at 10:19:26AM -, Adam Bell wrote: Does anyone know what the default 'sys' password is for Oracle 8.0.5 Wasn't it 'oracle'? Or 'manager'. I believe it can be found in the online documentation. An answer to this question would be greatly appreciated Thanks Adam -- Chris Christoph P. U. Kukulies [EMAIL PROTECTED] -- --- Gordon E. Hooker Principal Applications Engineer Oracle Corporation Brisbane, QLD Phone: (07) 3031 7149 ---
HPUX11 - tomcat+apache+mod_jk fixed
We finally got tomcat 3.2 + apache + mod_jk setup and running under HPUX11. From what we had to do i'm not sure if it had been tested under this environment or not. Our setup is using the binary 3.2 release, but the work below had to be done on the source distribution of tomcat. the apxs line we used : -- /usr/local/apache/bin/apxs -o mod_jk.so -DHPUX11 -I../jk -I/opt/java1.2/include -I/opt/java1.2/include/hp-ux -c *.c ../jk/*.c -- 1.) Edited the file path to tomcat src/src/native/jk/jk_global.h --jk_global.h-- /* sys/select */ --- commented out the above section, due to the fact that HP's select is now in sys/time. This line was in the if statement checking for netware. - otherwise upon running apxs would die with compile errors. 2.) Edited file path to tomcat src/src/native/jk/jk_pool.h - Added code to following section, HPUX11,HPUX, or HPUX10 are not checked for, AND there is no else for a default value, so we added an elif for HP to defiine the type of jk_pool_atom and also a default value. (btw, shouldn't they all just be set to long and just check for MS to set it on it's own?) jk_pool.h--- #elif(HPUX11) a #elif defined(HPUX11) typedef long long jk_pool_atom_t; #else typedef long long jk_pool_atom_t; #endif - after making these changes the above apxs command was used, mod_jk compiled, and now apache + tomcat3.2+ mod+jk are running fine on our HPUX11 box.. (as per following all the other directions in the great docs included) hope this helps someone else. thanks, -charlie. p.s. I'm not subscribed to the dev list any longer, not sure if you want this passed on to them or not. -- Charles Fulton Computational Chemistry Union Carbide Corp. [EMAIL PROTECTED] 304-747-3175
loading servlet on startup
Hello, How do I go about loading a sevlet on startup? I know this is probably on the FAQ page, but unfortunately I am unable to get onto the faq page at the moment. ANy help would be great. thanks, Chris.
Re: How to get HTTP 1.1 response
"Edara, Indira" wrote: I am using tomcat as standalone webserver. When I send simple GET request I am always getting HTTP 1.0 request back. How do I get HTTP 1.1 response? I am using Tomcat 3.1, I placed jsptest.jsp file under /tomcat/ROOT folder and requesting this file using telnet. Thank you Tomcat 3.1 (and 3.2) do not support HTTP/1.1 in stand-alone mode -- for that you need to use Tomcat 4.0 (or use Tomcat 3.1 or 3.2 behind a web server that supports HTTP/1.1). Craig McClanahan
IIS help
Here is the isapi log file output: [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12[jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/dates/date.jsp] is a servlet url - should redirect to ajp12[jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/jsp/dates/date.jsp] is points to the web-inf directory Here is the web server log 192.168.25.56 - - [04/Dec/2000:17:22:58 -0500] "GET /examples/jsp/dates/date.jsp HTTP/1.0" 404 604 It works fine if I put in 192.168.25.56:8080 then i'm able to retrieve the pages. If I leave the 8080 out, then I can't. I've read the documentation. I've read the online messages. What else is there. Please don't respond by pointing me to another page. The dll filter is installed correctly. The green arrow is pointing up. I have IIS running on port 80 and I can't shut it down. I need IIS and I need to server jsp pages. With all the messages, one would think there would be a huge document on the front page that says, "IIS help click here." and lists out all the various methods of solving this problem which is obviously a problem due to the number of messages.
Is there a way to configure the maximum number of session that a tomcat servlet runner can allow?
Hi all -- I'm looking for a way for my servlet to detect when the number of connections is too high, in order to limit the load. What's the best way to do this? Thanks Betty Portal Wave, Inc.The Fastest Track to Integrated e-Businesswww.portalwave.com
RE: IIS help
Is this on a NT Server with IIS? Or a workstation, 95/98 machine with PWS? I ahve found that with the later you have to put in the 8080. Mark G. Franz -Original Message- From: Karim Amin [mailto:[EMAIL PROTECTED]] Sent: Monday, December 04, 2000 2:28 PM To: [EMAIL PROTECTED] Subject: IIS help Here is the isapi log file output: [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 [jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/dates/date.jsp] is a servlet url - should redirect to ajp12 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/jsp/dates/date.jsp] is points to the web-inf directory Here is the web server log 192.168.25.56 - - [04/Dec/2000:17:22:58 -0500] "GET /examples/jsp/dates/date.jsp HTTP/1.0" 404 604 It works fine if I put in 192.168.25.56:8080 then i'm able to retrieve the pages. If I leave the 8080 out, then I can't. I've read the documentation. I've read the online messages. What else is there. Please don't respond by pointing me to another page. The dll filter is installed correctly. The green arrow is pointing up. I have IIS running on port 80 and I can't shut it down. I need IIS and I need to server jsp pages. With all the messages, one would think there would be a huge document on the front page that says, "IIS help click here." and lists out all the various methods of solving this problem which is obviously a problem due to the number of messages.
principal
I can't figure out what a Principal is all about... where does the Principal come from? I log on to a secure page using formbased security and it put in the user name tomcat and passwd tomcat...it says logged in as tomcat principal johnd ! Where does it get johnd?? that is my name...but how does it get this?
Re: build mod_jk for apache
Looks like you are missing the src to native/jk and native/apacheX.X. You need to download the source version and copy the src/native directory into the Tomcat binary tree. Any Tomcat developers know why src/native isn't part of the binary distribution as most people are going to integrate tomcat with some Webserver. Bryan According to [EMAIL PROTECTED]: | | Dear Tomcat users, | When I run the following command to build mod_jk for apache For Solaris: I get | the following errors. Can you please suggest me a solution to fix it... | Thanks a lot for sparing yor time, | regards, | ravik | | apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include | -I/usr/java/include/solaris -c | *.c ../jk/*.c | | gcc: *.c: No such file or directory | gcc: No input files | apxs:Break: Command failed with rc=65536 | | | --
Re: tools for Stress Testing
Take a look at http://sourceforge.net/projects/opensta/ I did not test it but it seems to be a good solution. Eric -- Original Message -- From: Chris Chen [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 4 Dec 2000 15:05:53 -0500 Hi all, I am just wondering if there is a way to do a stress testing on my jsp/servlet pages even I am using the session tracking in my application. for example, I have: 1.jsp for user logon checking 2.jsp for loading data from database 3.jsp for business data calculation 4.jsp for modifying data to database The application works like: when user passed 1.jsp, there will be a set of data in their session, hold by Java data Beans, from database. Base on those data, 3.jsp will performance a certain business logic, then 4.jsp will write data to database. I want to build a set of benchmark/stress testing for all those *.jsp pages. How long it will take? How's the response performance? ... How could I do this? Is there any this kind of tools? By using Tomcat, how can I let tomcat know that I am in the session, and performance certain data set for me? Regards, Chris
cache busting
sorry if this is faq - i checked and couldn't find it except basic info about how tomcat caching works. can't figure out why jsp pages do not get re-compliled after changes are made. (server is NT 4.0 with apache 1.3.14/tomcat 1.0) i've done seemingly everything - deleting the class files in the tomcat/work directory, restarting apache/tomcat. seems like there's only two ways to make it update - reboot the machine or deleting the class file, removing the .jsp files - restarting tomcat, accessing the page (to get a 404) then moving the .jsp file back. very bizzare and un-fun way to write jsp pages. any ideas...? much thanks, -- Jason Hinkle Developer helus, inc. http://www.helus.com/ sorry if this is faq - i checked and couldn't find it except basic info about how tomcat caching works. can't figure out why jsp pages do not get re-compliled after changes are made. (server is NT 4.0 with apache 1.3.14/tomcat 1.0) i've done seemingly everything - deleting the class files in the tomcat/work directory, restarting apache/tomcat. seems like there's only two ways to make it update - reboot the machine or a bizzare sequence of events that includes temporarily removing the jsp files, deleting class files, rebooting apache/tomcat. gots to be a better way. any ideas...? much thanks, -- Jason Hinkle Developer helus, inc. http://www.helus.com/ sorry if this is faq - i checked and couldn't find it except basic info about how tomcat caching works. can't figure out why jsp pages do not get re-compliled after changes are made. (server is NT 4.0 with apache 1.3.14/tomcat 1.0) i've done seemingly everything - deleting the class files in the tomcat/work directory, restarting apache/tomcat. seems like there's only two ways to make it update - reboot the machine or a bizzare sequence of events that includes temporarily removing the jsp files, deleting class files, restarting apache/tomcat. gots to be a better way. any ideas...? much thanks, -- Jason Hinkle Developer helus, inc. http://www.helus.com/
Re: mod_jk.so == apxs:Break: Command failed with rc=16777215
You say you have Java 1.3 but are you sure its installed in /usr/java? Does /usr/java/bin/java -version come back with v1.3? Try "where java" The reason why it looks like there are NO JAVA 2 HEADERS below. This might(?) be due to you having installed a jre and not a jdk? According to Scott Liu: | | Hi All, | | It's been a long battle to make "mod_jk.so" and it failed with | rc=16777215. | My system has | | apache-1.3.14 | perl5.6 | java1.3 | tomcat3.2. | | Tomcat3.2 was built successfully. I tried to build "mod_jk.so" which | failed. | Can anyone tell me what might had happened from the following log? | Thanks. | | # /usr/local/apache/bin/apxs -o mod_jk.so -DSOLARIS -I../jk | -I/usr/java/include -I/usr/java/include/solaris -c *.c ../jk/*.c | gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED | -I/usr/local/apache/include -I../jk -I/usr/java/include | -I/usr/java/include/solaris -DSOLARIS -c mod_jk.c snip | ../jk/jk_jni_worker.c:764: warning: #warning | --- | ../jk/jk_jni_worker.c:765: warning: #warning NO JAVA 2 HEADERS! SUPPORT | FOR JAVA 2 FEATURES DISABLED | ../jk/jk_jni_worker.c:766: warning: #warning | --- snip | gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED | -I/usr/local/apache/include -I../jk -I/usr/java/include | -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_worker.c | -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o | jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o | jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o | jk_ajp12_worker.o mod_jk.o | apxs:Break: Command failed with rc=16777215 | | | Scott Liu
Re: Tomcat and IIS 4.0
Hi, I might be too late to catch up on this. I hope you found a solution already. I have been able to run NT 4.0 + IIS + TOMCAT (also on Win98). In case you have not found something, let me know if i can help you out. Good luck, -Seidhi --- Margarita Manterola [EMAIL PROTECTED] wrote: Hi! I'm trying to make Tomcat and IIS 4.0 work together. I followed the HOW-TO as much as I could understand. But I keep getting a 500 error. I read in the Java Forums of Sun that it could have to do with the versions. I'm using jdk 1.3 and Tomcat 3.1. I really need help with this asap. I beg you, please help me. Thanks, Margarita Manterola ATTACHMENT part 2 application/ms-tnef __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Re: mod_jk.so == apxs:Break: Command failed with rc=16777215
Yes, I am using java1.3. apxs:Break: Command failed with rc=16777215 # /usr/local/bin/java -version /usr/local/bin/java: Command not found. # /usr/java/bin/java -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) Scott [EMAIL PROTECTED] wrote: You say you have Java 1.3 but are you sure its installed in /usr/java? Does /usr/java/bin/java -version come back with v1.3? Try "where java" The reason why it looks like there are NO JAVA 2 HEADERS below. This might(?) be due to you having installed a jre and not a jdk? According to Scott Liu: | | Hi All, | | It's been a long battle to make "mod_jk.so" and it failed with | rc=16777215. | My system has | | apache-1.3.14 | perl5.6 | java1.3 | tomcat3.2. | | Tomcat3.2 was built successfully. I tried to build "mod_jk.so" which | failed. | Can anyone tell me what might had happened from the following log? | Thanks. | | # /usr/local/apache/bin/apxs -o mod_jk.so -DSOLARIS -I../jk | -I/usr/java/include -I/usr/java/include/solaris -c *.c ../jk/*.c | gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED | -I/usr/local/apache/include -I../jk -I/usr/java/include | -I/usr/java/include/solaris -DSOLARIS -c mod_jk.c snip | ../jk/jk_jni_worker.c:764: warning: #warning | --- | ../jk/jk_jni_worker.c:765: warning: #warning NO JAVA 2 HEADERS! SUPPORT | FOR JAVA 2 FEATURES DISABLED | ../jk/jk_jni_worker.c:766: warning: #warning | --- snip | gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED | -I/usr/local/apache/include -I../jk -I/usr/java/include | -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_worker.c | -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o | jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o | jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o | jk_ajp12_worker.o mod_jk.o | apxs:Break: Command failed with rc=16777215 | | | Scott Liu
jdbc
I was a bit confused with the server.xml file. I want to use a jdbc date base to keep a user list in...(names, passwords, roles) and saw the following in the server.xml file: !-- UnComment the following and comment out the above to get a JDBC realm. Other options for driverName: driverName="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL" connectionName="scott" connectionPassword="tiger" driverName="org.gjt.mm.mysql.Driver" connectionURL="jdbc:mysql://localhost/authority" connectionName="test" connectionPassword="test" "connectionName" and "connectionPassword" are optional. -- !-- RequestInterceptor className="org.apache.tomcat.request.JDBCRealm" debug="99" driverName="sun.jdbc.odbc.JdbcOdbcDriver" connectionURL="jdbc:odbc:TOMCAT" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" / -- Why are there two ReqestInterceptor tags? What is the diff between the first one and the second one?
is it possible to dynamically create and interpret JSP?
hello, is it possible to dynamically generate and interpret jsp? the purpose is to reuse custom tag libraries. the jsp code would mainly be retreived from a database. is it at all possible, or should i rather look at some other template mechanism? -- Joakim Verona [EMAIL PROTECTED] http://www.verona.se/
connection pooling
Hello All, I would like to know whether Tomcat supports database connection pooling. If not then do developers have to implement their own connection pool. Also can one use jdbc 2.0 data source with Tomcat. Would appreciate any info on these questions. Thanks in advance Mukul
Re: Catching the Standard Err
Sorry, I solved it. It was in my own C implementation. JNI errors always behave a bit strange. Things work, couldn't solve this easily without catching the standard err and output. From: "Marco Ensing" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Catching the Standard Err Date: Mon, 04 Dec 2000 15:47:49 -0800 Finally I managed to catch the Standard Err. Instead of running the startup.sh/.bat call tomcat_home\bin\tomcat run myError.txt I found out why my tomcat died: # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 4F533F57494E13120E43505002D4 # I'm running C:\www\tomcat\binjava -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) Doing some JNI calls with Tomcat and java 1.3 seems to be unstable. I see what happens with the old jdk 1.2 Anybody else experienced same behaviour. SFMarco _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
Isapi_redirect.dll v3.2 will not load
Facts: WinNT 4.0SP6a, IIS 4.0 Tomcat 3.2 JDK 1.3 I have successfully install, configured and ran Tomcat 3.1 (as stand-alone, then out of process, and finally in-process) following the documentation closely. However, after removing 3.1 and installing 3.2, I am unable to get the isapi_redirect.dll to load. I have followed the exact same steps as 3.1 for the IIS How-To (for out of process) but the dll fails to load (red downward arrow). Tomcat 3.2 as a stand-alone works fine. Questions: 1. When I unzipped 3.2, I noticed that all of the text files in the conf directory have non-MS carriage returns (i.e. black boxes when viewed with Notepad). The same files were fine in 3.1 when viewed with Notepad. Could the improper carriage returns cause problems with running tomcat within IIS? 2. Does the registry key version for the Jakarta Isapi Redirector remain 1.0 for 3.2 as it was for 3.1? 3. Someone suggested that the isapi_redirect filter need be added at the web server level and not the default web site level. I had it at the default web site level for 3.1 and it worked. For 3.2, it does work at either level. What is the real requirement for 3.2? 4. tomcat 3.2 unzips to the jakarta-tomcat-3.2 directory. Version 3.1 ran out of jakarta-tomcat. I deleted jakarta-tomcat and replaced it with the 3.2 tree. Does that matter? 5. Regarding the out of process mode, do I need to edit any of the conf files for 3.2? I did not have to edit any for 3.1. 6. What else can I look at to determine why the redirector won't load? This seems to be giving alot of people headaches. It would be nice if some who was successful could post their configuration procedure (or a modified How To document). I would be happy to but first I must join those who have been successful. -- Peter Desaulniers
APXS mod_jk.so
To Whom Can Help... I am currently trying to setup tomcat to work with apache. I followed instructions but recieved an error that talks about jk_module and how mod_jk.so is garbled and may not be a DSO type file upon start up of TOMCAT. Can anyone help? I believe to correct this I must use the "APXS" program to modify the mod_jk.so file (or is there a better version I can download, where?). I actually tried this to use APXS... however I was unable to perform this task. I followed the command lines in the mod_jk.so documentation however my RedHat Linux op system was unable to find or execute the file even though I can see it in the directory. Can anyone help me? THANKS IN ADVANCE. BDH
RE: APXS mod_jk.so
Check for Perl installed or not, apxs requires Perl to run Kenneth Kwan -Original Message- From: bdh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 05, 2000 9:00 AM To: [EMAIL PROTECTED] Subject:APXS mod_jk.so To Whom Can Help... I am currently trying to setup tomcat to work with apache. I followed instructions but recieved an error that talks about jk_module and how mod_jk.so is garbled and may not be a DSO type file upon start up of TOMCAT. Can anyone help? I believe to correct this I must use the "APXS" program to modify the mod_jk.so file (or is there a better version I can download, where?). I actually tried this to use APXS... however I was unable to perform this task. I followed the command lines in the mod_jk.so documentation however my RedHat Linux op system was unable to find or execute the file even though I can see it in the directory. Can anyone help me? THANKS IN ADVANCE. BDH
Mod_jk overhead and IIS availability?
I am trying to see how many requests per second can be handled on a configuration including 1 apache with mod_jk module balancing the load on two tomcat workers and I come through really strange results: - 1 apache acting as a proxy and using rewrite rules to forward requests to a tomcat server on port 8080 handles 80 requests/second - The same apache using mod_jk, two tomcat servers (the one above and another one on a similar machine), handles 4 requests/second - using ajp12 I am using WebBench from ZDnet, and all requests to Apache are not giving back any cookie. I therefore wonder: - Does mod_jk add a big overhead compared to a simple rewrite rule? - Does the fact that my faked clients never come back with the AJP cookie adds an overhead? - Is there a real diff. in speed between ajp12 and ajp13? Has anyone used mod_jk for load balancing? And will mod_jk be ported to IIS? Thanx for your help!
Re: More on JSP in XML format
Pierre Delisle wrote: As "Bap" replied, you must make sure you "escape" content that can be interpreted by XML. Remember, this is an XML document that is being submitted to an XML parser. By doing this: jsp:scriptlet ![CDATA[ for(int i=0; i6; i++) out.println(i); ]] /jsp:scriptlet It should work fine. When you asked me to report bugs I was not sure if you mneant for me to enter them to bugrat - I created Bug Report #511 with synopsis "Error in parsing scriptlet when jsp is in xml format " to describe this problem. Yes, bugrat is the preferred way to submit bug reports. If just submitted to the mailing list, they unfortunately run the chance to fall through the cracks. -- Pierre Pierre and Bap - thanks for the clarification - as you point out the use of CDATA is what I needed. Now I finally understand the note in section 5.1.9 of the spec except the section 5.5 it refers to is missing. I do appreciate the help - as I said when I started this I dont always find the spec easy to understand. -- Thanks and Regards Anne and Bill Moore [EMAIL PROTECTED] Remember: Life is too short to drink bad wine!!!
Tomcat3.1 workers.properties file
Hi! I think my previous mail was not sent out so here goes: I am trying to set up load balancin between 2 tomcat servers. Just some simple questions: Does the workers file works on tomcat 3.1 with mod_jserv? I am runnin Redhat 6.2. If it does, can you guys send me a copy of your worker.properties file? I tried usin the tomcat 3.2 workers file but couldnt get it workin. Is there other configuration that I have to make other than the workers file? Thanks a mil! Samo
Problems Setting up new Tomcat3.2 installation with jdk1.3
I have encountered some problems setting up Tomcat on adevelopment Linux system. If anyone could throw up some suggestions I would be most appreciative. I have installed Tomcat3.2 and I can run the sample servlets and jsp applications after I have started the tomcat server. My problem is that I can't compile the simple Hello.java application in the sample directory e.g. [mark@netdev src]$ javac Hello.java Hello.java:98: Can''t find method "setContentType(java.lang.String)" [mark@netdev src]$ Also the interfaces and other code defined in /usr/local/jakarta-tomcat/src/javax have NO associated class objects? Yet on the other machine with the same configuration I can run the sample applications and compile new servlets. The machine that doesallow me to compile apps now runs jdk1.3, but was previously running jdk1.1.7, also this machine has class objects in the /usr/local/jakarta-tomcat/src/javax directory. If you need it here are some of the steps I have taken and my system settings, related to the installation of tomcat. Here are the steps I have taken. Downloaded the latest stable version of Tomcat -- jakarta-tomcat.tar.gz I have run tar and extracted tomcat to /usr/local The resultant directory structure is C:\jakarta-tomcat\bin \conf \doc \lib \logs \src \webapps \work I have set JAVA_HOME to /usr/local/jdk1.3 //-- Root directory of java installation I have set the PATH to include /usr/local/jdk1.3/bin //-- The directory that holds executables for //-- javac, java, javadoc etc /usr/local/jdk1.3 //-- Root directory of java installation /usr/local/jdk1.3/lib //-- The location of tools.jar /usr/local/jakarta-tomcat //-- Root directory of tomcat installation /usr/local/jakarta-tomcat/bin //-- Tomcat executables I have set the CLASSPATH to include /usr/local/jdk1.3 /usr/local/jakarta-tomcat/src /usr/local/jdk1.3/lib I have set TOMCAT_HOME to /usr/local/jakarta-tomcat //-- The root installation directory Many thanks. Mark
Re: Servlet in the middle... in the middle.. in the middle
I have rewritten following reply to MVC thread. Hope it helps. - guess, there IS a way to forward the .jsp processing to tomcat's jsp-servlet, even when you have registered your own servlet to process all .jps requests. Instead of using ServletContext.getRequestDispatcher(url).forward(request, response); use ServletContext.getNamedRequestDispatcher("jserv-servlet").forward(request, response); It worked for me. Note: This method does not work if you want to "re-write" the url in your handler servlet. JSP files processed by the jserv-servlet is always the URL of the original request. --- Kedar Choudhary. - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 01, 2000 1:23 AM Subject: Re: Servlet in the middle... in the middle.. in the middle "Bragg, Casey" wrote: Is there a way to do the following? Let's say a user requests /foo/junk.gif, or /foo/test.jsp. I'd like all requests to /foo/* to first be processed by a servlet. The servlet performs some operation (user authentication specifically). If the servlet processing performs normally, I want the request forwarded to the page actually requested (in the case of .jsp files, the page must be processed by the jsp engine first of course). I've set my Tomcat 3.1 up as defined below. The result is an infinite loop. A request of /foo/junk.gif is redirected to the servlet and then to /foo/junk.gif (which then is redirected to the servlet and then to /foo/junk.gif... and so on). This question came up earlier today as well. The bottom line is that you cannot do what you are after in Tomcat 3.x (which is based on the servlet 2.2 specification). You can do it by using a Filter from the servlet 2.3 API (which Tomcat 4.0 supports). See my expanded explanation on a thread with subject "MVC problem". Thanks so much for your help! ...Casey Craig McClanahan
It is getting closer to make mod_jk.so, but??
Hi All, I downloaded a precompiled "mod_jk.so" for solaris 2.6 offered by a tomcat-user and it did not work on my system. I still need to compile it myself. It is almost there. Solaris 2.6/tomcat3.2/perl5/apache1.3.14 command used to build "mod_jk.so": /usr/local/apache/bin/apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -c *.c ../jk/*.c log result with error "apxs:Break: Command failed with rc=16777215": gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c mod_jk.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_ajp12_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_ajp13.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_ajp13_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_connect.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_jni_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_lb_worker.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_map.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_msg_buff.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_nwmain.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_pool.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_sockbuf.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_uri_worker_map.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_util.c gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=16777215 Thanks, Scott
Virtual Domains
Could somone please help me with Virtual Domains for Tomcat 3.2? I'm runing Sco Unixware 7.1 , Tomcat 3.2, and Apache 1.3.12. I am also using all the example and default configurations of that come with Tomcat3.2 The onlines docs show the configuration for virtual domains to look like this? ## #Apache Tomcat Virtual Hosts Sample Configuration# ## LoadModule jserv_module modules/ApacheModuleJServ.dll IfModule mod_jserv.c ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel notice ApJServDefaultHost localhost ApJServDefaultPort 8007 # 1 Creating an Apache virtual host configuration NameVirtualHost 9.148.16.139 # 2 Mounting the first virtual host VirtualHost 9.148.16.139 ServerName www.vhost1.com ApJServMount /examples ajpv12://localhost:8007/examples /VirtualHost # 3 Mounting the second virtual host VirtualHost 9.148.16.139 ServerName www.vhost2.com ApJServMount /examples ajpv12://localhost:8009/examples /VirtualHost /IfModule What about the Context mapping for /examples above ?? This outline did not show any. Would I do the context mapping before or after the above Virtual Host configurations? This is what my /examples context mapping looks, it is the default Tomcat configuration in the tomcat-apache.conf that I have not touched, my question here is, if I still havae to include this, do I change the way in which this was done when using virtual host? Or does it remain this same? Alias /examples "/home/flalone/jakarta-tomcat-3.2/webapps/examples" Directory "/home/flalone/jakarta-tomcat-3.2/webapps/examples" Options Indexes FollowSymLinks /Directory ApJServMount /examples/servlet /examples Location "/examples/WEB-INF/" AllowOverride None deny from all /Location Location "/examples/META-INF/" AllowOverride None deny from all /Location Thank You Very Much Frank LaLone
Re: Hi folks!
First day in this mailing list and first question: Does anyone know something about the Basic Authentication mechanism with Tomcat? It was supposed to be fixed in this release. Did anyone try it? Is it working? Thanks, Vittorio It's working for me, *but* you need to following in web.xml: login-config auth-methodBASIC/auth-method realm-nameYour realm/realm-name /login-config Jon
Re: MVC problem
I guess, there IS a way to forward the .jsp processing to tomcat's jsp-servlet, even when you have registered your own servlet to process all .jps requests. Instead of using ServletContext.getRequestDispatcher(url).forward(request, response); use ServletContext.getNamedRequestDispatcher("jserv-servlet").forward(request, response); It worked for me. Note: This method does not work if you want to "re-write" the url in your handler servlet. JSP files processed by the jserv-servlet is always the URL of the original request. Kedar - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, November 30, 2000 11:27 PM Subject: Re: MVC problem See below. "Aiken, David" wrote: hi all.. We're hitting a problem with the MVC approach in tomcat. Our controller is designed to intercept all requests for URLs within our web application so that it can handle internationalization and security checks centrally. The problem is as follows: - the controller servlet registers interest in URLs of the form '*.jsp' - a request for 'a.jsp' arrives and the controller checks security and negotiates the locale settings - the controller includes the contents of 'a.jsp' in the response At this point it seems that tomcat takes over. Unfortunately, it doesn't retrieve the contents of the page - it just resubmits the request to the controller again, resulting in an endless loop. This also occurs for a 'forward'. Not good. One of the workarounds is to use URLs of the form '.do' to request page content. This allows the controller to forward to a .jsp URL without getting into a loop. The problem is that someone who knows the structure of the www site can submit requests for '.jsp' directly and bypass any security checks. The obvious workaround for this is to put tags into the .jsp pages and java calls into any servlets to perform the security check - but this negates any advantage to the MVC approach (and forces page/servlet developers to remember to place checks into all of their content). We're probably missing something - it seems difficult to believe that the MVC approach has such a fundamental flaw. thanks! David Aiken BMC Software What you are hitting is primarily a limitation of the way that servlet mappings work in servlet 2.2. If you define a servlet mapping that maps the "*.jsp" extension to the JSP servlet (as Tomcat does by default), then the JSP servlet will be executed -- bypassing your security checks. If you register the "*.jsp" extension to your own servlet, then you will receive the request -- but there is no way to forward control later to get the JSP page executed. This kind of issue was one of the motivating factors for the Filter API of the new servlet 2.3 spec (which Tomcat 4.0 supports). This lets you register filters that can preprocess (and postprocess, if you want) requests to particular URI patterns, completely independently of which servlets will actually process those requests. For your use case, you could write a filter that is mapped to the "*.jsp" extension. It would look at the request, before the JSP system ever sees it. If your security checks are satisfied, simply pass the request on through the filter chain, which will cause the page to be executed in the usual way. If a check fails, you can redirect the user to an error page instead. Craig McClanahan