Re: Refuse connections in the selector
Yes, I want to write my own NIO code. But I dont know how to cancel/close a connection in the selector, because the file NioEndPoint.java es so confusing and I dont in which of class of that file I have to do that. Tnaks I'm still not sure what you're asking, but if you are writing your own NIO code, then you can cancel/close a connection that is in the selector pool at any point in time. Just get it out of the selector pool, and close it. Filip ubekhet wrote: Hi Filip, Is related java nio, and in this case as I use Tomcat with NIO paradigm, is the same. Thanks Filip Hanik - Dev Lists wrote: is this related to tomcat, or just generic java/nio? Filip ubekhet wrote: Hi, I would like to know, how I can refuse the connections when they are in the selector pool, just for waiting thread to manage connections. I use Tomcat 6 and also using NIO paradigm! and I dont know how to do that. Thanks in advance!!! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: JMX MBean
- Original Message - From: ubekhet [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, May 16, 2008 10:33 PM Subject: Re: JMX MBean Liang, When I read this, I think, Damn, the guy is rebuilding Tomcat ;) Are you? Are you trying to make a new version of TC... sounds like you into the source there. If so thats not a problem, but then you should be in the dev, group, there you can talk to the guys that actually wrote the Mbena modules. If not and its a bean in your servlet that you want to use. Then this article is the only one I've ever seen on the subject http://oss.wxnet.org/mbeans.html Essentially there is a bean Registry inside tomcat... and the idea is to get your bean into that registry... then TC will treat it like its own internal beans, and then Jconsole will see it. So... it seems you stick your bean in TC libs, you do a little XML stuff so the TC picks it up, and then you use a listener to start the bean. Then your Servlet will just use that bean. Then mbeans are actually quite complex, and getting the interfaces right is not so easy, but luckily Netbeans, and probably eclipse (not sure) has a plugin that automates the testing mbeans in your code... so together you on your way... hopefully. That side of it will help you get the Mbean right and figure out how to get a chart going in Jconsole etc. It doesnt seem to be a very popular topic, and I think thats because most guys (like me) think, JMX is cool, but TC is a great big powerful Web Server... and in the end... we (I) just end up using a web page to change some custom servlet configuration, or display status. I still havnt found a reason to really use JMX in my own servlets... because its TC. In an accounting app or something like that, I think JMX would be great. Anyway... thats why I think documentation is a little thin in this area. If you are into the source... then this whole registration thing will be done differently... but for that, you'll have to ask the guy the wrote it. ie if you playing with the TC source in org/apache/catalina/mbeans For that you have to be younger than 20... else you may run out of time ;) Hi Caldarale, Yes, I use the current version of Tomcat. Thanks for your link, but I want to know how to implement MBean, because according the web you gave, I have to add my MBean to the mbeans-descriptor.xml and also the folder where is contained. For example, if I want to implement the HelloWorld in java/org/apache/catalina/mbeans, first of all I have to add to mbeans-descriptor.xml in java/org/apache/catalina and then also in java/org/apache/catalina/mbeans. On the other hand, I've implemented HelloWorld.java in java/org/apache/catalina/deploy and HelloWorldMBean as interface in java/org/apache/catalina/mbeans. This implementation is the correct way? Other way in the same java/org/apache/catalina/deploy directory contain another mbeans-descriptor.xml file Can you say me, if I am right? Thanks a lots!!! Caldarale, Charles R wrote: -Original Message- From: Liang Xiao Zhu [mailto:[EMAIL PROTECTED] Subject: JMX MBean I am searching how to implement a MBean for a class that I implemented, which add some new funcionality to Tomcat. Don't suppose you'd care to tell us what version of Tomcat you're using? If it's the current level, have you followed these instructions? http://tomcat.apache.org/tomcat-6.0-doc/mbeans-descriptor-howto.html - Chuck - 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: User-JDBC-Realm: User case-sensitiv?
Hi Todd, On Fri, May 16, 2008 at 11:23 PM, Boyd, Todd M. [EMAIL PROTECTED] wrote: You can use WHERE x LIKE condition to perform a case-sensitive search without modifying the structure of the table(s) involved by using the BINARY keyword. well, I could so so - however, I'm talking about Tomcat's Authentication (User-Realm). Since I don't want to patch Tomcat, I had to change the tables. Sure, there are a lot of possible solutions, however, it would ease up things if MySQL would behave as expected by the common programmer. Just an example: What, if you create a databse-independent software (as what we do), that runs on any database providing a JDBC 2.0-compliant driver and supports SQL 2.0-standard? AFAIK DB2 doesn't know the binary attribute, not sure about Oracle, Postgres, Informix etc. So what you'd have to to then is evaluate every database for those kind of features and provide different create-scripts for each database providing such a feature. Or, even worse, you'll have to write code within your application handling each such feature (if db == mysql soSomethingElse) Folks, from the from the interperability-point-of-view I guess MySQL is behaving badly here since it just doesn't stick to one of the principles of computing: A != a No problem if MySQL would offer this behaviour as a feature (i.e. create table foo (bar varchar(10) NOCASE)), but how they did it ist just the wrong way round, IMHO. Anyways, I guess we're getting slightly off topic here. To get back to the topic, I'm wondering how many percent of the Tomcat-users using a MySQL are aware of the fact that the user-id is not case-sensitive, when they use a JDBC-realm as their user-database. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple authentication schemes within a webapp
Hi, I have a webapp that uses form based authentication but I'd like to also be able to login to it using basic authentication. The main use case for this is to present a nice form based login for web users, not involving the standard browser's username/password prompt, but also allow people to include their username and password into the url for use in the likes of wget and other tools. Can anyone give me recommendations on how to achieve this? As far as I can tell I can't have more than one login-config elements in the web.xml. Would I need to implement a new Authenticator delegating to BasicAuthenticator and FormAuthenticator? Thanks in advance for any advice, Rob - 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: understanding some tomcat code
On Sat, May 17, 2008 at 12:12 AM, Leon Rosenberg [EMAIL PROTECTED] wrote: Hi, was just browsing through tomcat code, and the following is just a mystery to me -StandardSession.fireSessionsEvent(type,data): public void fireSessionEvent(String type, Object data) { if (listeners.size() 1) return; SessionEvent event = new SessionEvent(this, type, data); SessionListener list[] = new SessionListener[0]; WHY synchronized? synchronized (listeners) { list = (SessionListener[]) listeners.toArray(list); } It is kind of Snapshot Pattern i thought. Synchronize copy the SessionListener list as toArray is not thread safety. Then further synchronized is not required in the for loop below (as the list is a snapshot of the original list). Thus any registration or removal of session listener does not need to wait the complete of event firing in StandardSession. for (int i = 0; i list.length; i++){ ((SessionListener) list[i]).sessionEvent(event); } } can someone enlighten me? :-) regards Leon - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Twinsen
Re: JMX MBean
Johnny Kewl wrote: If not and its a bean in your servlet that you want to use. Then this article is the only one I've ever seen on the subject http://oss.wxnet.org/mbeans.html Essentially there is a bean Registry inside tomcat... and the idea is to get your bean into that registry... then TC will treat it like its own internal beans, and then Jconsole will see it. So... it seems you stick your bean in TC libs, you do a little XML stuff so the TC picks it up, and then you use a listener to start the bean. Then your Servlet will just use that bean. Then mbeans are actually quite complex, and getting the interfaces right is not so easy, but luckily Netbeans, and probably eclipse (not sure) has a plugin that automates the testing mbeans in your code... so together you on your way... hopefully. That side of it will help you get the Mbean right and figure out how to get a chart going in Jconsole etc. Of course you can just ignore the fact that this is Tomcat (i.e. be servlet engine independent) and register your MBeans with the platform MBean server in a different domain. [I'm assuming you're using Java 5 or 6.] Also some MBean approaches are quite complex, but standard MBeans and then the StandardMBean class when the simple minded standard MBean pattern runs out of gas are quite easy. Using the latter approach you can easily have your MBean start with a statically typed/declared MBean interface and then add dynamic operations and attributes if/when you need to. The managed MBean stuff in Tomcat itself is more complicated than most common use cases require. -- Jess Holle - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem about tomcat session management
Hi all, Recently, I am suffering a problem about tomcat session management. It is a sign-in service, sometimes the user A logs in, system sets user¡¯s information in session and then a piece of JSP codes to read the user¡¯s name from session, but the user gets another user¡¯s name in browser. I cannot repeat this problem in our network environment, but our customers meet(NOT ALWAYS). Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15. Other skills we used include struts, dwr, hibernate, and etc. If need the service codes, let me know. Thanks for any help and suggestion.
problem about tomcat session management
Hi all, Recently, I am suffering a problem about tomcat session management. It is a sign-in service, sometimes the user A logs in, system sets user¡¯s information in session and then a piece of JSP codes to read the user¡¯s name from session, but the user gets another user¡¯s name in browser. I cannot repeat this problem in our network environment, but our customers meet(NOT ALWAYS). Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15. Other skills we used include struts, dwr, hibernate, and etc. If need the service codes, let me know. Thanks for any help and suggestion.
Re: [OT] User-JDBC-Realm: User case-sensitiv?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, Gregor Schneider wrote: | Sure, there are a lot of possible solutions, however, it would ease up | things if MySQL would behave as expected by the common programmer. Sorry, but the common programmer ought to know that, in spite of SQL's standard-ness, every RDBMS implementation is slightly different. Just try to do something as simple as getting the database to generate a unique id for you, and suddenly you are outside of the standard. http://en.wikipedia.org/wiki/Sql#Reasons_for_lack_of_portability | Just an example: | | What, if you create a databse-independent software (as what we do), | that runs on any database providing a JDBC 2.0-compliant driver and | supports SQL 2.0-standard? You probably mean something like SQL-92. Or maybe SQL3? FIPS 127-1/SQL-89? The problem is that SQL is not as standard as you think. Sure, some group of people sat in a room and made some decisions, but the database companies also made different decisions. | AFAIK DB2 doesn't know the binary attribute, not sure about Oracle, | Postgres, Informix etc. No, they have other ways of doing this. See http://www.orafaq.com/node/999 for instance. SQL Server has the same semantics as MySQL ('=' is case-insensitive). It's all over the map. Remember that JDBC is a method-oriented API, but does not make any assumptions about the underlying implementation. You are free to call (SQL) functions that only exist in certain databases and not in others. Want string concatenation in Oracle? Use ||. Moving to another database? Well, you're gonna have to change all those to something else (usually a function call). There are many many many examples of this. | So what you'd have to to then is evaluate every database for those | kind of features and provide different create-scripts for each | database providing such a feature. Absolutely. This is the name of the game when using RDBMSs. Sorry to burst your bubble. | No problem if MySQL would offer this behaviour as a feature (i.e. | create table foo (bar varchar(10) NOCASE)), but how they did it ist | just the wrong way round, IMHO. That's exactly what they did... you just don't like the way they spell NOCASE. | Anyways, I guess we're getting slightly off topic here. To get back to | the topic, I'm wondering how many percent of the Tomcat-users using a | MySQL are aware of the fact that the user-id is not case-sensitive, | when they use a JDBC-realm as their user-database. On our projects, we don't use Tomcat realms, but we definitely see the case-insensitivity of usernames as positive behavior, since we tend to use email addresses as usernames. Email addresses are, by definition, not case sensitive, so making usernames match those semantics is good for us. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgu5joACgkQ9CaO5/Lv0PCqrQCfeXo1a9Bdty3XxCc0B9L5pGHM fHkAn0fFkwpFv5gqbuchJs1GdjXFcI8M =TPey -END PGP SIGNATURE- - 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: Multiple authentication schemes within a webapp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Oxspring wrote: | I have a webapp that uses form based authentication but I'd like to also | be able to login to it using basic authentication. The main use case | for this is to present a nice form based login for web users, not | involving the standard browser's username/password prompt, but also | allow people to include their username and password into the url for use | in the likes of wget and other tools. | | Can anyone give me recommendations on how to achieve this? As far as I | can tell I can't have more than one login-config elements in the | web.xml. Would I need to implement a new Authenticator delegating to | BasicAuthenticator and FormAuthenticator? Yeah, you basically need to do something like this. You might not even be able to use the existing classes without some of your own logic, because you never want to send a 401 response, right? You just want to accept WWW-Auth headers if they happen to be in the request. If you find that the classes in Tomcat are too restrictive, you might want to look into securityfilter (http://securityfilter.sourceforge.net/), which has some options not available through Tomcat's built-in security. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgu59wACgkQ9CaO5/Lv0PBBXACgle4nad6bQGsXMOU1XO0jmlTA 1xMAnRLjt38A9E4ZEN3nLc4T+jCfbDKd =f5Ij -END PGP SIGNATURE- - 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: problem about tomcat session management
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zufeng, Zufeng Huang wrote: | Recently, I am suffering a problem about tomcat session management. | It is a sign-in service, sometimes the user A logs in, system sets | user¡¯s information in session and then a piece of JSP codes to read | the user¡¯s name from session, but the user gets another user¡¯s name | in browser. I cannot repeat this problem in our network environment, | but our customers meet(NOT ALWAYS). This is almost certainly an application error. You should make sure that you are not storing references to HttpServletRequest or HttpSession objects /anywhere/ that might be shared with another thread. Specifically, check that your servlets do not have any class-level members. | Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15. You might want to upgrade to Tomcat 5.5.26, which is the latest 5.5.x version available. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgu6TMACgkQ9CaO5/Lv0PBXygCgmCIc2dG4YnBHBn0jCrKW02hx prMAoKhVNE1XxgDUpTS7PEzmaKVLnDSZ =jMBi -END PGP SIGNATURE- - 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: Multiple authentication schemes within a webapp
- Original Message - From: Robert Oxspring [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Saturday, May 17, 2008 12:49 PM Subject: Multiple authentication schemes within a webapp Hi, I have a webapp that uses form based authentication but I'd like to also be able to login to it using basic authentication. The main use case for this is to present a nice form based login for web users, not involving the standard browser's username/password prompt, but also allow people to include their username and password into the url for use in the likes of wget and other tools. Can anyone give me recommendations on how to achieve this? As far as I can tell I can't have more than one login-config elements in the web.xml. Would I need to implement a new Authenticator delegating to BasicAuthenticator and FormAuthenticator? Thanks in advance for any advice, Rob I love this question... but I'm not sure ;) You want to do something like this http://userid:[EMAIL PROTECTED]/webapp/enterhere I dont think it will let you do it directly... But I cant see why you couldnt map the servlets slightly differently... if it is servlets. so normal is /myPageThatSendsMeToAForm That is the whole form auth thing and /myPageThatSendsMeToAForm/ENTERHERE is setup for BASIC... So if the person gets the url wrong the browser will put up the Password box... and both are actually mapped to the same servlet... I think TC is smart enuf for that... just a tiny little addon to a URL and a slightly different mapping. If its JSP pages... I'm not sure and I think you would have to make a servlet... Otherwise like Chris said... its probably a cool tool ;) Tell us what you did in the end... ;) --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IIS/Tomcat work only on my LAN
I want to make Tomcat 6.0.16 work with IIS 6 on Windows 2003 server. I followed all steps in http://indrayam.com/demo/HowToLinkTomcat5WithIIS6.pdf and things work only on my LAN. The tomcat examples work fine when fetched from a browser on any computer of my Local Area Network. That is, IIS listens on port 80 and fetches the Tomcat examples correctly (http//www.mydomain/examples/) When fetching the same link from the Internet, the error web page takes a while to come and displays: The page cannot be displayed Note that all other web pages from the site are accessible from the Internet, static web pages and dynamic with standard CGI (i.e. no tomcat CGI) Best regards. -- View this message in context: http://www.nabble.com/IIS-Tomcat-work-only-on-my-LAN-tp17293009p17293009.html Sent from the Tomcat - User mailing list archive at Nabble.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: InvalidClassException between Tomcat and Eclipse
Thanks. Can you explain the idea behind serialVersionUID (or point to a link)? It seems (under ideal circumstances and not what I was conerned with previously) that if the classes are legitimately out of sync and I don't set it, I will get an exception saying that serialVersionUID is mismatched. If I do set it, I will get an invalid stram exception or something like that. I don't particularly care what exception I get. Thanks! Dola --- Yuval Perlov [EMAIL PROTECTED] wrote: It is also affected by the compiler version. It is most advisable to add serialVersionUID Yuval Perlov www.r-u-on.com On May 17, 2008, at 7:16 AM, Dola Woolfe wrote: Hi, I get java.io.InvalidClassException when I send a serialized class from an application launched by Eclipse to a JSP page, compiled by the server. I thought that serialVersionUID was strictly a function of members, signatures, etc - but that doesn't appear to be the case. A workaround is to define serialVersionUID explicitly, but I would like to understand what's going on. Many thanks in advance! Dola - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.26+sun jdk1.5.0.15 linux for 64 bit architecture problems
Hello there It is very strange for me. I just installed a brand new machine with Red Hat 5.1x64 on dell power edge 860. I downloaded jdk-1.5.0.15-linux-amd64 from sun. Downloaded tomcat 5.5.26. Installed both. I have in setenv.sh JAVA_OPTS=-server -Xms256m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m CATALINA_OPTS=-Dlogs.root=/opt/logs -Dwas.install.root=/opt JAVA_HOME=/jdk1.5.0_15/jre I can see the welcome screen of tomcat on port 8080 can enter the manager with the appropriate user and pass but When I try to start some of the JSP2.0 examples (they come by default with tomcat) an error appears: (the strange thing is that most of the JSP 1.2 examples work) When I try to start Basic Arithmetic example here is the result in the browser HTTP Status 404 - Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is not available *type* Status report *message* _Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is not available_ *description* _The requested resource (Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is not available) is not available._ Apache Tomcat/5.5.26 Here is the result in the localhost.2008-05-17.log May 17, 2008 6:52:34 PM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is currently unavailable May 17, 2008 7:04:11 PM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is currently unavailable May 17, 2008 7:05:44 PM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet org.apache.jsp.jsp2.el.basic_002darithmetic_jsp is currently unavailable WHEN I TRY ANOTHER EXAMPLE... BASIC COMPARISON ...HERE IS THE RESULT IN LOCALHOST FILE SEVERE: Error loading WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: [EMAIL PROTECTED] org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp java.lang.ClassNotFoundException: org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) May 17, 2008 7:07:31 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp java.lang.ClassNotFoundException: org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at
RE: InvalidClassException between Tomcat and Eclipse
From: Dola Woolfe [mailto:[EMAIL PROTECTED] Subject: Re: InvalidClassException between Tomcat and Eclipse Can you explain the idea behind serialVersionUID AFAIK, its primary purpose is to insure that the deserialized object is compatible with the the current class definition. Serializable classes distributed with the JRE have explicit serialVersionUID values, and are changed whenever the class implementation changes - not just when methods or fields are updated. It's usually not safe to depend on the automatically generated ID value, since logic changes could produce incompatibilities; best to always set your own and be careful to increment it whenever modifying the class (I think some of the IDEs will do this for you). Look here, especially section 4.6: http://java.sun.com/javase/6/docs/platform/serialization/spec/class.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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.5.26+sun jdk1.5.0.15 linux for 64 bit architecture problems
From: Niki Diulgerov [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5.26+sun jdk1.5.0.15 linux for 64 bit architecture problems CATALINA_OPTS=-Dlogs.root=/opt/logs -Dwas.install.root=/opt Those system properties are not used by Tomcat; are they for a webapp you've deployed? JAVA_HOME=/jdk1.5.0_15/jre Your JAVA_HOME setting is wrong - it should be just /jdk1.5.0_15 (although that's an unusual place to install the JDK - it's typically in something like /usr/local/jdkversion). Are you sure you're using the desired JDK? Have you set the PATH properly? What does java -version display? Are these examples supposed to work with 5.5 tomcat and the version of sun java which I'm using? Yes. Is this connected with the x64 architecture which I have. Probably not, if the JDK is properly installed. Can it be something with the fact that on the java sun build which I downloaded it is written amd64 and my CPU is Intel? No, the AMD64 architecture is what market pressure forced Intel to implement for its EM64T chips (now known as Intel 64, just to provoke confusion with the despised IA-64). It's also known as x86-64, which is what AMD originally called it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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: Multiple authentication schemes within a webapp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johnny, Johnny Kewl wrote: | But I cant see why you couldnt map the servlets slightly differently... | if it is servlets. You can't set up more than one authentication scheme for a webapp, at least not using the simple configuration in web.xml. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgvF/YACgkQ9CaO5/Lv0PBEUgCeKwoFkm6986rWs2zy8bmgR8Uu l7UAoKT3Xw319bl8B+hs4+CiisQNgzhE =BuMb -END PGP SIGNATURE- - 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: Multiple authentication schemes within a webapp
- Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Saturday, May 17, 2008 7:37 PM Subject: Re: Multiple authentication schemes within a webapp -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johnny, Johnny Kewl wrote: | But I cant see why you couldnt map the servlets slightly differently... | if it is servlets. You can't set up more than one authentication scheme for a webapp, at least not using the simple configuration in web.xml. Damn... sorry Robert... looks like once you say form, its form. I know a filter wont even help you... the security happens even before the filter. I had at look if maybe its easy to override the class... looks like too much pain. Its look like, lose the form... or its Chris's tool suggestion Thanks Chris... a true TC master ;) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploying Servlets in users directory
Hello all, I'm using tomcat 6.016 and have configured userconfig in server.xml to look in user's public_html subdir for jsps etc. Jsp files works fine in user directories but servlets do not. Does anyone have tomcat working with servlets in user's public_html subdirectories? Thanks Cristian - 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: problem about tomcat session management
Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zufeng, Zufeng Huang wrote: | Recently, I am suffering a problem about tomcat session management. | It is a sign-in service, sometimes the user A logs in, system sets | user¡¯s information in session and then a piece of JSP codes to read | the user¡¯s name from session, but the user gets another user¡¯s name | in browser. I cannot repeat this problem in our network environment, | but our customers meet(NOT ALWAYS). This is almost certainly an application error. You should make sure that you are not storing references to HttpServletRequest or HttpSession objects /anywhere/ that might be shared with another thread. Specifically, check that your servlets do not have any class-level members. Actually, since the OP can't reproduce it on his network, I'd vote for an up-stream proxy server returning a cached view of the page. Of course Tomcat will take care of this for protected pages if you are using Container Auth, but it doesn't sound like this app is doing that. | Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15. You might want to upgrade to Tomcat 5.5.26, which is the latest 5.5.x version available. Always a good suggestion, since there are quite a few fixes from 5.5.15 :). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgu6TMACgkQ9CaO5/Lv0PBXygCgmCIc2dG4YnBHBn0jCrKW02hx prMAoKhVNE1XxgDUpTS7PEzmaKVLnDSZ =jMBi -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: CGI/HTML
Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shabu, Shabu Khan wrote: | For some reason, the cgi perl script that I run via IE/Firefox does not | render the output immediately, but waits until it has big chunk of the | HTML. Does this have anything to do with the tomcat/cgi setup or header or | something, or perl mod defaults? This probably has to do with the size of the output buffer in either Perl or whatever mechanism is being used to shuttle information from your CGI script through Tomcat and any other layers you may have in between. I would check the CGI runner you are using to see if there is a buffer size tweaking setting. I didn't see anything like that in http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html so you might want to check the code. CGIServlet appears to have a small (2048 byte) buffer for output, which shouldn't be a problem. It looks like the loop that monitors the (external) CGI process at 500ms intervals to check up on the process while no output is being produced. While output is being produced, it should be constantly moving data from the CGI's stdout to the ServletOutputStream (which is unbuffered). The /input/ from the CGI is Not strictly true. By default Tomcat has an 8Kb output buffer (in o.a.c.c.OutputBuffer ;) before actually sending the output to the Socket. buffered up through the end of the headers, and then the writer is ignored and the input stream is unbuffered (not really sure how this works properly...). It's possible that you are hitting odd buffer boundaries where a buffer flush requires several of these half-second pauses before enough data is available. Have you timed your perl script independently to see if there actually is a delay in generating the content, rather than simply moving if from the CGI to through Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgtx7EACgkQ9CaO5/Lv0PB4CACggNXDgd1RVziRT+L9KEFr60nC pVMAnim65WeLxS4QfhfKyeeD207ECWfm =Pnob -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: JMX MBean
Chuck's post works for implementing custom Tomcat components (e.g. a custom Realm extending RealmBase). If you are implementing a custom class that doesn't extend any Tomcat class, then your class will have to self-register itself. Since you say you are using TC6, the default configuration should give you access to the Registry class to allow you to do it using the mbeans-descriptor.xml method that the (forked) commons-modeler uses. ubekhet [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Caldarale, Yes, I use the current version of Tomcat. Thanks for your link, but I want to know how to implement MBean, because according the web you gave, I have to add my MBean to the mbeans-descriptor.xml and also the folder where is contained. For example, if I want to implement the HelloWorld in java/org/apache/catalina/mbeans, first of all I have to add to mbeans-descriptor.xml in java/org/apache/catalina and then also in java/org/apache/catalina/mbeans. On the other hand, I've implemented HelloWorld.java in java/org/apache/catalina/deploy and HelloWorldMBean as interface in java/org/apache/catalina/mbeans. This implementation is the correct way? Other way in the same java/org/apache/catalina/deploy directory contain another mbeans-descriptor.xml file Can you say me, if I am right? Thanks a lots!!! Caldarale, Charles R wrote: -Original Message- From: Liang Xiao Zhu [mailto:[EMAIL PROTECTED] Subject: JMX MBean I am searching how to implement a MBean for a class that I implemented, which add some new funcionality to Tomcat. Don't suppose you'd care to tell us what version of Tomcat you're using? If it's the current level, have you followed these instructions? http://tomcat.apache.org/tomcat-6.0-doc/mbeans-descriptor-howto.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: CGI/HTML
Thanks Bill. Can this be tweaked to a lesser value then? On Sat, May 17, 2008 at 6:21 PM, Bill Barker [EMAIL PROTECTED] wrote: Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shabu, Shabu Khan wrote: | For some reason, the cgi perl script that I run via IE/Firefox does not | render the output immediately, but waits until it has big chunk of the | HTML. Does this have anything to do with the tomcat/cgi setup or header or | something, or perl mod defaults? This probably has to do with the size of the output buffer in either Perl or whatever mechanism is being used to shuttle information from your CGI script through Tomcat and any other layers you may have in between. I would check the CGI runner you are using to see if there is a buffer size tweaking setting. I didn't see anything like that in http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html so you might want to check the code. CGIServlet appears to have a small (2048 byte) buffer for output, which shouldn't be a problem. It looks like the loop that monitors the (external) CGI process at 500ms intervals to check up on the process while no output is being produced. While output is being produced, it should be constantly moving data from the CGI's stdout to the ServletOutputStream (which is unbuffered). The /input/ from the CGI is Not strictly true. By default Tomcat has an 8Kb output buffer (in o.a.c.c.OutputBuffer ;) before actually sending the output to the Socket. buffered up through the end of the headers, and then the writer is ignored and the input stream is unbuffered (not really sure how this works properly...). It's possible that you are hitting odd buffer boundaries where a buffer flush requires several of these half-second pauses before enough data is available. Have you timed your perl script independently to see if there actually is a delay in generating the content, rather than simply moving if from the CGI to through Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgtx7EACgkQ9CaO5/Lv0PB4CACggNXDgd1RVziRT+L9KEFr60nC pVMAnim65WeLxS4QfhfKyeeD207ECWfm =Pnob -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Shabu Khan | Mentis Systems Inc | W: (425) 649-1130 | C: (425) 301-1948 | F: (425) 256-2819 http://www.linkedin.com/in/shabukhan
question about protected resources in a security-constraint and login-config
I am using tomcat 5.5.23 to set up form based authentication. I have looked at the source code and ran the security/protected example that is provided with tomcat, and I have a question about the resources associated with the login-config. The two jsps defined in the login-config are in the security/protected directory, under which I thought all resources are protected. How is it then these two pages can be displayed without the user logging in? Or is there an exemption for those pages defined in the login-config? [The reason I am asking is that I am trying to work out the best structure for my application. I want my login pages to contain images and css and those resources *will* have to be in an unprotected area. When I created a protected directory then I had all sorts of trouble with the path to the unprotected resources. My current structure is: /login.jsp /error.jsp /images/*.gif /application.css /protected/*.jsp /protected/images/*.gif but when I try to access protected/*.jsp tomcat brings up the correct login page but seems to think that all resources that are relatively defined in login.jsp are actually relative to the protected area. The only way I can fix this is to define absolute paths in my jsp, a solution which I am not particularly happy with (I saw an associated posting on this for a different version of tomcat: http://mail-archives.apache.org/mod_mbox/tomcat-users/200311.mbox/[EMAIL PROTECTED])] Any help with the original question would be much appreciated. Natalie Get the name you always wanted with the new y7mail email address. www.yahoo7.com.au/y7mail - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]