Re: why can't i login to tomcat7 status page from clean install zip
Bo, On Monday, December 17, 2018, 9:49:34 PM PST, Bo wrote: > > here is screenshot > > I just tried again still no working\ > >. https://i.imgur.com/8bQH2YB.png At the risk of stating the obvious, your screenshot shows: - a tomcat-users.xml file with three usernames: dog, god, and role1. - a Tomcat login page with username admin Did you try logging in with username god or adding a user with username admin? - Bob
Re: [maybe OT] /dev/urandom [was : Re: Tomcat 8.5.23 Initialization PRNG/SSL]
> On Friday, October 27, 2017, 2:32:50 PM PDT, André Warnier (tomcat) >wrote: > > > There seem to be a recrudescence of interventions on this list about >SSL/HTTPS, and > associated discussions about the usage of various randomness sources.> I > found this article interesting :> https://www.2uo.de/myths-about-urandom/ André, [OT] or not, thanks for adding a word to my vocabulary and for the article; recrudescence sounds better in French: Google Translate | | | | Google Translate Google's free service instantly translates words, phrases, and web pages between English and over 100 other lang... | | | - Bob
Re: Typo in my previous post, Re: Protecting files within a context
On Thursday, August 24, 2017 5:48 PM, Bob Hall <rfha...@yahoo.com> wrote: Yahoo auto-munged the URL, it should be: https://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html - Bob
Re: Typo in my previous post, Re: Protecting files within a context
On Thursday, August 24, 2017 5:29 PM, James H. H. Lampertwrote: > Cache and cookies both cleared, all the way back, and the context > that theoretically should be presenting a sign-on dialog for the > forbidden pages still serves an immediate 403 page instead. I don't use Tomcat's Realms for AuthN/AuthZ; the cookie clearing suggestion was a bit of a guess. Does your app's web.xml include a element? Apache Tomcat 8 (8.0.46) - Realm Configuration HOW-TO | | | Apache Tomcat 8 (8.0.46) - Realm Configuration HOW-TO By Craig R. McClanahan | | | - Bob
Re: Typo in my previous post, Re: Protecting files within a context
James, On Thursday, August 24, 2017 4:58 PM, James H. H. Lampertwrote: >> This is interesting: >> >> I added this (contents of web-resource-collection omitted) to the top of >> the context's web.inf, right below the "web-app" and "display-name" tags: >> >>> >> . . . >>> >>> >>> >. . . > > Of course, I meant to say, ". . . the context's WEB-INF/web.xml" > > Oops. The question in my previous post still stands: why is it that when > I change the above to an auth-constraint that *should* produce a > password dialog, am I still going straight to a 403 page? If you successfully logged in previously, I suggest you check your browser for any cookies that were created at that time. You will probably need to remove them before the login challenge will be presented. - Bob
Re: Protecting files within a context
James, On Thursday, August 24, 2017 2:26 PM, James H. H. Lampertwrote: > Could you be a bit more specific on what edition of the servlet spec, and where I can find it? > The first one I grabbed ("Java Servlet Specification Version 2.4") is over a decade old, and doesn't *have* a section 13.8. https://www.google.com/search?q=servlet+spec+section+13.8=servlet+spec+section+13.8=chrome..69i57.7134j0j1=chrome=UTF-8
Re: [ANN] End of life for Apache Tomcat 8.0.x
On Friday, June 30, 2017 2:32 PM, Mark Thomaswrote: The Apache Tomcat team announces that support for Apache Tomcat 8.0.xwill end on 30 June 2018. This means that after 30 June 2018:- releases from the 8.0.x branch are highly unlikely- bugs affecting only the 8.0.x branch will not be addressed- security vulnerability reports will not be checked against the 8.0.x branch Three months later (i.e. after 30 September 2017)- the 8.0.x download links will be removed- the latest 8.0.x release will be removed from the mirror system- the 8.0.x branch in svn will move from /tomcat/tc8.0.x to /tomcat/archive/tc8.0.x- the links to the 8.0.x documentation will be removed from tomcat.apache.org Note that all 8.0.x releases will always be available from the archive. It is anticipated that the final 8.0.x release will be made shortlybefore 30 June 2016. The Tomcat team is aware that a number of Linux distributions supportTomcat 8.0.x and that that support for Tomcat 8.0.x is scheduled tocontinue in those distributions beyond June 2018. The Tomcat team willtherefore:- work with those distributions to address any issues preventing the update to 8.5.x from 8.0.x- where an update to 8.5.x is not possible, the Tomcat team will endeavour to provide advice on back-porting security fixes to 8.0.x === Hi Mark, Seems to something amiss with the year values in this EOL message? - Bob
Re: I'm using jdk1.6 + tomcat 7.0.23
On Saturday, June 20, 2015 11:17 PM, hao huang huanghao...@gmail.com wrote: Can you put my E-mail account deleted from the mailing list, thank you Hao, as indicated here: Apache Tomcat - Mailing Lists you should send a blank email to users-unsubscr...@tomcat.apache.org to unsubscribe from the Tomcat users list. - Bob
Re: Anyway to enable just all TLS protocols in APR connector?
On Friday, October 17, 2014 1:05 PM, Jeffrey Janner jeffrey.jan...@polydyne.com wrote: With baited breath, but not holding it. Should be bated breath. - Bob
Re: Help regarding CSRF Filter in Tomcat 7
André, On 16/11/2012 14:39, André Warnier wrote: Response (to Mark and David) : I accept the verdict of the native English-speakers. In my defense, I would say that to me, the word useless has more of a negative connotation than what I wanted to express. Using an expression such as the filter is useless here may have suggested that I thought that this code was not worth the memory cells it was written on. Which is of course far from my thoughts on the matter. Unnecessary was a way for me to express that in these particular circumstances, it would 1) not help, while 2) - being a filter - adding unwarranted (?) overhead to the application. filter is ineffective might work for you. - Bob
Re: [Tomcat JDBC Pool] Close pooled connections via JMX
From: Brooke Hedrick brooke.t.hedr...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, March 4, 2012 12:21 PM On Mar 4, 2012, at 1:35 PM, Chema demablo...@gmail.com wrote: We use Spring w/ Hibernate as I recall. Yes, we have talked about that - a ping query. What we don't like about that is now we have a tc ping and app ping. We have also discussed just changing the tc borrow/ping to do the dual@remotedb query as this would test both primary and remote. We have tested this and it works. What stinks about this is we only access the remotedb 10% of the time. Well, I don't know how works Hibernate , but I know that you can have many SessionFactory Can you define different SessionFactory with different settings , for example, with different pingQuery value? Does Hibernate have a pingQuery setting ? Even if it does, are we actually losing the close() method for the connection pool mbean? If so, why? This change would mean requiring many development teams to change many apps. I don't see the value of requiring that change - if it is actually the case we are losing the close() method. Have you tried defining views in the primary database based on the @otherdb queries? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat JDBC Pool] Close pooled connections via JMX
From:Brooke Hedrick brooke.t.hedr...@gmail.com Sent: Sunday, March 4, 2012 1:57 PM Have you tried defining views in the primary database based on the @otherdb queries? Bob, How will that help with the borrow query and not wanting to run extra queries to the remote db when not necessary? It should eliminate the need to run extra queries, the queries would only be run when necessary against the views defined in the primary database. Hopefully, Oracle will manage restarts of the remote DB. Everyone - the feedback is great, but it still is just working around the elimination of a jmx call, if that is the case. Why is the jmc close() method being eliminated? Using views might result in the restoration of the close() method. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Errors with NIO processor
Matt, Did the testing include load testing? Have you checked the open file limit values? If not, you may be running into an open file limit for the OS and/or user that is running Tomcat. - Bob From: Matthew Tyson matthewcarlty...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, November 15, 2011 4:18 PM Subject: Re: Errors with NIO processor Is there more info I can provide to help diagnose this error? It is killing us. Thanks, Matt On Tue, Nov 15, 2011 at 9:00 AM, Matthew Tyson matthewcarlty...@gmail.comwrote: Hey Guys, We are seeing the following errors (in production of course, testing didn't reveal this) after switching to NIO protocol. This is Tomcat 7.0.22 on CentOS 6. There is a load balancer sending only comet traffic to port 8080, where the NIO protocol is used. Nov 15, 2011 8:39:29 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException Nov 15, 2011 8:39:51 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:712) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1200) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1136) at java.lang.Thread.run(Thread.java:662) Nov 15, 2011 8:39:52 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: null java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:202) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:104) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:519) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Exception in declaration() I see more of the Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] error by itself also. Here is the connector setup: Connector port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol connectionTimeout=2 redirectPort=8443 / Any direction on where to look for the cause? Thanks, Matt
Re: JSP Exception object arriving null at error handler
From: Nadav Katz nadav.k...@oracle.com To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, September 11, 2011 2:11 AM Subject: JSP Exception object arriving null at error handler Hi, I seem to be having a problem with the exception object attribute arriving null at the error handeling jsp. Since I encountered this error in production, I recreated on a small project. This is the web.xml error page entry: error-page error-code404/error-code location/notFoundErrorPage.jsp/location /error-page This is notFoundError.jsp: %@ page isErrorPage=true % %@ page isELIgnored=false% % if(exception != null) { System.out.println(Exception is not Null, it's + exception.toString()); } else { System.out.println(Exception is Null!!); } % What am I doing wrong? Nadav, There is no Exception in this case. This example should work for you _and_ allow you to display the resource that was not found: http://stackoverflow.com/questions/4948275/get-url-of-page-requested-that-caused-a-404 - Bob
Re: Save session information in Memory database
From: Ashish Kulkarni ashish.kulkarn...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, September 9, 2011 11:38 AM Subject: Re: Save session information in Memory database Hi I have inherited this application, and it was developed this way, i dont have time and resources to analyze this application to start removing data from session, so i am looking for ways to get it working without having to go through this process of removing data from session, I thought if i could save session information in a database instead of in heap it would work, and so in memory database and it would be faster to access then regular DB2 database So any ideas Ashish -- Ashish, Have you considered ehcache? http://ehcache.org/ - Bob
Re: recovering connections on jdbc connection pool
try { while (it.hasNext()) { c1 = getConnection(); You should move getConnection() outside of the while() block. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat for Mac
--- On Fri, 4/22/11 at 1:34 AM, Brajesh Patel brajeshpate...@gmail.com wrote: Hello All, I have Mac book and want to run tomcat on it so please provide steps or documentation it will great help. -- Thanks Brajesh Patel http://lmgtfy.com/?q=tomcat+install+mac - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] servlet-specific error pages
Chris, --- On Wed, 4/13/11 at 1:11 PM, Christopher Schultz ch...@christopherschultz.net wrote: Basically, I want two defaults. If the servlet spec allowed for error-page to include a servlet-name filter, that's what I would use. But it doesn't :( Would an Exception marker interface help to differentiate Servlet and other Exceptions? A Servlet could conditionally throw Exceptions that implemented a given marker interface. An error-page JSP could use instanceof to check for marker interface(s) and conditionally handle presentation of the Exceptions. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP class size increase in Tomcat 7
Jess, --- On Thu, 3/10/11 at 7:10 PM, Jess Holle je...@ptc.com wrote: P.S. This was with Tomcat 7.0.10. On 3/10/2011 9:10 PM, Jess Holle wrote: I've been looking at moving to Tomcat 7 from Tomcat 6. Most things look good. I have been surprised by one thing, however: Tomcat 7 produces larger JSP class files than Tomcat 6 from the same JSP source files, tag libraries, etc. Around 12% larger in some examples I've been looking at (whereas the intermediate Java sources increase in size by ~1%). Is the same version of Java used in both cases? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP class size increase in Tomcat 7
--- On Thu, 3/10/11 at 8:43 PM, Jess Holle je...@ptc.com wrote: Yes, both Java 6 Update 24. Just to verify, are both instances Tomcat running in the same JVM mode (-client or -server)? (That shouldn't affect the .class file size, but just checking...) Yes. Have you compared the size of .class files generated for a simple hello world JSP in the two Tomcat instances? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6
Dharamshila, --- On Tue, 3/8/11 at 7:35 PM, Dharamshila Khandelwal dharmshil...@gmail.com wrote: Thanks for your response Christopher! I have structs.jar in WEB-INF/lib. I even tried putting it in CATALINA_HOME/lib, but it didn't work. I have attached the log files as you had requested. As Chris already mentioned, attachments are normally stripped and you will need to copy-paste a hopefully small relevant portion of the log file(s). - Bob
RE: localhost
Ken, --- On Sun, 3/6/11 at 6:49 PM, ken dias kend...@hotmail.com wrote: I am running Tomcat 6.0.024 server. This server is always on. Java 6 is used. Checked task manager and could not find pid 1908. Did find the vertical line on my keyboard. Ken http://localhost:8080 - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: connection Pooling in tomcat 6
--- On Wed, 11/3/10 at 10:30 PM, mike houston mike.housto...@gmail.com wrote: Can you please explain to me in detail. Thanks, M http://lmgtfy.com/?q=tomcat+6+dbcpl=1 - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat ldap authentication with 403 Forbidden error
Julio, --- On Mon, 9/27/10 at 11:24 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: The security-role is right below the security-constraint closing tag and above the login-config opening tag. Sorry, I missed it. However, the security-role element normally comes /after/ login-config; not sure if that's required by the DTD, by your ordering is unusual. In case you are still encountering a problem you could try listing the role(s) that have been assigned after authentication and comparing with authenticated-user; note that the comparison is case sensitive. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat ldap authentication with 403 Forbidden error
Oops, just saw the [solved] msg... --- On Mon, 9/27/10 at 7:55 PM, Bob Hall rfha...@yahoo.com wrote: --- On Mon, 9/27/10 at 11:24 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: The security-role is right below the security-constraint closing tag and above the login-config opening tag. Sorry, I missed it. However, the security-role element normally comes /after/ login-config; not sure if that's required by the DTD, by your ordering is unusual. In case you are still encountering a problem you could try listing the role(s) that have been assigned after authentication and comparing with authenticated-user; note that the comparison is case sensitive. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Mike Wilde is out of the office
--- On Wed, 8/4/10 at 9:48 AM, Christopher Schultz ch...@christopherschultz.net wrote: Mike, You sure seem to be out of the office a lot. Are they paying you well over there? Also, it seems you have returned (today is 2010-08-04, at least in Washington, DC): you should either disable your out-of-office reminder or update the dates ;) - -chris Or he's using DD/MM/. In any case, he should configure his out-of-office reminder to *not* be sent to user lists... - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WebApp not recognised when having context.xml
--- On Thu, 7/15/10 at 2:56 PM, bugger s...@trash-mail.com wrote: Found the problem.Context must be written with capital letter at the beginning. -- Which Chuck pointed out earlier; about 50 minutes before you found it. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: jsre_home is null
--- On Wed, 7/14/10 at 10:08 AM, testwreq wreq testw...@gmail.com wrote: catalina logs are showing jre_home as null. Any ideas how to set it? Earlier, in a separate thread, you indicated that java 1.6 was installed. At the command prompt type: $ which java which should display something like: /usr/local/jdk1.6/bin/java Depending on the 'shell' you are using you should be able to use of the following commands: $ export JAVA_HOME=/usr/local/jdk1.6 $ setenv JAVA_HOME /usr/local/jdk1.6 This will only set JAVA_HOME for the current 'shell', it is not permanent. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: weird bug?
--- On Tue, 7/13/10 at 2:50 PM, michel compu...@videotron.ca wrote: You could have just answered my question, instead of making such a snarky reply. Perhaps this will help: http://en.wikipedia.org/wiki/User:DonDiego/Thread_hijacking - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error on startup catalina
Sondro, --- On Wed, 6/2/10 at 2:57 PM, Sandro Gallo sandro.gallo...@gmail.com wrote: TOMCAT version: 6.0.26. java -version java version 1.6.0_17 Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) The version of Java is already on Mac. I installed Tomcat by following this step: 1. download from site, 2. create folder /Library/Tomcat, 3. untar file in this new folder, 4. create simbolic link from /Library/Tomcat/apache-tomcat-6.0.26 to /Library/Tomcat/Home, 5. create env variables CATALINA_HOME, JAVA_HOME. All files in CATALINA_HOME/bin have exec permission. Check the permissions of bin/tomcat-juli.jar; it needs to be readable by the user that is running tomcat. And try running Tomcat without the benefit of the symbolic link or setting CATALINA_HOME: $ export CATALINA_HOME= $ /Library/Tomcat/apache-tomcat-6.0.26/bin/startup.sh - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
--- On Mon, 5/24/10 at 11:52 PM, Yucca Nel yucca...@live.co.za wrote: Could someone please help me understand what thia stack trace is saying? catalina.log File Type: ASCII English text, with very long lines INFO main org.apache.catalina.startup.Catalina - Initialization processed in 875 ms INFO main org.apache.catalina.core.StandardService - Starting service Catalina INFO main org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/6.0.20 ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) There is leading white space in the user name: ' yucca123_tom'. There are also errors in your DDL SQL that will need to be fixed after your app is able to connect to the DB. ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - ALTER command denied to user 'yucca123_hiber'@'localhost' for table 'usercomments' ERROR TP-Processor2 org.hibernate.util.JDBCExceptionReporter - SELECT command denied to user 'yucca123_hiber'@'localhost' for table 'usercomments' Don't know why there are two DB users in play: yucca123_tom and yucca123_hiber Apparently, the latter was able to connect to MySQL but could not access a table. Are you sure the table exists? Did you grant select on the table to yucca123_hiber? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
--- On Tue, 5/25/10 at 12:20 AM, Yucca Nel yucca...@live.co.za wrote: I know what the exception is saying but I can only swear that I am providing correct credentials. Did you notice: There is leading white space in the user name: ' yucca123_tom'. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help need for implementing Custom Login Module
Srinivas, --- On Wed, 5/5/10 at 5:05 PM, Srinivasa Rao.Kandula srinivas_j...@yahoo.com wrote: Well, I know how to implement form-based authentication. Here the requirement is to access ServletRequest/HttpSession from the login module. Thanks for you inputs though. You could implement a Filter that extracts the attribute(s) of interest from the ServletRequest/HttpSession and use ThreadLocal to make the attribute(s) available throughout your application for the life of the Request. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: General / Special cause under which TOMCAT Crash been noticed
Karthik, --- On Thu, 4/29/10 at 11:02 PM, Karthik Nanjangude karthik.nanjang...@xius-bcgi.com wrote: This is in referral to one of the form topics raised some day's ago For JVM to restart Tomcat in 1 case when OnOutOfMemoryError was raised URL http://marc.info/?l=tomcat-userm=127119151302985w=2 Refers to -XX:OnOutOfMemoryError=cmd args;cmd args for restart I wanted to make sure if any other cause for TOMCAT Crash been noticed. Yes... - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: getting servlet context in JSF?
Yucca, --- On Wed, 4/28/10 at 11:34 PM, Yucca Nel yucca...@live.co.za wrote: Hello, is it possible to gain access to servletcontext from JSP using faces or servlet EL? Yes. Using your subject line in a google search, third result: http://www.mail-archive.com/u...@shale.apache.org/msg01707.html - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: EE application server
Navid, --- On Tue, 4/27/10 at 12:38 AM, Navid Esfahani na...@sobhanpaya.com wrote: I want to know is this possible to use apache tomcat application server for Enterprise Application(EAR)? No. Is there two version for web-server and EE applications server? No. how can I download EE application server? http://www.lmgtfy.com/?q=java+ee+servers - Bob
Re: SV: set time out based on userInRole
Soren, --- On Mon, 4/19/10 at 5:01 AM, Søren Blidorf so...@nolas.dk wrote: Fx if you are admin no connectionTimeout and if you are user connectionTimeout 20 min session.setMaxInactiveInterval() - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Session Timeout - Filter Not Called
Paul, --- On Mon, 4/12/10 at 7:21 AM, Paul Carroll pcarr...@nfmail.net wrote: That works in that my filter is called when the session times out and the user is redirected to the login page. However, the Referer header makes no indication that the user is logging in. What does the referrer header contain? If the request URI is not null, then I can redirect them to the requested URI if it has been determined that it is a safe area that does not need any session variables established. Is there a way to determine if the user's session has timed out and the user is logging in once again? Check for the session variables that would have been set? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: The question of automatic restart Tomcat
Gregor, --- On Tue, 4/13/10 at 1:19 PM, Gregor Schneider rc4...@googlemail.com wrote: -XX:OnOutOfMemoryError=/usr/sbin/restart_tcserver I'm not aware of that option within my standard sun jdk 1.6.x - what Java-version are you running offering this really useful feature? I wasn't aware of it either. From http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp -XX:OnOutOfMemoryError=cmd args;cmd args Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6) - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?
Godmar, --- On Tue, 4/13/10 at 9:22 PM, Godmar Back god...@gmail.com wrote: What API function can be used to notify my application that it is about to be shut down, so that the thread in question can exit? First, is there a standard API that would work also in other J2EE containers besides Tomcat? Have you tried implementing a ServletContextListener? http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html - Bob PS Tomcat is not a J2EE container. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Session Timeout - Filter Not Called
Paul, --- On Sun, 4/11/10, Paul Carroll pcarr...@nfmail.net wrote: I am using Tomcat 6.0 on Windows Server 2003. It seems that when my session expires I am redirected to the login page which I would expect. However, my filter is not called when I am redirected to the login page. When I used Jetty as my web server, the call was intercepted by the filter before the user was presented the login page. Does anyone know why this is the case? The following is the sections of my web.xml that contains the filter info. filter filter-nameSessionTimeoutFilter/filter-name filter-classcom.mycompany.ui.filters.SessionTimeoutFilter/filter-class init-param param-namehome/param-name param-value/home.do/param-value /init-param /filter filter-mapping filter-nameSessionTimeoutFilter/filter-name servlet-nameaction/servlet-name /filter-mapping servlet servlet-nameaction/servlet-name servlet-classcom.mycompany.ui.web.ActionServlet/servlet-class init-param param-nameconfig/param-name /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping My index.jsp contains 1 line which redirects to home.do. Your filter is mapped to servlet-name action which is mapped to url-pattern *.do Don't know about Jetty, but you will probably get the behavior you expect if you change the filter-mapping element to use: url-mapping/*/url-mapping (and remove servlet-name) - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat scalability setting - need help please
Rendra, --- On Thu, 4/8/10 at 5:28 PM, cinl...@gmail.com cinl...@gmail.com wrote: Do you have better way as how to transport this result to jsp? Please enlighten me. If you *really* need to serve _millions_ of rows of data to a user you will need to implement some form of paging - the query results are cached on the server and served to the user on a page-by-page basis when requested. You mentioned that you implemented your own caching scheme. I suggest you take a look at ehcache: http://ehcache.org/ It can be easily setup to automatically cache to disk and purge stale data. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why cant I access a folder at root level which contains Java Script
--- On Sat, 4/3/10 at 5:07 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: To: Tomcat Users List users@tomcat.apache.org Date: Saturday, April 3, 2010, 5:07 PM On Sat, Apr 3, 2010 at 1:57 PM, nzindian vj...@hotmail.com wrote: Im trying to use a javascript WYSIWYG editor in a JSP page. The JSP contains the following code to include the JS file: and it doesnt work, Look at the page source in a browser and see what it is. Why doesn't it work? Because it's wrong, *from the perspective of the user agent*. You can hard-code your context path or use JSTL e.g. c:url ... or the corresponding JSP declaration to add your context path in front of the context-relative script directory path. Or you can specify a *correct* relative path. For example, if your .jsp is in jsp/ and your .js is in a parallel js/ folder you can use a relative path: src=../js/the-js.js - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RemoteHostValve for infinite domains?
Dean, --- On Wed, 3/31/10 at 10:53 PM, Dean Hiller dean.hil...@gmail.com wrote: allow=.*\.dev\.premonitionx\.com/ I haven't used this TC feature but it wouldn't hurt to try: allow=*\.dev\.premonitionx\.com / - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: RemoteHostValve for infinite domains?
--- On Thu, 4/1/10 at 5:52 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: Please explain how that parses, since the allow string uses regular expression syntax, not wildcards (hence the need for the \. to match a period). I can't, since it doesn't. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Submitting a patch
--- On Tue, 3/30/10 at 11:54 PM, ntwrkd ntw...@gmail.com wrote: I appreciate the ltmgtfy, but the search results actually didn't address my question. The 1st Google hit, http://tomcat.apache.org/bugreport.html seems to cover it: Bug Fix Patch - A patch created using diff -u or svn diff which fixes the bug. (If you have found a bug fix which can be applied to the Apache Tomcat code) - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Submitting a patch
--- On Tue, 3/30/10 at 9:56 PM, ntwrkd ntw...@gmail.com wrote: Is the a HOWTO located somewhere on the best way to submit a patch? http://www.lmgtfy.com/?q=tomcat+patch+submit - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: DB connection error -Tomcat 6 config
--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: If you can, move up to 6.0.26 so we can all be looking at the same release. From one of the OP's earlier messages: An error occurred at line: 68 in the jsp file: /chngctrl/chgctrl_details.jsp Type mismatch: cannot convert from Object to Context 65: 66: Connection connection = null; 67: Context initCtx = new InitialContext(); 68: Context envCtx = initCtx.lookup(java:comp/env); 69: // Look up our data source 70: DataSource ds = initCtx.lookup(jdbc/myoracle); 71: SEVERE: Servlet.service() for servlet jsp threw exception javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) Have you tried: 66: Connection connection = null; 67: Context initCtx = new InitialContext(); 68: Context envCtx = (Context) initCtx.lookup(java:comp/env); 69: // Look up our data source 70: DataSource ds = (DataSource) initCtx.lookup(java:/myoracle); OR 70: DataSource ds = (DataSource) initCtx.lookup(java:jdbc/myoracle); - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DB connection error -Tomcat 6 config
--- On Thu, 3/18/10 at 3:02 PM, Pid p...@pidster.com wrote: Context envCtx = initCtx.lookup(java:comp/env); DataSource ds = initCtx.lookup(jdbc/myoracle); should be: Context envCtx = initCtx.lookup(java:comp/env); DataSource ds = envCtx.lookup(jdbc/myoracle); no? I was wondering why envCtx was discarded and was about to suggest: DataSource ds = (DataSource) initCtx.lookup(java:comp/env/jdbc/myoracle); - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: DB connection error -Tomcat 6 config
--- On Thu, 3/18/10 at 3:07 PM, Propes, Barry L barry.l.pro...@citi.com wrote: Yes, it should be. Not sure how that got jumbled as such but what I did have was: Connection connection = null; Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle); Tried other variations seen elsewhere on here as suggested. But still no dice. Odd - like I'd mentioned earlier, I can pass params through (DBUrl, user, password) and hit it, but not with a Context object. Have you tried 'exploring' JNDI? NamingEnumerationNameClassPair list = initCtx.list(java:comp/env); - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: DB connection error -Tomcat 6 config
--- On Tue, 3/2/10 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote: Then that should work...are you using DBCP with it? I wonder now...should I perhaps be using this jar? ojdbc6.jar ? Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6? If anyone has used these environments together and needed to make the change, please apprise. We did *not* have to upgrade to ojdbc6; we are using: ojdbc14 (10.2.0.3.0) DBCP tomcat 6.0.20 Java 1.6.0_16 Oracle 10.2.0.4.0 - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat context startup failed
Andre, --- On Wed, 2/17/10 at 1:06 AM, André Warnier a...@ice-sa.com wrote: The obvious error displayed from log is java.lang.NoClassDefFoundError: org/apache/xerces/util/EncodingMap. First check whether the xerces jar containing mentioned class is in place. Try downloading new jar and again restart the tomcat services. The NoClassDefFoundError can also be caused by having more than one copy of a given class available due to its having been loaded by separate class loaders. The OP should check his Tomcat installation for multiple .jars that contain the missing class. I am no great Java or Eclipse expert, but sometimes one wonders how explicit an error log message must be, that one would notice. In the submitted logfile, these two errors happen first : 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Program Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 16-feb-2010 16.48.14 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Program Files\Apache\Tomcat55\webapps\Calzedonia2007\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Should not the first two errors above be attended to first ? The offending .jar files were not loaded and can't contribute to any problems. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource
Steve, --- On Mon, 1/25/10 at 10:50 PM, Steve Ryder sry...@jsrsys.com wrote: I understand what you mean by don't use, but I am not using it. What do I need to change so that it is not used? How might I track down the offending library? What do you get when you type the following commands: $ java -version $ which java - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Polling and session timeout
--- On Thu, 1/21/10 at 7:26 AM, Christopher Schultz ch...@christopherschultz.net wrote: If you access the session at all, it counts as a touch, thereby extending the life of the session. It's not possible to peek at the session without touching it AFAICT. The Session timeout can be set when the response is being delivered via Session's setMaxInactiveInterval() method without extending the life of the Session. In a JSP: % session.setMaxInactiveInterval(inactiveTimeSecs); % - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Comet and thread binding
--- On Thu, 1/7/10 at 12:02 AM, tbee t...@tbee.org wrote: Yes. But the problem with comet is that it may switch threads mid request; a request can be suspended, the thread freed up, and after a while the request is resumed, but by probably a different thread. So I cannot bind the request to the thread anymore. I don't have much Comet experience but given that it can pause and resume processing of a given request, would it be possible to bind your execution context to that 'request' and re-bind it to the 'new' Thread when request processing resumes? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Load balancing questions
--- On Wed, 1/6/10 at 7:54 AM, assan alhamoud hamoudas...@gmail.com wrote: any suggestion ? Upgrade to a more recent version of JBoss/Tomcat, like JBoss 5.1.0. - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Comet and thread binding
--- On Wed, 1/6/10 at 10:18 PM, tbee t...@tbee.org wrote: The issue is not the storage, but access to the storage. How would I, at any place in the execution, access it, without passing the context to each method. Have you considered using ThreadLocal? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Load balancing questions
--- On Mon, 1/4/10 at 1:34 AM, Mark Thomas ma...@apache.org wrote: On 03/01/2010 11:09, assan alhamoud wrote: Happy new year to all , I am using tomcat and JBoss. You'll need to explain that further. Why would you use Tomcat and JBoss for the same app. I would expect one or the other. Tomcat/5.0.26 That is very, very old and has many known bugs and a number of security vulnerabilities. I'd strongly suggest moving to 5.5.28. JBoss 3.2.5 has Tomcat 5.0 embedded (both very old versions) JBoss 4.0.3 has Tomcat 5.5 embedded (both old versions) Current version of JBoss is 6.0 not sure what version of Tomcat is embedded, http://community.jboss.org isn't responding... - Bob mod_jk/1.2.26 Also worth upgrading to the latest version To get back to your original question, it looks like your app could benefit from some tuning. The hanging is likely to be caused by long running requests using up all the connections between httpd and Tomcat and/or poor mod_jk / AJP connector configuration. Since you haven't shown us this configuration it is hard to provide specific advice but generally I would suggest: - use JkOptions +DisableReuse (or sort out your timeouts but my experience has been disable reuse is simpler to configure and has similar performance) - turn on access logging for Tomcat - check any timeouts are consistent with your longest running requests - ensure the following are compatible - httpd processes/threads - Tomcat AJP connector threads - mod_jk connection pooling Mark Regards, 2009/12/29 Mark Thomas ma...@apache.org On 29/12/2009 16:17, assan alhamoud wrote: Hello Mark , we are using apache Server version: Apache/2.2.11 (Unix) we use mod_jk.so module jboss-3.2.5 Tomcat5 and jrockit-jdk1.4.2_19 at your disposal if you need more information Are you using Tomcat or JBoss? Tomcat version? mod_jk version? Mark Regards, Ghassan 2009/12/29 Mark Thomas ma...@apache.org On 29/12/2009 15:21, assan alhamoud wrote: Hello All I have some questions and I hope to find answers about Load balancing . 1- The first question , our DBA says that it not normal and no logic to have several instances of tomcat server on the same machine with the same configuration , is this correct ? No. Your DBA is wrong. 2- Each tomcat instance here can serve about 125 user , and I have more than this number on the server I got alot of problems and usually the instance hang , is there anyway to get better performance from tomcat. That isn't a Tomcat problem, that is an application problem. The solution is to fix/tune your application. I am using now 3G memory for each instance and 120 for max_pool_size and 750 maxThread It isn't clear what the 125 users refers to. Is it concurrent requests, is it concurrent sessions, is it concurrent users (assuming 1 concurrent user == more than 1 concurrent request). From these numbers the application seems very resource intensive. It does appear that it would benefit from some tuning. 3- The most critical issue I had , when one instance hangs , apache hangs and then all the application hangs because apache keep trying to connect to the hanged instance , Is there any way to force apache to bypass the hanged instance. Yes. But since you haven't told us the Tomcat version, httpd version nor how you are connecting httpd to Tomcat we can't tell you how to fix it. 4- When instance of tomcat hangs , i forced to restart this instance ( tomcat server ) the problem is GC can not free memory anymore Is there anyway to solve the problem instead of restarting the server. Yes. Work out if you have a memory leak or need more memory than is available. If it is a memory leak, fix it. If you need more memory either allocate it or tune your app so it uses less. 5- at last sometimes I found that the same action repeated many times which means that apache sends the request more than one time to tomcat server ,could I have control over this behavior. Maybe, maybe not. If this behaviour is initiated by the user agent you need to manage this in your app. It could also be caused by the fail-over mechanism, in which case I refer you to my answer to point 3 above. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For
Re: Connection Pool Exhausted
--- On Mon, 8/17/09 at 11:38 AM, Kristen Walker kwal...@sbceo.org wrote: We had some help debugging the connection pool exhausted issue over the weekend and for now it seems that changing jdbcUsePool=true to jdbcUsePool=false stops the site from crashing due to connection pool issues. We are going to investigate more to see why connection pooling isn't working like expected. You can obtain a stack trace that should point to the offending code by using the Deprecated log abandoned functionality in BasicDataSource: setLogAbandoned() setRemoveAbandoned() setRemoveAbandonedTimeout() http://commons.apache..org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html There is some indication that logging of abandoned connections/statements will continue in some form: http://wiki.apache.org/commons/DBCP - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: All threads (200) are currently busy
--- On Sun, 11/2/08 at 1:23 AM, Juha Laiho [EMAIL PROTECTED] wrote: What kind of situation did you have when you took the thread dump in the original request? Could you take a thread dump at a such point in time where you are actually waiting for a request to complete? That way, at least one of the threads would have to be somewhere in the slow section. AD, you could add a filter that would log request/response handling for all requests and include the thread Id and request parms info. The log would be processed to identify requests w/o a response and requests that took a long time to handle. -Bob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload servlet
--- 10:07PM Wed 27 Feb 2008 Kimberly Begley [EMAIL PROTECTED] wrote: Hi - I'm trying to compile come java code to upload a file but am getting errors - it looks like it can't find the javax.servlet stuff to import and from what I've read online everyone talks about having the directory in the classpath but I have also read not to mess with my classpath - I'm trying to compile it from my catalina_home/webapps/appname/WEB_INF directory - does anyone have any suggestions? I'm sure it's obvious but I just can't see it. The CLASSPATH warnings are associated with starting Tomcat - not compiling your java code; servlet-api.jar needs to be in your CLASSPATH. You should also take a look at the commons fileUpload project; http://commons.apache.org/fileupload/ HTH - Bob Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session expiration and AJAX issues
--- 10:10AM Mon 25 Feb 2008, Adam Gordon [EMAIL PROTECTED] wrote: Storing the date/time a user logs in on the session is probably useful, but our problem is that we want to forcefully log the user out if there's no human present at the computer and the AJAX tasks keep a user's session active indefinitely, whether or not they mean it to. If there's a user input side to the AJAX tasks, would it be possible for the AJAX task time interval to increase over time w/o user input? Eventually, this would lead to a session timeout. -Bob Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session expiration and AJAX issues
--- 2:09PM Mon 25 Feb 2008 Adam Gordon [EMAIL PROTECTED] wrote: Adding a time decay in our timer task is an interesting idea and were it not for IE's JavaScript counting ineptness, that'd probably work. The server could track the requests and provide an updated delay time for the timer task if the browser isn't reliable. -Bob Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: TOMCAT 5.0.28 stability
--- Dwight Farris [EMAIL PROTECTED] wrote: Thanks for responding; I see the following lines recurring often in the Catalina_out file: 372yes In the for loop on myUsers2 variables in for loop: 374yes In ctx == null BEFORE THE QUERY IN Cohorts getName JVM version - 1.4.2_04-b05 Dwight --- Dwight Farris [EMAIL PROTECTED] wrote: Quick question about memory allocation - could the issue described below be a product of the settings in the following startup allocation: CATALINA_OPTS=$CATALINA_OPTS -Xms256m -Xmx1024m A couple of questions: - Any Exceptions / Errors in the Tomcat log file(s)? - What version of Java? I usally set starting and max memory the same; read somewhere that garbage collection is more efficient when that is done. If you are running Java 5+ you may be running out of PermGen space - check the log file(s) and the archives for recommendations. -Bob If your webapp(s) really need a gig of memory, I sugggest changing CATALINA_OPTS CATALINA_OPTS=$CATALINA_OPTS -Xms1024m -Xmx1024m Looks like you are using unix/linux. Did you 'grep' for Exception and Error in catalina.out? The Cohorts getName() messages don't look familiar to me. Is there a Cohorts class in one or more of your webapp's? -Bob Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TOMCAT 5.0.28 stability
--- Dwight Farris [EMAIL PROTECTED] wrote: Thanks for your response; I will look into the SQL code Dwight -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 27, 2007 9:47 AM To: Tomcat Users List Subject: RE: TOMCAT 5.0.28 stability This is certainly not a tomcat stability problem, it's the application that has been coded poorly syntax to use near 's Time Management workshop You've got some SQL code somewhere that looks like this: String sql = INSERT INTO table (foo) VALUES(' + fooVar + '); And you're inserting data (fooVar variable contains) Manager's Time Management workshop Which results in SQL that looks like: INSERT INTO table (foo) VALUES('Manager's Time Management workshop') Notice how the single quote results in mal-formed SQL? Dwight, Take a look at JDBC's PreparedStatement and use the setString() method to set the Manager's Time Management workshop value. This will also serve to avoid SQL injection. -Bob TV dinner still cooling? Check out Tonight's Picks on Yahoo! TV. http://tv.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can a web app discover its Service?
--- Paul Singleton [EMAIL PROTECTED] wrote: I want to deploy the same war into different (5.5) Services (e.g. test and live), and want it to discover where it is and behave differently. I didn't explain *why* we want to do this, because I don't want to spend time debating it with folk who prefer to do it the other way ;-) But here are a couple of plus points for discovery and self-configuration (DSC): 1) our dev, test and demo configurations behave in convenient ways we don't *ever* want in our live apps; with DSC we are more confident that, even if deployment misteaks are made, we won't be embarrassed Paul, If your app talks to a database, have you considered using a database table to map IP's to deploy modes? -Bob Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please Help: Tomcat 5.5.17 SSL Help
--- Blake Smith [EMAIL PROTECTED] wrote: I have uncommented the section within server.xml and pointed it to the location of the keystore, and it's password. I even changed the port from 8443 to 443 and the corresponding forwarding value for 8080. Is Tomcat listening on port 443? $ netstat -an | grep 443 -Bob Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to make a scheduled event on tomcat
--- Gaurav Kushwaha [EMAIL PROTECTED] wrote: I would like to have a method that will run every-so-often. Lets say once in 2 weeks. How do I do that in Tomcat ? Thanks, Gaurav Singh Kushwaha Gaurav, Take a look at quartz: Quartz is an open source, job scheduler for integration with stand-alone java applications and full-scale J2EE applications. Advanced features include clustering and participation in container managed transactions. https://quartz.dev.java.net/ -Bob Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Daylight Savings 2007
--- John Flores [EMAIL PROTECTED] wrote: Do you know where I can find some documentation on this subject? John, On the JRE side, see: http://java.sun.com/developer/technicalArticles/Intl/USDST/ -Bob 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Tomcat still the reference implementation for Servlets and JSP?
With regard to Servlet spec 2.5 see: http://tomcat.apache.org/tomcat-6.0-doc/index.html -Bob --- Tim Funk [EMAIL PROTECTED] wrote: Tomcat isn't used in the RI for 2.5. Glassfish is a fork of tomcat. So you'll notice many things the same. -Tim Jon Miller wrote: Hi all, Does anyone know if Tomcat is still the reference implementation for Servlets and JSP? I thought the Servlets 2.5 spec was finalized in May. Why is it taking so long for a release version of Tomcat that implements Servlets 2.5? Also, I don't understand how Glassfish can support the new specs when it embeds Tomcat. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: urgent : unsubscribe please
Christian, To unsubscribe, e-mail: [EMAIL PROTECTED] which is included (near the end) in every message from the list. -Bob - Original Message From: Christian Mennequin [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED] Cc: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED] Sent: Tuesday, January 9, 2007 11:38:51 PM Subject: urgent : unsubscribe please Cordialement, Christian Mennequin Barclays IRCB / DI 183 avenue Daumesnil 75575 Paris Cedex 12 Phone : 0033 (0)1.55.78.43.05 Email : [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To [EMAIL PROTECTED], e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What a wonderfull world ..
And thanks to George Weiss Bob Thiele for writing it and and to Louis 'Satchmo' Armstrong for performing it. http://solosong.net/wonderful.html -Bob - Original Message From: Almir Kazazic [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Saturday, December 30, 2006 11:16:04 AM Subject: Re: What a wonderfull world .. thanks On 12/30/06, Vijay Hatewar [EMAIL PROTECTED] wrote: WHAT A WONDERFUL WORLD I see trees of green, red roses too I see them bloom for me and you And I think to myself, what a wonderful world I see skies of blue and clouds of white The bright blessed day, the dark sacred night And I think to myself, what a wonderful world The colours of the rainbow, so pretty in the sky Are also on the faces of people going by I see friends shakin' hands, sayin' How do you do? They're really saying I love you I hear babies cryin', I watch them grow They'll learn much more than I'll ever know And I think to myself, what a wonderful world Yes, I think to myself, what a wonderful world Oh yeah Happy new Year .. Enjoy life ..Love thyself and others Thanks Regards, Vijay G Hatewar |Member of Technical Staff - TQE|Persistent Systems Pvt, Ltd., Pune.| |Ph: +91 .20 .3023.5331| Mobile: +91.9890678168| @: [EMAIL PROTECTED]| mailto:[EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New session PER REQUEST
Maurice Yarrow wrote: I'm fronting tomcat 5.0.28 with apache 2.0.59 through mod_proxy. I am not seeing loss of session persistence: here are the values of HttpSession.getId(), as seen in a typical succession of the servlets, and also, one of the JSP's: SelectPubImgSetServlet: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 DisplayPubGalleryServlet: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 GetPubSmallServlet: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 PassWordCheckServlet: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 SelectPhotoClub.jsp: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 EditGalleryServlet: thisUser.getId()=303D62BDCC86A5BC6D8218364F513A09 I can't, of course, tell you why you are not seeing persistent session id's, but I believe the above shows that this is normal for my webapp. I do not believe that I am doing anything unusual, here, just the usual HttpSession thisUser = GetPubSession( request, response, true ); In fact, for the login/https side of my webapp, I rely on this to determine authorization. Note that going from http to https, the same session is persisted, going the other way, one cannot rely on this - an artifact of the security specification in J2EE). Maurice Yarrow Maurice, thanks for the concientous effort. However, your responses should be addressed to Darren Hall. (no relation that I'm aware of) -Bob Hall - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New session PER REQUEST
--- Darren Hall [EMAIL PROTECTED] wrote: Peter, You are correct. When hitting Tomcat directly, the session remains intact. When using mod_proxy to forward requests to Apache the session is lost. Is this a common issue? How can I go about correcting this? Thanks - D I don't have any experience with mod_proxy. Have you tried mod_jk? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database connection pooling in Tomcat 5.5
--- Darren Hall [EMAIL PROTECTED] wrote: Further progress... When I connect to the database directly (not using a connection pool) and specify the same username and password below, the code executes fine. When I try to do the context lookup and connect to the database via the connection pool, I get the invalid username/password; logon denied error. This leads me to believe the error is in my configuration (or my code). What am I doing wrong here?? Is the DB url *exactly* the same in the two cases, DBCP and non-DBCP? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable search machines?
--- Zsolt [EMAIL PROTECTED] wrote: Hi, I see that google and msn searches on our pages (tomcat-5.5.17). How can I disable that? Zsolt Zsolt, See go away example on http://www.robotstxt.org/wc/norobots.html - Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does using Kerberos with Tomcat reduce my security?
--- P. Douglas Reeder [EMAIL PROTECTED] wrote: After some effort, I've managed to set up a JAASRealm that draws its account information from our Kerberos server (Krb5LoginModule, connecting to Open Directory on OS X Server 10.3.9). One of the key security properties of Kerberos is that passwords are never sent over the network, even in encrypted form. However, since users interact with Tomcat using HTTP, I think passwords are sent in the clear, if using Basic authentication and encrypted if using Digest authentication. In either case, it would appear that I'm not preserving the level of security I had with the Kerberos setup before. So, would it make more sense to use account information from our Linux machine (JAASRealm with UnixLoginModule), since that is sent over the network in encrypted form when users login via ssh? Is Digest authentication about as secure as SSH? If not, what's the easiest kind of Realm to set up which stores passwords in an encrypted form, for a half dozen users? (UserDatabaseRealm is right out.) Doug, Can your app use HTTPS instead of HTTP? If yes, then you can (which you may already know) add a transport-guarantee / element to your app's web.xml. -Bob security-constraint web-resource-collection web-resource-nameOSUstudent/web-resource-name descriptionStudent access/description url-pattern/student/*/url-pattern http-methodHEAD/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint descriptionThese are the coarse-grained roles that enable a subject to pass the JAAS login stack. /description role-nameOSUActiveStudent/role-name /auth-constraint user-data-constraint descriptionThis app will use https in the /student subtree/description transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] how to over come toomanyconnection error when communicatingMYSQL
--- prakash shanmugam [EMAIL PROTECTED] wrote: hai all, i have one major issue in my project.. My project is developed using jsp,servlets in Tomcat5 with MySql as database.. i am using type1 driver My project is now used by end users in intranet.. When multiple users are accessing at the same time ,its throwing too many connections exception at sometimes . And at sometimes its dispaying error as Operation not allowed after ResultSet is closed i dont know how to rectify this .. Can anybody help me to overcome this.. Prakash, Your code has to be reworked to be usable. As written, users are stepping on one another in too many places to list. You should take a look at a fairly robust example and rewrite your code accordingly. Guidelines: (see example) - Connection, Statement, ResultSet vars must have method scope - obtain, use, and close a Connection in a single method - after your application is successfully supporting multiple users look into using a Connection pool to improve performance Example: http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/Example2/solution/Report4J.java -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] decompile java class
Tomcat wrote: --- Tomcat [EMAIL PROTECTED] wrote: Thanks Mohsen for your reply, but I can not download and use jad or other decompilers, please let me know if you know how to decompile the java class that contains another class. Thanks $ javap -help $ javap -classpath And a proper name would be nice; does your boss call you Tomcat? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat shutdowns unexpectedly - Please help
--- Arunan Kannan [EMAIL PROTECTED] wrote: I have found the solution to this problem. The problem is when we start a tomcat in solaris from a user shell (like telnet) , then when the shell quits, the tomcat might get stopped. The bourne shell gives the shutdown signal when the shell quits, to kill the tomcat process. The solution to this problem is we should start/stop tomcat using C-shell. Arunan, Your Tomcat server was stopping because the process running it received a SIGHUP signal when the login shell exited. This behavior is configurable and the setting is usually governed by security policy since you might not want to allow all users to launch processes that continue after they logout. Look at the man page for 'nohup' for more info. BTW, 'ssh' is preferred over 'telnet' for security reasons. -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Crashing -- how do I read the resulting hs_err_pid11598.log?
--- Kim Albee [EMAIL PROTECTED] wrote: That's all interesting, but we're not running Fedora Core 4 -- we are running Fedora Core 3. Secondly, I've got this identical environment running in production without incident. This environment on this server used to run without incident until we had to replace the memory, and now it crashes -- same config I've got running fine in other places -- which is why I'm trying to figure out what's different. What I know is different is that this server has 4GB of RAM when all of our other servers have 2GB of RAM, so that is a difference. Kim, Don't know off hand what the utilities are, but I suggest performing some memory checks on the 4 Gb box; there may be a problem with the new RAM. -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connection Error Cannot create PoolableConnectionFactory
Cameron, You wrote: I have a newly installed and configured Ubuntu server running Tomcat5.5 and Mysql 5.0. This server was created in an attempt to migrate from a Red Hat server in a similar configuration, running the exact same webapp. Most of the configuration/classpath differences between the two platforms have been ironed out. The Problem: When our webapp trys to connect to the database on localhost, an exception 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)' is generated. Looks like the OS is unable to resolve localhost. Does the ubuntu server have the following in its /ect/hosts file? 127.0.0.1localhost -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Connection Error Cannot create PoolableConnectionFactory
Cameron, For some reason tomcat can't connect to the database and create a connection pool, even though a normal client can connect just fine. I even wrote a small java program to connect using JDBC, in case that was the problem. I used the same parameters given to tomcat and again, it works just fine. A couple of questions: Are you running the small java test program on the same host as the Tomcat server? Assumming that different usernames are being used, did you try running the test program as the user that is running Tomcat on the Tomcat host? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Programmatic Security
--- John Caron [EMAIL PROTECTED] wrote: I guess im fishing around for anyone who has thought about or implemented programmatic security instead of / in addition to container managed security. Thanks for your time. John, You might want to consider Turbine instead of rolling your own programmitic security. If the whole package doesn't appeal to you, the framework can provide a starting point. http://jakarta.apache.org/turbine/ -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j in webapp hanging Tomcat?
--- Avi Deitcher [EMAIL PROTECTED] wrote: The simple classes (a JSF backing bean and a filter) are set to use either commons-logging or log4j directly (I tried both). In either case, the moment that I uncomment any category line and one of my classes (the filter or the bean) calls log.debug(some message), Tomcat freezes entirely. This is true whether I use log4j directly or commons-logging in my classes, and whether or not I comment or uncomment the first log4j.rootCategory line in log4j.properties. I get some output from the appender matching the pattern, and then freeze. I cannot access any context; I cannot use the manager; the only thing I can do is kill the Tomcat process. I am at wit's end with this; it took literally days to narrow down that it was log4j's activation doing it. Avi, You didn't mention which OS you are using. If it's *nix you may be able use 'truss' to get info on exactly what Tomcat is doing when it freezes. BTW, a google search produced several hits for linux impl's of solaris' truss command. My guess is that you'll find that Tomcat is stuck in a loop. HTH, Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j in webapp hanging Tomcat?
--- Bob Hall [EMAIL PROTECTED] wrote: --- Avi Deitcher [EMAIL PROTECTED] wrote: The simple classes (a JSF backing bean and a filter) are set to use either commons-logging or log4j directly (I tried both). In either case, the moment that I uncomment any category line and one of my classes (the filter or the bean) calls log.debug(some message), Tomcat freezes entirely. This is true whether I use log4j directly or commons-logging in my classes, and whether or not I comment or uncomment the first log4j.rootCategory line in log4j.properties. I get some output from the appender matching the pattern, and then freeze. I cannot access any context; I cannot use the manager; the only thing I can do is kill the Tomcat process. I am at wit's end with this; it took literally days to narrow down that it was log4j's activation doing it. Avi, You didn't mention which OS you are using. If it's *nix you may be able use 'truss' to get info on exactly what Tomcat is doing when it freezes. BTW, a google search produced several hits for linux impl's of solaris' truss command. My guess is that you'll find that Tomcat is stuck in a loop. HTH, Bob Looks link linux's equivalent of 'truss' is 'strace'. -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: job offering for a web application developer in switzerland
--- Leon Rosenberg [EMAIL PROTECTED] wrote: and what exactly is ment by leistungsbezogene Entlöhnung ? leon According to Babblefish: achievement-referred remuneration -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Multiple Jboss Instance on a single Windows Box
--- Sanjeev Kumar Bhat, Noida [EMAIL PROTECTED] wrote: Is it possible to run multiple instances of Jboss Server on a single win2k box? Thanks Sanjeev Yes. You should use server/service-bindings.xml to orchestrate port # assignment. -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Urgent...
--- Christian Jean [EMAIL PROTECTED] wrote: I've been successfully using various version of Tomcat for serveral years with the same certificate... all worked well. I wanted to test the stability of Tomcat 5.5.17, so I installed in on the same server but renamed all the 8XXX ports to 9XXX so that it could be run in parallel to the 5.0.28 server. When I started the 5.5.17 server, I noticed that I could not get the HTTPS (SSL) pages working correctly. The normal HTTP pages were working correctly though. Then the real trouble started!! I could not load any HTTPS pages from any server thereafter... The SSL pages DID work on the 5.0.28 prior to testing the 5.5.17, but now HTTPS no longer works at all. When trying to load the ssl pages from the browser it says nothing... just a timeout occures. The logs don't show a single trace that something (a page) was not properly sent. Using 'netstat -ln' shows that the ports are successfully bound. The only message I'm capable of getting is with lynx: bash lynx https://localhost:8443 Will display the following line: SSL error:Can't find common name in certificate-Continue? (y) Appart from installing and running server 5.5.17, nothing has changed on my server, so its weird that my production 5.0.28 should stop working because of this test??? Christian, You mention that no other changes were made on the server, but did you happen to also install jdk/jre 1.5 and/or change JAVA_HOME? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieve certain session data inside a servlet
--- Carlos Alonso Vega [EMAIL PROTECTED] wrote: I am trying to obtain data about a session inside a servlet, the code seems to be simple as localSession = Ctx.getManager().findSession(sessionId); My problem is that I do not know how to obtain the Ctx object from a request (HttpServletRequest) Thanks in advance Carlos, To obtain the HttpSession for the current request: HttpSession sess = req.getSession(); OR boolean create = false; (or true) HttpSession sess = req.getSession(create); HTH, Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieve certain session data inside a servlet
Carlos, The javadoc indicates that the methods are deprecated, but it looks like you could use: HttpSession mySess = request.getSession(); // getSessionContext() is deprecated HttpSessionContext sessCtx = mySess.getSessionContext(); // getSession(String) is deprecated HttpSession otherSess = sessCtx.getSession(otherSessId); -Bob --- Carlos Alonso Vega [EMAIL PROTECTED] wrote: Thanks for the reply. My problem is that the session info I need is not of the session that makes the request. I need to check other sessions in the same context. I can use the request because it is in the same context, so the manager is the same. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing tomcat's group [OT]
--- Aria Bamdad [EMAIL PROTECTED] wrote: On Thu, 27 Apr 2006 20:09:44 -0700 (PDT) Bob Hall said: How about making each application owner a member of the 'tomcat' group. Bob, making each app owner a member of the tomcat group will allow different app owners to look at each other's files. For security, I need to keep each applications files secure from the other. So, I can't add each owner to the tomcat group. Even so, the application owner needs to have read/write access to the files created which makes matters more complicated. What I need is to either have tomcat create the files using the appropriate group by maybe having tomcat do a 'newgrp' before executing an application request. Is this possible? Is there a way to do a post- or pre- script before running a request in tomcat? Thanks. Aria. The 'newgrp' command starts another shell within the current one, whcich won't work AFAIK. However, you should still be able to accomplish what you want. - For each app-dir - # 1. Ensure all files/dirs have correct owner group: $ chown -R app-owner app-dir $ chgrp -R app-owner-group app-dir # 2. Ensure all file/dirs are group writeable: $ chmod -R g+w app-dir # 3. Set group sticky-bit for app's dirs: $ find . -type d | xargs chmod -R g+s app-dir Step 3 should force all files/dirs created in an app-dir to have the specified app-owner-grp. This will allow an app-owner full access to files created by the tomcat user. You'll also need to require that all app owner accounts have their umask set to 002. Otherwise an app-owner account could create a file that would be read-only for the tomcat user which might produce problems when running Tomcat. ($ umask 002) -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing tomcat's group
--- Aria Bamdad [EMAIL PROTECTED] wrote: Solved!!! The solution is to use the linux group sticky bit to force any files created in a directory (and subdirectories) to have the same group as the parent. For example let's say there are two applications, one for accounting and one for payroll. If you create a directory for accounting and one for payroll, each belonging to their own group and tomcat belonging to both groups, then tomcat can read the files in both directories but when it creates a file, it ends up being tomcat user and tomcat group. If you change the settings on the two directories as follows: chmod g+ws /accounting chmod g+ws /payroll Aria, good to know the problem is solved. Wish I had seen your latest post before replying a few minutes ago. To set the group sticky bit on dirs from 'app' down: $ find ./app -type d | xargs chmod g+s -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing tomcat's group [OT]
--- Eric Haszlakiewicz [EMAIL PROTECTED] wrote: On Thu, Apr 27, 2006 at 04:55:40PM -0400, Aria Bamdad wrote: I have several applications running in different directories. Each application is owned by a different linux owner/group. In order for Tomcat to be able to read these files to serve them, the Tomcat has as it's secondary groups, the group names of each application. The problem I am having is that when any of the applications create a file, the file created has the owner/group tomcat:tomcat which prevents the application owner from accessing the file directly (as a logged in linux user). How do others address this problem? Is there a way to have Tomcat dynamically switch 'group' before serving somthing from each application? If the files are in separate directories, it might work to just make sure the directory is owned by the appropriate group. Under NetBSD that seems to ensure that any files created are owned appropriately, but I'm not sure how it works under linux. You might need to do a chmod g+s on the directory. eric How about making each application owner a member of the 'tomcat' group. Then set the group permissions as read-only on the dirs/files: $ chmod -R g-w app-dir If you want to share the ability to write to a given app's dirs/files then you need to do more: # allow members of tomcat group to write $ chmod -R g+w app-dir # set group sticky-bit $ find . -type d | xargs chmod -R g+s app-dir You'll also need to somehow require that all app owners set their umask to 002 so that files and dirs created by them in the tomcat group app dirs are writeable by other tomcat group members. $ umask 002 Overall, it's much simpler if the app owners only have read rights. -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: index.jsp not showing after successful installation
--- balaraju mandala [EMAIL PROTECTED] wrote: Hi Bob, Thanks for your response. catalina.out file is not ending with any error messages. It is showing that, Tomcat started successfully with some millesecond time. I am using 8080 port for Tomcat. I am entering http://myip:8080 in the browser. But simple error page is displaying. No 404 or any special errors from Tomcat. Regards, Bala. Bala, Your catalina.out should contain something like: INFO: Starting Coyote HTTP/1.1 on http-8080 It may also contain something like: INFO: JK2: ajp13 listening on /0.0.0.0:8009 grep for Coyote HTTP and ajp13 listening in your catalina.out and let us know what you find. You should also grep for Exception in catalina.out. Some more questions: 1. What browser are you using? 2. Is the browser running on the same system that is hosting Tomcat? 3. Is there a firewall in place on the linux box that is hosting Tomcat? 4. What exactly is the text on the simple error page? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: index.jsp not showing after successful installation
--- balaraju mandala [EMAIL PROTECTED] wrote: Bob, The ending messages in catalina.out are -- Apr 10, 2006 1:48:20 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Apr 10, 2006 1:48:20 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Apr 10, 2006 1:48:20 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/24 config=/home/wizon555/Softwares/tomcatsoftware/jakarta-tomcat-5.0.28 /conf/jk2.properties Apr 10, 2006 1:48:20 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 2742 ms and there are no 'Exceptions' in catalina.out. I am using Internet Explorer 6. I am connecting to remotly located system, where i installed Tomcat and trying to access it from my System. There is no Physical firewall present for that server, a software was installed, but though i disabled software firewall result is same. -Bala Bala, Looks like a clean startup of Tomcat - good. What is the text of the error message that appears when you attempt to reach Tomcat from IE6 on a remote host? Can you run a browser on the linux host and attempt to access Tomcat via: http://localhost:8080 ? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: index.jsp not showing after successful installation
--- balaraju mandala [EMAIL PROTECTED] wrote: Hi Nic, Its me again, You suggested to check weather Tomcat was started as service, i am starting Tomcat by issuing a command at SSH (tomcat/bin/./startup.sh). Is this is correct one to start Tomcat as service or i have to do another way to start tomcat as service. regards, Bala Bala, Using startup.sh on yuour linux box should be fine. Does catalina.out end with a report of the port(s) that Tomcat is using? WHich ports? What URL are you entering into the browser? What response are you getting in the browser? timeout, Http404 ? -Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session GC
John, The simple and intuitive solution that Hansen provided can be used to log when an HttpSession instance is GC'd since the objects that instance holds *unique* references to will also be GC'd. So, the question becomes, which classes are holding references to HttpSession objects and preventing them from being GC'd? We used a tool years ago to analyze the heap when we were tracking down some elusive memory issues. Heap Analysis Tool: https://hat.dev.java.net/ -Bob --- John Powers [EMAIL PROTECTED] wrote: thats not what i'm talking about. after a session times out... tomcat removes it from its list of sessions. a session listener will show that it leaves. however, a GC then needs to see if its available for collection on the next go around of the GC.if i force the GC, or whenever it decides to happen, my objects under the session aren't being collected. so then. how can you know when the session itself is collected (not timed out) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Fri 3/31/2006 5:36 PM To: Tomcat Users List Subject: RE: session GC easiest way to make sure they are GC'd is to set session time-outs. -Original Message- From: John Powers [mailto:[EMAIL PROTECTED] Sent: Friday, March 31, 2006 6:07 PM To: Tomcat Users List Subject: session GC How do you know when a session is garbage collected? You can write a sessionlistener for when it gets deleted out of tomcat, but after that, when do you know if its garbage collected? I currently do not think my sessions are being collected. Within a day 500M of memory get eaten up and I can't collect them manually even. So I want to know when/if the sessions are being collected. If I wrote a subclass to httpsession, how could get tomcat to use it? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download file Problem - 404 error
--- DEEPA M N [EMAIL PROTECTED] wrote: Hi I m using Jdk1.5 and Tomcat 5.0.28 for my proj. I have written a code which can download a file from the server. The code is compiling properly. I pasted the .class file in the webapps/DownloadFile/WEB-INF/classes/ Also i hav written web.xml in the WEB-INF folder. After running a appln, i get 404 Resource not found error. Before i hav worked on servlet and tomcat, i was not getting such issues before. But now i m facing such type of issues, i need to solve it as early as possible. Here is a web.xml lines: ?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-nameTomcat Documentation/display-name description Tomcat Documentation. /description servlet servlet-nameDownloadFiles/servlet-name servlet-classDownloadFiles/servlet-class /servlet servlet-mapping servlet-nameDownloadFiles/servlet-name url-pattern/servlet/DownloadFiles/url-pattern /servlet-mapping /web-app Pls do let me know how can i solve this prob. I always appreciate ur help. Thanks in advance. Deepa Deepa, Your servlet must be in a package to work with Java 1.4 and greater. After placing DownloadFiles in a package: (com.deepa.servlet) servlet servlet-nameDownloadFiles/servlet-name servlet-classcom.deepa.servlet.DownloadFiles/servlet-class /servlet - Bob __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Download file Problem - 404 error
Deepa, As someone pointed out in an earlier post you need to include the following in your DownloadFile.java file: (usually, as the first line) package com.deepa.servlet; You would also normally place DownloadFiles.java in a directory that ended in com/deepa/servlet. In WinSpeak: D:\data\eclipse\workspace\com\deepa\servlet\DownloadFiles.java After a successful compile, com\deepa\servlet\DownloadFiles.class should be copied to the WEB-INF\classes directory of your web app. - Bob -Original Message- From: DEEPA M N [mailto:[EMAIL PROTECTED] Sent: Tue 1/31/2006 11:43 AM To: Tomcat Users List Cc: D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classesjava com.deepa.servlet.DownloadFiles Exception in thread main java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]