Re: Servlets with JDBC connectivity
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote: How do people handle this elegantly? The requirements are: a single, globally visible (within a webapp) database interface and the ability to access multiple databases easily. The first point is to use a singleton to set up the database connection - or more correctly the connection pool. This way you can request a connection and return it to the pool easily. Of course every time you use one you will have to use try-catch blocks. Sorry no way around that. However, if you are clever you will create data objects to hide all that stuff. Even better - why not get something to write all those horrid data objects - sql and trycatch blocks for you. Last year we (another developer any myself) developed a project called sysmod, which essentially takes a xml description of a database schema and turns it into Java code and a real SQL schema. This is by no means a unique approach - tools like JBuilder allow you to use graphical UI's and UML to do something similar - and is even two way. However, our approach is somewhat lighter. All we have is the XML model. The model generates the Java data objects. The code includes comments such that it creates nice JavaDoc as well, so in effect you have a self documenting business model from the XML. At this stage we have to write very little SQL, and no SQL at all for updating and adding records. The actions (we use struts) become very simple because in addition to being able to load and save themselves from a database they can also load themselves from a request, therefore our code looks something like this: Client client = ClientFactory.newClient(); client.loadFromRequest( client, request ); client.saveChanges(); This code essentially loads all the fields from the request prefixed by client into the data object. Then the call to saveChanges() saves the record to the database. The data objects also handle their own SQL exceptions, although they throw their own exceptions. The Factory for each data object also provides lists of various kinds, ie you can call ClientFactory.findAll() and it will return a list of Client objects prefilled by a single query. You can also do a findByQuery with parameters to define the query. The approach works very well, but is not without its drawbacks. It is quite easy to code things which look logical but create hundreds of queries and is inefficient. We are still working on ways to improve the system, such as caching data. It is also limiting - in that while it creates DataObjects it is not a trrue object hiracy. This is because the system is still based on a relational database. In other words this system is not a relational mapping tool. It is also not a object database. However, it does provide a quick and easy way to prototype databases and the Java code to access it. Currently the system creates objects that are not JDO or EJB. If you are interested I can provide it - Regards, Peter Harrison - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
execution order of context listener and servlets
hi guys, i have a question about der execution order of the ServletContextListener.contextInitialized() method and the init() method of an servlet. In my web.xml i have a servlet with load load-on-startup1/load-on-startup declared. besides i have declared an ServletContextListener. in tomcat the ServletContextListener executes first and then der init() method of the servlet. in ias (oracle) the servlets init() method executes first and then the ServletContextListener. i thought the ServletContextListener has to execute first. is this right or am i missing something? servus uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.x and JBoss
Yes, I posted this question on the jboss.org forum, but I'm still waiting for the answer. --- Simon Chou [EMAIL PROTECTED] a écrit : Have you posted this question in the JBoss forum? SC -Original Message- From: J.L. [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 5:22 AM To: [EMAIL PROTECTED] Subject: Tomcat 5.x and JBoss Hi, I want to use JBoss 3.2.2 and Tomcat 5.0.14. The problem is that I have to replace the JBoss embedded Tomcat, by the 5.0.14 version (I need local access between servlets and EJBs). I have heard I can do that by recompiling JBoss with Tomcat 5.0.14, but I have no idea how to do that. If you have any ideas... Thx ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - 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] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets with JDBC connectivity
Peter Harrison wrote: On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote: How do people handle this elegantly? The requirements are: a single, globally visible (within a webapp) database interface and the ability to access multiple databases easily. The first point is to use a singleton to set up the database connection - or more correctly the connection pool. This way you can request a connection and return it to the pool easily. Of course every time you use one you will have to use try-catch blocks. Sorry no way around that. Both Tomcat and J2EE specification support javax.sql.DataSource objects over JNDI. That is how we handle it elegantly. A DataSource object is specified by the administrator and created by the container. Container then deploys it under specified JNDI name. A servlet (or EJB) can then lookup this object and use it, something like this: import java.sql.*; import javax.sql.*; import javax.naming.*; InitialContext ic = new InitialContext(); DataSource ds = (DataSource)ic.lookup( java:comp/env/jdbc/MyDataSource ); Connection conn = ds.getConnection(); Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shell script to check if Tomcat is running?
Does anybody has script also for unix systems like REDHAT linux? This looks likes for windows! 2 really simple ways - # Assume tomcat is the only java process COWBELL=`ps -ef | grep java| grep -v grep | wc -l` if [ $COWBELL 0 ]; then echo Woohoo - the process is there; fi - OR - # Assume glodenfile should be result from url below rm dest_file.html wget http://more/cowbell.txt --output-document=dest_file.html COWBELL=`diff dest_file.html goldenfile.html | wc -l` if [ $COWBELL == 0 ]; then echo Woohoo - the site is up (and not hacked); else echo The downloaded page is diff from the golden file fi - -Tim Tom Ly wrote: I plan on using cron to automatically run a script to check if Tomcat is running. How would I write one? -Tom - 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: Shell script to check if Tomcat is running?
This is for unix/linux. Oscar On Tue, 2 Dec 2003 [EMAIL PROTECTED] wrote: Does anybody has script also for unix systems like REDHAT linux? This looks likes for windows! 2 really simple ways - # Assume tomcat is the only java process COWBELL=`ps -ef | grep java| grep -v grep | wc -l` if [ $COWBELL 0 ]; then echo Woohoo - the process is there; fi - OR - # Assume glodenfile should be result from url below rm dest_file.html wget http://more/cowbell.txt --output-document=dest_file.html COWBELL=`diff dest_file.html goldenfile.html | wc -l` if [ $COWBELL == 0 ]; then echo Woohoo - the site is up (and not hacked); else echo The downloaded page is diff from the golden file fi - -Tim Tom Ly wrote: I plan on using cron to automatically run a script to check if Tomcat is running. How would I write one? -Tom - 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]
OutOfMemoryError on Tomcat-4.1.24
hi, I'm installed Tomcat-4.1.24 on a Linux Debian pc with j2sdk1.4.1. On that there is an application running that causes Tomcat stoppping from time to time. The error I get is: Dec 2, 2003 1:44:33 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError It's not predictable when it happens, sometimes 3 weeks all seems to go right and than in 2 days Tomcat stops. Can any one point me to a direction where I have to look for. thanks in advance Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cross site single sign on
Hi all! Not necessarily Tomcat specific, but I'm curious what others may have done to support cross site single sign on. The basic problem is that customer goes to site A, and logs in. Then while navigating that site, they eventually head over to site B. Of course when they hit site B, the customer should already be logged in. If site A and site B live in the same domain space (say, site.com and b.site.com), then a site.com cookie should be able to be used as a token that show login. Of course, this requires cookies. It also requires both sites to maintain the cookie if the cookie is allowed to expire (say, it's only useful for 30 minutes). However I think this would have to be a signed cookie, where both participating servers encrypt to cookie with a known key (perhaps a shared public key). Now, if you have sitea.com and siteb.com, then the cookie technique can't work (as neither can set a cookie for the other). So, I'm thinking that you can do something similiar, a signed token, in a hidden field and then having to submit a form to get to the new site. Of course, you can always stick the token on the URL as well. Does that sum it up? Any other ways for cooperating sites to transparently exchange credentials? I suppose the back ends can do it. Send signed packets to each other during their log in processes to notify cooperating services. But if your logins time out, you still need to constantly update the session information. It's not enough to know that Bob signed in at 10am, and expires at 10:30. If Bob actively uses the site, you want the time out to be since last activity. How are others doing this and what have you found effective? Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError on Tomcat-4.1.24
hi, I'm installed Tomcat-4.1.24 on a Linux Debian pc with j2sdk1.4.1. On that there is an application running that causes Tomcat stoppping from time to time. The error I get is: Dec 2, 2003 1:44:33 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError It's not predictable when it happens, sometimes 3 weeks all seems to go right and than in 2 days Tomcat stops. Can any one point me to a direction where I have to look for. thanks in advance Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat 4.1.27 and MySQL J/Connector 3.0.9 (stable)
Here's my two cent's. The problem is that when I try to open the connection by calling method dataSource.getConnection() it throws a java.sql.SQLException stating Cannot load JDBC driver class 'null'. Had the same problem on 4.1.29 and 3.23.58 Try adding this to the Web.xml servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping Server.xml (important parts): GlobalNamingResources Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB | | | nameurl/name valuejdbc:mysql://localhost/TestDB?autoReconnect=true/value /parameter /ResourceParams This section of my code is in a set of context tags. /GlobalNamingResources Service... Engine... Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/TestDB userTable=UserTBL userNameCol=userid userCredCol=pass userRoleTable=RoleTBL roleNameCol=role/ /Engine /Service Not used in my case yet. Everything else looks like my code. I'm no expert and don't know how most of it works but it does. I have one catch on my system. I have to restart Tomcat after I deploy the war file via manager. I get null pointer exceptions if I don't. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets with JDBC connectivity
Based on the how-to and modified for your app: package yourpackage; import java.sql.*; import javax.naming.*; import javax.sql.*; public class Conn { /**Takes desired database as a string and returns a connection. */ public static Connection getConn(String dBase) { Connection connection = null; String osName = System.getProperty(os.name); try { //Start of Tomcat connect Context ctx = new InitialContext(); if (ctx == null) { System.err.println(Conn.getConn ctx is null); throw new Exception(Boom - No Context); DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/ + dBase); if (ds != null) connection = ds.getConnection(); //End of Tomcat connect } catch (Exception e) { System.err.println(Conn.getConn + e); } return connection; } } I think this link over here, might give you a hand. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html There are samples there for databases like mysql, but I think you should be ok. Todd O'Bryan wrote: This may not be the right place to ask this, but if you can direct me to the right place, I'd appreciate it. I'm looking for a design pattern that someone must have already thought through so that my head can stop hurting. Here's the problem: I'm designing a webapp that has several servlets that all access a database (or a couple of databases, actually) to either update or retrieve information. Rather than initializing these connections multiple times, dealing with SQLExceptions in every class that uses JDBC queries, and generally doing things multiple times, I thought I'd put all the database stuff into a single class. I created a setUp() method that initialized the database connection and then used static methods so I could do something like SQLUtils.executeQuery(a SQL statement); SQLUtils.executeUpdate(another one); anywhere in my webapp. If the database connection had not been created, it got created before executing the SQL statement. If it was already created, it just got done. I handled all the nastiest exceptions in the SQLUtils class, so I didn't have to deal with them elsewhere. You can probably guess the next part. I've discovered I need to connect to more than one database, and this design does not support that. Creating instances of a SQLUtil class would be a big pain, because then I have to pass those around between my servlets and I lose one of the huge advantages of this approach, namely a single, globally visible interface to the database. I thought about multiple classes, one for each database I'm connecting to, but I know that can't be right on so many levels. Meanwhile, I'm a little stumped. How do people handle this elegantly? The requirements are: a single, globally visible (within a webapp) database interface and the ability to access multiple databases easily. Thanks in advance for any ideas, Todd - 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]
intial context
Hi ! I'm using Tomcat/4.1.24-LE-jdk14 and getting a trouble with initial Context in Tomcat. Could you help me ? I'm develop my database in SQL Server 2000, using ODBC Data Source : Systwm DSN is book, using JdbcOdbc bridge. I don't know how to edit server.xml web.xml in conf to deploy my app with Context is bookDB. Thanh you very much !
Re: OutOfMemoryError on Tomcat-4.1.24
Hans Steinraht wrote: I'm installed Tomcat-4.1.24 on a Linux Debian pc with j2sdk1.4.1. On that there is an application running that causes Tomcat stoppping from time to time. The error I get is: Dec 2, 2003 1:44:33 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError It's not predictable when it happens, sometimes 3 weeks all seems to go right and than in 2 days Tomcat stops. Can any one point me to a direction where I have to look for. I will point you to the list archives http://marc.theaimsgroup.com/?l=tomcat-user Possible causes for OOM as well as techniques to fix them are there. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: execution order of context listener and servlets
In the Servlet-2.4 spec (aka Tomcat 5), it explicitly specifies Tomcat's order. @See section 9.12. It isn't explicitly specified in the Servlet-2.3 spec, so technically oracle isn't wrong. However, because of the spec change, they will have to match Tomcat's order in their Servlet-2.4 release. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi guys, i have a question about der execution order of the ServletContextListener.contextInitialized() method and the init() method of an servlet. In my web.xml i have a servlet with load load-on-startup1/load-on-startup declared. besides i have declared an ServletContextListener. in tomcat the ServletContextListener executes first and then der init() method of the servlet. in ias (oracle) the servlets init() method executes first and then the ServletContextListener. i thought the ServletContextListener has to execute first. is this right or am i missing something? servus uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: execution order of context listener and servlets
thanks for the info bill. Bill Barker [EMAIL PROTECTED]An: [EMAIL PROTECTED] .comKopie: Gesendet von:Thema:Re: execution order of context listener and servlets news [EMAIL PROTECTED] rg 03.12.03 09:58 Bitte antworten an Tomcat Users List In the Servlet-2.4 spec (aka Tomcat 5), it explicitly specifies Tomcat's order. @See section 9.12. It isn't explicitly specified in the Servlet-2.3 spec, so technically oracle isn't wrong. However, because of the spec change, they will have to match Tomcat's order in their Servlet-2.4 release. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] . hi guys, i have a question about der execution order of the ServletContextListener.contextInitialized() method and the init() method of an servlet. In my web.xml i have a servlet with load load-on-startup1/load-on-startup declared. besides i have declared an ServletContextListener. in tomcat the ServletContextListener executes first and then der init() method of the servlet. in ias (oracle) the servlets init() method executes first and then the ServletContextListener. i thought the ServletContextListener has to execute first. is this right or am i missing something? servus uli - 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: OutOfMemoryError
Christopher Schultz wrote: So, moving on, what usually happens is that a low memory condition triggers a GC (usually a full GC). When the GC runs, it needs some memory to work with. If it cannot allocate memory for itself, it will die with an OOM. If the heap hasn't increased, yet, then the GC cannot allocate more objects on the heap to do it's thing. That can explain why you get an OOM when you are way under the heap size in the output of ps. Hi Christopher, I have a doubt with respect to your explanation. Is there any difference between an OOM thrown within the GC thread, and any other OOM? I mean, if an OOM is thrown within the GC, and it dies, the JVM looses its GC, so no memory can be deallocated, and the only way is to shutdown the JVM. But what happens if the OOM is thrown in any other thread? Is the JVM state preserved in this case? As said in another post, generally speaking, an OOM leaves the JVM in a bad state. But, can this state be detected by checking the state of any of the JVM threads? I guess the GC should run in a thread I could get a reference from. If I check this reference liveness, could I determine if the OOM has affected the GC? I have developed some web services that can return an important amount of data. Under high load, the server memory requirements can become huge, so I added a loop into the catalina script to restart my tomcat instance automatically, and added a filter that catches OOMs and forces a JVM shutdown, after writing some logs asking for more memory. I was wondering if I could reduce the shutdown condition to only the cases when the GC has died. Greetings, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Include Files
When using Tomcat 4.0, I was able to include files in a directory above my public web directory, but with tomcat 4.1, when I try to run the same jsp, I get the error: org.apache.jasper.JasperException: /main.jsp(3,0) File ../Private/NormalTemplate.inc not found All casing etc is correct. Is this a security fix, or should this still be possible? Many thanks Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Editors
Thanks guys Seems to be big differances in opinion, but I'll try a few of them out - Duncan Duncan wrote: Sorry if off topic but... What do people use to edit JSPs? I'm after an editor, free if possible, to run on windows, with syntax colouring and possibly auto complete for java. Have tried vim for windows, but it doesn't seem as nice on windows as it is on linux. Any other suggestions? Cheers Duncan Smith Decker Telecom Ltd - 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.x and JBoss
J.L. wrote: Hi, I want to use JBoss 3.2.2 and Tomcat 5.0.14. The problem is that I have to replace the JBoss embedded Tomcat, by the 5.0.14 version (I need local access between servlets and EJBs). I have heard I can do that by recompiling JBoss with Tomcat 5.0.14, but I have no idea how to do that. If you have any ideas... JBoss 3.2.3 includes the latest Tomcat 5.0.16 build (the SAR is ready to build in docs/examples/tomcat). There are some details here: http://www.werner.be/blog/page/werner/20031202#jboss_3_2_3_with -- 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]
response.sendRedirect() finite loop?!
talk2UtimeHi all, I am getting strange entries in my test_service_log.2003-12-03.txt. In my JSP which gets executed before this I am running a response.sendRedirect(/test/RedirectToMe.jsp); with a return; afterwards. So this should only get executed once. However. According to my logs its being accessed 1333 times in just SIX seconds [line count / 2]. I am the ONLY person on the server and therefore this is strange occurance! I checked the corresponding apache logs and this servlet was not in the logs, the servlet before hand which does the redirect was the only servlet that has been accessed externally. This is true from what the user sees. Is this a bug in Tomcat 4.1.29 or has something changed? I've been using Tomcat for a few years now and I've never seen anything like this? Regards, Stuart Stephen 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true ... ... ... 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true
Re: Please Help: Inconsistent Load Balancing info mod_jk2
Hi, i'm using mod_jk2 for load balancing purpose and I have a problem in fail over scenario. I described this scenario in the bugs database: http://issues.apache.org/bugzilla/show_bug.cgi?id=24882 Can you tell me if you have a similar behavior please? Thanks! Marco - Original Message - From: Asif Chowdhary [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 6:52 PM Subject: RE: Please Help: Inconsistent Load Balancing info mod_jk2 Thank you -Original Message- From: David O'Brien [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:48 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Higher the number ... More Hits I have one worker at lb_factor=4 and one at lb_factor=8 and the distribution if I have 150 sessions active the server with lb_factor=4 has 49 and the server with lb_factor=8 has 101 This can be seen at @ http://www.nacrraware.net/cluster/ -Dave At 10:32 AM 12/2/2003, Asif Chowdhary wrote: The apache documentation say that higher the number the greater the number of requests which tomcat will receive. The tomcat definitive Guide from orielly says that the lower the number the greater the number of requests a tomcat instance will receive. What is correct? Which instance will get more requests? First or Second #First instance of tomcat in workers2.properties lb_factor = 10 #Second instance of tomcat in workers2.properties lb_factor = 20 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David G. O'Brien Web Services Coordinator / Systems Administrator NACCRRA The Nation's Network of Child Care Resource Referral 1319 F Street NW, Suite 500 Washington, DC 20004 (202) 393-5501 ext. 113 (202) 393-1109 fax - 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]
Any Examples of jakarta Slide
hi All, Has anyone Worked on jakarta Slide.. I am designing a Document Management System Let me know pleaase Thank you very much Van -Original Message- From: Marco Manini [mailto:[EMAIL PROTECTED] Sent: Wed 03/12/2003 11:27 To: Tomcat Users List Cc: Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Hi, i'm using mod_jk2 for load balancing purpose and I have a problem in fail over scenario. I described this scenario in the bugs database: http://issues.apache.org/bugzilla/show_bug.cgi?id=24882 Can you tell me if you have a similar behavior please? Thanks! Marco - Original Message - From: Asif Chowdhary [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 6:52 PM Subject: RE: Please Help: Inconsistent Load Balancing info mod_jk2 Thank you -Original Message- From: David O'Brien [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:48 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Higher the number ... More Hits I have one worker at lb_factor=4 and one at lb_factor=8 and the distribution if I have 150 sessions active the server with lb_factor=4 has 49 and the server with lb_factor=8 has 101 This can be seen at @ http://www.nacrraware.net/cluster/ -Dave At 10:32 AM 12/2/2003, Asif Chowdhary wrote: The apache documentation say that higher the number the greater the number of requests which tomcat will receive. The tomcat definitive Guide from orielly says that the lower the number the greater the number of requests a tomcat instance will receive. What is correct? Which instance will get more requests? First or Second #First instance of tomcat in workers2.properties lb_factor = 10 #Second instance of tomcat in workers2.properties lb_factor = 20 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David G. O'Brien Web Services Coordinator / Systems Administrator NACCRRA The Nation's Network of Child Care Resource Referral 1319 F Street NW, Suite 500 Washington, DC 20004 (202) 393-5501 ext. 113 (202) 393-1109 fax - 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]
Antwort: Any Examples of jakarta Slide
hi, i have only used the client part of slide to transfer files with WebDAV between two servers. uli Vaneet Sharma [EMAIL PROTECTED]An: Tomcat Users List [EMAIL PROTECTED] ast.edu.mt Kopie: Thema:Any Examples of jakarta Slide 03.12.03 11:35 Bitte antworten an Tomcat Users List hi All, Has anyone Worked on jakarta Slide.. I am designing a Document Management System Let me know pleaase Thank you very much Van -Original Message- From: Marco Manini [mailto:[EMAIL PROTECTED] Sent: Wed 03/12/2003 11:27 To: Tomcat Users List Cc: Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Hi, i'm using mod_jk2 for load balancing purpose and I have a problem in fail over scenario. I described this scenario in the bugs database: http://issues.apache.org/bugzilla/show_bug.cgi?id=24882 Can you tell me if you have a similar behavior please? Thanks! Marco - Original Message - From: Asif Chowdhary [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 6:52 PM Subject: RE: Please Help: Inconsistent Load Balancing info mod_jk2 Thank you -Original Message- From: David O'Brien [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:48 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Higher the number ... More Hits I have one worker at lb_factor=4 and one at lb_factor=8 and the distribution if I have 150 sessions active the server with lb_factor=4 has 49 and the server with lb_factor=8 has 101 This can be seen at @ http://www.nacrraware.net/cluster/ -Dave At 10:32 AM 12/2/2003, Asif Chowdhary wrote: The apache documentation say that higher the number the greater the number of requests which tomcat will receive. The tomcat definitive Guide from orielly says that the lower the number the greater the number of requests a tomcat instance will receive. What is correct? Which instance will get more requests? First or Second #First instance of tomcat in workers2.properties lb_factor = 10 #Second instance of tomcat in workers2.properties lb_factor = 20 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David G. O'Brien Web Services Coordinator / Systems Administrator NACCRRA The Nation's Network of Child Care Resource Referral 1319 F Street NW, Suite 500 Washington, DC 20004 (202) 393-5501 ext. 113 (202) 393-1109 fax - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: Servlets with JDBC connectivity
On Dec 3, 2003, at 2:59 AM, Nikola Milutinovic wrote: Peter Harrison wrote: On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote: How do people handle this elegantly? The requirements are: a single, globally visible (within a webapp) database interface and the ability to access multiple databases easily. The first point is to use a singleton to set up the database connection - or more correctly the connection pool. This way you can request a connection and return it to the pool easily. Of course every time you use one you will have to use try-catch blocks. Sorry no way around that. Both Tomcat and J2EE specification support javax.sql.DataSource objects over JNDI. That is how we handle it elegantly. A DataSource object is specified by the administrator and created by the container. Container then deploys it under specified JNDI name. A servlet (or EJB) can then lookup this object and use it, something like this: import java.sql.*; import javax.sql.*; import javax.naming.*; InitialContext ic = new InitialContext(); DataSource ds = (DataSource)ic.lookup( java:comp/env/jdbc/MyDataSource ); Connection conn = ds.getConnection(); 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. At least, I think that's what it's doing. Am I missing something? Here's what I want. In every servlet in my webapp, I'm only going to be using one of a very few database connections. I'd like to be able to do something like: Test.executeQuery(SQL) without doing any setup because the Test class handles all the setup, initializes the connection the first time it's called, etc. Basically, it's a singleton class that never gets an instance created because if I create an instance, I'd have to pass it around to all the servlets in the webapp, which would kill the convenience of having it be available with minimal overhead. Oo, oo, oo... As I've been sitting here writing this, I had a brainstorm. What if I create an abstract class that has all the database connectivity built into it as static methods, but is just waiting for a connection method, a username, and a password. Then creating a new JDBC connection which is visible to all my servlets is just a matter of making a concrete subclass that defines those three variables and inherits all the functionality from its abstract parent class. Any reason this is a horrible idea? Thanks for being patient, Todd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best JVM for Tomcat
What is the best version of J2SDK to run Tomcat 4.1.29 over Linux? Thanks for any tip
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]
Re: Servlets with JDBC connectivity
On Dec 3, 2003, at 5:40 AM, Todd O'Bryan wrote: On Dec 3, 2003, at 2:59 AM, Nikola Milutinovic wrote: Peter Harrison wrote: On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote: How do people handle this elegantly? The requirements are: a single, globally visible (within a webapp) database interface and the ability to access multiple databases easily. The first point is to use a singleton to set up the database connection - or more correctly the connection pool. This way you can request a connection and return it to the pool easily. Of course every time you use one you will have to use try-catch blocks. Sorry no way around that. Both Tomcat and J2EE specification support javax.sql.DataSource objects over JNDI. That is how we handle it elegantly. A DataSource object is specified by the administrator and created by the container. Container then deploys it under specified JNDI name. A servlet (or EJB) can then lookup this object and use it, something like this: import java.sql.*; import javax.sql.*; import javax.naming.*; InitialContext ic = new InitialContext(); DataSource ds = (DataSource)ic.lookup( java:comp/env/jdbc/MyDataSource ); Connection conn = ds.getConnection(); 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. At least, I think that's what it's doing. Am I missing something? Here's what I want. In every servlet in my webapp, I'm only going to be using one of a very few database connections. I'd like to be able to do something like: Test.executeQuery(SQL) without doing any setup because the Test class handles all the setup, initializes the connection the first time it's called, etc. Basically, it's a singleton class that never gets an instance created because if I create an instance, I'd have to pass it around to all the servlets in the webapp, which would kill the convenience of having it be available with minimal overhead. Oo, oo, oo... As I've been sitting here writing this, I had a brainstorm. What if I create an abstract class that has all the database connectivity built into it as static methods, but is just waiting for a connection method, a username, and a password. Then creating a new JDBC connection which is visible to all my servlets is just a matter of making a concrete subclass that defines those three variables and inherits all the functionality from its abstract parent class. Any reason this is a horrible idea? Thanks for being patient, Todd Never mind. The compiler just reminded me that abstract and static together are nonsensical. It must be too early in the morning. I suppose I could write a constructor that initializes the database, user, and password settings, and then use the instance. Instead of ProductionDB.executeUpdate(a SQL statement); I'd have ProductionDB prod = new ProductionDB(); prod.executeUpdate(a SQL statement); slightly more complicated than what I envisioned, but I could create any connection I need in each servlet's constructor so it would only have to be done once. Once more, any obvious (or, better for my self-esteem, non-obvious) reason this is a bad idea? Thanks, Todd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat 4.1.27 and MySQL J/Connector 3.0.9 (stable)
ke, 2003-12-03 kello 04:19, Doug Parsons wrote Had the same problem on 4.1.29 and 3.23.58 Try adding this to the Web.xml servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping Does not make sense, since I do not have servlets in my web app... Server.xml (important parts): GlobalNamingResources Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB | | | nameurl/name valuejdbc:mysql://localhost/TestDB?autoReconnect=true/value /parameter /ResourceParams This section of my code is in a set of context tags. I need it in GlobalNamingResources, since the realm uses the same DBCP. /GlobalNamingResources Service... Engine... Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/TestDB userTable=UserTBL userNameCol=userid userCredCol=pass userRoleTable=RoleTBL roleNameCol=role/ /Engine /Service Not used in my case yet. Works well in my case... Everything else looks like my code. I'm no expert and don't know how most of it works but it does. I have one catch on my system. I have to restart Tomcat after I deploy the war file via manager. I get null pointer exceptions if I don't. Actually I was lucky enough to solve this problem myself. Hints for the solution was in the examples section of the default server.xml. I had to add a Context-element for my web application into the server.xml, and in that I needed to include ResourceLink-element telling the use of the global datasource. Then I needed to delete the resource-ref element from the web.xml of my web app. And voila, it started working... The downside is that I cannot anymore use the manager ant-task to install or reload the web application context (resulting exception when trying to use it: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context). I have included parts of the server.xml if someone else has the same problem: /GlobalNamingResources Resource name=TestDB auth=Container type=javax.sql.DataSource /Resource ResourceParams name=TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueuserx/value /parameter parameter namepassword/name valuepassx/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/TestDB?autoReconnect=true/value /parameter /ResourceParams /GlobalNamingResources ... Context path=/testapp docBase=testapp debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_testapp_log. suffix=.txt timestamp=true/ ResourceLink name=jdbc/TestDB global=TestDB type=javax.sql.DataSource/ /Context The Realm did not change. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat 4.1.27 and MySQL J/Connector 3.0.9 (stable)
Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/TestDB userTable=UserTBL userNameCol=userid userCredCol=pass userRoleTable=RoleTBL roleNameCol=role/ The Realm did not change. Sorry, the Realm indeed changed. I had to change the dataSourceName from jdbc/TestDB to TestDB, since the name of the global resource-reference changed as well. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
accessing tomcat from another machine
I've upgraded from tomcat 4.0.4 to tomcat 4.1.29 I can access my application by using http://localhost:8080/appname Everything's ok. But if I try to access it from another machine, it fails. Even if I try to access the application from my own machine by using the computername or 127.0.0.1 instead of localhost it fails, too. If I start the tomcat 4.0.4 everything works fine. Do I miss some configuration for the 4.1 version? I can't find any hints. Thanks in advance Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Build Tomcat :Jasper - cannot resolve symbol
Hi, Any one have any clues as to why this build is unsuccessful. Is something missing? deploy: [echo] Target: Jasper - Deploy ... build-prepare: [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build/bin [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build/common/classes [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build/common/lib [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build/shared/classes [mkdir] Created dir: /tmp/jakarta-tomcat-4.1.29-src/jasper/build/shared/lib copy-launcher.jars: build-static: [copy] Copying 4 files to /tmp/jakarta-tomcat-4.1.29-src/jasper/build/bin build-only: [javac] Compiling 80 source files to /tmp/jakarta-tomcat-4.1.29-src/jasper/build/shared/classes [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:69: cannot resolve symbol [javac] symbol : class DynamicAttributes [javac] location: package tagext [javac] import javax.servlet.jsp.tagext.DynamicAttributes; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:71: cannot resolve symbol [javac] symbol : class SimpleTag [javac] location: package tagext [javac] import javax.servlet.jsp.tagext.SimpleTag; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:74: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: package tagext [javac] import javax.servlet.jsp.tagext.TagFileInfo; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ELNode.java:61: cannot resolve symbol [javac] symbol : class FunctionInfo [javac] location: package tagext [javac] import javax.servlet.jsp.tagext.FunctionInfo; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:1352: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: class org.apache.jasper.compiler.Node.CustomTag [javac] private TagFileInfo tagFileInfo; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:1426: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: class org.apache.jasper.compiler.Node.CustomTag [javac] TagFileInfo tagFileInfo) { [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:1438: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: class org.apache.jasper.compiler.Node.CustomTag [javac] Mark start, Node parent, TagFileInfo tagFileInfo) { [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java:1511: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: class org.apache.jasper.compiler.Node.CustomTag [javac] public TagFileInfo getTagFileInfo() { [javac]^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ELNode.java:153: cannot resolve symbol [javac] symbol : class FunctionInfo [javac] location: class org.apache.jasper.compiler.ELNode.Function [javac] private FunctionInfo functionInfo; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ELNode.java:182: cannot resolve symbol [javac] symbol : class FunctionInfo [javac] location: class org.apache.jasper.compiler.ELNode.Function [javac] public void setFunctionInfo(FunctionInfo f) { [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ELNode.java:186: cannot resolve symbol [javac] symbol : class FunctionInfo [javac] location: class org.apache.jasper.compiler.ELNode.Function [javac] public FunctionInfo getFunctionInfo() { [javac]^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java:74: cannot resolve symbol [javac] symbol : class TagFileInfo [javac] location: package tagext [javac] import javax.servlet.jsp.tagext.TagFileInfo; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java:72: package javax.servlet.jsp.el does not exist [javac] import javax.servlet.jsp.el.ELException; [javac] ^ [javac] /tmp/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java:73: package javax.servlet.jsp.el does not exist
NotSerializableException - DBCP
Hello, I have not been using the shutdown command when restarting Tomcat in Windows but now that I have I get exception traces for all my Session beans on shutting down and then again for each of two connection objects when starting up. Is this simply that the DBCP package's PoolableConnection Class does not implement Serializable? If so how can I get it to implement this. Is there any way to use a destroy method to remove the connection pool from the equation before persisting? Maybe using a SessionListener? All my session beans implement Serializable. StandardHost[www.myhostname.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session 44B5000FB88CCCEDE215D47D3DAAFF9A java.io.NotSerializableException: org.apache.commons.dbcp.PoolableConnection at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) ... etc. Thanks in advance, Andoni. Tomcat 4.0.4
Re: Best JVM for Tomcat
I use BEA's jRockit (but with tomcat 5) on Fedora. .V Walter do Valle wrote: What is the best version of J2SDK to run Tomcat 4.1.29 over Linux? Thanks for any tip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general)
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]
Re: Cross site single sign on
Sounds like pubcookie: http://pubcookie.org/ -Tim Will Hartung wrote: Hi all! Not necessarily Tomcat specific, but I'm curious what others may have done to support cross site single sign on. The basic problem is that customer goes to site A, and logs in. Then while navigating that site, they eventually head over to site B. Of course when they hit site B, the customer should already be logged in. If site A and site B live in the same domain space (say, site.com and b.site.com), then a site.com cookie should be able to be used as a token that show login. Of course, this requires cookies. It also requires both sites to maintain the cookie if the cookie is allowed to expire (say, it's only useful for 30 minutes). However I think this would have to be a signed cookie, where both participating servers encrypt to cookie with a known key (perhaps a shared public key). Now, if you have sitea.com and siteb.com, then the cookie technique can't work (as neither can set a cookie for the other). So, I'm thinking that you can do something similiar, a signed token, in a hidden field and then having to submit a form to get to the new site. Of course, you can always stick the token on the URL as well. Does that sum it up? Any other ways for cooperating sites to transparently exchange credentials? I suppose the back ends can do it. Send signed packets to each other during their log in processes to notify cooperating services. But if your logins time out, you still need to constantly update the session information. It's not enough to know that Bob signed in at 10am, and expires at 10:30. If Bob actively uses the site, you want the time out to be since last activity. How are others doing this and what have you found effective? Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include Files
I would think this is a security fix. (Or a bug fix) I am surprised this was allowed in 4.0. -Tim Duncan wrote: When using Tomcat 4.0, I was able to include files in a directory above my public web directory, but with tomcat 4.1, when I try to run the same jsp, I get the error: org.apache.jasper.JasperException: /main.jsp(3,0) File ../Private/NormalTemplate.inc not found All casing etc is correct. Is this a security fix, or should this still be possible? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best JVM for Tomcat
Vic Cekvenich wrote: I use BEA's jRockit (but with tomcat 5) on Fedora. How does this work ? I've had trouble with jRockit on Linux, plus there's the new Posix threads reportedly causing problems. Maybe Fedora + new JRockits would help, but hard data would be useful. Are you using TC standalone ? Does the VM ever crash ? -- 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
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]
NotSerializableException: StandardSessionFacade
I managed to get around the other problem with DBCP by removing the implements Serializable from the connection pooling bean. Now I am left with a problem I can't solve though as I cannot affect the: org.apache.catalina.session.StandardSessionFacade Each of my beans have an init() method that takes ServletContext and HttpSession as parameters so that they can call other beans at these levels. Are these the Sessions that I am being asked to serialize or remove? If so how can I do this? StandardHost[www.myhost.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session A8D7FCFB58E0D018D6C1E07E64368A88 java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361) Thanks as ever. Andoni.
Problem after compiling the java file
Hi, After I'm compiling the java file with changes and try to run it again I'm getting error in the browser:: The requested service (Servlet TkTld is currently unavailable) is not currently available. In the STDOUT I get: StandardServer.await: Invalid command '' received and in the STDERR I'm getting: Dec 3, 2003 1:44:05 PM org.apache.jk.server.JkCoyoteHandler action INFO: RESET and I cannot run any servlet after this until I restart the tomcat Please advise, Regards, Yuval Zantkeren Domain The Net Technologies Ltd. 81 Sokolov St. Ramat-Hasharon Israel 47238 Tel: 972-3-7600500 Fax: 972-3-7600505 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include Files
So how does one get around this issue ie, how do you have an include file that is not accessable by a user, do people set up a secure folder for these? Any suggestions? - Duncan Tim Funk wrote: I would think this is a security fix. (Or a bug fix) I am surprised this was allowed in 4.0. -Tim Duncan wrote: When using Tomcat 4.0, I was able to include files in a directory above my public web directory, but with tomcat 4.1, when I try to run the same jsp, I get the error: org.apache.jasper.JasperException: /main.jsp(3,0) File ../Private/NormalTemplate.inc not found All casing etc is correct. Is this a security fix, or should this still be possible? - 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: Include Files
Place it in WEB-INF (or a subdirectory in WEB-INF) -Tim Duncan wrote: So how does one get around this issue ie, how do you have an include file that is not accessable by a user, do people set up a secure folder for these? Any suggestions? - Duncan Tim Funk wrote: I would think this is a security fix. (Or a bug fix) I am surprised this was allowed in 4.0. -Tim Duncan wrote: When using Tomcat 4.0, I was able to include files in a directory above my public web directory, but with tomcat 4.1, when I try to run the same jsp, I get the error: org.apache.jasper.JasperException: /main.jsp(3,0) File ../Private/NormalTemplate.inc not found All casing etc is correct. Is this a security fix, or should this still be possible? - 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: response.sendRedirect() finite loop?!
Hi, On further investigation it would appear that this is not a Tomcat issue. It seems to be something to do with mod_jk. When a response.sendRedirect occurs it does not apply it properly. Or at least something is not executing properly. The setup we have is Apache 2.0.48, Tomcat 4.1.29, and mod_jk between them working with mod_ssl. I tested the code without using apache between me and Tomcat and everything worked as expected. Any suggestions or comments?? Regards Stuart -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 10:06 To: [EMAIL PROTECTED] Subject: response.sendRedirect() finite loop?! talk2UtimeHi all, I am getting strange entries in my test_service_log.2003-12-03.txt. In my JSP which gets executed before this I am running a response.sendRedirect(/test/RedirectToMe.jsp); with a return; afterwards. So this should only get executed once. However. According to my logs its being accessed 1333 times in just SIX seconds [line count / 2]. I am the ONLY person on the server and therefore this is strange occurance! I checked the corresponding apache logs and this servlet was not in the logs, the servlet before hand which does the redirect was the only servlet that has been accessed externally. This is true from what the user sees. Is this a bug in Tomcat 4.1.29 or has something changed? I've been using Tomcat for a few years now and I've never seen anything like this? Regards, Stuart Stephen 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true ... ... ... 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Auto start scripts
Have very limited experience of Linux or Tomcat. Not even really sure if this is a Tomcat issue or a Linux issue. Main question: How do I run a Tomcat4 script from /etc/rc.d/init.d so that Tomcat starts automatically? Tomcat works fine when I run startup.sh as root. However, common sense and many passing references on the mailing list suggest that root is not the best choice. - What user do people normally use? - Should I create a user for the purpose? - What attributes and permissions should it have? - Is this related to the tomcat tomcat element in the default tomcat-users.xml? I read somewhere that tar preserves file and directory permissions when unpacking .tar.gz files. However, everything now seems to be owned by root (group also root), possibly because I unpacked it as root. So when I run Tomcat as tomcat, it dies of 'access denied'. I have changed the owner and group to tomcat for the logs and conf directories (so that Tomcat can rewrite tomcat-users.xml ???) but I am very reluctant to do too much of this without fully understanding why and what the downstream consequences might be. Most things now work but not the admin application. - What is the best practiced with regard to permissions? Tomcat documentation seems to stop firmly at startup.sh and shutdown.sh (unless I simply have not found the right page). I have found FAQs and tutorials that give sample scripts for various Linux distributions (none so far for Fedora) but none of them work if the user and permissions are not good. - Can anyone please summarise what I need to do? Best practice, even? :-) - Should it be documented? - Would all this go away if there was an RPM? - Is there an RPM? :-) Many thanks Robin Rigby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include Files
Good plan. Thanks Tim, didn't think of that one. Tim Funk wrote: Place it in WEB-INF (or a subdirectory in WEB-INF) -Tim Duncan wrote: So how does one get around this issue ie, how do you have an include file that is not accessable by a user, do people set up a secure folder for these? Any suggestions? - Duncan Tim Funk wrote: I would think this is a security fix. (Or a bug fix) I am surprised this was allowed in 4.0. -Tim Duncan wrote: When using Tomcat 4.0, I was able to include files in a directory above my public web directory, but with tomcat 4.1, when I try to run the same jsp, I get the error: org.apache.jasper.JasperException: /main.jsp(3,0) File ../Private/NormalTemplate.inc not found All casing etc is correct. Is this a security fix, or should this still be possible? - 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: Auto start scripts
Robin Rigby wrote: Have very limited experience of Linux or Tomcat. Not even really sure if this is a Tomcat issue or a Linux issue. Main question: How do I run a Tomcat4 script from /etc/rc.d/init.d so that Tomcat starts automatically? Tomcat works fine when I run startup.sh as root. However, common sense and many passing references on the mailing list suggest that root is not the best choice. - What user do people normally use? - Should I create a user for the purpose? - What attributes and permissions should it have? - Is this related to the tomcat tomcat element in the default tomcat-users.xml? I'd sugest: - download TC-4.1.24 RPMs and install them - study it, see how it arranges files, permissions, etc... - configure your own TC 4.1.29 accordingly - or just (carefully) paste 4.1.29 over existing 4.1.24 RPM install Setting up TC correctly or, even more, building your own RPMs can be very time consuming. The layout of 4.1.24 RPMs seams OK to me. There is a site, JPackage, I think, which has newer RPMs, but they have moved other packages from TC into separate ones (JavaMail, JDBC-ext,...), so getting it all together is not easy. Plus they have their own dependencies, which I couldn't provide on Mandrake. Nixie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Log4j SMTP Appender trouble
Hello, I'm trying to use the SMTP Appender of log4j 1.2.8 with the following configuration : ### Logger Mail ( SMTP Appender ) log4j.logger.Mail=DEBUG, Mail log4j.appender.Mail=org.apache.log4j.net.SMTPAppender log4j.appender.Mail.BufferSize=4096 log4j.appender.Mail.From=zz [EMAIL PROTECTED] log4j.appender.Mail.Subject= log4j.appender.Mail.SMTPHost=zz..zzz log4j.appender.Mail.layout=org.apache.log4j.SimpleLayout log4j.appender.Mail.layout=org.apache.log4j.PatternLayout log4j.appender.Mail.layout.ConversionPattern=%d[%c{1}i %x] %m%n under Eclipse using a simple test class I receive the mail. When I try to do the same under Tomcat 4.1.29 / JDK 1.4 nothing append : no mail, no dump. I use the same mail.jar ( the jar is in WEB-INF/lib for Tomcat ) on both test case. Please advise, Regards, Jardin Xavier. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat does not die
Hello all I have a Tomcat 4.1 instaled in a Red Hat Linux 7.3 server. My JDK is JDK 1.3.0 from IBM. My Tomcat was instaled from a RPM package downloaded from jakarta project homepage. When it was installed, rpm created a file called tomcat4 in /etc/init.d. I use this script to start and stop my Tomcat. I have chosen that JDK because RPM package waits for JDK 1.3.0 from IBM. All works well. tomcat4 start starts Tomcat, tomcat4 stop stops Tomcat. But in some moments Tomcat stops responding (hang) then I try use the command tomcat4 stop to stop it but it does not work. Tomcat stops to listen his 8080 port but the processes (threads) stay still running (ps -ef). What can I do to solve this problem? Update Tomcat? Update JDK? Any help is welcome
RE: Tomcat does not die
are you sure its not one of the pages in your application that makes it hang? /anton -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: den 3 december 2003 15:02 To: [EMAIL PROTECTED] Subject: Tomcat does not die Hello all I have a Tomcat 4.1 instaled in a Red Hat Linux 7.3 server. My JDK is JDK 1.3.0 from IBM. My Tomcat was instaled from a RPM package downloaded from jakarta project homepage. When it was installed, rpm created a file called tomcat4 in /etc/init.d. I use this script to start and stop my Tomcat. I have chosen that JDK because RPM package waits for JDK 1.3.0 from IBM. All works well. tomcat4 start starts Tomcat, tomcat4 stop stops Tomcat. But in some moments Tomcat stops responding (hang) then I try use the command tomcat4 stop to stop it but it does not work. Tomcat stops to listen his 8080 port but the processes (threads) stay still running (ps -ef). What can I do to solve this problem? Update Tomcat? Update JDK? Any help is welcome
problems with Jasper in Tomcat-4.1.24
Hello folks, i trying to compile some JSP pages from command line, but i getting these messages from it: D:\desenv\osctrl\buildjava org.apache.jasper.JspC -d . -p org.apache -uriroot /desenv -webapp ../osctrl error:org.apache.jasper.JasperException: The -uriroot option must specify a pre- existing directory at org.apache.jasper.JspC.execute(JspC.java:769) at org.apache.jasper.JspC.main(JspC.java:823) I already replaced my uriroot for a real path in my filesystem and a completely non-existing directory, what must i do? Regards, Edson
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
RE: Best JVM for Tomcat
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]
RE: Cross site single sign on
Howdy, We have a standalone authentication web service used by all our apps. It's cookie-based. Yoav Shapira Millennium ChemInformatics -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 6:54 AM To: Tomcat Users List Subject: Re: Cross site single sign on Sounds like pubcookie: http://pubcookie.org/ -Tim Will Hartung wrote: Hi all! Not necessarily Tomcat specific, but I'm curious what others may have done to support cross site single sign on. The basic problem is that customer goes to site A, and logs in. Then while navigating that site, they eventually head over to site B. Of course when they hit site B, the customer should already be logged in. If site A and site B live in the same domain space (say, site.com and b.site.com), then a site.com cookie should be able to be used as a token that show login. Of course, this requires cookies. It also requires both sites to maintain the cookie if the cookie is allowed to expire (say, it's only useful for 30 minutes). However I think this would have to be a signed cookie, where both participating servers encrypt to cookie with a known key (perhaps a shared public key). Now, if you have sitea.com and siteb.com, then the cookie technique can't work (as neither can set a cookie for the other). So, I'm thinking that you can do something similiar, a signed token, in a hidden field and then having to submit a form to get to the new site. Of course, you can always stick the token on the URL as well. Does that sum it up? Any other ways for cooperating sites to transparently exchange credentials? I suppose the back ends can do it. Send signed packets to each other during their log in processes to notify cooperating services. But if your logins time out, you still need to constantly update the session information. It's not enough to know that Bob signed in at 10am, and expires at 10:30. If Bob actively uses the site, you want the time out to be since last activity. How are others doing this and what have you found effective? Regards, Will Hartung ([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: NotSerializableException: StandardSessionFacade
Howdy, Don't put a Session as a session attribute. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:20 AM To: Tomcat Users List Subject: NotSerializableException: StandardSessionFacade I managed to get around the other problem with DBCP by removing the implements Serializable from the connection pooling bean. Now I am left with a problem I can't solve though as I cannot affect the: org.apache.catalina.session.StandardSessionFacade Each of my beans have an init() method that takes ServletContext and HttpSession as parameters so that they can call other beans at these levels. Are these the Sessions that I am being asked to serialize or remove? If so how can I do this? StandardHost[www.myhost.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session A8D7FCFB58E0D018D6C1E07E64368A88 java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361) Thanks as ever. Andoni. 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: OutOfMemoryError
Howdy, Aah. I think I see a part of the problem. First of all, the amount of memory shown by 'ps' is completely irrelevant, except that it shows how much memory that the OS has allocated to the Java process. This is allowed to be more than the max heap size set for Java. It's not completely irrelevant, but close ;) Do you have any 3rd party containers or such that live outside of the context (their JARs would be in CATALINA_HOME/server/lib or CATALINA_HOME/common/lib -- someone please confirm that the second of these two does *not* get discarded along with the rest of the context upon reload). I'll confirm that -- common classloader repositories (as well as shared and server) do not get discarded on webapp reload. They can't, as that might destroy other webapps. Yet another reason never to use these repositories, keep your webapp self-contained. 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: response.sendRedirect() finite loop?!
Howdy, I've never seen something like this with tomcat, and I don't know enough about mod_jk to comment intelligently. If you don't need Apache, don't use it ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:37 AM To: Tomcat Users List Subject: RE: response.sendRedirect() finite loop?! Hi, On further investigation it would appear that this is not a Tomcat issue. It seems to be something to do with mod_jk. When a response.sendRedirect occurs it does not apply it properly. Or at least something is not executing properly. The setup we have is Apache 2.0.48, Tomcat 4.1.29, and mod_jk between them working with mod_ssl. I tested the code without using apache between me and Tomcat and everything worked as expected. Any suggestions or comments?? Regards Stuart -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 10:06 To: [EMAIL PROTECTED] Subject: response.sendRedirect() finite loop?! talk2UtimeHi all, I am getting strange entries in my test_service_log.2003-12-03.txt. In my JSP which gets executed before this I am running a response.sendRedirect(/test/RedirectToMe.jsp); with a return; afterwards. So this should only get executed once. However. According to my logs its being accessed 1333 times in just SIX seconds [line count / 2]. I am the ONLY person on the server and therefore this is strange occurance! I checked the corresponding apache logs and this servlet was not in the logs, the servlet before hand which does the redirect was the only servlet that has been accessed externally. This is true from what the user sees. Is this a bug in Tomcat 4.1.29 or has something changed? I've been using Tomcat for a few years now and I've never seen anything like this? Regards, Stuart Stephen 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapping contextPath='/test' with requestURI='/test/RedirectToMe.jsp' and relativeURI='/RedirectToMe.jsp' 2003-12-03 09:32:08 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RedirectToMe.jsp' and path info 'null' and update=true ... ... ... 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapping contextPath='/t2ut' with requestURI='/t2ut/RoomTimes.jsp' and relativeURI='/RoomTimes.jsp' 2003-12-03 09:32:14 StandardContext[/t2ut]: Mapped to servlet 'jsp' with servlet path '/RoomTimes.jsp' and path info 'null' and update=true - 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.0.x memory leak (not javac)
Howdy, Happy holidays hopefully devoid of debugging ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 4:15 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) Ok, thanks guys. I'll see what I can do. EXTREMELY busy right now, but I might be able to try it over christmas holidays. :) MAYBE! -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 12:08 PM To: Tomcat Users List Subject: RE: Tomcat 4.0.x memory leak (not javac) Howdy, You don't have to know much about the tomcat under the hood to diagnose this. It's not a problem with the tomcat classes. What you need to know is: - What 3rd party libraries does your application use - What classes stay in memory after a reload and have a 2nd instance of them created. You can use a profiler like Senor Hanik suggested (JProbe, OptimizeIt, etc.) to find out the latter. You want to look for a list of objects whose instance count increases after a reload of your webapp. OptimizeIt can do heap snapshot deltas which are the perfect tool here. Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 2:08 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) Ouch, LOL. I don't really know a whole lot about the tomcat under the hood! :) I can try though. Do you have a procedure that I should take to find this? Is there a debugging option that I can turn on for tomcat? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 11:45 AM To: Tomcat Users List Subject: RE: Tomcat 4.0.x memory leak (not javac) Howdy, Since you can reproduce your error easily, can you narrow down which 3rd party library is keeping the references that cause the memory leak? Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 1:43 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 11:01 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.x memory leak (not javac) Shapira, Yoav wrote: Besides what Senor Schultz said (which is 100% true), 1. Where is this mentioned in the release notes, and what would one have to search for? Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web application reloading where shared libraries keep references to objects instantiated by the web application. That says memory leak to me although it doesn't specifically say that. 2. You mentioned in your passage the bug was marked as invalid or wontfix, and the bug you gave below is marked as new. So if anyone actually wasted time (like me) looking up what you said, they didn't find it. All I did was search for memory leak under Tomcat 4 and all status. I was not positive that it was marked WONTFIX, I should have clarified that in my original message. I had thought that the issue was something inherent to the design of Tomcat 4 (which was overhauled in Tomcat 5), but I'm sure that they are willing to accept patches if anyone can fix it. ;-) Bugzilla is obviously not working sometimes. I searched for memory leak one time and got it. Then I went to search for it for someone else so I could give them the bug number but nothing came up. I did the exact same search, memory leak. Very interesting indeed. Heck, I even searched for just memory or leak once each and came up with nothing. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This communication is intended for the use of the recipient to whom it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communications received in error, or subsequent reply, should be deleted or destroyed. --- - 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
RE: Tomcat does not die
Howdy, You most likely have non-daemon threads that you're not shutting down properly. This is a common issue and has been discussed on this list many times in the past, though not for a couple of months. You can search the archives for more details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:02 AM To: [EMAIL PROTECTED] Subject: Tomcat does not die Hello all I have a Tomcat 4.1 instaled in a Red Hat Linux 7.3 server. My JDK is JDK 1.3.0 from IBM. My Tomcat was instaled from a RPM package downloaded from jakarta project homepage. When it was installed, rpm created a file called tomcat4 in /etc/init.d. I use this script to start and stop my Tomcat. I have chosen that JDK because RPM package waits for JDK 1.3.0 from IBM. All works well. tomcat4 start starts Tomcat, tomcat4 stop stops Tomcat. But in some moments Tomcat stops responding (hang) then I try use the command tomcat4 stop to stop it but it does not work. Tomcat stops to listen his 8080 port but the processes (threads) stay still running (ps - ef). What can I do to solve this problem? Update Tomcat? Update JDK? Any help is welcome 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
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]
RE: Tomcat Log4j SMTP Appender trouble
Howdy, Please don't cross-post. We saw this and Jacob Kjome answered it on the log4j-user mailing list. I have some comments on his response and will post them there. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jardin Xavier [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:00 AM To: TOMCAT, User Subject: Tomcat Log4j SMTP Appender trouble Hello, I'm trying to use the SMTP Appender of log4j 1.2.8 with the following configuration : ### Logger Mail ( SMTP Appender ) log4j.logger.Mail=DEBUG, Mail log4j.appender.Mail=org.apache.log4j.net.SMTPAppender log4j.appender.Mail.BufferSize=4096 log4j.appender.Mail.From=zz [EMAIL PROTECTED] log4j.appender.Mail.Subject= log4j.appender.Mail.SMTPHost=zz..zzz log4j.appender.Mail.layout=org.apache.log4j.SimpleLayout log4j.appender.Mail.layout=org.apache.log4j.PatternLayout log4j.appender.Mail.layout.ConversionPattern=%d[%c{1}i %x] %m%n under Eclipse using a simple test class I receive the mail. When I try to do the same under Tomcat 4.1.29 / JDK 1.4 nothing append : no mail, no dump. I use the same mail.jar ( the jar is in WEB-INF/lib for Tomcat ) on both test case. Please advise, Regards, Jardin Xavier. - 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: Auto start scripts
Thanks. I tried to to find the 4.1.24 RPM under http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ but this redirects me to http://jakarta.apache.org/site/binindex.cgi which offers 4.1.29 and no RPM. Where should I really be looking? Robin -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 13:01 To: Tomcat Users List Subject: Re: Auto start scripts Robin Rigby wrote: Have very limited experience of Linux or Tomcat. Not even really sure if this is a Tomcat issue or a Linux issue. Main question: How do I run a Tomcat4 script from /etc/rc.d/init.d so that Tomcat starts automatically? Tomcat works fine when I run startup.sh as root. However, common sense and many passing references on the mailing list suggest that root is not the best choice. - What user do people normally use? - Should I create a user for the purpose? - What attributes and permissions should it have? - Is this related to the tomcat tomcat element in the default tomcat-users.xml? I'd sugest: - download TC-4.1.24 RPMs and install them - study it, see how it arranges files, permissions, etc... - configure your own TC 4.1.29 accordingly - or just (carefully) paste 4.1.29 over existing 4.1.24 RPM install Setting up TC correctly or, even more, building your own RPMs can be very time consuming. The layout of 4.1.24 RPMs seams OK to me. There is a site, JPackage, I think, which has newer RPMs, but they have moved other packages from TC into separate ones (JavaMail, JDBC-ext,...), so getting it all together is not easy. Plus they have their own dependencies, which I couldn't provide on Mandrake. Nixie. - 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: Auto start scripts
Howdy, RPMs are not packaged on the jakarta site for tomcat. They're done by external parties on their sites. Google ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Robin Rigby [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:16 AM To: Tomcat Users List Subject: RE: Auto start scripts Thanks. I tried to to find the 4.1.24 RPM under http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ but this redirects me to http://jakarta.apache.org/site/binindex.cgi which offers 4.1.29 and no RPM. Where should I really be looking? Robin -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 13:01 To: Tomcat Users List Subject: Re: Auto start scripts Robin Rigby wrote: Have very limited experience of Linux or Tomcat. Not even really sure if this is a Tomcat issue or a Linux issue. Main question: How do I run a Tomcat4 script from /etc/rc.d/init.d so that Tomcat starts automatically? Tomcat works fine when I run startup.sh as root. However, common sense and many passing references on the mailing list suggest that root is not the best choice. - What user do people normally use? - Should I create a user for the purpose? - What attributes and permissions should it have? - Is this related to the tomcat tomcat element in the default tomcat-users.xml? I'd sugest: - download TC-4.1.24 RPMs and install them - study it, see how it arranges files, permissions, etc... - configure your own TC 4.1.29 accordingly - or just (carefully) paste 4.1.29 over existing 4.1.24 RPM install Setting up TC correctly or, even more, building your own RPMs can be very time consuming. The layout of 4.1.24 RPMs seams OK to me. There is a site, JPackage, I think, which has newer RPMs, but they have moved other packages from TC into separate ones (JavaMail, JDBC-ext,...), so getting it all together is not easy. Plus they have their own dependencies, which I couldn't provide on Mandrake. Nixie. - 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: NotSerializableException: StandardSessionFacade
Hello, I have now reworked my code so that instead of having an init() method in the jsp:useBean /jsp:useBean tag which is taking the session and the application implicit variables as parameters... Now I have code to fill objects with the contents of session and passing these as objects to the Beans which are in Session and application scope. Unfortunately the error message is still there. ;-( Andoni. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 2:01 PM Subject: RE: NotSerializableException: StandardSessionFacade Howdy, Don't put a Session as a session attribute. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:20 AM To: Tomcat Users List Subject: NotSerializableException: StandardSessionFacade I managed to get around the other problem with DBCP by removing the implements Serializable from the connection pooling bean. Now I am left with a problem I can't solve though as I cannot affect the: org.apache.catalina.session.StandardSessionFacade Each of my beans have an init() method that takes ServletContext and HttpSession as parameters so that they can call other beans at these levels. Are these the Sessions that I am being asked to serialize or remove? If so how can I do this? StandardHost[www.myhost.com]: Removing web application at context path StandardManager[]: Cannot serialize session attribute userSession for session A8D7FCFB58E0D018D6C1E07E64368A88 java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361) Thanks as ever. Andoni. 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: Auto start scripts
Robin Rigby wrote: Thanks. I tried to to find the 4.1.24 RPM under http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ but this redirects me to http://jakarta.apache.org/site/binindex.cgi which offers 4.1.29 and no RPM. Where should I really be looking? Robin Try this... http://archive.apache.org/dist/jakarta/tomcat-4/archive/v4.1.24/rpms/ -- Tomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Auto start scripts
Got it. Thank you. :-) -Original Message- From: Tomas Wredendal [mailto:[EMAIL PROTECTED] Sent: 03 December 2003 14:40 To: Tomcat Users List Subject: Re: Auto start scripts Robin Rigby wrote: Thanks. I tried to to find the 4.1.24 RPM under http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/ but this redirects me to http://jakarta.apache.org/site/binindex.cgi which offers 4.1.29 and no RPM. Where should I really be looking? Robin Try this... http://archive.apache.org/dist/jakarta/tomcat-4/archive/v4.1.24/rpms/ -- Tomas - 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
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(MultipartParser.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]
Tomcat 4.1.24 and mod_jk
Hi, I am migrating to tomcat 4.1.24 and mod_jk on apache 1.3.26 configuration Unfortunately when i deploy my production webapp im getting constant lines in the catalina.out log file [INFO] ChannelSocket - -server has been restarted or reset this connection This INFO line is actually loged 3 and more times per request (js, img, css includes in HTML?). When I google it all I get is some postings about apache restarting its childs in order to avoid memory leeks. Obviously its not the case. Do u guys have any clue? Thanks in advance.
RE: JDBCRealm problem
Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3) - 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] ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session not freed in tomcat4.0.6
Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan
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) 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: Inconsistent Load Balancing info mod_jk2
Have not tested to that extent yet -Original Message- From: Marco Manini [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:27 AM To: Tomcat Users List Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Hi, i'm using mod_jk2 for load balancing purpose and I have a problem in fail over scenario. I described this scenario in the bugs database: http://issues.apache.org/bugzilla/show_bug.cgi?id=24882 Can you tell me if you have a similar behavior please? Thanks! Marco - Original Message - From: Asif Chowdhary [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 6:52 PM Subject: RE: Please Help: Inconsistent Load Balancing info mod_jk2 Thank you -Original Message- From: David O'Brien [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:48 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2 Higher the number ... More Hits I have one worker at lb_factor=4 and one at lb_factor=8 and the distribution if I have 150 sessions active the server with lb_factor=4 has 49 and the server with lb_factor=8 has 101 This can be seen at @ http://www.nacrraware.net/cluster/ -Dave At 10:32 AM 12/2/2003, Asif Chowdhary wrote: The apache documentation say that higher the number the greater the number of requests which tomcat will receive. The tomcat definitive Guide from orielly says that the lower the number the greater the number of requests a tomcat instance will receive. What is correct? Which instance will get more requests? First or Second #First instance of tomcat in workers2.properties lb_factor = 10 #Second instance of tomcat in workers2.properties lb_factor = 20 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David G. O'Brien Web Services Coordinator / Systems Administrator NACCRRA The Nation's Network of Child Care Resource Referral 1319 F Street NW, Suite 500 Washington, DC 20004 (202) 393-5501 ext. 113 (202) 393-1109 fax - 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: Session not freed in tomcat4.0.6
Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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: Session not freed in tomcat4.0.6
Hi, Can you point me how to do these settings? Thanks, senthilnathan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:24 PM Subject: RE: Session not freed in tomcat4.0.6 Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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: Session not freed in tomcat4.0.6
Hi Yoav, I have noticed this behavior too. Sorry if this is a stupid question but why aren't the sessions destroyed when tomcat is shutdown? If the jvm is gone should all of it's objects be destroyed? Thanks, Paul -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:54 AM To: Tomcat Users List Subject: RE: Session not freed in tomcat4.0.6 Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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: JDBCRealm problem
I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3) - 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] ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session not freed in tomcat4.0.6
Howdy, This is not a stupid question. The servlet specification mandates that sessions be persisted across server restarts. This is done so that if a user is doing something and the server crashes, the server can come back up with the user's session data intact. When the JVM is gone, all its objects ARE gone -- from memory. Session data by default is more like preferences that are persisted. This is of course tunable: you control the session timeout (in web.xml), as well as tomcat-specific session persistence settings. Read the Manager (component, not webapp) configuration reference for details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:01 AM To: 'Tomcat Users List' Subject: RE: Session not freed in tomcat4.0.6 Hi Yoav, I have noticed this behavior too. Sorry if this is a stupid question but why aren't the sessions destroyed when tomcat is shutdown? If the jvm is gone should all of it's objects be destroyed? Thanks, Paul -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:54 AM To: Tomcat Users List Subject: RE: Session not freed in tomcat4.0.6 Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBCRealm problem
One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3) - 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] ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3)
servlet sendRedirect() to j_security_check problem
Dear all, I'm implementing remember me login functionality using FORM authentication, a LoginServlet and a Filter. It's very much based on the code in an earlier posting to this list From: Raible, Matt Subject: RE: Form based security and Remember Me Date: Fri, 21 Feb 2003 07:33:22 -0800 My set up works fine when my FORM uses j_security_check as it's action but using a redirect from a servlet seems to fail with a 403 error. I've debugged the servlet so I know it's getting to it and doing what I expect. In the original mail, Matt's servlet call is... - - - - - - - - - - - - - - - - - - - - - - - - - - String username = request.getParameter(j_username).toLowerCase(); String password = request.getParameter(j_password); ... String req = j_security_check?j_username= + RequestUtils.encodeURL(username) + j_password= + RequestUtils.encodeURL(password); response.sendRedirect(response.encodeRedirectURL(req)); - - - - - - - - - - - - - - - - - - - - - - - - - - I don't have the RequestUtils.encodeURL() in my version. a) Do I need them? - the html form seems for work even if the password field is plain text when the action is set to j_security_check. b) Where do I get these methods? Aren't they somewhere in Struts? Do I really have to bring down all of that stuff? For completeness here's my code... - - - - - - - - - - - - - - - - - - - - - - - - - - String req = j_security_check?j_username= + request.getParameter(j_username) + j_password= + request.getParameter(j_password); response.sendRedirect(response.encodeRedirectURL(req)); - - - - - - - - - - - - - - - - - - - - - - - - - - Any help would be fantastic. Best regards Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session not freed in tomcat4.0.6
That's great! Thank you very much for you help. Paul -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:04 AM To: Tomcat Users List Subject: RE: Session not freed in tomcat4.0.6 Howdy, This is not a stupid question. The servlet specification mandates that sessions be persisted across server restarts. This is done so that if a user is doing something and the server crashes, the server can come back up with the user's session data intact. When the JVM is gone, all its objects ARE gone -- from memory. Session data by default is more like preferences that are persisted. This is of course tunable: you control the session timeout (in web.xml), as well as tomcat-specific session persistence settings. Read the Manager (component, not webapp) configuration reference for details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:01 AM To: 'Tomcat Users List' Subject: RE: Session not freed in tomcat4.0.6 Hi Yoav, I have noticed this behavior too. Sorry if this is a stupid question but why aren't the sessions destroyed when tomcat is shutdown? If the jvm is gone should all of it's objects be destroyed? Thanks, Paul -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:54 AM To: Tomcat Users List Subject: RE: Session not freed in tomcat4.0.6 Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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] - 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: JDBCRealm problem
If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: Session not freed in tomcat4.0.6
Can you point me how to do these settings? Change the saveOnRestart setting to false in your server.xml Manager className=org.apache.catalina.session.PersistentManager debug=0 saveOnRestart=false maxActiveSessions=-1 minIdleSwap=-1 maxIdleSwap=-1 maxIdleBackup=-1 Store className=org.apache.catalina.session.FileStore/ /Manager BTW: I didn't notice the Manager section in the server.xml file in Tomcat 5x. has it been replaced? ALSO: If I were a committer, I would vote against making the new minimal server.xml file the default for future disturbutions. It's a lot easier to instruct us newbies to uncomment something from the file than to explain how to write sections in or switch from one config file to another.. On Wednesday 03 December 2003 10:01 am, senthilnathan wrote: Hi, Can you point me how to do these settings? Thanks, senthilnathan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:24 PM Subject: RE: Session not freed in tomcat4.0.6 Howdy, That's not a problem. Sessions are freed (destroyed) when they are timed out. They are persisted on restart. You can control these settings via the Manager element in server.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: senthilnathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:48 AM To: [EMAIL PROTECTED] Subject: Session not freed in tomcat4.0.6 Hi, I am using Tomcat 4.0.6 in solaris2.8 After tomcat shutdown, i am seeing the sessions are not freed. I mean After shutdown and restart the tomcat, i am getting the same sessionid and the session attributes are still there. Any idea what is the problem here? Thanks, senthilnathan 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session not freed in tomcat4.0.6
Howdy, ALSO: If I were a committer, I would vote against making the new minimal server.xml file the default for future disturbutions. It's a lot easier to instruct us newbies to uncomment something from the file than to explain how to write sections in or switch from one config file to another.. Let's stick to the subject of the thread ;) I'm not making the minimal one the default. 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: TC 4 -oreillyMultipart- TC5
3 methods has been added to HttpServletRequest: public int getRemotePort() public java.lang.String getLocalName() public java.lang.String getLocalAddr() public int getLocalPort() See section SRV.1.6.2 Be aware that this addition causes source incompatibility in some cases, such as when a developer implements the ServletRequest interface. In this case, ensure that all the new methods are implemented. That probably not related, but just double check to be sure. -- Jeanfrancois Dirk Griesbach wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
server-minimal.xml
Let's stick to the subject of the thread ;) Fair enough.. I'm not making the minimal one the default. I know it was brought up. Looking for something in the comments that was there in previous versions but is now gone, made me picture the number of posts to this list that would result if the minimum version became the default so I added my 2 cents. Again, thank you. On Wednesday 03 December 2003 10:25 am, Shapira, Yoav wrote: Howdy, ALSO: If I were a committer, I would vote against making the new minimal server.xml file the default for future disturbutions. It's a lot easier to instruct us newbies to uncomment something from the file than to explain how to write sections in or switch from one config file to another.. Let's stick to the subject of the thread ;) I'm not making the minimal one the default. 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tar problem resolved
Thanks Bill, That was indeed the issue, gnu tar restored the contents properly That bold message you refer to would have saved me hours p.s. I'm not using Solaris or Mac/OS so if the message is restored it should just state that gnu tar should be used imho - Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 12:37 AM Subject: Re: 4.1.29 tar file Cannot find message resources under key org.apache.struts.action.MESSAGE I was going to have really good fun at your expense, but it seems that the nice big bold message that tells you to not use Solaris or Mac/OS tar has gone away :-(. However, that's the answer: use the GNU gtar instead. tommy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am getting this error returned to my browser when accessing http://10.1.1.1:8080/admin org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) This is from an out-of-the-box install i.e. I downloaded Tomcat version 4.1.29.tar.gz from http://jakarta.apache.org/site/binindex.cgi then unzipped and untarred the entire contents to my root directory. I discovered that the reason for the error is that the servlet is unable to find org.apache.webapp.admin.ApplicationServlet.class Turns out the tar file appears to contains a lot of very long pathnames which are truncated if they exceed 100 bytes e.g. jakarta-tomcat-4.1.29/server/webapps/admin/WEB-INF/classes/org/apache/webapp /admin/ApplicationServle I don't see a tar option that gets around this. Is this just my version of tar that's doing this? Or is it a problem with the tar file? Could someone verify it e.g. tar tvf jakarta-tomcat-4.1.29.tar - 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 4.0.x memory leak (not javac)
We first ran into this bug when hot-deploying JetSpeed - about seven times would cause an out of memory w/ the default heap size. JetSpeed had so many leaks itself that we dropped down to bares bones test app with a servlet, but no JSPs or third party libraries. With this small app would could do a hundred or so deploys or reloads before hitting out of memory. We purchased JProbe to try and further track down the problem. Unfortunately, JProbe appeared to disturb the environment enough that things could not clean up properly anyway. At that point we gave up the hunt. Although we're still using 4.1.x in production, we recently confirmed that the problem still exists in 5.x. In most cases we've been running RedHat 8 with a Sun 4.1 JDK, but we've seen the problem on Windows and MacOS as well. It is easy to reproduce - we used the Ant task to deploy inside a loop. No need to hit any pages or cause JSP's to compile, just redeploying will do it. On Dec 3, 2003, at 7:06 AM, Shapira, Yoav wrote: Howdy, Happy holidays hopefully devoid of debugging ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 4:15 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) Ok, thanks guys. I'll see what I can do. EXTREMELY busy right now, but I might be able to try it over christmas holidays. :) MAYBE! -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 12:08 PM To: Tomcat Users List Subject: RE: Tomcat 4.0.x memory leak (not javac) Howdy, You don't have to know much about the tomcat under the hood to diagnose this. It's not a problem with the tomcat classes. What you need to know is: - What 3rd party libraries does your application use - What classes stay in memory after a reload and have a 2nd instance of them created. You can use a profiler like Senor Hanik suggested (JProbe, OptimizeIt, etc.) to find out the latter. You want to look for a list of objects whose instance count increases after a reload of your webapp. OptimizeIt can do heap snapshot deltas which are the perfect tool here. Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 2:08 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) Ouch, LOL. I don't really know a whole lot about the tomcat under the hood! :) I can try though. Do you have a procedure that I should take to find this? Is there a debugging option that I can turn on for tomcat? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 11:45 AM To: Tomcat Users List Subject: RE: Tomcat 4.0.x memory leak (not javac) Howdy, Since you can reproduce your error easily, can you narrow down which 3rd party library is keeping the references that cause the memory leak? Yoav Shapira Millennium ChemInformatics -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 1:43 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.0.x memory leak (not javac) -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: December 2, 2003 11:01 AM To: Tomcat Users List Subject: Re: Tomcat 4.0.x memory leak (not javac) Shapira, Yoav wrote: Besides what Senor Schultz said (which is 100% true), 1. Where is this mentioned in the release notes, and what would one have to search for? Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web application reloading where shared libraries keep references to objects instantiated by the web application. That says memory leak to me although it doesn't specifically say that. 2. You mentioned in your passage the bug was marked as invalid or wontfix, and the bug you gave below is marked as new. So if anyone actually wasted time (like me) looking up what you said, they didn't find it. All I did was search for memory leak under Tomcat 4 and all status. I was not positive that it was marked WONTFIX, I should have clarified that in my original message. I had thought that the issue was something inherent to the design of Tomcat 4 (which was overhauled in Tomcat 5), but I'm sure that they are willing to accept patches if anyone can fix it. ;-) Bugzilla is obviously not working sometimes. I searched for memory leak one time and got it. Then I went to search for it for someone else so I could give them the bug number but nothing came up. I did the exact same search, memory leak. Very interesting indeed. Heck, I even searched for just memory or leak once each and came up with nothing. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This communication is intended for the use of the recipient to whom it is addressed, and may contain
Global Variables
Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Global Variables
use context-param param-nameparam/param-name param-valuevalue/param-value /context-param in the web.xml and String param = servletContext.getInitParameter(param); in the JSP. - Original Message - From: Duncan [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:08 PM Subject: Global Variables Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - 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: JDBCRealm problem
I am new in tomcat. I am looking in tomcat site for source file for JDBCRealm. Is this part of the tomcat source files? or it is separate? thanks James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm.
RE: Global Variables
Howdy, Yeah, context-param parameters are available to all resources within the context (servlets, JSPs, filters, listeners, etc) for the lifetime of the application. Yoav Shapira Millennium ChemInformatics -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:08 AM To: Tomcat User List Subject: Global Variables Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - 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: JDBCRealm problem
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java The easiest way to compile in this case: CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib* javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java -Tim Ostad, James wrote: I am new in tomcat. I am looking in tomcat site for source file for JDBCRealm. Is this part of the tomcat source files? or it is separate? thanks James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am
RE: JDBCRealm problem
Tim, I got the source files. Now there are three jdbcrealm files: jdbcrealm.java jdbcrealmform.java do I need to compile them all, or just the first one? thanks, james -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using JDBCRealm + form authentication database property: match exactly as explained in tomcat documentation for setting up JDBCRealm I am including three things: 1-server.xml part for realm setup 2-web.xml of the web apps 3-errorlog file is the error log I get when I attempt to use jdbcrealm.
Re: JDBCRealm problem
Oops, wrong file: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java -Tim Tim Funk wrote: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java The easiest way to compile in this case: CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib* javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java -Tim Ostad, James wrote: I am new in tomcat. I am looking in tomcat site for source file for JDBCRealm. Is this part of the tomcat source files? or it is separate? thanks James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. Since I don't use SQL server and Java, I can't be of more help, but my guess is - Database setup - Driver parameter missing -Tim Ostad, James wrote: Hi everyone, Hope everyone will have a great TG Day. Problem: I am not able to login successfully. It keeps failing. Structure: using
apache, tomcat wan't run ROOT/index.jsp
Moin, I've setup apache 2.0.48 and tomcat/4.1.29 sucessfully. I also setup a demo application (JSPWiki) on a virtual host like this: server.xml Host name=doc.mteege.de address=192.168.18.184 Context path= docBase=/opt/tomcat/webapps/JSPWiki debug=0 / ApacheConfig forwardAll=true noRoot=false / /Host httpd.conf VirtualHost *:80 DocumentRoot /opt/tomcat/webapps/JSPWiki DirectoryIndex Wiki.jsp ServerName doc.mteege.de IfModule mod_jk.c JkMount /*.jsp ajp13 /IfModule /VirtualHost This works great and I try to setup another virtual host which serve the default tomcat index.jsp and the demo apps. server.xml Host name=cat.mteege.de address=192.168.18.184 Context path= docBase=webapps/ROOT debug=0 / ApacheConfig forwardAll=true noRoot=false / /Host httpd.conf VirtualHost *:80 DocumentRoot /opt/tomcat/webapps DirectoryIndex index.jsp ServerName cat.mteege.de IfModule mod_jk.c JkMount /*.jsp ajp13 /IfModule /VirtualHost I get the get the index.jsp but if I try to load the demo app folder I get a 404 error from tomcat. I think there is a mismatch between the apache DocumentRoot and the Tomcat docBase but If I use docBase=webapps I only get a indexview of the webapps folder. What do I missing? Many thanks Matthias -- Matthias Teege -- http://www.mteege.de make world not war - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBCRealm problem
Tim, I am afraid that I am not familiar with the first line, CP=... is that a copy command on unix? thanks james -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem Oops, wrong file: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/ org/apache/catalina/realm/JDBCRealm.java -Tim Tim Funk wrote: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/ org/apache/catalina/realm/JNDIRealm.java The easiest way to compile in this case: CP=*All jars in $CATALINA/common/lib,All jars in $CATALINA/server/lib* javac -classpath $CP -d $CATALINA_HOME/server/classes JNDIRealm.java -Tim Ostad, James wrote: I am new in tomcat. I am looking in tomcat site for source file for JDBCRealm. Is this part of the tomcat source files? or it is separate? thanks James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:20 AM To: Tomcat Users List Subject: Re: JDBCRealm problem If you have a NPE, it might being thrown by the Realm. This can happen when there is a null role or similar. This has since been patched. You can test it by getting the latest JDBCRealm from source, compiling it and placing it in the appropriate nested dir in server/classes. (Which has a higher precedence than the lib dir) -Tim Ostad, James wrote: One more thing, when I commented out the realm section in server.xml, the program does work with the default realm. James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 10:08 AM To: Tomcat Users List Subject: RE: JDBCRealm problem I just noticed this errors in the following files under tomcat log directory: catalina_log.2003-12-03.txt 2003-12-03 09:59:06 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:478) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:263) localhost_log.2003-11-26.txt 2003-12-03 09:58:53 StandardManager[/webdav]: Seeding of random number generator has been completed 2003-12-03 09:58:53 StandardManager[/webdav] IOException while loading persisted sessions: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.ja va:2150) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStre am.java:2619) Any help would be appreciated thanks, James -Original Message- From: Ostad, James Sent: Wednesday, December 03, 2003 9:51 AM To: Tomcat Users List Subject: RE: JDBCRealm problem Hi, Thanks for the info. Apparently, the database was not set correctly. After correcting the previous problem, I am able to login. The log shows the correct authentication with no errors. Yet, I not getting anything after the login. the web page is clear, in stead of taking me to the next page, by design. the top url address is like: http://localhost/login/j_security_check any help, suggestion, or comment would be nice. Thanks, James -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 5:01 AM To: Tomcat Users List Subject: Re: JDBCRealm problem The JDBCRealm does two things: 1) Authenticates the user (by checking password) 2) Authorizes the user (by checking roles) The logs would seem to imply the JDBC driver is blowing up creating the prepared statement in the second step (ie reading from the roles table). I think Tim is right - he usually is - that there is a config problem with the db or the connection to the db. A quick google later: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181 HTH, Jon Ostad, James wrote: The line above the line you mentioned in the error log indicates that the connection was established at one point: 2003-11-26 11:53:19 JDBCRealm[localhost]: Username admin successfully authenticated 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing authentication So, I don't think that the parameters are wrong, neither the database setup. The web application functions with form base authentication without usage of realm. It is my next step to implement the realm, which I having problem. but, I will double check my settings and configuration to make sure that I didn't miss anything. thanks, James -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:00 PM To: Tomcat Users List Subject: Re: JDBCRealm problem The problem is this: 2003-11-26 11:53:19 JDBCRealm[localhost]: Exception performing
Re: Global Variables
Thanks for the replies, but what do I define servletContext as? Many thanks Duncan Jardin Xavier wrote: use context-param param-nameparam/param-name param-valuevalue/param-value /context-param in the web.xml and String param = servletContext.getInitParameter(param); in the JSP. - Original Message - From: Duncan [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:08 PM Subject: Global Variables Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - 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: Global Variables
Howdy, Are you serious? ;) You might want to buy a servlets book or go through a tutorial, this is a very basic concept. You don't define a servlet context, the server creates one for you. You define context parameters in your deployment descriptor, the web.xml file. Yoav Shapira Millennium ChemInformatics -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:50 AM To: Tomcat Users List Subject: Re: Global Variables Thanks for the replies, but what do I define servletContext as? Many thanks Duncan Jardin Xavier wrote: use context-param param-nameparam/param-name param-valuevalue/param-value /context-param in the web.xml and String param = servletContext.getInitParameter(param); in the JSP. - Original Message - From: Duncan [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:08 PM Subject: Global Variables Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - 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] 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: Global Variables
Here is is added to the default web.xml file that shipps in the TOMCAT_HOME/webapps/ROOT/WEB-INF/web.xml file ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description context-param param-nameparam/param-name param-valuevalue/param-value /context-param /web-app On Wednesday 03 December 2003 11:50 am, Duncan wrote: Thanks for the replies, but what do I define servletContext as? Many thanks Duncan Jardin Xavier wrote: use context-param param-nameparam/param-name param-valuevalue/param-value /context-param in the web.xml and String param = servletContext.getInitParameter(param); in the JSP. - Original Message - From: Duncan [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:08 PM Subject: Global Variables Is there a way to set global variables in the web.xml which can be read by any JSP page? Cheers, -Duncan - 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat does not die
I've experienced this using different VMs. Currently I have a site which serves nothing more than HTML...no jsp or anything, and this will happen every now and then. This occurs in all versions of Tomcat I have used. I'm running 5.0.x currently and it still happens. Wade -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:02 AM To: [EMAIL PROTECTED] Subject: Tomcat does not die Hello all I have a Tomcat 4.1 instaled in a Red Hat Linux 7.3 server. My JDK is JDK 1.3.0 from IBM. My Tomcat was instaled from a RPM package downloaded from jakarta project homepage. When it was installed, rpm created a file called tomcat4 in /etc/init.d. I use this script to start and stop my Tomcat. I have chosen that JDK because RPM package waits for JDK 1.3.0 from IBM. All works well. tomcat4 start starts Tomcat, tomcat4 stop stops Tomcat. But in some moments Tomcat stops responding (hang) then I try use the command tomcat4 stop to stop it but it does not work. Tomcat stops to listen his 8080 port but the processes (threads) stay still running (ps -ef). What can I do to solve this problem? Update Tomcat? Update JDK? Any help is welcome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]