trouble with servelts
i am a student and we use Tomcat as our server. I have been trying to run a basic servlet program but have been unsucessful as of yet. My tomact runs perfect, gives me the index page and stuff. Bu my servelt comiples with following errors C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:2: package javax.servlet does not exist import javax.servlet.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:13: cannot resolve symbol symbol : class HttpServlet location: class HelloWWW public class HelloWWW extends HttpServlet { ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:14: cannot resolve symbol symbol : class HttpServletRequest location: class HelloWWW public void doGet(HttpServletRequest request, ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:15: cannot resolve symbol symbol : class HttpServletResponse location: class HelloWWW HttpServletResponse response) ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:16: cannot resolve symbol symbol : class ServletException location: class HelloWWW throws ServletException, IOException { ^ 6 errors Tool completed with exit code the code for the same is as follow: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class HelloWWW extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html); PrintWriter out = response.getWriter(); String docType = !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 + Transitional//EN\\n; out.println(docType + HTML\n + HEADTITLEHello WWW/TITLE/HEAD\n + BODY\n + H1Hello WWW/H1\n + /BODY/HTML); } } - Do you Yahoo!? Free Pop-Up Blocker - Get it now
Re: trouble with servelts
You are missing the servlet.jar file, which contains the neccesary classes for your servlet to compile. Just make sure your compiler can find the jar file in your classpath. If you have a IDE like netbeans than you have it easy, just mount the jar file, and you will be able to compile without problems. kandathil girish wrote: i am a student and we use Tomcat as our server. I have been trying to run a basic servlet program but have been unsucessful as of yet. My tomact runs perfect, gives me the index page and stuff. Bu my servelt comiples with following errors C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:2: package javax.servlet does not exist import javax.servlet.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:13: cannot resolve symbol symbol : class HttpServlet location: class HelloWWW public class HelloWWW extends HttpServlet { ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:14: cannot resolve symbol symbol : class HttpServletRequest location: class HelloWWW public void doGet(HttpServletRequest request, ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:15: cannot resolve symbol symbol : class HttpServletResponse location: class HelloWWW HttpServletResponse response) ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:16: cannot resolve symbol symbol : class ServletException location: class HelloWWW throws ServletException, IOException { ^ 6 errors Tool completed with exit code the code for the same is as follow: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class HelloWWW extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html); PrintWriter out = response.getWriter(); String docType = !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 + Transitional//EN\\n; out.println(docType + HTML\n + HEADTITLEHello WWW/TITLE/HEAD\n + BODY\n + H1Hello WWW/H1\n + /BODY/HTML); } } - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trouble with servelts
Hello Girish, You have to set the CLASSPATH environment varaible to include the tomcat install directory\common\lib\servlet.jar in order to compile servlets. Have you run the example application available at http://localhost/examples/servlets/index.html. rgds Antony Paul - Original Message - From: kandathil girish [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:00 PM Subject: trouble with servelts i am a student and we use Tomcat as our server. I have been trying to run a basic servlet program but have been unsucessful as of yet. My tomact runs perfect, gives me the index page and stuff. Bu my servelt comiples with following errors C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:2: package javax.servlet does not exist import javax.servlet.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:13: cannot resolve symbol symbol : class HttpServlet location: class HelloWWW public class HelloWWW extends HttpServlet { ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:14: cannot resolve symbol symbol : class HttpServletRequest location: class HelloWWW public void doGet(HttpServletRequest request, ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:15: cannot resolve symbol symbol : class HttpServletResponse location: class HelloWWW HttpServletResponse response) ^ C:\Tomcat 4.1\webapps\ROOT\WEB-INF\Classes\HelloWWW.java:16: cannot resolve symbol symbol : class ServletException location: class HelloWWW throws ServletException, IOException { ^ 6 errors Tool completed with exit code the code for the same is as follow: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Simple servlet that generates HTML. * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class HelloWWW extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html); PrintWriter out = response.getWriter(); String docType = !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 + Transitional//EN\\n; out.println(docType + HTML\n + HEADTITLEHello WWW/TITLE/HEAD\n + BODY\n + H1Hello WWW/H1\n + /BODY/HTML); } } - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PLEASE HELP! How can I make Tomcat see DB2 jdbc driver?
hiya, try renaming the driver to db2java.jar hth JasonG -Original Message- From: Sarah Zou [SMTP:[EMAIL PROTECTED] Sent: Thursday,4 December 2003 7:09 To: [EMAIL PROTECTED] Subject: PLEASE HELP! How can I make Tomcat see DB2 jdbc driver? Hi All, I am using Tomcat 4.1.29 and DB2 8.1. I try to use the servlet below to see if it can find DB2 jdbc driver: public class Test extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void service(HttpServletRequest request, HttpServletResponse response) { try{ Class.forName (COM.ibm.db2.jdbc.app.DB2Driver).newInstance (); } catch (Exception e) { System.err.println (\n Error loading DB2 Driver...\n + e); } } } I have tried to put db2java.zip in Tomcat common\lib or webapp\web-inf\lib. Also I tried to add db2java.zip to set classpath in catalina.bat in Tomcat bin. It didnot work. Your help will be very much appreciated. Sarah - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets with JDBC connectivity
This is how I handle mine modified for your application. import java.sql.*; public class DBUtil { /** Retrieves results from query as a DBResults class. */ public static DBResults getQueryResults(String query, String dBase) { Connection connection = Conn.getConn(dBase); Statement statement = null; ResultSet resultSet = null; DBResults dbResults = null; boolean good = false; try { DatabaseMetaData dbMetaData = connection.getMetaData(); String productName = dbMetaData.getDatabaseProductName(); String productVersion = dbMetaData.getDatabaseProductVersion(); statement = connection.createStatement(); resultSet = statement.executeQuery(query); ResultSetMetaData resultsMetaData = resultSet.getMetaData(); int columnCount = resultsMetaData.getColumnCount(); String[] columnNames = new String[columnCount]; // Column index starts at 1 (a la SQL) not 0 (a la Java). for (int i = 1; i columnCount + 1; i++) { columnNames[i - 1] = resultsMetaData.getColumnName(i).trim(); } dbResults = new DBResults( connection, productName, productVersion, columnCount, columnNames); while (resultSet.next()) { String[] row = new String[columnCount]; // Again, ResultSet index starts at 1, not 0. for (int i = 1; i columnCount + 1; i++) { String entry = resultSet.getString(i); if (entry != null) { entry = entry.trim(); } row[i - 1] = entry; } dbResults.addRow(row); } good = true; } catch (SQLException sqle) { System.err.println(Error connecting: + sqle); } finally { // Always make sure result sets and statements are closed, // and the connection is returned to the pool if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { System.err.println(DataBaseUtilities Error closing resultset: + e); } resultSet = null; } if (statement != null) { try { statement.close(); } catch (SQLException e) { System.err.println(DataBaseUtilities Error closing statement: + e); } statement = null; } if (connection != null) { try { connection.close(); } catch (SQLException e) { System.err.println(DataBaseUtilities Error closing connection: + e); } connection = null; } if (good) return (dbResults); else return (null); } } /** Runs update query. */ public static void setUpdate(String query, String dBase) { Connection connection = Conn.getConn(dBase); Statement statement = null; boolean good = false; try { statement = connection.createStatement(); statement.executeUpdate(query); } catch (SQLException sqle) { System.err.println(Error connecting: + sqle); } finally { // Always make sure statements are closed, // and the connection is returned to the pool if (statement != null) { try { statement.close(); } catch (SQLException e) { System.err.println(DataBaseUtilities Error closing statement: + e); } statement = null; } if (connection != null) { try { connection.close(); } catch (SQLException e) { System.err.println(DataBaseUtilities Error closing connection: + e); } connection = null; } } } } And to handle the data from the resultset that would otherwise be unaccessable it is places in an DBResults object. package srm; import java.sql.*; import java.util.*; /** Class to store completed results of a JDBC Query. * Differs from a ResultSet in several ways: * UL * LIResultSet doesn't necessarily have all the data; * reconnection to database occurs as you ask for * later rows. * LIThis class stores results as strings, in arrays. * LIThis class includes DatabaseMetaData (database product * name and version) and ResultSetMetaData * (the column names). * LIThis class has a toHTMLTable method that turns * the results into a long string corresponding to * an HTML table. * /UL * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class DBResults { private Connection connection; private String productName; private String productVersion; private int columnCount; private String[] columnNames; private Vector queryResults; String[] rowData; public DBResults(Connection connection, String productName, String productVersion, int columnCount, String[] columnNames) { this.connection = connection; this.productName = productName; this.productVersion = productVersion; this.columnCount = columnCount; this.columnNames = columnNames; rowData = new String[columnCount]; queryResults = new Vector(); } public void addRow(String[] row) { queryResults.addElement(row); } public int getColumnCount() { return(columnCount); } public String[] getColumnNames() { return(columnNames); } public Connection getConnection() { return(connection); } public String getProductName() { return(productName); } public String getProductVersion() { return(productVersion); } public String[] getRow(int index) { return((String[])queryResults.elementAt(index)); } public int
Tomcat 5.0.16 as a service
OK, OK. I know 5.x is SUPPOSED to have this easy to use service installer, but it's not working for me. The installation program doesn't even try to create the service (at least I can't find any evidence of it), so I'm trying to create my own using the tomcat.exe program, but when I go to start it I get this evil The Apache Tomcat (Live) service on Local Computer started and then stopped. Some services No log files of any type are created. If I run startup.bat from a command line, it starts up and runs fine, but I need the service. I'm using: tomcat //IS//ApacheTomcatLive --DisplayName Apache Tomcat (Live) --Description Apache Tomcat 5.0.16 - Live Instance --ImagePath c:\www\live\tomcat\5.0.16\bin\bootstrap.jar --StartupClass org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass org.apache.catalina.startup.Bootstrap;main;stop --Java auto There's no linefeeds obviously, and I've even tried adding tools.jar to the ImagePath argument as well. Does anybody see what I'm doing wrong? Thanks, Mike
trouble starting tomcat on kaffe
Hai I am trying to start tomcat on kaffe virtual machine.I made the following changes: JAVA_HOME=/usr/local/kaffe/bin.In the conf/web.xml,i added the code init-param param-namecompiler/param-name param-valuekjc/param-value /init-param I am working on tomcat version 4.1.29.The error being thrown by tomcat is: java.lang.ClassNotFoundException:org/apache/naming/java/javaURLContextFactory. When I type on browser http://localhost:8080,i get the error Could not connect to host(port 8080). Any suggestion or help is greatly appreciated. Thanks --Ram __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
migrating from TDK2.1 to tomcat 4.1.29
hi, i wanted to get an app developped under TDK2.1 to run under tomcat 4.0( running as a service!). I couldn't find tomcat 4.0 so i had to get 4.1.29, installed it then tryed to copy everything from tdk2.1\webapps\myapp_name\WEB-INF\ to tomcat4.1.29\webapps\myapp_name. It didn't work, because of the screens that were not placed in the proper location. Now i would like to know where i have to copy the screens that can be found under tdk2.1\webapps\myapp_nametemplates\app in the newly installed tomcat?? My second question relates to the actual webserver running under the TDK. When i installed the TDK bundle, there was a webserver listning on port If i got it right, i can use the TDK as a webserver itself, i wouldn't need to installed a third party webs8080, so i understood that i wouldn't need another webserver. Pease correct me if am wrong or confused on this issue _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SEVERE: Error in action code
Hi, Was browsing through some logfiles and found this, is this something I should worrie about ? SEVERE: Error in action code java.net.SocketException: Connection reset at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326) at org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.j ava:500) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:619) at java.lang.Thread.run(Thread.java:534) Thanx -reynir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ClassCastException
Hi I am using axis web services with the java cog kit, each web service is a application under tomcat. But when two applications wish to use the cog kit, ie the web service is invoked, the first web service works fine and the the second throws this stackTrace: java.lang.ClassCastException at org.globus.gsi.bc.BouncyCastleUtil.getIdentity(BouncyCastleUtil.java:387) at org.globus.gsi.bc.BouncyCastleUtil.getIdentity(BouncyCastleUtil.java:402) at org.globus.gsi.GlobusCredential.getIdentity(GlobusCredential.java:342) at org.globus.gsi.gssapi.GlobusGSSCredentialImpl.lt;initgt;(GlobusGSSCredenti alImpl.java:56) Now if i restart tomcat, and call the second web service first, it works fine, but then the original first web service when called throws the exception. It seems that two applications cannot load the cog kit under tomcat? Has anyone any ideas on what is happening??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.x
Sorry for the silly question: but is tomcat 5.0.x still in beta or was it declared ready for production usage? Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic
Session expires on accessing load balanced servers individually
Hello, On accessing an individual servers among five load balanced servers, I get session expired error for my web based application. For ex: I have 5 servers as a1, a2, a3, a4, a5 So when I access the URL a1.appname.com, on accessing the web application, I get session expired message. This happens on few of the systems and not on all. Does this problem relates to tomcat / apache settings or can we do something for it through Internet Explorer settings. Thanks and Regards, Abhijeet Selukar, Cybage Software
[offtopic] Architecture Question
Hi, We have two tomcat servers. One is located at our enterprise. The other is located at our hosting provider. They can see each other by Internet. We would like to set up an unique authentification system for both server. The authentification system will be on the server at our entreprise. The web applications on both servers will query the authentification system. What's the best/clean/nice way to do this ? JAAS ? Web services ? SSL keys ? Thanks
Re: TC 4 -oreillyMultipart- TC5
Hi Joav, the hint putting the lib into WEB-INF/lib instead of $CATALINA_HOME/common/lib put it, thanks to you. But why ? Another classloader issue ? I think this could only be a workaround, not really a solution because this public lib may be used by other servlets, too. What worries is that not all of the classes inside the lib were rejected but only one of them. Is there a kind of class-version-control ? Strange... Hope this gets fixed in the upcoming non-beta release of TC 5. grisi - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 3:53 PM Subject: RE: TC 4 -oreillyMultipart- TC5 Howdy, I don't have an immediate idea, which is worrisome (to me at least ;)). Let's try to not put this oreilly jar in commons/lib, but instead in WEB-INF/lib. Yoav Shapira Millennium ChemInformatics -Original Message- From: Dirk Griesbach [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:44 AM To: Tomcat Users List Subject: Re: TC 4 -oreillyMultipart- TC5 Hi Yoav, the 'full' error trace is: java.lang.IllegalAccessError: tried to access method com.oreilly.servlet.multipart.Part.init(Ljava/lang/String;)V from class com.oreilly.servlet.multipart.ParamPart at com.oreilly.servlet.multipart.ParamPart.init(ParamPart.java:42) at com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartPar ser. j ava:341) ... the calling servlet method ... the source code mentioned reads: STARTSNIP of class ParamPart public class ParamPart extends Part { /** contents of the parameter */ private byte[] value; HashMap hashMap; private String encoding; /** * Constructs a parameter part; this is called by the parser. * ... */ ParamPart(HashMap hashMap, String name, ServletInputStream in, String boundary, String encoding) throws IOException { super(name); --- start of error-trace this.encoding = encoding; .. ENDSNIP class 'ParamPart' STARTSNIP of class 'Part' public abstract class Part { private String name; /** * Constructs an upload part with the given name. */ Part(String name) { -- this constructor being called causes the error I think this.name = name; } /** * Returns the name of the form element that this Part corresponds to. * * @return the name of the form element that this Part corresponds to. */ public String getName() { return name; } . ENDSNIP class 'ParamPart' I have used TC 5 'as is' after standard installation; no changes to server.xml. Same web.xml. Same with TC4. The multipartlibrary both times (TC4 and TC5) being in ../common/lib Same (web-)application, different results. Any ideas ? grisi - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 3:08 PM Subject: RE: TC 4 -oreillyMultipart- TC5 Howdy, Class ParamPart is public and its constructor is public as well? Strange. Are you running with different security settings? Did you put the library in a different place? Yoav Shapira Millennium ChemInformatics -Original Message- From: Dirk Griesbach [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:28 AM To: Tomcat Users List Subject: TC 4 -oreillyMultipart- TC5 Hi folks, I encountered a strange behaviour using 'oreilly's' multipartlibary (from Nov,2002): It works fine on TC 4.1.27 but exactly the same servlet and library with TC 5.0.12 and 5.0.14 (just copied them) the error log reads: java.lang.IllegalAccessError: tried to access method com.oreilly.servlet.multipart.Part.init(Ljava/lang/String;)V from class com.oreilly.servlet.multipart.ParamPart Class 'Part' IS public, so why this error on TC5 ? And no error on TC 4 ? Any suggestions ? greets grisi This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
Re: Servlets with JDBC connectivity
Thanks, Doug. I'll have a look at this today and make sure I understand it. Todd On Dec 3, 2003, at 11:30 PM, Doug Parsons wrote: The whole class I need, apparently. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets with JDBC connectivity
On Dec 3, 2003, at 6:59 PM, Kwok Peng Tuck wrote: But this means I still have to get a connection, create a statement, and execute a query or update on the statement in every servlet where I want to use the connection. Yes, it locates the connection details (i.e., the JDBC connection method, the database name, user and password) somewhere centrally so that I don't have to keep coding it, but all of the connection overhead still has to be dealt with in every servlet in a webapp. The datasource solution that a few people in the list (including me :) ) have been asking you to look at provides a connection pool to your web application. In your code where you ask for a connection from JNDI, you are actually getting a connection from the pool, which is already setup. When you call the close() method of this connection, it is not actually destoryed but returned to the connection pool, ready to be used. I'm sorry. When I said connection overhead, I didn't mean the overhead of creating a Connection object, I meant the overhead of having to write all the code to create one. I understand that there's a connection pool in a central location, but getting a connection from that pool is no less complicated for the programmer than creating one from scratch. I'm incredibly lazy. It seems that if I'm only going to be connecting to two or three databases in a webapp, it should be possible to maintain open connections to those databases somewhere so that anywhere in my webapp I can issue a statement that runs a SQL statement. In other words, I want to encapsulate the connection creation so that my other programs can just assume that it's done. This may not be possible, but it seems a reasonable OO thing to do. Does that make more sense, or am I still just confused? Todd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general)
Thank you - your explanation helps. From: Bodycombe, Andrew [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general) Date: Wed, 03 Dec 2003 11:48:09 + The sessionCreated() method is called when the session is first created, and therefore has no attributes set. If you are interested in session attributes, perhaps you should look at HttpSessionAttributeListener or HttpSessionBindingListener. Hope this helps Andy -Original Message- From: Tommy Smith [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 11:03 To: [EMAIL PROTECTED] Subject: Re: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general) Sorry, just joined this group - so I hope I am not jumping in at the wrong time to this thread. I am running Tomcat 4.1.18 (with Cocoon on Windows 2000, incidentally) Anyway, I have implemented a HttpSessionListener, code below is for the on sessionCreated event handler I am interested in various session attributes, and I am confused as to why I can only access the session id and not any attributes. I have propogated attributes to the session (I am able to access them in Cocoon). Output from Tomcat as follows : User null Session E0647E125B965537D1B7E087F5915FA2 Driver loaded OK Acquired connection OK Executed OK - login public void sessionCreated(HttpSessionEvent se) { Object sessionId = se.getSession().getId(); Object sessionUser = se.getSession().getAttribute(user); System.out.println(User +sessionUser); System.out.println(Session +sessionId); for (Enumeration e = se.getSession().getAttributeNames() ; e.hasMoreElements() ;) { System.out.println(Attribute +e.nextElement()); } try { Class.forName(dbDriver); System.out.println(Driver loaded OK); con = DriverManager.getConnection(dbURL,dbUser, dbPwd); System.out.println(Acquired connection OK); Statement s = con.createStatement(); rs = s.executeQuery(update calib_users set logged_in = 'Y' where username = 'simon'); rs = s.executeQuery(commit); System.out.println(Executed OK - login); } catch (ClassNotFoundException cnfe) { System.out.println(No driver); return; } catch (SQLException sqle) { System.out.println(No connection); return; } } _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets with JDBC connectivity
I hadn't noticed that ResultSets need to be closed. But why couldn't I close it after dealing with it in whichever servlet I call it from? Also, if the Connection is a static variable in SQLUtils that all the servlets use, it won't ever get closed. I'm just realizing that there's probably a major scalability issue here that I need to worry about, but I'm still thinking this has to be easier... Todd P.S. A little context, so you all don't tell me to get another job. I teach high school math and computer science, and in one of my advanced classes we decided to create a webapp. One group is working on the database backend and another group is writing Velocity templates to display the information. I'm learning as we go, because I've written about 5 or 6 total servlets since last summer. I've got the Java Servlets book and the JDBC book from O'Reilly, but I haven't had time to read them cover to cover, so there may be gaps in my knowledge. All my database knowledge has also been picked up since last summer, and I spend maybe an hour a day actually writing code. My concern is that we set this up in a way that is sound, but perhaps more importantly, clean and easy to understand. Since it's me and a bunch of high school seniors who'll be messing up the code, something straightforward seems the way to go. Thanks again for your patience. On Dec 3, 2003, at 12:27 PM, Christopher Schultz wrote: Todd, SQLUtils.executeQuery(a SQL statement); SQLUtils.executeUpdate(another one); Just out of curiosity, what do these methods return? If the former returns a ResultSet object, then you're in for a world of trouble. The ResultSet will never get closed, or you'll close the connection over which the ResultSet communicates, and then you're hosed, 'cause the calling code can't access the data. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.0.16 as a service
-Original Message- From: Mike OK, OK. I know 5.x is SUPPOSED to have this easy to use service installer, but it's not working for me. I'm using: tomcat //IS//ApacheTomcatLive --DisplayName Apache Tomcat (Live) --Description Apache Tomcat 5.0.16 - Live Instance --ImagePath c:\www\live\tomcat\5.0.16\bin\bootstrap.jar --StartupClass org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass org.apache.catalina.startup.Bootstrap;main;stop --Java auto Add the --Install c:\www\live\tomcat\5.0.16\bin\tomcat.exe and use --Java java (not --Java auto). If using --Java auto (inproc jvm.dll) you will need --StartupClass org.apache.catalina.startup.BootstrapService;main;start Also add --JavaOptions -Xrs (so that redirected java.exe doesn't die on first logoff). MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Max. wait time for a Servlet Response
Hi, How long a servlet can wait to give reponse. Actually, my servlet wants to wait until some process done by other component. This will periadically will check, if it is done then only i need to give response to client other wise i need to wait for some time then i need to check. In this scenario, how long my iteration logic can implementable. Thanks Regards, Ashok.D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI, DataSource, and ClassCastException
I have a situation where I am attempting to downcast a DataSource resource into the exact class that getClass().getName() reports the object is, but it's causing a ClassCastException. -- server.xml: GlobalNamingResources Resource name=LoanAuditorDB auth=Container type=org.enhydra.jdbc.pool.StandardXAPoolDataSource/ ResourceParams name=LoanAuditorDB ...more /ResourceParams /GlobalNamingResources ...more Context path=/workbench docBase=C:\Code\loanauditor\src\webapp\workbench workDir=C:\Code\loanauditor\src\webapp\workbench\WEB-INF\work reloadable=true debug=0 ResourceLink name=jdbc/loanauditor global=LoanAuditorDB type=org.enhydra.jdbc.pool.StandardXAPoolDataSource/ ResourceLink name=jta/loanauditor global=UserTransaction type=javax.transaction.UserTransaction/ /Context -- web.xml resource-ref descriptionDB Connection/description res-ref-namejdbc/loanauditor/res-ref-name res-typeorg.enhydra.jdbc.pool.StandardXAPoolDataSource/res-type res-authContainer/res-auth /resource-ref -- constructor from abstract class, AbstractDAO.java: protected AbstractDAO() { try { Context ctx = new InitialContext(); Object o = ctx.lookup(java:comp/env/jdbc/loanauditor); log.debug(loanauditor from JNDI: + o.getClass().getName()); ds = (org.enhydra.jdbc.pool.StandardXAPoolDataSource) o; ds.setJdbcTestStmt(SELECT 1); } catch (NamingException ne) { log.fatal(ne.getMessage(), ne); throw new RuntimeException(ne); } } -- logging: 2003-12-04 05:25:39,157 [main] DEBUG com.socotech.loanauditor.dao.AbstractDAO - loanauditor from JNDI: org.enhydra.jdbc.pool.StandardXAPoolDataSource -- stacktrace: java.lang.ClassCastException at com.socotech.loanauditor.dao.AbstractDAO.init(AbstractDAO.java:31) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.init(TorqueDomainTypeDAO. java:34) at com.socotech.loanauditor.dao.TorqueDomainTypeDAO.getInstance(TorqueDomainTyp eDAO.java:29) at com.socotech.loanauditor.dao.DAOFactory.getDomainTypeDAO(DAOFactory.java:79) at com.socotech.loanauditor.web.listener.DomainTypeLoader.contextInitialized(Do mainTypeLoader.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3271) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Thanks in advance for any insight. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [offtopic] Architecture Question
Laurent Michenaud wrote: Hi, Hi laurent, We have two tomcat servers. One is located at our enterprise. The other is located at our hosting provider. They can see each other by Internet. We would like to set up an unique authentification system for both server. The authentification system will be on the server at our entreprise. The web applications on both servers will query the authentification system. What's the best/clean/nice way to do this ? JAAS ? Web services ? SSL keys ? JAAS is obviously a good way (the smartest one maybe ? :) ) But using the configuration file with the same authentication configuration could be enough... That is to say using Realm tags in your server.xml config files (JDBCRealm or JNDIREalm if you set up LDAP ) are valuable solutions HTH Jerome -- Auteur cahier du programmeur Java tome 2 - Eyrolles 10/2003 http://www.eyrolles.com/php.informatique/Ouvrages/ouvrage.php3?ouv_ean13=9782212111941 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
The open socket problem in tomcat 3.3.1
Hi, all 3-4 days Tomcat 3.3.1 does not work anymore correctly in conjunction with mod_jk1.2 and shows up follwing lines in the mod_jk.log: [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (712)]: Error reading reply [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (845)]: In jk_endpoint_t::service, get_reply failed in send loop 0 [Tue Nov 25 20:25:10 2003] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 1 [Tue Nov 25 20:25:10 2003] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 2 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (712)]: Error reading reply Looking for a solution I found the hint of a few guys that one should increase maxProcessors in the server.xml MaxClients in the httpd.conf. At the moment my impression is that maxProcessors first was introduced with Tomcat 4.1 and cannot be used under TomCat 3.3.1. So what can I do now? Is there any corresponding variable? Additionally I could read that with ajp13 the support for persistent connections was introduced. But I suggest that this could be the reason for my problems so I wonder how I can disable that? Or can I simply set KeepAlive to off in the httpd.conf in order to succeed? Best regards Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Could not read system property log4j.configDebug.
Thus some one now a way to fix this, Browser msg Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService (ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service (ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService (ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service (ContextManager.java:758) 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:501) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fconnect_00034_0002ejspconnect4_jsp_11._jspService(_0002fconnect_00034_ 0002ejspconnect4_jsp_11.java:62) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) 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:501) at java.lang.Thread.run(Thread.java:484) Browser msg END when I take a look @ 0002fconnect_00034_0002ejspconnect4_jsp_11.java:62 there is writtenClass.forName (org.firebirdsql.jdbc.FBDriver) ; and the server is giving the error message Could not read system property log4j.configDebug. Im looking forward for some suggestions. Richard Drent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat's ThreadPool and InheritableThreadLocal variables
Hi, A query regarding InheritableThreadLocal variables in the tomcat context. To explain the problem i am facing: If i am correct,for each request,tomcat uses a thread from it's threadpool to process the request. Suppose during one of these requests,i set the value of a InheritableThreadLocal variable.Once this request is processed,the thread will be available for use from the ThreadPool.Does tomcat reset the value of the InheritableThreadLocal variable which was set by the previous request processing?(it should,ideally). The tomcat version i am using is 3.3.1a.Also use the struts framework model. It seems to me that the InheritableThreadLocal value which was set by a previous request on a thread is still retained when that thread is reused for processing another request.Are there any known issues regarding this? Would be really helpful if someone can answer this.A bit urgent.Thanks in advance. Regards, Umapathy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.16 is still Beta or final
Hi, I wanted to download tomcat 5.0.16 but at http://jakarta.apache.org/site/sourceindex.cgi I see 5.0.16 Beta zip. Is 5.0.16 still Beta or is it really stable? Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Could not read system property log4j.configDebug.
Thus some one now a way to fix this, Browser msg Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService (ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service (ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService (ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service (ContextManager.java:758) 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:501) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fconnect_00034_0002ejspconnect4_jsp_11._jspService(_0002fconnect_00034_ 0002ejspconnect4_jsp_11.java:62) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) 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:501) at java.lang.Thread.run(Thread.java:484) Browser msg END when I take a look @ 0002fconnect_00034_0002ejspconnect4_jsp_11.java:62 there is writtenClass.forName (org.firebirdsql.jdbc.FBDriver) ; and the server is giving the error message Could not read system property log4j.configDebug. Im looking forward for some suggestions. Richard Drent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.x
It was declared stable Wednesday Dec 3, 2003. (Depending on your time zone) -Tim Simone Chiaretta wrote: Sorry for the silly question: but is tomcat 5.0.x still in beta or was it declared ready for production usage? Simone - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Http10Connector
Hi, am I right that - concerning the Server.xml Configuration in Tomcat 3.3 - the Http10Connector section is not important for me and can be deleted when I use Tomcat only as a servlet container (and additionally Apache as the webserver) - connecting them with mod_jk? Thanks and regards Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: The open socket problem in tomcat 3.3.1
To see what attributes are supported for Ajp13Connector, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#Ajp13Connector I believe maxThreads will accomplish the same thing as maxProcessors. Cheers, Larry -Original Message- From: Volker [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 6:59 AM To: [EMAIL PROTECTED] Subject: The open socket problem in tomcat 3.3.1 Hi, all 3-4 days Tomcat 3.3.1 does not work anymore correctly in conjunction with mod_jk1.2 and shows up follwing lines in the mod_jk.log: [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (712)]: Error reading reply [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (845)]: In jk_endpoint_t::service, get_reply failed in send loop 0 [Tue Nov 25 20:25:10 2003] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 1 [Tue Nov 25 20:25:10 2003] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 61 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 2 [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Nov 25 20:25:10 2003] [jk_ajp13_worker.c (712)]: Error reading reply Looking for a solution I found the hint of a few guys that one should increase maxProcessors in the server.xml MaxClients in the httpd.conf. At the moment my impression is that maxProcessors first was introduced with Tomcat 4.1 and cannot be used under TomCat 3.3.1. So what can I do now? Is there any corresponding variable? Additionally I could read that with ajp13 the support for persistent connections was introduced. But I suggest that this could be the reason for my problems so I wonder how I can disable that? Or can I simply set KeepAlive to off in the httpd.conf in order to succeed? Best regards Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet sendRedirect() to j_security_check problem (remember me)
That's a fairly circuitous route for a login. I guess you do what you have to do though. I was wondering whether I could adapt it to allow an SSL login form to be used to login to non-SSL pages, but I think the httpClient would leave the j_security_check post in plain text on the net - unless it never leaves the server, but I'm not sure that would be possible. Adam On 12/04/2003 12:52 AM Matt Raible wrote: It's standard container managed security stuff - I first invoke a protected URL - in index.jsp - I redirect to mainMenu.do - and *.do is protected. Based on security constraints in web.xml, I'm presented with a form-login-page login.jsp - rather than having action=j_security_check in this form, I have action=/security/authorize - which is mapped to my own LoginServlet. In the LoginServlet, I encrypt the password (optionally based on an init-parameter), set some cookies and do an HTTP Post to j_security_check. Works on Tomcat 4-5 and Resin 3.x. Matt On Dec 3, 2003, at 4:21 PM, Adam Hardy wrote: Matt, are you really managing to post a form to j_security_check without invoking it first, or is that some sort of black magic you've cooked up? Or have I just misunderstood what Chris said? Adam On 12/03/2003 09:24 PM Matt Raible wrote: Chris, I found your post at http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/ msg111700.html and I'm cc'ing the list in case anyone else is interested in this info (I'm not subscribed). I've actually improved the Remember Me feature a fair amount since I posted to the Tomcat User list. The sendRedirect works, however, it (in some browsers) puts the URL (with password) into the address bar. This isn't a big deal IMO since it's the user that just logged in and they don't mind seeing their own passwords. However, the URL tends to show up in server log files which can be a security hole. Because of this, I changed to using an HTTP Post with Jakarta Common's HttpClient. I also moved my form-login-page and form-error-page into a security folder and then set my cookies for the /appname/security path rather than / - this makes it so the user/pass cookies are more secure and can only be retrieved when logging in, rather than for any URL in the site. That being said, I've updated one of my sample apps with these changes and you can download it if you'd like: http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse Here's my updated LoginServlet that does an Http Post instead of a Get: http://tinyurl.com/xl80 HTH, Matt On Dec 3, 2003, at 12:52 PM, Chris Ward wrote: Hi Matt, Sorry for sending unsolicited email but I've been looking at some of your postings to Tomcat-User and wondered if I could ask a couple of questions. I've tried posting to list but had no response from anyone there. Specifically, it's regarding your remember me login stuff. If this is a pain feel free to ignore this email. Best regards Chris p.s. My question the list was under the subject servlet sendRedirect() to j_security_check problem -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Http10Connector
Correct. If you do not need to serve HTTP requests, Http10Connector may be removed. I would recommend just commenting it out. If you encounter problems when accessing through Apache, you can re-enable it easily to see if you get different behavior directly accessing Tomcat. Cheers, Larry -Original Message- From: Volker [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:41 AM To: [EMAIL PROTECTED] Subject: Http10Connector Hi, am I right that - concerning the Server.xml Configuration in Tomcat 3.3 - the Http10Connector section is not important for me and can be deleted when I use Tomcat only as a servlet container (and additionally Apache as the webserver) - connecting them with mod_jk? Thanks and regards Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to measue performance? Log4j on/off.
We have a performance issue with a web page being served via Tomcat/Apache. I don't think it has anything to do with Tomcat, but I am being asked to turn debug logging off to help improve it. I'm resisting because the output has been extremely valuable in solving problems that still crop up and to find out what the users are really doing as opposed to what they said they did. That said, is there a definitive way I can compare the performance of the site before and after turning the logging off? Other than a stopwatch? Thanks, Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Another issue came up comparing TC4 and TC5: using the oreilly multipart lib on TC5 causes the error ...Corrupt form data: premature ending on POST uploads. As stated in the FAQ's at http://www.servlets.com/cos/faq.html this problem is merely due to the webcontainer and has been fixed with Tomcat 4. I tested and can state that this problem doesn't occur with TC4. But it is apparent with TC5 again. Will this be fixed ? grisi - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 3:53 PM Subject: RE: TC 4 -oreillyMultipart- TC5 Howdy, I don't have an immediate idea, which is worrisome (to me at least ;)). Let's try to not put this oreilly jar in commons/lib, but instead in WEB-INF/lib. Yoav Shapira Millennium ChemInformatics -Original Message- From: Dirk Griesbach [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:44 AM To: Tomcat Users List Subject: Re: TC 4 -oreillyMultipart- TC5 Hi Yoav, the 'full' error trace is: java.lang.IllegalAccessError: tried to access method com.oreilly.servlet.multipart.Part.init(Ljava/lang/String;)V from class com.oreilly.servlet.multipart.ParamPart at com.oreilly.servlet.multipart.ParamPart.init(ParamPart.java:42) at com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartPar ser. j ava:341) ... the calling servlet method ... the source code mentioned reads: STARTSNIP of class ParamPart public class ParamPart extends Part { /** contents of the parameter */ private byte[] value; HashMap hashMap; private String encoding; /** * Constructs a parameter part; this is called by the parser. * ... */ ParamPart(HashMap hashMap, String name, ServletInputStream in, String boundary, String encoding) throws IOException { super(name); --- start of error-trace this.encoding = encoding; .. ENDSNIP class 'ParamPart' STARTSNIP of class 'Part' public abstract class Part { private String name; /** * Constructs an upload part with the given name. */ Part(String name) { -- this constructor being called causes the error I think this.name = name; } /** * Returns the name of the form element that this Part corresponds to. * * @return the name of the form element that this Part corresponds to. */ public String getName() { return name; } . ENDSNIP class 'ParamPart' I have used TC 5 'as is' after standard installation; no changes to server.xml. Same web.xml. Same with TC4. The multipartlibrary both times (TC4 and TC5) being in ../common/lib Same (web-)application, different results. Any ideas ? grisi - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 3:08 PM Subject: RE: TC 4 -oreillyMultipart- TC5 Howdy, Class ParamPart is public and its constructor is public as well? Strange. Are you running with different security settings? Did you put the library in a different place? Yoav Shapira Millennium ChemInformatics -Original Message- From: Dirk Griesbach [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:28 AM To: Tomcat Users List Subject: TC 4 -oreillyMultipart- TC5 Hi folks, I encountered a strange behaviour using 'oreilly's' multipartlibary (from Nov,2002): It works fine on TC 4.1.27 but exactly the same servlet and library with TC 5.0.12 and 5.0.14 (just copied them) the error log reads: java.lang.IllegalAccessError: tried to access method com.oreilly.servlet.multipart.Part.init(Ljava/lang/String;)V from class com.oreilly.servlet.multipart.ParamPart Class 'Part' IS public, so why this error on TC5 ? And no error on TC 4 ? Any suggestions ? greets grisi This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an)
RE: How to measue performance? Log4j on/off.
Howdy, I would use JMeter first, if you're just looking for performance numbers, i.e. time to serve that page. JMeter is ideally suited for that. JProbe and OptimizeIt are great, but they do more than you need in this case and they WILL skew performance significantly. As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Yoav Shapira Millennium ChemInformatics -Original Message- From: Justin Brister [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 8:44 AM To: 'Tomcat Users List' Subject: RE: How to measue performance? Log4j on/off. Jim, if you have any money to spend, it would be worth running a code profiler such as JProbe over the code. If you don't have access to such a tool / money, then you could try running JMeter to benchmark the site. J -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:40 PM To: Tomcat Users List Subject: How to measue performance? Log4j on/off. We have a performance issue with a web page being served via Tomcat/Apache. I don't think it has anything to do with Tomcat, but I am being asked to turn debug logging off to help improve it. I'm resisting because the output has been extremely valuable in solving problems that still crop up and to find out what the users are really doing as opposed to what they said they did. That said, is there a definitive way I can compare the performance of the site before and after turning the logging off? Other than a stopwatch? Thanks, Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: migrating from TDK2.1 to tomcat 4.1.29
Howdy, What is TDK? It might help more if you simply told us what errors you were running into.. Yoav Shapira Millennium ChemInformatics -Original Message- From: Inandjo Taurel [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:55 AM To: [EMAIL PROTECTED] Subject: migrating from TDK2.1 to tomcat 4.1.29 hi, i wanted to get an app developped under TDK2.1 to run under tomcat 4.0( running as a service!). I couldn't find tomcat 4.0 so i had to get 4.1.29, installed it then tryed to copy everything from tdk2.1\webapps\myapp_name\WEB-INF\ to tomcat4.1.29\webapps\myapp_name. It didn't work, because of the screens that were not placed in the proper location. Now i would like to know where i have to copy the screens that can be found under tdk2.1\webapps\myapp_nametemplates\app in the newly installed tomcat?? My second question relates to the actual webserver running under the TDK. When i installed the TDK bundle, there was a webserver listning on port If i got it right, i can use the TDK as a webserver itself, i wouldn't need to installed a third party webs8080, so i understood that i wouldn't need another webserver. Pease correct me if am wrong or confused on this issue _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Sun's Java Desktop System
Has anyone been involved with testing Sun's Java Desktop System? If you have, does Tomcat 4.1 run on it without any problems? According to Sun support JDS is based on SuSe 8.1 does anyone run Tomcat 4.1 on this platform and if so, what version of J2EE do you use? Thanks, Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Max. wait time for a Servlet Response
Howdy, You can look at the connector configuration (upload timeout and related parameters). By default it's about 60sec before the browser will give up on your servlet if it doesn't get any response. Yoav Shapira Millennium ChemInformatics -Original Message- From: dakavara [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 6:29 AM To: 'Tomcat Users List' Subject: Max. wait time for a Servlet Response Hi, How long a servlet can wait to give reponse. Actually, my servlet wants to wait until some process done by other component. This will periadically will check, if it is done then only i need to give response to client other wise i need to wait for some time then i need to check. In this scenario, how long my iteration logic can implementable. Thanks Regards, Ashok.D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [offtopic] Architecture Question
Howdy, In a similar situation we use a web service running on another (3rd) tomcat server. It's worked well, especially as we've added more applications beyond our original two. Yoav Shapira Millennium ChemInformatics -Original Message- From: jerome moliere [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 6:51 AM To: Tomcat Users List Subject: Re: [offtopic] Architecture Question Laurent Michenaud wrote: Hi, Hi laurent, We have two tomcat servers. One is located at our enterprise. The other is located at our hosting provider. They can see each other by Internet. We would like to set up an unique authentification system for both server. The authentification system will be on the server at our entreprise. The web applications on both servers will query the authentification system. What's the best/clean/nice way to do this ? JAAS ? Web services ? SSL keys ? JAAS is obviously a good way (the smartest one maybe ? :) ) But using the configuration file with the same authentication configuration could be enough... That is to say using Realm tags in your server.xml config files (JDBCRealm or JNDIREalm if you set up LDAP ) are valuable solutions HTH Jerome -- Auteur cahier du programmeur Java tome 2 - Eyrolles 10/2003 http://www.eyrolles.com/php.informatique/Ouvrages/ouvrage.php3?ouv_ean1 3=97 82212111941 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Howdy, Another issue came up comparing TC4 and TC5: using the oreilly multipart lib on TC5 causes the error ...Corrupt form data: premature ending on POST uploads. As stated in the FAQ's at http://www.servlets.com/cos/faq.html this problem is merely due to the webcontainer and has been fixed with Tomcat 4. Umm, you misread that section of the FAQ. It states that there are many possible causes for this bug. A small subcase (IE, client hitting stop then starting again, leading to empty input stream) was isolated and fixed in a couple of containers (tomcat 4.0 and weblogic 6.1 according to the FAQ). I tested and can state that this problem doesn't occur with TC4. But it is apparent with TC5 again. Will this be fixed ? If you provide a concise description along with a test case or steps to reproduce your problems, there's a chance it might be fixed. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Debugging
Howdy, If you use the OptimizeIt wizard to connect OptimizeIt to Tomcat, then a class filter is added which prevents the tomcat (org.apache.catalina.*) classes from showing up in OptimizeIt's heap viewer. Remove the filter (Tomcat.oif is the file name, typically placed in $CATALINA_HOME) or configure the startup script (tomcat4_OI.sh or something like that) to not use the filter. Yoav Shapira Millennium ChemInformatics -Original Message- From: SH Solutions [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:43 PM To: [EMAIL PROTECTED] Subject: Memory Debugging Hi Since I saw a lot of references on this list to Borlands Optimizeit, I just got the trial and started testing. Everything fine, except that I cannot use it. I have Windows XP as client running the UI and I want to profile my tomcat 4.1.29 server on debian 3.1 sarge running on sun jvm 1.4.2. The profiler attaches to the server and I do get very few information, but the list of instances stays completely empty. Anyone, any glue ? Thanks, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to measue performance? Log4j on/off.
As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Showing my C heritage here, but can't you do something like Log(an error has occurred); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
Jim, if you have any money to spend, it would be worth running a code profiler such as JProbe over the code. If you don't have access to such a tool / money, then you could try running JMeter to benchmark the site. J -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:40 PM To: Tomcat Users List Subject: How to measue performance? Log4j on/off. We have a performance issue with a web page being served via Tomcat/Apache. I don't think it has anything to do with Tomcat, but I am being asked to turn debug logging off to help improve it. I'm resisting because the output has been extremely valuable in solving problems that still crop up and to find out what the users are really doing as opposed to what they said they did. That said, is there a definitive way I can compare the performance of the site before and after turning the logging off? Other than a stopwatch? Thanks, Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
Graham, unfortunately, Java does not have a precompiler (although I think there are some third party pre-processors about). J -Original Message- From: Graham Reeds [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 2:05 PM To: Tomcat Users List Subject: Re: How to measue performance? Log4j on/off. As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Showing my C heritage here, but can't you do something like Log(an error has occurred); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to measue performance? Log4j on/off.
If it were my boss wanting to do the measurement, I'd have money, but I'm trying to keep him off my back, hence no cash. Thanks, Jim. Justin Brister wrote: Jim, if you have any money to spend, it would be worth running a code profiler such as JProbe over the code. If you don't have access to such a tool / money, then you could try running JMeter to benchmark the site. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Shapira, Yoav wrote: Howdy, Another issue came up comparing TC4 and TC5: using the oreilly multipart lib on TC5 causes the error ...Corrupt form data: premature ending on POST uploads. As stated in the FAQ's at http://www.servlets.com/cos/faq.html this problem is merely due to the webcontainer and has been fixed with Tomcat 4. Umm, you misread that section of the FAQ. It states that there are many possible causes for this bug. A small subcase (IE, client hitting stop then starting again, leading to empty input stream) was isolated and fixed in a couple of containers (tomcat 4.0 and weblogic 6.1 according to the FAQ). I tested and can state that this problem doesn't occur with TC4. But it is apparent with TC5 again. Will this be fixed ? If you provide a concise description along with a test case or steps to reproduce your problems, there's a chance it might be fixed. There has been enough testing for uploading (with the standalone connector, at least, but there's no difference with JK for this), that I can confidently say that there's very little likelihood of a Tomcat bug in this area. Maybe if the thing uses readLine on the Tomcat provided reader (a rather annoying method to implement, so maybe there could be a bug), but in the unlikely case it does, I recommend dumping that library in favor of commons-fileupload (readLine is by definition awful performance wise). -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Help getting SSL to work with HttpsURLConnections
John, I found a solution. Add the line below to force it to use the correct libraries: System.setProperty(java.protocol.handler.pkgs,javax.net.ssl); This one falls into the inexplicable category of problems that lots of people must have dealt with, yet Google shows up almost nothing, and you never get a reply about it in the mail-group. cranky this morning, Mike - Original Message - From: Mike Kellstrand [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:40 PM Subject: Re: Need Help getting SSL to work with HttpsURLConnections I just came across a similar problem today. I have working code in a Swing app that uses import javax.net.ssl.*; I copied the ssl connection code over to another app that happens to be a servlet, and I get the ClassCastException as seen below, at the line of code: connection = (HttpsURLConnection) url.openConnection(); Anybody know what is going on? Thanks, Mike - Original Message - From: John Kammer [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:02 PM Subject: Re: Need Help getting SSL to work with HttpsURLConnections An update and a correction... I was able to get the HttpsURLConnection to work by replacing: import javax.net.ssl.*; with: import com.sun.net.ssl.*; Contrary to what I had said below there is an java.lang.ClassCastException being thrown when making the call : HttpsURLConnection conn = (HttpsURLConnection) myurl.openConnection(); Now the compiler warns me that I'm using deprecated code, but it does work. Still, why would javax.net.ssl.* be having this problem ? Thanks again! --- Forgive me, I'm new at this... I am using: Java v 1.4.2_02-b03 : Tomcat v 4.1.29 I'm having trouble getting an HttpsURLConnection to work as expected. I suspect I am missing something (possibly a great many things) and would appreciate any insight anyone could provide. I've not been able to find a single source that addresses this problem although I've found bits and pieces in several places. I have a simple servlet running in Tomcat that does nothing more than report back that it is alive. Posting to it at http://myserver:8080/simpleServlet/simpleServlet returns a response of: simpleServletResponseI am alive!/simpleServletResponse. Additionally I have a simple client app that calls the servlet with a POST. The client can run on either the same machine as the server or a different machine. 1. Using an HttpURLConnection in the client app works fine. I can call the servlet on either port 8080 (http) or 8443 (https). This works from either machine. 2. If I do nothing other than change the HttpURLConnection to an HttpsURLConnection then everything falls apart immediately and I don't understand why (I do believe I have the proper imports included and it all compiles fine). From everything I can tell I should be able to replace the one with the other. 3. Keystores certificates: I have generated certificates for both machines using keytool and have imported the client machine certificate into the trustedcerts file on the server machine. I have NOT had any of these certificates signed by a certificate authority (and due to complexities I won't go into here that isn't likely to happen). Do the certificates need to be signed by a CA in order for HttpsURLConnection to work? 4. The result of calling the method url.openConnection() is that null is printed to the screen then program execution simply stops. No Exception seems to be thrown - everything just stops. Why? HttpsURLConnection conn = (HttpsURLConnection) myurl.openConnection(); Ultimately I would like to get Client-Certification working but haven't been able to find a good guide out there for doing so. At the moment I am taking small steps in the hope of gaining a better understanding. Any help would be greatly appreciated. Thanks in advance ! -- John Kammer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to measue performance? Log4j on/off.
There is a hack to accomplish similar results. If you declare a constant boolean variable as false and use it in your branch statement the compiler will exclude the entire statement. static final boolean DEBUG = false; if(DEBUG){ //conditional code goes here } On Thursday 04 December 2003 09:05 am, Graham Reeds wrote: As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Showing my C heritage here, but can't you do something like Log(an error has occurred); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to measue performance? Log4j on/off.
Hi, Yoav, I'll take a look at thos products. I wasn't aware of your other suggestion. I assume you mean it will improve the performance when debugging is turned off thus preventing the debug statement from being called at all. Is this because there is a lot of overhead with debug(...) calls even with debugging off? This will be fun, I've got a LOT of debug calls to change. 8( Thanks, Jim. Shapira, Yoav wrote: Howdy, I would use JMeter first, if you're just looking for performance numbers, i.e. time to serve that page. JMeter is ideally suited for that. JProbe and OptimizeIt are great, but they do more than you need in this case and they WILL skew performance significantly. As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Yoav Shapira Millennium ChemInformatics -Original Message- From: Justin Brister [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 8:44 AM To: 'Tomcat Users List' Subject: RE: How to measue performance? Log4j on/off. Jim, if you have any money to spend, it would be worth running a code profiler such as JProbe over the code. If you don't have access to such a tool / money, then you could try running JMeter to benchmark the site. J -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:40 PM To: Tomcat Users List Subject: How to measue performance? Log4j on/off. We have a performance issue with a web page being served via Tomcat/Apache. I don't think it has anything to do with Tomcat, but I am being asked to turn debug logging off to help improve it. I'm resisting because the output has been extremely valuable in solving problems that still crop up and to find out what the users are really doing as opposed to what they said they did. That said, is there a definitive way I can compare the performance of the site before and after turning the logging off? Other than a stopwatch? Thanks, Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's ThreadPool and InheritableThreadLocal variables
Howdy, Why don't you just test it if it's so urgent instead of waiting for a reply from us? ;) I think the variables will stay with the thread, as they're not bound to the lifetime of the request. This is a far from optimal design (actually I think InheritableThreadLocal is just evil and shouldn't be used). You might want to try tomcat 5 and its request listeners, as these provide the proper lifecycle for what you're trying to do. Yoav Shapira Millennium ChemInformatics -Original Message- From: Pon Umapathy K.S. [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:09 AM To: Tomcat List Subject: Tomcat's ThreadPool and InheritableThreadLocal variables Hi, A query regarding InheritableThreadLocal variables in the tomcat context. To explain the problem i am facing: If i am correct,for each request,tomcat uses a thread from it's threadpool to process the request. Suppose during one of these requests,i set the value of a InheritableThreadLocal variable.Once this request is processed,the thread will be available for use from the ThreadPool.Does tomcat reset the value of the InheritableThreadLocal variable which was set by the previous request processing?(it should,ideally). The tomcat version i am using is 3.3.1a.Also use the struts framework model. It seems to me that the InheritableThreadLocal value which was set by a previous request on a thread is still retained when that thread is reused for processing another request.Are there any known issues regarding this? Would be really helpful if someone can answer this.A bit urgent.Thanks in advance. Regards, Umapathy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's ThreadPool and InheritableThreadLocal variables
-Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:40 PM To: Tomcat Users List Subject: RE: Tomcat's ThreadPool and InheritableThreadLocal variables Howdy, Why don't you just test it if it's so urgent instead of waiting for a reply from us? ;) Thanks for responding.I had already kinda tested it.But thought,i would get it confirmed from the gurus. ;) I think the variables will stay with the thread, as they're not bound to the lifetime of the request. This is a far from optimal design (actually I think InheritableThreadLocal is just evil and shouldn't be used).You might want to try tomcat 5 and its request listeners, as these provide the proper lifecycle for what you're trying to do. The problem is it's already decided that we are to use tomcat 3.3.1a for our application and we have to live with it.I'll just try to find some way to work around this issue. Is there some release note or something regarding this which i can refer to? Yoav Shapira Millennium ChemInformatics -Original Message- From: Pon Umapathy K.S. [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:09 AM To: Tomcat List Subject: Tomcat's ThreadPool and InheritableThreadLocal variables Hi, A query regarding InheritableThreadLocal variables in the tomcat context. To explain the problem i am facing: If i am correct,for each request,tomcat uses a thread from it's threadpool to process the request. Suppose during one of these requests,i set the value of a InheritableThreadLocal variable.Once this request is processed,the thread will be available for use from the ThreadPool.Does tomcat reset the value of the InheritableThreadLocal variable which was set by the previous request processing?(it should,ideally). The tomcat version i am using is 3.3.1a.Also use the struts framework model. It seems to me that the InheritableThreadLocal value which was set by a previous request on a thread is still retained when that thread is reused for processing another request.Are there any known issues regarding this? Would be really helpful if someone can answer this.A bit urgent.Thanks in advance. Regards, Umapathy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Rémy, I had a look into the sources. There it reads: class MultipartParser: do { String line = readLine(); if (line == null) { throw new IOException(Corrupt form data: premature ending); } (:-) By which method should 'readLine()' be replaced to achieve best performance ? grisi - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:23 PM Subject: Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending Shapira, Yoav wrote: Howdy, Another issue came up comparing TC4 and TC5: using the oreilly multipart lib on TC5 causes the error ...Corrupt form data: premature ending on POST uploads. As stated in the FAQ's at http://www.servlets.com/cos/faq.html this problem is merely due to the webcontainer and has been fixed with Tomcat 4. Umm, you misread that section of the FAQ. It states that there are many possible causes for this bug. A small subcase (IE, client hitting stop then starting again, leading to empty input stream) was isolated and fixed in a couple of containers (tomcat 4.0 and weblogic 6.1 according to the FAQ). I tested and can state that this problem doesn't occur with TC4. But it is apparent with TC5 again. Will this be fixed ? If you provide a concise description along with a test case or steps to reproduce your problems, there's a chance it might be fixed. There has been enough testing for uploading (with the standalone connector, at least, but there's no difference with JK for this), that I can confidently say that there's very little likelihood of a Tomcat bug in this area. Maybe if the thing uses readLine on the Tomcat provided reader (a rather annoying method to implement, so maybe there could be a bug), but in the unlikely case it does, I recommend dumping that library in favor of commons-fileupload (readLine is by definition awful performance wise). -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsp:include :: no error when target page is missing
hi all, i've noticed that jsp:include tag does not generate an error when the target page is not found. it simply does not include anything. is there a way to change this behavior? i looked it up in the jasper configuration docs to find a way to affect how it generates the offending code to no avail. am i missing something? by the way, do you know of or a pointer to any similar error prone behaviors of tomcat? thanks in advance, guven demir. Guven DemirSoftware Engineer Telenity A.S. Tel. +90.212.468.2057Fax. +90.212.465.0910 [EMAIL PROTECTED] www.telenity.com IMPORTANT: The information contained in this e-mail and any attachment(s) may be privileged and confidential information intended only for the use of the entity named above. If the reader is not the intended recipient or the agent responsible to deliver it to the intended recipient, the reader is hereby notified that any disclosure, dissemination, distribution, copying or electronic or other storage of this communication is strictly prohibited. If you havereceived this communication in error, please immediately call us to collect.
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Dirk Griesbach wrote: Rémy, I had a look into the sources. There it reads: class MultipartParser: do { String line = readLine(); if (line == null) { throw new IOException(Corrupt form data: premature ending); } (:-) By which method should 'readLine()' be replaced to achieve best performance ? Yes, but what does this readLine method does and when is it called ? I was talking about request.getReader().readLine(). -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's ThreadPool and InheritableThreadLocal variables
Howdy, Is there some release note or something regarding this which i can refer to? Nope, this is not addressed in the documentation as it's a relatively fringe and risky issue that's far from being a recommended standard practice. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
Howdy, I would expect that the Appenders and Formatters only come into play if debug is enabled. Am I wrong ? You're right in principle, but the definition of debug is enabled is not always trivial: a class may have multiple loggers (and in log4j 1.3, multiple loggers in multiple logging domains) with different levels set up, so one may be debug-enabled while another isn't. There are also other more advanced log4j usage cases which increase the complexity of the debug call. But this is getting off-topic: the basic point was that the isDebugEnabled() check is a good practice, can only improve performance (at runtime, without changing code or using pre-processors), and can help the original poster. Yoav Shapira -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:34 PM To: Tomcat Users List Subject: RE: How to measue performance? Log4j on/off. Finally, even the example with debug(x) vs. debug(translate(x)) missed something -- the possibly complex configuration of log4j. If, for example, you have an appender such as JMS, Telnet, or SMTP (all come with log4j) configured to send out debug messages, every call to debug can be much much more expensive than simply writing a text string to a file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet sendRedirect() to j_security_check problem (remember me)
Thanks for the extra info Matt ( Adam) I'm going to try to continue with my login work next week - the newer version of Matt's Remember-me JSP/Servlet/Filter seems to have a lot going on in there. I feel a little daunted to be honest. But I shall play around with it some more. Thanks again for all the good advice guys - I'll probably be in touch next week. Best regards, Chris -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 December 2003 13:02 To: Tomcat Users List; Matt Raible Subject: Re: servlet sendRedirect() to j_security_check problem (remember me) That's a fairly circuitous route for a login. I guess you do what you have to do though. I was wondering whether I could adapt it to allow an SSL login form to be used to login to non-SSL pages, but I think the httpClient would leave the j_security_check post in plain text on the net - unless it never leaves the server, but I'm not sure that would be possible. Adam On 12/04/2003 12:52 AM Matt Raible wrote: It's standard container managed security stuff - I first invoke a protected URL - in index.jsp - I redirect to mainMenu.do - and *.do is protected. Based on security constraints in web.xml, I'm presented with a form-login-page login.jsp - rather than having action=j_security_check in this form, I have action=/security/authorize - which is mapped to my own LoginServlet. In the LoginServlet, I encrypt the password (optionally based on an init-parameter), set some cookies and do an HTTP Post to j_security_check. Works on Tomcat 4-5 and Resin 3.x. Matt On Dec 3, 2003, at 4:21 PM, Adam Hardy wrote: Matt, are you really managing to post a form to j_security_check without invoking it first, or is that some sort of black magic you've cooked up? Or have I just misunderstood what Chris said? Adam On 12/03/2003 09:24 PM Matt Raible wrote: Chris, I found your post at http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/ msg111700.html and I'm cc'ing the list in case anyone else is interested in this info (I'm not subscribed). I've actually improved the Remember Me feature a fair amount since I posted to the Tomcat User list. The sendRedirect works, however, it (in some browsers) puts the URL (with password) into the address bar. This isn't a big deal IMO since it's the user that just logged in and they don't mind seeing their own passwords. However, the URL tends to show up in server log files which can be a security hole. Because of this, I changed to using an HTTP Post with Jakarta Common's HttpClient. I also moved my form-login-page and form-error-page into a security folder and then set my cookies for the /appname/security path rather than / - this makes it so the user/pass cookies are more secure and can only be retrieved when logging in, rather than for any URL in the site. That being said, I've updated one of my sample apps with these changes and you can download it if you'd like: http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse Here's my updated LoginServlet that does an Http Post instead of a Get: http://tinyurl.com/xl80 HTH, Matt On Dec 3, 2003, at 12:52 PM, Chris Ward wrote: Hi Matt, Sorry for sending unsolicited email but I've been looking at some of your postings to Tomcat-User and wondered if I could ask a couple of questions. I've tried posting to list but had no response from anyone there. Specifically, it's regarding your remember me login stuff. If this is a pain feel free to ignore this email. Best regards Chris p.s. My question the list was under the subject servlet sendRedirect() to j_security_check problem -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Rémy, this copy is of type javax.servlet.ServletInputStream.readLine() acquired by HttpServletRequest.getInputStream(); Would you agree that this is a good idea ? grisi - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:49 PM Subject: Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending Dirk Griesbach wrote: Rémy, I had a look into the sources. There it reads: class MultipartParser: do { String line = readLine(); if (line == null) { throw new IOException(Corrupt form data: premature ending); } (:-) By which method should 'readLine()' be replaced to achieve best performance ? Yes, but what does this readLine method does and when is it called ? I was talking about request.getReader().readLine(). -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC 4 -oreillyMultipart- TC5
Howdy, Hi Joav, There's a Y there, not a J ;) the hint putting the lib into WEB-INF/lib instead of $CATALINA_HOME/common/lib put it, thanks to you. But why ? Another classloader issue ? I think this could only be a Yes, basically. A combination of issues. This is one of the many reasons I tell people not to use the common classloader repositories: keep your webapp self-contained. I doubt this will be fixed. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.x non .jsp suffix for includes?
In fact, I think you could reuse the default jsp servlet, and simply add servlet-mapping servlet-namejsp/servlet-name url-pattern*.jnc/url-pattern /servlet-mapping to your webapp WEB-INF/web.xml, or $CATALINA_HOME/conf/web.xm, whichever you preferl What I am not sure about is whether the JSP servlet has its name fixed in the JSP specification, or it is left to the container implementation. Perhaps someone here can enlight this :-) Cheers, Rodrigo Ruiz Richard Bondi wrote: Thanks to Chris and and Tim Funk for pointing me in the right direction. For the archives, I found that adding the following two lines to %catalina_home%/conf/web.xml did the trick: servlet servlet-namejnc/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namelogVerbosityLevel/param-name param-valueWARNING/param-value /init-param load-on-startup3/load-on-startup /servlet servlet-mapping servlet-namejnc/servlet-name url-pattern*.jnc/url-pattern /servlet-mapping Best, Richard Bondi At 06:14 PM 12/3/2003 -0500, you wrote: Richard, Does anyone know how to configure tomcat to compile .jnc files in this circumstance? Is there a standard convention for naming jsp include files? Yeah, .jsp :) Seriously, though. Check out CATALINA_HOME/conf/web.xml for how they configure the .jsp file trnaslator/compiler. You could modify the that web.xml file to include the same type of things for .jsp files, or you could modify the deployment descriptor for your application. Unfortunately, modifying your deployment descriptor will make your application non-portable. But, you are already making your .jsp files called something else, anyway, so you'll have to do some sort of re-configuration for every app server you indend to use. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
there are two things to consider: - the time that is spent in arguments of the call. - the time that is spent in the call If you have something like debug(abc) there is hardly any time spent constructing the argument. But if you have debug(abc + someNestedObject.toString()); or debug(translate(abc)); (or something like that) You pay the time spent in translate() and toString() even if debug is off. (They are evaluated before the method is called) Depending on the nature of the called methods that can be quite some time. In opposition to Mr. Shapira I wouldn't expect that log4 spends much time in the call to debug() as I would expect the 'if (logger.isDebugEnabled)' as first test inside of debug(). (But that's just an opinion, I have never tried it or looked at the source) -Original Message- From: Jim Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:08 PM To: Tomcat Users List Subject: Re: How to measue performance? Log4j on/off. Hi, Yoav, I'll take a look at thos products. I wasn't aware of your other suggestion. I assume you mean it will improve the performance when debugging is turned off thus preventing the debug statement from being called at all. Is this because there is a lot of overhead with debug(...) calls even with debugging off? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: compiling tomcat-5.0.16 from source
Howdy, Assuming you're following http://cvs.apache.org/viewcvs/jakarta-tomcat-5/BUILDING.txt?rev=1.32con tent-type=text/vnd.viewcvs-markup, can you tell us what errors you're getting? Yoav Shapira Millennium ChemInformatics -Original Message- From: James Black [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 10:31 AM To: Tomcat Users List Subject: re: compiling tomcat-5.0.16 from source Hello, I am curious how I compile all the components of tomcat from source code. I am having various problems, the only one that made sense was that I had to upgrade mail.jar. From the $HOME_DIR/jakarta-tomcat-5.0.16/src I should just be able to type 'ant' and have it compile, but it appears that the connector section isn't compiled and catalina isn't compiled. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Your configuration Files
did you see the jkstatus page is the jk2.shm file created when you start apache. -Original Message- From: Asif Chowdhary Sent: Thursday, December 04, 2003 10:07 AM To: [EMAIL PROTECTED] Subject: RE: Your configuration Files Try this [shm] info=Scoreboard. Required for reconfiguration and status with multi process servers file=/var/log/httpd/jk2.shm size=1 -Original Message- From: Ingmars Rubenis [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:41 AM To: Asif Chowdhary Subject: Re: Your configuration Files Importance: High Thank You, but I have the same errors in error.log (apache dir) [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3944 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3945 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3946 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3947 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3948 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3949 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3950 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3951 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations Asif Hi, Asif I just felt like doing a good deed. Asif Here are the modified files. Asif jk2.properties workers2.properties Asif Once you have the mod_jk2 on your machine working. Asif Type: http://localhost/jkstatus. This will display the page Asif and will mean that mod_jk2 is working. Asif Next. Ensure Tomcat is working by Asif Type: http://localhost:8080/examples Asif Try the servlets and Jsp there. Asif Next: Type Asif http://localhost:80/examples Asif If you can access the Tomcat servlets and JSP page from here Asif it means that your connections are working fine. Asif Also, I have added the info in workers2.properties file that you Asif should add to the server.xml file of your tomcat. Asif The jvmRoute=localhost:8010 This is for load balancing. Asif Also the connector should be in your server.xml file. Asif Asif Best wishes Ingmars Rubenis LU University of Latvia Developer IT Department (371) 9227133 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Rémy, I'm quite sure. With a summary of oreilly´s sources I see: class MultipartParser { ... private ServletInputStream in; private byte[] buf = new byte[8 * 1024]; ... ServletInputStream in = req.getInputStream(); ... do { String line = readLine(); if (line == null) { throw new IOException(Corrupt form data: premature ending); thrown when using TC5, but not on TC4 } ... private String readLine() throws IOException { int result; StringBuffer sbuf = new StringBuffer(); do { result = in.readLine(buf , 0, buf.length); ... sbuf.append(new String(buf, 0, result, encoding)); } ... return sbuf.toString(); } } looks quite normal, doesn't it ? grisi - Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 4:16 PM Subject: Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending Dirk Griesbach wrote: Rémy, this copy is of type javax.servlet.ServletInputStream.readLine() acquired by HttpServletRequest.getInputStream(); Would you agree that this is a good idea ? Are you sure ? There's a ServletIS.readLine(byte[] b, int off, int len) method, but no readLine returning a String (that's in the BufferedReader). SevletIS.readLine is not optimal already (I thought nobody would use it). Maybe it would be a good idea to attempt to reimplement it eventually. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: compiling tomcat-5.0.16 from source
Hello, I am curious how I compile all the components of tomcat from source code. I am having various problems, the only one that made sense was that I had to upgrade mail.jar. From the $HOME_DIR/jakarta-tomcat-5.0.16/src I should just be able to type 'ant' and have it compile, but it appears that the connector section isn't compiled and catalina isn't compiled. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Dirk Griesbach wrote: Rémy, this copy is of type javax.servlet.ServletInputStream.readLine() acquired by HttpServletRequest.getInputStream(); Would you agree that this is a good idea ? Are you sure ? There's a ServletIS.readLine(byte[] b, int off, int len) method, but no readLine returning a String (that's in the BufferedReader). SevletIS.readLine is not optimal already (I thought nobody would use it). Maybe it would be a good idea to attempt to reimplement it eventually. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best JVM for Tomcat
Howdy, Nope, not at all related to memory problems. These are internal crashes that produce a core dump and the hotspot error report file (hs_err_[pid]). Yoav Shapira Millennium ChemInformatics -Original Message- From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 10:35 AM To: Tomcat Users List Subject: RE: Best JVM for Tomcat Were these crashes, by any chance, preceded by OutOfMemoryError's? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I've seen exactly the same behavior as Senor Alibert. Yoav Shapira Millennium ChemInformatics -Original Message- From: Aymeric Alibert [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: RE: Best JVM for Tomcat We are running Tomcat under Solaris 8 and tried to use the '-server' option.The option improved greatly the performances, but unfortunately load testing showed that the JVM would crash systematically under heavy load. No problem running with the '-client' option. Aymeric. [EMAIL PROTECTED] 12/03/03 03:08PM Can you tell us more about issues using -server mode? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I use Sun's latest on various platforms (Solaris 8, 9, SuSe, Intel) without a problem for both tomcat 4 and 5. The only caveat is the -server mode, which used to reduce stability. I knew there would be a jRockit response from Senor Cekvenich even before expanding this thread ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:09 AM To: Tomcat Users List Subject: Re: Best JVM for Tomcat On Wed, Dec 03, 2003 at 08:43:34AM -0300, Walter do Valle wrote: What is the best version of J2SDK to run Tomcat 4.1.29 over Linux? On Linux, I've been using the latest from Sun, 1.4.2_02 without any issues. There may be others which are faster, but performance hasn't been an issue for me. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PLEASE HELP! How can I make Tomcat see DB2 jdbc driver?
I've run into this before. Although every document I've read refers to the driver as COM.ibm.db2.jdbc.app.DB2Driver, in actuality the package name is com.blah.blah. Change your upper case COM to lower case and it should work. [EMAIL PROTECTED] 12/3/2003 12:13:59 PM hiya, try renaming the driver to db2java.jar hth JasonG -Original Message- From:Sarah Zou [SMTP:[EMAIL PROTECTED] Sent:Thursday,4 December 2003 7:09 To:[EMAIL PROTECTED] Subject:PLEASE HELP! How can I make Tomcat see DB2 jdbc driver? Hi All, I am using Tomcat 4.1.29 and DB2 8.1. I try to use the servlet below to see if it can find DB2 jdbc driver: public class Test extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void service(HttpServletRequest request, HttpServletResponse response) { try{ Class.forName (COM.ibm.db2.jdbc.app.DB2Driver).newInstance (); } catch (Exception e) { System.err.println (\n Error loading DB2 Driver...\n + e); } } } I have tried to put db2java.zip in Tomcat common\lib or webapp\web-inf\lib. Also I tried to add db2java.zip to set classpath in catalina.bat in Tomcat bin. It didnot work. Your help will be very much appreciated. Sarah - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authenticate userrole, using form based login
Hi, I am using form based authentication with this system: win.2K adv. server SQL 2k Tomcat 4.1 After fixing many problems, thanks to you guys and specially Tim Funk, I am getting this error now, which is giving me a http status 403, access forbidden. I have checked database and each column name, data, and relationships. They all look OK. If I commented out the realm section of the server.xml, it does work by using the base database of tomcat. this is from the context log file: 2003-12-04 09:39:03 Authenticator[]: Security checking request POST /login/j_security_check 2003-12-04 09:39:03 Authenticator[]: Authenticating username 'admin' 2003-12-04 09:39:04 Authenticator[]: Authentication of 'admin' was successful 2003-12-04 09:39:04 Authenticator[]: Redirecting to original '/form' 2003-12-04 09:39:04 Authenticator[]: Failed authenticate() test 2003-12-04 09:39:04 Authenticator[]: Security checking request GET /form 2003-12-04 09:39:04 Authenticator[]: Checking constraint 'SecurityConstraint[RestrictedResources]' against GET /form -- true 2003-12-04 09:39:04 Authenticator[]: Subject to constraint SecurityConstraint[RestrictedResources] 2003-12-04 09:39:04 Authenticator[]: Calling checkUserData() 2003-12-04 09:39:04 Authenticator[]: User data constraint has no restrictions 2003-12-04 09:39:04 Authenticator[]: Calling authenticate() 2003-12-04 09:39:04 Authenticator[]: Restore request from session '21690FF10FB41747F52F1BFFDD248702' 2003-12-04 09:39:04 Authenticator[]: Authenticated 'admin' with type 'FORM' 2003-12-04 09:39:04 Authenticator[]: Proceed to restored request 2003-12-04 09:39:04 Authenticator[]: Calling accessControl() 2003-12-04 09:39:04 Authenticator[]: Failed accessControl() test this is from the host log file: 2003-12-04 09:39:03 StandardHost[localhost]: Trying the longest context path prefix 2003-12-04 09:39:03 StandardHost[localhost]: Mapped to context '' 2003-12-04 09:39:04 JDBCRealm[localhost]: Username admin successfully authenticated 2003-12-04 09:39:04 StandardHost[localhost]: Mapping request URI '/form' 2003-12-04 09:39:04 StandardHost[localhost]: Trying the longest context path prefix 2003-12-04 09:39:04 StandardHost[localhost]: Mapped to context '' 2003-12-04 09:39:04 JDBCRealm[localhost]: Username admin does NOT have role admin 2003-12-04 09:39:12 HostConfig[localhost]: Deploying discovered web applications Any suggestion or hint would be appreciated. thanks, James Ostad Application Developer/Analyst TMS Department Ex. 4457 E-mail: [EMAIL PROTECTED] Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
Howdy, This is off-topic now, but the short answer is no. The longer answer is that java doesn't have such constructs at runtime, and we are talking about runtime not recompiling the code. The even longer answer has to do with log4j architecture and Logger#debug being a potentially very expensive call depending on its parameters and configured appenders, whereas isDebugEnabled is an optimize hash lookup. Yoav Shapira Millennium ChemInformatics -Original Message- From: Graham Reeds [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 9:05 AM To: Tomcat Users List Subject: Re: How to measue performance? Log4j on/off. As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Showing my C heritage here, but can't you do something like Log(an error has occurred); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Restarting tomcat from web page
Hi How can i restart Tomcat which is running as service, from a web page 1 - calling bat file ? (not working) 2 - calling http://localhost:8080/manager/html/start?path=/engine (asking password) any clean way ? Regards Altug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best JVM for Tomcat
Were these crashes, by any chance, preceded by OutOfMemoryError's? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I've seen exactly the same behavior as Senor Alibert. Yoav Shapira Millennium ChemInformatics -Original Message- From: Aymeric Alibert [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: RE: Best JVM for Tomcat We are running Tomcat under Solaris 8 and tried to use the '-server' option.The option improved greatly the performances, but unfortunately load testing showed that the JVM would crash systematically under heavy load. No problem running with the '-client' option. Aymeric. [EMAIL PROTECTED] 12/03/03 03:08PM Can you tell us more about issues using -server mode? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I use Sun's latest on various platforms (Solaris 8, 9, SuSe, Intel) without a problem for both tomcat 4 and 5. The only caveat is the -server mode, which used to reduce stability. I knew there would be a jRockit response from Senor Cekvenich even before expanding this thread ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:09 AM To: Tomcat Users List Subject: Re: Best JVM for Tomcat On Wed, Dec 03, 2003 at 08:43:34AM -0300, Walter do Valle wrote: What is the best version of J2SDK to run Tomcat 4.1.29 over Linux? On Linux, I've been using the latest from Sun, 1.4.2_02 without any issues. There may be others which are faster, but performance hasn't been an issue for me. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restarting tomcat from web page
I have heard of this done by using a second webserver with perl installed and then using Perl Win32 calls from webserver A to webserver B to restart the server. You could always run the other webserver on a high protected port so you don't need a second box. -Tim Altug B. Altintas wrote: Hi How can i restart Tomcat which is running as service, from a web page 1 - calling bat file ? (not working) 2 - calling http://localhost:8080/manager/html/start?path=/engine (asking password) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Restarting tomcat from web page
Howdy, Restarting all of tomcat or just selected webapps? Yoav Shapira Millennium ChemInformatics -Original Message- From: Altug B. Altintas [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 10:57 AM To: Tomcat Users List Subject: Restarting tomcat from web page Hi How can i restart Tomcat which is running as service, from a web page 1 - calling bat file ? (not working) 2 - calling http://localhost:8080/manager/html/start?path=/engine (asking password) any clean way ? Regards Altug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.x non .jsp suffix for includes?
Thanks to Chris and and Tim Funk for pointing me in the right direction. For the archives, I found that adding the following two lines to %catalina_home%/conf/web.xml did the trick: servlet servlet-namejnc/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namelogVerbosityLevel/param-name param-valueWARNING/param-value /init-param load-on-startup3/load-on-startup /servlet servlet-mapping servlet-namejnc/servlet-name url-pattern*.jnc/url-pattern /servlet-mapping Best, Richard Bondi At 06:14 PM 12/3/2003 -0500, you wrote: Richard, Does anyone know how to configure tomcat to compile .jnc files in this circumstance? Is there a standard convention for naming jsp include files? Yeah, .jsp :) Seriously, though. Check out CATALINA_HOME/conf/web.xml for how they configure the .jsp file trnaslator/compiler. You could modify the that web.xml file to include the same type of things for .jsp files, or you could modify the deployment descriptor for your application. Unfortunately, modifying your deployment descriptor will make your application non-portable. But, you are already making your .jsp files called something else, anyway, so you'll have to do some sort of re-configuration for every app server you indend to use. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Your configuration Files
Try this [shm] info=Scoreboard. Required for reconfiguration and status with multi process servers file=/var/log/httpd/jk2.shm size=1 -Original Message- From: Ingmars Rubenis [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:41 AM To: Asif Chowdhary Subject: Re: Your configuration Files Importance: High Thank You, but I have the same errors in error.log (apache dir) [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3944 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3945 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3946 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3947 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3948 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3949 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3950 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [error] jk2_init() Can't find child 3951 in scoreboard [Thu Dec 04 14:40:08 2003] [error] mod_jk child init 1 -2 [Thu Dec 04 14:40:08 2003] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations Asif Hi, Asif I just felt like doing a good deed. Asif Here are the modified files. Asif jk2.properties workers2.properties Asif Once you have the mod_jk2 on your machine working. Asif Type: http://localhost/jkstatus. This will display the page Asif and will mean that mod_jk2 is working. Asif Next. Ensure Tomcat is working by Asif Type: http://localhost:8080/examples Asif Try the servlets and Jsp there. Asif Next: Type Asif http://localhost:80/examples Asif If you can access the Tomcat servlets and JSP page from here Asif it means that your connections are working fine. Asif Also, I have added the info in workers2.properties file that you Asif should add to the server.xml file of your tomcat. Asif The jvmRoute=localhost:8010 This is for load balancing. Asif Also the connector should be in your server.xml file. Asif Asif Best wishes Ingmars Rubenis LU University of Latvia Developer IT Department (371) 9227133 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restarting tomcat from web page
The only way to restart a Windows service is through native code. You could use JNDI, or Runtime.exec() to run a net stop net start script, or a perl script, or a vbs one... there are many options here :-) Apart from protecting the page, I would also implement a first step with a countdown, so you can abort the restart operation if you want :-P Regards, Rodrigo Ruiz Tim Funk wrote: I have heard of this done by using a second webserver with perl installed and then using Perl Win32 calls from webserver A to webserver B to restart the server. You could always run the other webserver on a high protected port so you don't need a second box. -Tim Altug B. Altintas wrote: Hi How can i restart Tomcat which is running as service, from a web page 1 - calling bat file ? (not working) 2 - calling http://localhost:8080/manager/html/start?path=/engine (asking password) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
Howdy, The whole point was to change at runtime without recompiling. This is what lgo4j allows you to do. As to my order of magnitude improvement by using if(logger.isDebugEnabled()) -- it's well-proven and benchmarked in the log4j documentation, and the log4j kit comes with the benchmarks you can run yourself. Finally, even the example with debug(x) vs. debug(translate(x)) missed something -- the possibly complex configuration of log4j. If, for example, you have an appender such as JMS, Telnet, or SMTP (all come with log4j) configured to send out debug messages, every call to debug can be much much more expensive than simply writing a text string to a file. Yoav Shapira Millennium ChemInformatics -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 9:33 AM To: Tomcat Users List Subject: Re: How to measue performance? Log4j on/off. There is a hack to accomplish similar results. If you declare a constant boolean variable as false and use it in your branch statement the compiler will exclude the entire statement. static final boolean DEBUG = false; if(DEBUG){ //conditional code goes here } On Thursday 04 December 2003 09:05 am, Graham Reeds wrote: As an aside, make sure you have all log4j Logger#debug statements enclosed in if(logger.isDebugEnabled()) { ... } clauses -- that's an order of magnitude or so runtime performance improvement. Showing my C heritage here, but can't you do something like Log(an error has occurred); And in Log have a directive like class Logger() { void Log(string msg) { #ifdef DEBUG ... log message .. #endif }; And so you can compile a version with debug or no debug. Those if() statements are still going to take time to process, even if there is no logging going on. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to measue performance? Log4j on/off.
I would expect that the Appenders and Formatters only come into play if debug is enabled. Am I wrong ? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:34 PM To: Tomcat Users List Subject: RE: How to measue performance? Log4j on/off. Finally, even the example with debug(x) vs. debug(translate(x)) missed something -- the possibly complex configuration of log4j. If, for example, you have an appender such as JMS, Telnet, or SMTP (all come with log4j) configured to send out debug messages, every call to debug can be much much more expensive than simply writing a text string to a file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best JVM for Tomcat
Howdy, I've seen exactly the same behavior as Senor Alibert. Yoav Shapira Millennium ChemInformatics -Original Message- From: Aymeric Alibert [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: RE: Best JVM for Tomcat We are running Tomcat under Solaris 8 and tried to use the '-server' option.The option improved greatly the performances, but unfortunately load testing showed that the JVM would crash systematically under heavy load. No problem running with the '-client' option. Aymeric. [EMAIL PROTECTED] 12/03/03 03:08PM Can you tell us more about issues using -server mode? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, I use Sun's latest on various platforms (Solaris 8, 9, SuSe, Intel) without a problem for both tomcat 4 and 5. The only caveat is the -server mode, which used to reduce stability. I knew there would be a jRockit response from Senor Cekvenich even before expanding this thread ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:09 AM To: Tomcat Users List Subject: Re: Best JVM for Tomcat On Wed, Dec 03, 2003 at 08:43:34AM -0300, Walter do Valle wrote: What is the best version of J2SDK to run Tomcat 4.1.29 over Linux? On Linux, I've been using the latest from Sun, 1.4.2_02 without any issues. There may be others which are faster, but performance hasn't been an issue for me. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat question
Title: Message im not sure im sending my question to the right mailing list, but here we go. i have tomcat 4.1.29 installed on window 2000 and im running it as service, the question is how do i change the classpath of the tomcat? i change setclasspath file but it didnt help thank you in advance. mobile mapping application Guy LubovitchProject Manager TelmapBareket 11Herzelia [EMAIL PROTECTED] tel: mobile: +972(9)9582844+972(54)550865 Powered by Plaxo Want a signature like this? Add me to your address book...
RE: tomcat question
I'm almost sure that in Tomcat_Home/conf/tomcat4.conf there should be an entry for that. Well I'm talking about Linux, actually, but the setup should be similar for Windows... -Original Message- From: Guy Lubovitch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 12:14 PM To: '[EMAIL PROTECTED]' Subject: tomcat question im not sure im sending my question to the right mailing list, but here we go. i have tomcat 4.1.29 installed on window 2000 and im running it as service, the question is how do i change the classpath of the tomcat? i change setclasspath file but it didnt help thank you in advance. mobile mapping application Guy Lubovitch Project Manager Telmap Bareket 11 Herzelia [EMAIL PROTECTED] tel: mobile: +972(9)9582844 +972(54)550865 http://www.plaxo.com/signature Powered by Plaxo http://www.plaxo.com/signature Want a signature like this? https://www.plaxo.com/add_me?u=4294976276v0=17453k0=1888001226 Add me to your address book...
RE: tomcat question
Actually in solaris and linux its working for me, I can be more exact and exaplain that the problem is that I cannot connect to my jboss from tomcat because of some initial class the tomcat load before jboss_client.jar and the only way I made it work was addd this line to setclasspath,bat : set CLASSPATH=%JAVA_HOME%\lib\tools.jar;C:\work\app\Tomcat 4.1.29\server\lib\jbossall-client.jar -Original Message- From: Nadia Kunkov [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:20 PM To: Tomcat Users List Subject: RE: tomcat question I'm almost sure that in Tomcat_Home/conf/tomcat4.conf there should be an entry for that. Well I'm talking about Linux, actually, but the setup should be similar for Windows... -Original Message- From: Guy Lubovitch [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 12:14 PM To: '[EMAIL PROTECTED]' Subject: tomcat question im not sure im sending my question to the right mailing list, but here we go. i have tomcat 4.1.29 installed on window 2000 and im running it as service, the question is how do i change the classpath of the tomcat? i change setclasspath file but it didnt help thank you in advance. mobile mapping application Guy Lubovitch Project Manager Telmap Bareket 11 Herzelia [EMAIL PROTECTED] tel: mobile: +972(9)9582844 +972(54)550865 http://www.plaxo.com/signature Powered by Plaxo http://www.plaxo.com/signature Want a signature like this? https://www.plaxo.com/add_me?u=4294976276v0=17453k0=1888001226 Add me to your address book... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Monitoring Apache Traffic
Hi, Is there any way to determine if the contents sent from the client to the server is encrypted or not? I am not using a browser as a client. I am using a windows application. If I can see the contents then I will know if SSL is working. Any tools that will sniff the line to display the contents. Thanks Asif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TC 4 -oreillyMultipart- TC5: Corrupt form data: premature ending
Dirk Griesbach wrote: Rémy, I'm quite sure. With a summary of oreilly´s sources I see: class MultipartParser { ... private ServletInputStream in; private byte[] buf = new byte[8 * 1024]; ... ServletInputStream in = req.getInputStream(); ... do { String line = readLine(); if (line == null) { throw new IOException(Corrupt form data: premature ending); thrown when using TC5, but not on TC4 } ... private String readLine() throws IOException { int result; StringBuffer sbuf = new StringBuffer(); do { result = in.readLine(buf , 0, buf.length); ... sbuf.append(new String(buf, 0, result, encoding)); } ... return sbuf.toString(); } } looks quite normal, doesn't it ? If they're doing *that*, they might as well use the buffered reader readLine method ;-) Byte by byte input works (it's inefficent, obviously, but it works). I recommend adding some debug in their readLine method to see what is being returned. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jikes/Win32 with encoding
Hi, I built jikes for win32 with -encoding compiled in and I wonder if anyone cares to use it, for example for JSP compilation, as suggested in the Definitive Guide. Without thsi option, it was impossible to use jikes in conjuction with ant. http://www.javaroom.de/index.html Best, -Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
anyone running tomcat-4.1.29 with commons-daemons?
Hello, I'm trying to use the commons-daemons package as of 20031204.tar.gz with jakarta-tomcat-4.1.29, everything should be in the right place, but jsvc exits with java.lang.NoSuchMethodException: org.apache.catalina.startup.BootstrapService.init([Ljava.lang.String;) at java.lang.Class.getMethod1(Class.java:1888) at java.lang.Class.getMethod(Class.java:1056) at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:165) jsvc.exec error: Cannot load daemon jsvc.exec error: Service exit with a return value of 3 commons-daemon.jar and bootstrap.jar are available at the defined place. Does this release maybe only work with tomcat 5? Any help would be great! Regards Marten Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jasper offline produces NullPointerException in tomcat-4.1.24?
Hello folks, i wonder if is really possible to compile JSP pages offline, because all that i doing is going wrong, take a look at this output: $java org.apache.jasper.JspC -d blah -uribase http://osctrl -webapp /usr/local/ApacheGroup/tomcat-4.1.24/webapps/osctrl-app -uriroot /usr/local/ApacheGroup/tomcat-4.1.24/webapps/osctrl-app 2003-12-04 03:28:32 - ERROR-the file '\jsp\cadastroPerfil\cadastroPerfilFrm.jsp' generated the following general exception: java.lang.NullPointerException error:org.apache.jasper.JasperException: Error compiling \jsp\cadastroPerfil\cadastroPerfilFrm.jsp at org.apache.jasper.JspC.processFile(JspC.java:596) at org.apache.jasper.JspC.execute(JspC.java:801) at org.apache.jasper.JspC.main(JspC.java:823) Now i´m taking a look at org.apache.jasper.JspC´s source and ( i´m not sure, because i cannot debug JspC and don´t have its source for tomcat-4.1.24 ) as far as i can see, JspC cannot compile without objects and instances that should came from Tomcat. If this is my mistake in the command line, could someone shows me a correct example of JspC offline command line? Regards, Edson
RE: Monitoring Apache Traffic
If you make tomcat use SSL everything will use this protocol, then your requests and responses will be encrypted. If you plainly see what client browser is passing to tomcat or tomcat is passing to user, sure its not a safe request. -- De: Asif Chowdhary[SMTP:[EMAIL PROTECTED] Responder:Tomcat Users List Enviada: quinta-feira, 4 de dezembro de 2003 14:30 Para: [EMAIL PROTECTED] Assunto: Monitoring Apache Traffic Hi, Is there any way to determine if the contents sent from the client to the server is encrypted or not? I am not using a browser as a client. I am using a windows application. If I can see the contents then I will know if SSL is working. Any tools that will sniff the line to display the contents. Thanks Asif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAASRealm Tomcat 5.x - Tomcat 4.1.x
Hi AFAIK, the JAASRealm in Tomcat 4.1.29 is a beta version. Is the JAASRealm in Tomcat 5.x for production? If yes, can I use the JAASRealm of Tomcat 5.x in Tomcat 4.1.29? Thanks for your help Oliver *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Apache Traffic
Look at the browsers Lock icon. Sniffing the traffic seems like overkill to me. Ben Ricker Wellinx, Inc. On Thu, 2003-12-04 at 11:30, Asif Chowdhary wrote: Hi, Is there any way to determine if the contents sent from the client to the server is encrypted or not? I am not using a browser as a client. I am using a windows application. If I can see the contents then I will know if SSL is working. Any tools that will sniff the line to display the contents. Thanks Asif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with httpsessionlistener
Hello, I'm having some difficulty with my session listener. I set up a session listener in my web.xml file as such: listener listener-classcom.gri.web.SessionTracker/listener-class /listener Now when I go to the context that is under the listener method sessionCreated doesn't get executed. However a session is created because my log says: 2003-12-04 13:58:26 Authenticator[/emissions]: Restore request from session '46B9930847D159C904E53EE8C277B33A' Can anyone tell me what I may be doing incorrectly. -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with httpsessionlistener
Howdy, Is it possible this session was persisted to disk and recreated on tomcat startup (as opposed to newly created by a user request)? Recreation of persisted sessions (correctly) does not trigger the sessionCreated event. Yoav Shapira Millennium ChemInformatics -Original Message- From: Atreya Basu [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:04 PM To: Tomcat Users List Subject: Problem with httpsessionlistener Hello, I'm having some difficulty with my session listener. I set up a session listener in my web.xml file as such: listener listener-classcom.gri.web.SessionTracker/listener-class /listener Now when I go to the context that is under the listener method sessionCreated doesn't get executed. However a session is created because my log says: 2003-12-04 13:58:26 Authenticator[/emissions]: Restore request from session '46B9930847D159C904E53EE8C277B33A' Can anyone tell me what I may be doing incorrectly. -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: anyone running tomcat-4.1.29 with commons-daemons?
Howdy, It's commons-daemon (not daemons) ;) To run it with 4.1.29 you need to right some code. Tomcat 5 has an implementation of the DaemonContext, you'd need to do something similar for tomcat 4. It's possible. In fact I believe a solution with more details was discussed within the past two months on this list: search the archives. As an aside, since you're using 4.1.29, can you use 5.0.16 instead? Yoav Shapira Millennium ChemInformatics -Original Message- From: Marten Lehmann [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 12:47 PM To: [EMAIL PROTECTED] Subject: anyone running tomcat-4.1.29 with commons-daemons? Hello, I'm trying to use the commons-daemons package as of 20031204.tar.gz with jakarta-tomcat-4.1.29, everything should be in the right place, but jsvc exits with java.lang.NoSuchMethodException: org.apache.catalina.startup.BootstrapService.init([Ljava.lang.String;) at java.lang.Class.getMethod1(Class.java:1888) at java.lang.Class.getMethod(Class.java:1056) at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:1 65) jsvc.exec error: Cannot load daemon jsvc.exec error: Service exit with a return value of 3 commons-daemon.jar and bootstrap.jar are available at the defined place. Does this release maybe only work with tomcat 5? Any help would be great! Regards Marten Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrade from 4.1.29 to 5.0.16, logging is too verbose?
I was running tomcat 4.1.29 with a log4j jar in the $CATALINA_HOME/common/lib folder and a log4j.properties file in $CATALINA_HOME/common/classes folder. This worked fine, and kept the log messages at the level I wanted them. When I installed 5.0.16, I put the log4j jar and properties file in the same locations listed above, but now when tomcat starts, it spits out a ton of INFO: messages into catalina.out, so I don't think it is actually using the log4j configuration. Any ideas on what might have changed? Is this how I should setup log4j to be used within tomcat? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with httpsessionlistener
That's helpful. Any idea how I might verify this? I haven't found a SESSION.ser file. Atreya Shapira, Yoav wrote: Howdy, Is it possible this session was persisted to disk and recreated on tomcat startup (as opposed to newly created by a user request)? Recreation of persisted sessions (correctly) does not trigger the sessionCreated event. Yoav Shapira Millennium ChemInformatics -Original Message- From: Atreya Basu [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:04 PM To: Tomcat Users List Subject: Problem with httpsessionlistener Hello, I'm having some difficulty with my session listener. I set up a session listener in my web.xml file as such: listener listener-classcom.gri.web.SessionTracker/listener-class /listener Now when I go to the context that is under the listener method sessionCreated doesn't get executed. However a session is created because my log says: 2003-12-04 13:58:26 Authenticator[/emissions]: Restore request from session '46B9930847D159C904E53EE8C277B33A' Can anyone tell me what I may be doing incorrectly. -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with httpsessionlistener
Sorry, Shapira you are right. There was a SESSION.ser file. I got rid of it and it worked. Now there is another problem I'm trying: Object obj = session.getAttribute(j_username); (I'm doing FORM based authentication and this definitely works.) but I'm getting a null value for obj. I know that I am authenticated because I see: 2003-12-04 14:09:45 Authenticator[/emissions]: Calling authenticate() 2003-12-04 14:09:45 Authenticator[/emissions]: Already authenticated 'basu' help? Shapira, Yoav wrote: Howdy, Is it possible this session was persisted to disk and recreated on tomcat startup (as opposed to newly created by a user request)? Recreation of persisted sessions (correctly) does not trigger the sessionCreated event. Yoav Shapira Millennium ChemInformatics -Original Message- From: Atreya Basu [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:04 PM To: Tomcat Users List Subject: Problem with httpsessionlistener Hello, I'm having some difficulty with my session listener. I set up a session listener in my web.xml file as such: listener listener-classcom.gri.web.SessionTracker/listener-class /listener Now when I go to the context that is under the listener method sessionCreated doesn't get executed. However a session is created because my log says: 2003-12-04 13:58:26 Authenticator[/emissions]: Restore request from session '46B9930847D159C904E53EE8C277B33A' Can anyone tell me what I may be doing incorrectly. -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unclear about JDBC resource def in Tomcat 4.1
I'm using Tomcat 4.1... I have the O'Reilly after-market book for reference AWA the Jakarta info... I'm unclear about JDBC config issues... * Any JDBC client webapp can instantiate a driver and get a Connection WITHOUT ANY DEFINITION TO THE server.xml or the web.xml as long as the driver jars are in /shared/lib or /application/WEB-INF/lib...True or False? * For convenience, JDBC resources may be be defined to Tomcat as JNDI Data Sources to the default JNDI context provided by Tomcat,otherwise no config required...True or false? Best Regards, Michael Dean Sun Certified Programmer for the Java 2 Platform Washington State Department of Corrections ph: 360-664-8802 fx: 360-664-3985 mailto:[EMAIL PROTECTED] I'm a sailor, of the waters and the sun, I can fight the waves but have no weapons for the calm... - The Ship Best Regards, Michael Dean Sun Certified Programmer for the Java 2 Platform Washington State Department of Corrections ph: 360-664-8802 fx: 360-664-3985 mailto:[EMAIL PROTECTED] I'm a sailor, of the waters and the sun, I can fight the waves but have no weapons for the calm... - The Ship - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Upgrade from 4.1.29 to 5.0.16, logging is too verbose?
Ryan Cornia wrote: I was running tomcat 4.1.29 with a log4j jar in the $CATALINA_HOME/common/lib folder and a log4j.properties file in $CATALINA_HOME/common/classes folder. This worked fine, and kept the log messages at the level I wanted them. When I installed 5.0.16, I put the log4j jar and properties file in the same locations listed above, but now when tomcat starts, it spits out a ton of INFO: messages into catalina.out, so I don't think it is actually using the log4j configuration. Any ideas on what might have changed? Is this how I should setup log4j to be used within tomcat? Tomcat 5 only supplies the c-l API, and put it in the system classpath, to avoid the problems with c-l seen in Tomcat 4.1. You have to supply the commons-logging wrapper for log4j (it's in the default c-l JAR), and put it next to the log4j JAR. Otherwise, I think log4j won't get used. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installation Problem - Service wont start
Hi, I am installing Tomcat 5 on XP Pro. I followed the installation problem thread which is very helpful. I can run my tomcat from command line (catalina run), but when I tried to start the tomcat service, it wont start. Path to executable on tomcat services is :\Program Files\Apache Software Foundation\Tomcat 5.0\bin\tomcat.exe //RS//Tomcat5. Does any body can help? Second question is how do I change the path to executable on tomcat service?. Thanks advance for help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]