how to set JAAS Subject in HTTPSession
Hi: I would need help with the following - I am trying to implement JAAS authentication using struts2. I have implemented the following flow - user request -> struts action -> login() -> loginModule (implements LoginModule) this login module validates userid, password and in the commit(), it creates a Principal and adds the principal in the Subject. My qn is how do I set this Subject in the HttpSession so that I can retrieve it later, like below - HttpServletRequest request = ServletActionContext.getRequest(); Principal principal = request.getUserPrincipal(); Please help. thanx Shahahb -- View this message in context: http://www.nabble.com/how-to-set-JAAS-Subject-in-HTTPSession-tf3642977.html#a10173947 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: linux + tomcat, some path/link problem
make sure you have granted the correct permissions in your catalina.policy e.g. grant codeBase "file:${java.home}/lib/-" { permission java.security.AllPermission; }; M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "LRS" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, April 24, 2007 9:45 PM Subject: Re: linux + tomcat, some path/link problem thanks men, actually I've already tried to add " file:// " prefix explicitly to filePath in A href link, and in mozilla I can see the property of link appear to be " file:///root/test.html " , which is a good sign, huh? but, woo, hate this but, no matter how hard i clicked, the browsers made no reaction, it won't jump to test.html. the same thing happened in opera, so I guess it maybe still have something to with tomcat. I'm gonna work on this after work Johnny Kewl <[EMAIL PROTECTED]> Caldarale, Charlie R <[EMAIL PROTECTED]> Fargusson.Alon <[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: linux + tomcat, some path/link problem
thanks men, actually I've already tried to add " file:// " prefix explicitly to filePath in A href link, and in mozilla I can see the property of link appear to be " file:///root/test.html " , which is a good sign, huh? but, woo, hate this but, no matter how hard i clicked, the browsers made no reaction, it won't jump to test.html. the same thing happened in opera, so I guess it maybe still have something to with tomcat. I'm gonna work on this after work Johnny Kewl <[EMAIL PROTECTED]> Caldarale, Charlie R <[EMAIL PROTECTED]> Fargusson.Alon <[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: Listener won't start -> NoClassDefFoundError
Thanks, switching to a ServletContextListener resolved the problem. Pid <[EMAIL PROTECTED]> wrote: Mike Peremsky wrote: > If it helps at all I am running on Windows XP. If it's in the webapp directory, that explains it. It's not in the same classloader. You probably want ServletContextListener, rather than a LifecycleListener. The latter is a Tomcat interface, rather than a Servlet spec definition - which would be more useful to you. Lifecycle is server related as opposed to application. You'll need to add a attribute to your web.xml to make it work. p > Mike Peremsky wrote: > > > Pid wrote: Rashmi Rubdi wrote: >> Hi Mike, >> >> Someone has posted a solution to the new error you're getting: >> http://mail-archives.apache.org/mod_mbox/tomcat-users/200512.mbox/[EMAIL >> PROTECTED] >> >> >> their solution was under: >> >> 6. Edited Tomcat 'server.xml' (in the 'conf' folder). Removed the line: >> > > > This only disables APR usage. Using APR is an improvement in most > cases, as it permits Tomcat to take advantage of native library code. > This solution won't solve the problem below. > > This just produced an additional error in the catalina log file: > > Apr 23, 2007 9:39:50 AM org.apache.catalina.core.StandardContext start > SEVERE: Error listenerStart > Apr 23, 2007 9:39:50 AM org.apache.catalina.core.StandardContext start > SEVERE: Context [/fs] startup failed due to previous errors > > >> On 4/22/07, Mike Peremsky wrote: >>> OK, I just reinstalled Tomcat 5.5.23 to resolve an issue with Tomcat >>> starting up. Now I have an issue with my listener not starting up. The >>> class in question LifecycleListener exists in the >>> %CATALINA_HOME%\server\lib\catalina.jar file. Do I need to set a >>> switch or something when calling startup.bat or setting something else >>> to use listeners? Why would it have an issue loading/finding >>> catalina.jar? There are no other error messages in my log file. > > > Where is the jar with com.sf.listener.SingletonLoader? > If it's not in server/lib (with catalina.jar) it won't share the right > classloader, and thus is unable to 'see' the interface class. > > What function does it perform in your web application? > > > This is not an additional jar file. It is a class in my webapp directory. > It's purpose is to load all the singletons for my application at application > startup. So that there is no visible delay at code execution time while data > is loaded from the database. > > > > > >>> Apr 22, 2007 10:31:32 PM org.apache.catalina.core.StandardContext >>> listenerStart >>> SEVERE: Error configuring application listener of class >>> com.sf.listener.SingletonLoader >>> java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener >>> at java.lang.ClassLoader.defineClass1(Native Method) >>> at java.lang.ClassLoader.defineClass(ClassLoader.java:620) >>> at >>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >>> at >>> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847) >>> >>> >>> at >>> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873) >>> >>> >>> >>> >>> The messages in the catalina.2007-04-22.log file are: >>> >>> Apr 22, 2007 10:31:31 PM >>> org.apache.catalina.core.AprLifecycleListener lifecycleEvent >>> INFO: The Apache Tomcat Native library which allows optimal >>> performance in production environments was not found on the >>> java.library.path: >>> c:\java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program >>> Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROGRA~1\CA\ETRUST~1;C:\Program >>> >>> Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\IDM >>> Computer >>> Solutions\UltraEdit-32;c:\java\jdk1.5.0_11\bin;c:\ant\bin;c:\apache-tomcat-5.5.23\bin >>> >>> >>> Apr 22, 2007 10:31:31 PM org.apache.coyote.http11.Http11BaseProtocol init >>> INFO: Initializing Coyote HTTP/1.1 on http-8080 >>> Apr 22, 2007 10:31:31 PM org.apache.catalina.startup.Catalina load >>> INFO: Initialization processed in 625 ms >>> Apr 22, 2007 10:31:31 PM org.apache.catalina.core.StandardService start >>> INFO: Starting service Catalina >>> Apr 22, 2007 10:31:31 PM org.apache.catalina.core.StandardEngine start >>> INFO: Starting Servlet Engine: Apache Tomcat/5.5.23 >>> Apr 22, 2007 10:31:31 PM org.apache.catalina.core.StandardHost start >>> INFO: XML validation disabled >>> Apr 22, 2007 10:31:32 PM org.apache.catalina.core.StandardContext start >>> SEVERE: Error listenerStart >>> Apr 22, 2007 10:31:32 PApr 22, 2007 10:31:32 PM >>> org.apache.catalina.core.StandardContext start >>> SEVERE: Context [/fs] startup failed due to previous errors >>> M org.apache.coyote.http11.Http11BaseProtocol start >>> INFO: Starting Coyote HTTP/1.1 on http-8080 >>> Apr 22, 2007 10:31:32 PM org.apache.jk.common.ChannelSocket init >>> INFO: JK: ajp13 lis
Re: charset encoding bug
Thanks Rashmi for clearing that up. I will try to get spring to stop setting the Locale. >Christopher writes > The character set has to be chosen at some point. It > looks like what you are suggesting is that you want > to actually report an incorrect character set (or > none, which is just as bad) to the client. Also according to section 3.2 of http://www.ietf.org/rfc/rfc3023.txt, [SNIP] On the other hand, it has been argued that the charset parameter should be omitted and the mechanism described in Appendix F of [XML] (which is non-normative) should be solely relied on. This approach would allow users to avoid configuration of the charset parameter; an XML document stored in a file is likely to contain a correct encoding declaration or BOM (if necessary), since the operating system does not typically provide charset information for files. If users would like to rely on the encoding declaration or BOM and to hide charset information from protocols, they may determine not to use the parameter. [/SNIP] This is the approach I generally prefer to use, passing the xml parsing/serializing library streams rather than readers/writers, and letting the library deal with the character encoding issues. For this we need to use a content type of application/xml. In our app, the problem isn't limited to xml files. We are also serving application/zip;charset= which is a bit odd. Sean __ 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 UserDB in MySQL
Add a realm under the section. You'll need to copy the correct MySQL JDBC driver (http://dev.mysql.com/downloads/connector/j/5.0.html) to the tomcat_home\common\lib directory. Replace the "test" in localhost:3306/test with you database name. I've got it running on Tomcat 5.5.23 and MySQL 5.1. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 4:26 PM To: Tomcat Users List Subject: Tomcat UserDB in MySQL I want to replace the "tomcat-users.xml" with two tables in MySQL: Database : auth table users :username varchar(15) primary key NN pass varchar(41) NN table roles : username varchar(15) primary key NN role varchar(10) NN Tried the solution from thread "[SOLVED] :) user authetication on MySql db issue need some help!" from the list, but still doesn´t work. Are there any more changes I have to make. Do I need to update TC (now using TC 5.0.28) I want to avoid an update, because everything else is running fine, and I made the experience that updates often change this. The TC admintool doesn´t give the possibility to add MySQL userDBs. Thanks - 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 UserDB in MySQL
I want to replace the "tomcat-users.xml" with two tables in MySQL: Database : auth table users :username varchar(15) primary key NN pass varchar(41) NN table roles : username varchar(15) primary key NN role varchar(10) NN Tried the solution from thread "[SOLVED] :) user authetication on MySql db issue need some help!" from the list, but still doesn´t work. Are there any more changes I have to make. Do I need to update TC (now using TC 5.0.28) I want to avoid an update, because everything else is running fine, and I made the experience that updates often change this. The TC admintool doesn´t give the possibility to add MySQL userDBs. Thanks
Re: charset encoding bug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sean, Sean Bridges wrote: > I did a little more digging, and it seems this bug > only appears when the locale is set. My full servlet > code is, > [snip] > arg1.setLocale(arg0.getLocale()); > arg1.setContentType("application/foobar"); > arg1.getOutputStream(). > write(arg1.getContentType().getBytes()); [snip] > In this case the response will be, > > application/foobar;charset=ISO-8859-1 The character set has to be chosen at some point. It looks like what you are suggesting is that you want to actually report an incorrect character set (or none, which is just as bad) to the client. You're right, the encoding can be determined by an XML-aware client at the other end by looking at the BOM or by reading the "encoding" attribute of the XML processing instruction. On the other hand, your Writer must have an encoding set before you can write to it, so you don't have a choice of encodings in the first place. If the encoding of your response is ISO-8859-1, then your XML emitter had better be either using the existing servlet-manager Writer (which already has an encoding, and there is no reason to specify any encoding of any type) or writing bytes to the same output channel using the /same/ encoding as the Writer would have. In either case, the two either match up, or you will have problems. Tomcat is appending the character set that will be used whether you like it or not. If you don't like the character set, then change it. But you can't simply strip the character set off a Writer and then write "UTF-8" in the processing instruction for your XML and expect everything to work out. Why not pick a character set and stick with it everywhere? UTF-8 is usually a good choice. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGLogb9CaO5/Lv0PARAv2TAJ0cqpRuhABCatC9HZv4VFgJNDwPBQCeJI7Q 01zeGLgywCuQ2TwWlsBg7yY= =D60S -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: Memory Leak with Comet
Reich, Matthias wrote: I did a fresh build this morning from the SVN trunk, and I see the memory leak with both NIO and APR connector. Why don't you enable -XX:+HeapDumpOnOutOfMemoryError and send us a link where we can download the HPROF files that get generated. Also send us your config as well when you get the error Filip For each browser I run, I have at most 3 active connections at a time. I think, acually there are at most 2 active connections per browser, because by default both IE and FireFox don't open more than 2 connections to a single server. Thus, if I use 4 browser instances for my test, I have at most 12 (or 8) active connections. Matthias -Original Message- From: Rémy Maucherat [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 4:58 PM To: Tomcat Users List Subject: Re: Memory Leak with Comet On 4/24/07, Reich, Matthias <[EMAIL PROTECTED]> wrote: If memory allocation of Tomcat continues until I see messages like org.apache.coyote.http11.Http11NioProcessor: Error processing request java.lang.OutOfMemoryError: Java heap space There are leaks that have been fixed in the NIO connector, which exist in 6.0.10. Regardless of the amount of waiting events in your queue, each active Comet connection will use resources. There is also at least one relatively recent thread talking about Comet issues. Rémy - 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: Any documentation/example about org.apache.catalina.Comet* ?
Benjamin Larchevêque wrote: Hello, I saw that Tomcat proposes some interfaces to use Comet like Servlet from version 6.x. Even(t) if I get the main idea I was not able to reuse the pseudo code servlet ChatServlet provided on the following page: http://tomcat.apache.org/tomcat-6.0-doc/aio.html I would like to know if someone already used this techno successfully and could give me a link including a valid example or documentation on this topic. My main problem here is that I am never able to display anything in the web page while the connection is open... which is embarrassing in a Comet perspective :( that is mostly because of how your browser works. try writing a java client instead where you control what is displayed. many folks are using comet, hopefully someone else can give you another example Filip Regards, -- Benjamin Larchevêque Ingénieur Etude & Développement Team Trade Paris 43, rue Taitbout 75009 Paris +33 6 1955 6012 [EMAIL PROTECTED] http://www.linkedin.com/in/larcheveque - 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: NullPointerException after approx 3000 comet requests
Sebastiaan van Erk wrote: Hi, I'm running Tomcat 6.0.10 on Linux Ubuntu Feisty on Java 5. I have a CometProcessor which handles a large number of requests in a very short time, and after about 3000 requests I consistently get the following two errors: Apr 18, 2007 12:09:19 PM org.apache.tomcat.util.net.NioEndpoint$Poller events SEVERE: java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint$PollerEvent.run(NioEndpoint.java:1005) at org.apache.tomcat.util.net.NioEndpoint$Poller.events(NioEndpoint.java:1109) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1191) at java.lang.Thread.run(Thread.java:619) Exception in thread "http-8080-43" java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint$Worker.run(NioEndpoint.java:1443) at java.lang.Thread.run(Thread.java:619) Does anybody know how these errors can occur? Can it be a programming error on my part (even though none of my code is in the stack traces). Any hints/suggestions are welcome. If more information is needed I am more than happy to provide it. looks like the NPE is caused because the socket got closed/cancelled before there was a chance to reregister it. In upcoming 6.0.12 you won't get a NPE, there simple wont be anything. One suggestion is to do event.setTimeout on the BEGIN event to a much larger number Filip Regards, Sebastiaan - 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: Regarding the advantages and disadvantages of apache tomcat versus other server formats
Hi Saran, Why did you post this message twice? under different headings : "Ragarding the advantages of Apache tomcat server" -Rashmi - 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: Regarding the advantages and disadvantages of apache tomcat versus other server formats
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Saran, saravanan ragothman wrote: > [We] have plans to move to Oracle application server 10g > in future. but I still insist on tomcat server. Can you tell me some > advantages(and disadvantages, if any) of tomcat server over the > oracle application server 10g, so that we can re-analyse the > situation(if there are more advantages that can be considerable than > we stay with Tomcat server). Apache Tomcat is free (as in beer and as in speech) and open-source. You can modify it yourself if necessary. You can get free support from forums such as this one. Tomcat does not package a lot of things that Oracle will give you out-of-the box. I'm sure that a collection of free and open-source products such as Tomcat+OpenJMS+JBoss(or similar)+other things will give you a similar product offering. Oracle offers this all at once with a nice bow around it (and price tag attached). Oracle support is probably not free. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGLmyM9CaO5/Lv0PARAoFOAKCbEjQnxU/HnXfD69vw511Zl0VEXgCgwQ4u L5snw+XIAorA/5v0ACTJnhE= =NKPD -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: Authenticating to ActiveDirectory from webapp
| From: David Kerber [mailto:[EMAIL PROTECTED] | Sent: Tuesday, 24 April, 2007 13:31 | | Nelson, Tracy M. wrote: | | >Can't you just use the standard Java LDAP classes? Javax.naming.ldap.*, | >javax.naming.directory.* and friends? AD is supposed to be | >LDAPv3-compliant. | > | That was one of the possibilities I saw yesterday during my googling, | but it looked more complex than I was hoping to have to mess with, and I | couldn't find any good sample code. There probably is some, but I | couldn't find it yesterday. If you know of a link to any, I'd | appreciate seeing it! Try these: http://forum.java.sun.com/thread.jspa?threadID=579829&tstart=300 http://java.sun.com/products/jndi/tutorial/ldap/security/gssapi.html http://docs.sun.com/source/817-7644/appC_activedirauth.html http://www.developertutorials.com/tutorials/java/single-sign-on/page6.html You also might want to look at CAS: http://www.ja-sig.org/products/cas/ I found all of these within a couple of minutes with http://www.google.com/search?source=ig&hl=en&q=java+active+directory+login+e xample - The information contained in this message is confidential proprietary property of Nelnet, Inc. and its affiliated companies (Nelnet) and is intended for the recipient only. Any reproduction, forwarding, or copying without the express permission of Nelnet is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this e-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: charset encoding bug
However if you insist on only getting "application/xml" --- it is still achievable (even if the Locale is set), if you perform a HTTP Redirect response.sendRedirect("/p/test81/test81.jsp"); from the Servlet to the JSP instead of a HTTP Forward. -Rashmi - 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: Classloader Concept
... and finally don't forget, that the pathes used by these class loaders are configured in conf/catalina.properties. Luis Rivera schrieb: > Well, that makes sense and I have had no problems using the shared class > loader. I guess I did something wrong when I tried to use the common class > loader for my jni classes. I guess I am light years away from really > knowing > tomcat :) > > --Luis R. > > On 4/24/07, David Smith <[EMAIL PROTECTED]> wrote: >> >> My experience has been the reverse -- shared/lib is usually disabled and >> not working, common/lib is used most of the time. >> >> The difference between the two is common/lib is visible to both tomcat >> internals and the webapps. That's why we put the db drivers in there >> for container managed connection pooling. Shared/lib is only visible >> to the webapps -- tomcat internals can't see or access it. >> >> --David - 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: charset encoding bug
Hi Sean, You are right with the fact that the character set encoding does get appended to the Content-Type header when the Locale is set. However, according to the API docs: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html#setLocale(java.util.Locale) " It also sets the response's character encoding appropriately for the locale, if the character encoding has not been explicitly set using setContentType(java.lang.String) or setCharacterEncoding(java.lang.String), getWriter hasn't been called yet, and the response hasn't been committed yet. If the deployment descriptor contains a locale-encoding-mapping-list element, and that element provides a mapping for the given locale, that mapping is used. Otherwise, the mapping from locale to character encoding is container dependent." So the above is expected behavior and not considered a bug, because Tomcat 5.5.23 complies with Servlet 2.4 specification which is defined in the JavaEE5 API. Here's the code I just tried: package test81; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServlet; import javax.servlet.ServletException; import javax.servlet.RequestDispatcher; import java.io.IOException; import java.util.Locale; public class ContentTypeServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { processRequest(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { processRequest(request, response); } private void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("application/xml"); response.setLocale(Locale.US); RequestDispatcher rd = getServletContext().getRequestDispatcher("/p/test81/test81.jsp"); rd.forward(request,response); //response.sendRedirect("/p/test81/test81.jsp"); } } ~~ <%@ page contentType="application/xml" language="java" %> Get Content type: <%=response.getContentType()%> -Regards Rashmi ~~~ Output: − − − Get Content type: application/xml;charset=ISO-8859-1 -Regards Rashmi - 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: Creating a custom session manager -- SOLVED
Bryan, Thanks so much for sending this a lot earlier. We tried it out and found that we could simplify it a bit for our needs. I've included the source here just in case. What our valve does is just sets the domain on the session cookie, in the request and response. The first time a user comes to our site, they get one session cookie for the full domain (foo.evite.com), and one session cookie for the base domain (.evite.com). Any subsequent requests to xyz.evite.com get the same session id (While the session cookie exists). We needed to do this because we have our own session manager and wanted to keep things separated as much as possible. Any advice or comments are welcome. Thanks, hope this helps, Eric On 1/10/07, Bryan Basham <[EMAIL PROTECTED]> wrote: Oops... I had some bugs in the code. Here's the latest source. -Bryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Learn from the past. Live in the present. Plan for the future. package com.evite.tomcat; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.valves.ValveBase; /** * This class implements a Tomcat request valve and sets the domain on the * session cookie. * * @author Eric Berry */ public class EviteSessionValve extends ValveBase { private static final String JSESSIONID = "JSESSIONID"; private String cookieDomain; /** * An explicit no-arg constructor. */ public EviteSessionValve() { // do nothing } /** * This method Changes the session cookie domain for any requests that come * in containing the replacementDomain. * * This method handles each HTTP request coming through Tomcat as configured * in the server.xml or context.xml or a context-specific configuration file. */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { String sessionId = request.getSession().getId(); Cookie sessionCookie = getCookie(JSESSIONID, request.getCookies()); String replacementDomain = getCookieDomain(); String currentDomain = request.getHeader("host"); // we only want to replace the domain it's an evite.com domain. // this way we won't have to get a new session each time, testing // on localhost, or other internal IPs. boolean relaceDomain = currentDomain.indexOf(replacementDomain) >= 0; if (sessionCookie == null && sessionId != null && !sessionId.equals("")) { sessionCookie = new Cookie(JSESSIONID, sessionId); if(relaceDomain) { sessionCookie.setDomain(replacementDomain); } request.addCookie(sessionCookie); response.addCookie(sessionCookie); } String sessionCookieDomain = sessionCookie.getDomain(); if (relaceDomain && sessionCookieDomain != null && !sessionCookieDomain.equals(replacementDomain)) { sessionCookie.setDomain(replacementDomain); request.addCookie(sessionCookie); response.addCookie(sessionCookie); } getNext().invoke(request, response); } /** * This private method retrieves the cookie specified by the name parameter. * * @param name * @param cookies * @return the named cookie, or null if that cookie was not found */ private Cookie getCookie(String name, Cookie[] cookies) { if (cookies == null) return null; for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals(name)) return cookies[i]; } return null; } public String getCookieDomain() { return cookieDomain; } public void setCookieDomain(String domain) { this.cookieDomain = domain; } }- 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: Ragarding the advantages of Apache tomcat server
On 4/24/07, Ajand Saadat <[EMAIL PROTECTED]> wrote: some disadvantages os oracle AS 1) oracle implementation of JDK i think No, you can run OC4J with a Sun JDK, but... 2) very heavy on your resource specially at startup ..that's for sure. I consulted a while last year at a company that was using OC4J (9.0.4.1 IIRC) and it took *forever* to start up; minutes compared to Tomcat's seconds. And configuration was so clunky and convoluted, at least compared to Tomcat. This organization had tried to upgrade to 10.x before and had such problems with it they just gave up, which left them stuck on the 2.3 servlet spec. Before I left they totally changed their main portal application and no longer needed (their single!) EJB, so accepted my recommendation to move to a clustered Tomcat environment. As already pointed out, there's a substantial saving when you need multiple licenses to cover that kind of config. Better performance for less -- sounds like a slogan :-) FWIW, -- Hassan Schroeder [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: Classloader Concept
Well, that makes sense and I have had no problems using the shared class loader. I guess I did something wrong when I tried to use the common class loader for my jni classes. I guess I am light years away from really knowing tomcat :) --Luis R. On 4/24/07, David Smith <[EMAIL PROTECTED]> wrote: My experience has been the reverse -- shared/lib is usually disabled and not working, common/lib is used most of the time. The difference between the two is common/lib is visible to both tomcat internals and the webapps. That's why we put the db drivers in there for container managed connection pooling. Shared/lib is only visible to the webapps -- tomcat internals can't see or access it. --David Luis Rivera wrote: > Hi, > > Just as a comment. I use the shared classloader by using the shared > folder > to avoid loading multiple times my shared libraries (for jni use). I > am not > sure what is the difference with the common/lib classloader, but it > did not > work when I used that one. > > --Luis R. > > On 4/24/07, David Delbecq <[EMAIL PROTECTED]> wrote: > >> >> Sorry Leon but you are wrong. >> What Thomas looks for is common/lib, not server/lib >> according to >> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html it's >> common/lib that is loaded in common classloader. server/lib is loaded in >> catalina classloader which is not visible for webapps. >> >> >> To answer Thomas, yes, classes in common/lib get loaded only once in >> permgen. The problem of loading classes in common/lib is that they get >> shared. If some webapp call some static setter in JAF or JavaMail (to >> set a resolver of any kind) this one will be used by all running >> webapps. This can lead to curious bugs you might take a lot of time to >> solve. >> >> >> En l'instant précis du 24/04/07 10:42, Leon Rosenberg s'exprimait en ces >> termes: >> > i thinks its server/lib you are looking for (or common/endorsed) but >> > i'm not sure whether java mail has some static fields which will be >> > screwed by sharing them among all apps. >> > >> > leon >> > >> > >> > On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote: >> >> I need some help to the classloader concept of tomcat... (version >> 5.5.) >> >> >> >> Our Tomcat has about 60 webapps running - right now every webapps >> have >> >> in their Web/lib directory the libs for activation and java mail >> (among >> >> other libs). As I understand, right now this libs are 60times loaded >> >> into Permgen - if i will but them into the common/lib of tomcat - >> they >> >> are loaded only once info permgen? Any problem to share >> activation.jar >> >> and mail.jar inside common/lib for all webapps? >> >> >> >> Thanks a lot, >> >> >> >> Thomas >> >> >> >> - >> >> 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: charset encoding bug
Thanks for the reply Rashmi. I did a little more digging, and it seems this bug only appears when the locale is set. My full servlet code is, import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ContentType extends HttpServlet { protected void doGet( HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { arg1.setLocale(arg0.getLocale()); arg1.setContentType("application/foobar"); arg1.getOutputStream(). write(arg1.getContentType().getBytes()); } } In this case the response will be, application/foobar;charset=ISO-8859-1 This is with a fresh install of tomcat 5.5.23 with no other webapps or libraries installed. If I take out the call to setLocale(...) the charset is not appended to the content type. In our webapp, the setLocale(...) method is being called within Spring's DispatcherServlet. I think this is a bug, as setLocale(...) should not modify the content type. Thanks, Sean __ 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: Ragarding the advantages of Apache tomcat server
some advantages in tomcat: 1)It is an open source AS 2)it is a light weight AS (no EJB) 3)it is easily configured with apache and IIS 4)very stable on unix like systems 5)good documentation online 6)java sun complaint 7)doesn't require alot of memory at startup some disadvantages os oracle AS 1) oracle implementation of JDK i think 2) very heavy on your resource specially at startup 3)oracle dependant hope that helps AJ On 4/24/07, David Kerber <[EMAIL PROTECTED]> wrote: I know next to nothing about Oracle app server, but price would be a big difference, since you don't have to pay for Tomcat. saravanan ragothman wrote: > This is Saran doing good as an admin, and I have few questions about > the > Apache Tomcat Server after reading the documentation. In my workplace > we are > using the Tomcat server version 5.0.28 for the web applications(for > reports > and scorecards especially) but have plans to move to Oracle application > server 10g in future. but I still insist on tomcat server. Can you > tell me > some advantages(and disadvantages, if any) of tomcat server over the > oracle > application server 10g, so that we can re-analyse the situation(if > there are > more advantages that can be considerable than we stay with Tomcat > server). > Since Oracle application server 10g is advertised and marketed better > than > Apache Tomcat server, we cannot get into the other side,that is, not > getting > the exact detailed advantages of apache tomcat server. > > It will be great if you take concerns over the number of users using the > appplication and security of the user and application. > > Thanks a lot! > Saran > - 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: Classloader Concept
My experience has been the reverse -- shared/lib is usually disabled and not working, common/lib is used most of the time. The difference between the two is common/lib is visible to both tomcat internals and the webapps. That's why we put the db drivers in there for container managed connection pooling. Shared/lib is only visible to the webapps -- tomcat internals can't see or access it. --David Luis Rivera wrote: Hi, Just as a comment. I use the shared classloader by using the shared folder to avoid loading multiple times my shared libraries (for jni use). I am not sure what is the difference with the common/lib classloader, but it did not work when I used that one. --Luis R. On 4/24/07, David Delbecq <[EMAIL PROTECTED]> wrote: Sorry Leon but you are wrong. What Thomas looks for is common/lib, not server/lib according to http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html it's common/lib that is loaded in common classloader. server/lib is loaded in catalina classloader which is not visible for webapps. To answer Thomas, yes, classes in common/lib get loaded only once in permgen. The problem of loading classes in common/lib is that they get shared. If some webapp call some static setter in JAF or JavaMail (to set a resolver of any kind) this one will be used by all running webapps. This can lead to curious bugs you might take a lot of time to solve. En l'instant précis du 24/04/07 10:42, Leon Rosenberg s'exprimait en ces termes: > i thinks its server/lib you are looking for (or common/endorsed) but > i'm not sure whether java mail has some static fields which will be > screwed by sharing them among all apps. > > leon > > > On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote: >> I need some help to the classloader concept of tomcat... (version 5.5.) >> >> Our Tomcat has about 60 webapps running - right now every webapps have >> in their Web/lib directory the libs for activation and java mail (among >> other libs). As I understand, right now this libs are 60times loaded >> into Permgen - if i will but them into the common/lib of tomcat - they >> are loaded only once info permgen? Any problem to share activation.jar >> and mail.jar inside common/lib for all webapps? >> >> Thanks a lot, >> >> Thomas >> >> - >> 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: Ragarding the advantages of Apache tomcat server
It is my understanding that Tomcat is a reference implementation of a web container, so everything complies to standards. However Oracle might have its own proprietary extensions to the standards. Company sometimes decide to switch between servers for various reasons, during those situations what works on a proprietary extension will no longer work. In other words the app's portability is reduced. But, if the proprietary extensions provide considerable advantage then one might choose that server. Regards -Rashmi - 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: Classloader Concept
common: shared between all webapps and tomcat itself shared: only shared between all webapps Luis Rivera schrieb: > Hi, > > Just as a comment. I use the shared classloader by using the shared folder > to avoid loading multiple times my shared libraries (for jni use). I am not > sure what is the difference with the common/lib classloader, but it did not > work when I used that one. > > --Luis R. - 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: Ragarding the advantages of Apache tomcat server
[EMAIL PROTECTED] wrote: I know next to nothing about Oracle app server, but price would be a big difference, since you don't have to pay for Tomcat. I really can't see any clear general advantage to Oracle's app server. The Only clear advantage I can see is the integration with Oracle if you are using Oracle. Isn't the Oracle app server a full-blown J2EE server, like JBoss? While tomcat has only a subset of that functionality as a servlet container. From that point of view, there's probably a pretty good chance that tomcat will have better performance if you don't need all the extra functionality of the full J2EE spec. saravanan ragothman wrote: This is Saran doing good as an admin, and I have few questions about the Apache Tomcat Server after reading the documentation. In my workplace we are using the Tomcat server version 5.0.28 for the web applications(for reports and scorecards especially) but have plans to move to Oracle application server 10g in future. but I still insist on tomcat server. Can you tell me some advantages(and disadvantages, if any) of tomcat server over the oracle application server 10g, so that we can re-analyse the situation(if there are more advantages that can be considerable than we stay with Tomcat server). Since Oracle application server 10g is advertised and marketed better than Apache Tomcat server, we cannot get into the other side,that is, not getting the exact detailed advantages of apache tomcat server. It will be great if you take concerns over the number of users using the appplication and security of the user and application. Thanks a lot! Saran - 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: Classloader Concept
Hi, Just as a comment. I use the shared classloader by using the shared folder to avoid loading multiple times my shared libraries (for jni use). I am not sure what is the difference with the common/lib classloader, but it did not work when I used that one. --Luis R. On 4/24/07, David Delbecq <[EMAIL PROTECTED]> wrote: Sorry Leon but you are wrong. What Thomas looks for is common/lib, not server/lib according to http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html it's common/lib that is loaded in common classloader. server/lib is loaded in catalina classloader which is not visible for webapps. To answer Thomas, yes, classes in common/lib get loaded only once in permgen. The problem of loading classes in common/lib is that they get shared. If some webapp call some static setter in JAF or JavaMail (to set a resolver of any kind) this one will be used by all running webapps. This can lead to curious bugs you might take a lot of time to solve. En l'instant précis du 24/04/07 10:42, Leon Rosenberg s'exprimait en ces termes: > i thinks its server/lib you are looking for (or common/endorsed) but > i'm not sure whether java mail has some static fields which will be > screwed by sharing them among all apps. > > leon > > > On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote: >> I need some help to the classloader concept of tomcat... (version 5.5.) >> >> Our Tomcat has about 60 webapps running - right now every webapps have >> in their Web/lib directory the libs for activation and java mail (among >> other libs). As I understand, right now this libs are 60times loaded >> into Permgen - if i will but them into the common/lib of tomcat - they >> are loaded only once info permgen? Any problem to share activation.jar >> and mail.jar inside common/lib for all webapps? >> >> Thanks a lot, >> >> Thomas >> >> - >> 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: Ragarding the advantages of Apache tomcat server
> I know next to nothing about Oracle app server, but price would be a big > difference, since you don't have to pay for Tomcat. I really can't see any clear general advantage to Oracle's app server. The Only clear advantage I can see is the integration with Oracle if you are using Oracle. > > > saravanan ragothman wrote: > >> This is Saran doing good as an admin, and I have few questions about >> the >> Apache Tomcat Server after reading the documentation. In my workplace >> we are >> using the Tomcat server version 5.0.28 for the web applications(for >> reports >> and scorecards especially) but have plans to move to Oracle application >> server 10g in future. but I still insist on tomcat server. Can you >> tell me >> some advantages(and disadvantages, if any) of tomcat server over the >> oracle >> application server 10g, so that we can re-analyse the situation(if >> there are >> more advantages that can be considerable than we stay with Tomcat >> server). >> Since Oracle application server 10g is advertised and marketed better >> than >> Apache Tomcat server, we cannot get into the other side,that is, not >> getting >> the exact detailed advantages of apache tomcat server. >> >> It will be great if you take concerns over the number of users using the >> appplication and security of the user and application. >> >> Thanks a lot! >> Saran >> > > > > - > 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: Ragarding the advantages of Apache tomcat server
I know next to nothing about Oracle app server, but price would be a big difference, since you don't have to pay for Tomcat. saravanan ragothman wrote: This is Saran doing good as an admin, and I have few questions about the Apache Tomcat Server after reading the documentation. In my workplace we are using the Tomcat server version 5.0.28 for the web applications(for reports and scorecards especially) but have plans to move to Oracle application server 10g in future. but I still insist on tomcat server. Can you tell me some advantages(and disadvantages, if any) of tomcat server over the oracle application server 10g, so that we can re-analyse the situation(if there are more advantages that can be considerable than we stay with Tomcat server). Since Oracle application server 10g is advertised and marketed better than Apache Tomcat server, we cannot get into the other side,that is, not getting the exact detailed advantages of apache tomcat server. It will be great if you take concerns over the number of users using the appplication and security of the user and application. Thanks a lot! Saran - 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: charset encoding bug
Hi Sean, I made a little mistake w.r.t http://www.ietf.org/rfc/rfc3023.txt , I meant to point to 3.2 Application/xml Registration MIME media type name: application MIME subtype name: xml Mandatory parameters: none Optional parameters: charset Although listed as an optional parameter, the use of the charset parameter is STRONGLY RECOMMENDED, since this information can be used by XML processors to deter... . ~~~ Regards -Rashmi - 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: charset encoding bug
Hi Sean, Thank you for defining the problem. I tried a few variations of code in Servlets and JSPs and was able to get only "application/xml" instead of "application/xml;some character encoding" . The only time I got "application/xml;some character encoding" was when there was a conflicting setting in the JSP page. For example in the following case the character set was appended, because if you notice in the page directive, there's a conflict: <%@ page contentType="text/html;charset=UTF-8" language="java" %> with the explicit response set in the body. ~~ FirstTest.jsp ~~ <%@ page contentType="text/html;charset=UTF-8" language="java" %> Set Content type: <% response.setContentType("application/xml"); %> Get Content type: <%=response.getContentType()%> The output was: - - - Set Content type: Get Content type: application/xml;charset=UTF-8 ~ SecondTest.jsp ~ If I removed all all conflicting content-types and made them uniform as follows: <%@ page contentType="application/xml" language="java" %> Set Content type: <% response.setContentType("application/xml"); response.setLocale(null); %> Get Content type: <%=response.getContentType()%> gives the following output: - - - Set Content type: Get Content type: application/xml However, removing the character set, resulted in an error on Tomcat's console: java.lang.NullPointerException at org.apache.catalina.util.CharsetMapper.getCharset(CharsetMapper.java:106) Researching a little bit on the HTTP Content-Type header lead me to http://www.ietf.org/rfc/rfc3023.txt on page 6 it states: ~~ 3.1 Text/xml Registration MIME media type name: text MIME subtype name: xml Mandatory parameters: none Optional parameters: charset Although listed as an optional parameter, the use of the charset parameter is STRONGLY RECOMMENDED, since this information can be used by XML processors to determine authoritatively the character encoding of the XML MIME entity. The charset parameter can also be used to provide protocol-specific operations, such as charset- based content negotiation in HTTP. "utf-8" [RFC2279] is the recommended value, representing the UTF-8 charset. UTF-8 is supported by all conforming processors of [XML]. ~ The above might explain why Tomcat expects the character set parameter to be appended. -Regards Rashmi - 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: Authenticating to ActiveDirectory from webapp
Nelson, Tracy M. wrote: | From: David Kerber [mailto:[EMAIL PROTECTED] | Sent: Tuesday, 24 April, 2007 10:38 | | What is a good java package that I can use with my webapp to let my | customers authenticate against their active directory installation, from | my Tomcat 5.5.15 webapp? Can't you just use the standard Java LDAP classes? Javax.naming.ldap.*, javax.naming.directory.* and friends? AD is supposed to be LDAPv3-compliant. That was one of the possibilities I saw yesterday during my googling, but it looked more complex than I was hoping to have to mess with, and I couldn't find any good sample code. There probably is some, but I couldn't find it yesterday. If you know of a link to any, I'd appreciate seeing it! Thanks for responding... Dave - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ragarding the advantages of Apache tomcat server
This is Saran doing good as an admin, and I have few questions about the Apache Tomcat Server after reading the documentation. In my workplace we are using the Tomcat server version 5.0.28 for the web applications(for reports and scorecards especially) but have plans to move to Oracle application server 10g in future. but I still insist on tomcat server. Can you tell me some advantages(and disadvantages, if any) of tomcat server over the oracle application server 10g, so that we can re-analyse the situation(if there are more advantages that can be considerable than we stay with Tomcat server). Since Oracle application server 10g is advertised and marketed better than Apache Tomcat server, we cannot get into the other side,that is, not getting the exact detailed advantages of apache tomcat server. It will be great if you take concerns over the number of users using the appplication and security of the user and application. Thanks a lot! Saran
Re: linux + tomcat, some path/link problem
Ha ha boy of boy are you in for some pain... sorry cant help myself. Well yes, you need to convert... because MS just didnt have the decency to ask the linux guys how to do it ;) Heres a little code for you if(rawFileName == null) return ""; if(rawFileName.length() == 0) return ""; String s = rawFileName; s = s.replace('\\','/'); // make it unix compat s = s.trim(); String firstChar = s.substring(0,1); if(firstChar.compareTo("/") != 0){ s = "/" + s; something like that But this is why I'm talking to you have a look at file/// security restrictions on XP and later. They going to get blocked so after all that pain... IE is going to drive you mad ha ha. But I got some good news for you go to http://coolese.100free.com/ and download ESE... it does exactly that... its based on lucene and it allows you to search folders, and or dB's and then navigate the results in a browser. Have a look at how it navigates it doesnt use file/// it turns the directories into a URL and navigates through Tomcat to get around security issues. So yes I'm laughing coz I went through all this pain good luck. - Original Message - From: "Lu Rui" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 24, 2007 6:45 PM Subject: linux + tomcat, some path/link problem hi, all, i'm writing a jsp front-end of a desktop search program in linux using tomcat 5.5, here is my problem. say we need a result.jsp which can display the results from lucene and show the related links, codes like below (hard-coding for simple, as long as you can get my thougt is okay) // for winxp String filePath = new String("c:\\root\\test.html"); // for linux String filePath = new String("/root/test.html"); testlink i've test this page both in winxp and linux. in windows, right-click to check out the property of "testlink" you can see it goes to " file:///c:/root:/test.html " and left-click then the browser will open corresponding page, which is exactly what i've been expecting. but in linux here comes my trouble, i click "testlink" it goes to "404 not found", then i check out its property and find it leads to " http://localhost:8080/root/index.html ", it seems tomcat took " /root " as a subdir of " /tomcat/webapps " and messed things up, totally misunderstood my purpose. as far as i know path is always a confusing problem of tomcat, but in linux "/" stands for root of file system, so i'm clearly using an abusolute path, why tomcat still made such mistake while it works well in windows with " C:\\root\test.html" ? and as mentioned above, this link, actually these links, might go to anywhere in local file system, which makes the trouble more complex, so i don't think setup Context or docBase or relative-path could help much, i really need tomcat to be informed that i'm using abusolute path and i don't care it goes out of web project and that's what i want. plz help me out. thanks. and if what i said make you feel somehow offended, it's not my bad feelings just my bad english.. while ( true ) { help me out; } regards. - 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: Authenticating to ActiveDirectory from webapp
| From: David Kerber [mailto:[EMAIL PROTECTED] | Sent: Tuesday, 24 April, 2007 10:38 | | What is a good java package that I can use with my webapp to let my | customers authenticate against their active directory installation, from | my Tomcat 5.5.15 webapp? Can't you just use the standard Java LDAP classes? Javax.naming.ldap.*, javax.naming.directory.* and friends? AD is supposed to be LDAPv3-compliant. - The information contained in this message is confidential proprietary property of Nelnet, Inc. and its affiliated companies (Nelnet) and is intended for the recipient only. Any reproduction, forwarding, or copying without the express permission of Nelnet is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this e-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: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint?
I'd be glad to write it inside my own, but I figured using the security constraint, you were bound to their classes. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 12:45 PM To: Tomcat Users List Subject: Re: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint? I think you would be better off writing a little authentication code inside your servlets... However if you want to modify tomcat, you'll find that stuff in package org.apache.catalina.authenticator; public class BasicAuthenticator all I wanted to to say is that some browsers like IE do their own thing. Like for example... send this standard challenge to IE repeatedly response.setStatus(response.SC_UNAUTHORIZED); // I.e., 401 response.setHeader("WWW-Authenticate", "BASIC realm=\"User Check\""); and you'll see after a few tries it gives up anyway ;) not much a Tomcat can do to change that - Original Message - From: "Propes, Barry L " <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, April 24, 2007 7:11 PM Subject: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint? Any version? 4x. 5x? I'm actually in the 4.1.3. series, but was wondering which class files I'd need to revise and customize. I assume most if not all are in the /catalina/src/share/org/apache/catalina/ repository, and figured something like Authenticator.java or Session.java might need a method added to it, but wasn't sure what else would need to be done. In other words, whereas in its initial state the security constraint will repeatedly forward/redirect to the Login error page set, I'd like to be able to create a customized method to send to another (secondary) error page, telling the user they've been locked out after 6 consecutive, unsuccessful attempts. Is this at all possible to do in 4.1 or any other version? Any feedback is welcomed. Thanks! Barry - 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: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint?
I think you would be better off writing a little authentication code inside your servlets... However if you want to modify tomcat, you'll find that stuff in package org.apache.catalina.authenticator; public class BasicAuthenticator all I wanted to to say is that some browsers like IE do their own thing. Like for example... send this standard challenge to IE repeatedly response.setStatus(response.SC_UNAUTHORIZED); // I.e., 401 response.setHeader("WWW-Authenticate", "BASIC realm=\"User Check\""); and you'll see after a few tries it gives up anyway ;) not much a Tomcat can do to change that - Original Message - From: "Propes, Barry L " <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, April 24, 2007 7:11 PM Subject: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint? Any version? 4x. 5x? I'm actually in the 4.1.3. series, but was wondering which class files I'd need to revise and customize. I assume most if not all are in the /catalina/src/share/org/apache/catalina/ repository, and figured something like Authenticator.java or Session.java might need a method added to it, but wasn't sure what else would need to be done. In other words, whereas in its initial state the security constraint will repeatedly forward/redirect to the Login error page set, I'd like to be able to create a customized method to send to another (secondary) error page, telling the user they've been locked out after 6 consecutive, unsuccessful attempts. Is this at all possible to do in 4.1 or any other version? Any feedback is welcomed. Thanks! Barry - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
charset encoding bug
Sorry Rashmi, here is the problem without referencing other bugs. There is a problem with HttpServletResponse. If I set the content type of an HttpServletResponse, the charset is also set. For example consider the following code, HttpServletResponse sresp = ... sresp.setContentType("application/xml"); System.out.println(sresp.getContentType()); this will print, application/xml;charset=ISO-8859-1 When I would expect application/xml Tracing through the code, it seems this bug stems from the Response.setLocale(Locale locale) method calling, coyoteResponse.setCharacterEncoding(charset). In the method setCharacterEncoding(String charset), there is the line charsetSet=true; I am using tomcat 5.5.17, jdk 1.5, windows xp. Thanks, Sean __ 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: linux + tomcat, some path/link problem
> From: Lu Rui [mailto:[EMAIL PROTECTED] > Subject: linux + tomcat, some path/link problem > > // for winxp > String filePath = new String("c:\\root\\test.html"); > // for linux > String filePath = new String("/root/test.html"); > > testlink I have not verified the following, but this is what I think is happening. An href is a URI, not a file system path. The URI handler in the Windows JVM detects the "C:" prefix, and forces the protocol for the URI to be "file:", since that's the only scenario in which "C:" makes any sense. No such hints are available on Linux, so the path is returned as is, with no explicit protocol. The HTML RFC requires that such paths be treated as relative to the protocol and server used to present the page in which the href occurs, so the _browser_ (not Tomcat) converts that to "http:///root/test.html". To make the Linux version work like Windows, use an explicit protocol on the path (e.g., "file:///root/test.html". Note also that it's the browser handling the "file:" reference, so I expect your scheme will only work when the client and server are on the same machine. - 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]
anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint?
Any version? 4x. 5x? I'm actually in the 4.1.3. series, but was wondering which class files I'd need to revise and customize. I assume most if not all are in the /catalina/src/share/org/apache/catalina/ repository, and figured something like Authenticator.java or Session.java might need a method added to it, but wasn't sure what else would need to be done. In other words, whereas in its initial state the security constraint will repeatedly forward/redirect to the Login error page set, I'd like to be able to create a customized method to send to another (secondary) error page, telling the user they've been locked out after 6 consecutive, unsuccessful attempts. Is this at all possible to do in 4.1 or any other version? Any feedback is welcomed. Thanks! Barry
RE: linux + tomcat, some path/link problem
I may be completely miss-understanding, but I think this is a browser trick. At least in IE7 when I have c: it assumes file:..., but when I don't have c: it assumes http:... . You will probably need to code file:///root/test.html (I may have the wrong number of / after file:) to get this to work. -Original Message- From: Lu Rui [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 9:46 AM To: users@tomcat.apache.org Subject: linux + tomcat, some path/link problem hi, all, i'm writing a jsp front-end of a desktop search program in linux using tomcat 5.5, here is my problem. say we need a result.jsp which can display the results from lucene and show the related links, codes like below (hard-coding for simple, as long as you can get my thougt is okay) // for winxp String filePath = new String("c:\\root\\test.html"); // for linux String filePath = new String("/root/test.html"); testlink i've test this page both in winxp and linux. in windows, right-click to check out the property of "testlink" you can see it goes to " file:///c:/root:/test.html " and left-click then the browser will open corresponding page, which is exactly what i've been expecting. but in linux here comes my trouble, i click "testlink" it goes to "404 not found", then i check out its property and find it leads to " http://localhost:8080/root/index.html ", it seems tomcat took " /root " as a subdir of " /tomcat/webapps " and messed things up, totally misunderstood my purpose. as far as i know path is always a confusing problem of tomcat, but in linux "/" stands for root of file system, so i'm clearly using an abusolute path, why tomcat still made such mistake while it works well in windows with " C:\\root\test.html" ? and as mentioned above, this link, actually these links, might go to anywhere in local file system, which makes the trouble more complex, so i don't think setup Context or docBase or relative-path could help much, i really need tomcat to be informed that i'm using abusolute path and i don't care it goes out of web project and that's what i want. plz help me out. thanks. and if what i said make you feel somehow offended, it's not my bad feelings just my bad english.. while ( true ) { help me out; } regards. - 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: charset encoding bug
Hi Sean, It's a little difficult IMO to refer to multiple bugs to determine what the problem might be. Please present a small snippet of code relevant to the problem, it makes it more straight forward for us to understand and respond to the problem. If you are looking to set an uniform character encoding across all parts of the web application, then character encoding is configurable as indicated here: http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/index.html -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
linux + tomcat, some path/link problem
hi, all, i'm writing a jsp front-end of a desktop search program in linux using tomcat 5.5, here is my problem. say we need a result.jsp which can display the results from lucene and show the related links, codes like below (hard-coding for simple, as long as you can get my thougt is okay) // for winxp String filePath = new String("c:\\root\\test.html"); // for linux String filePath = new String("/root/test.html"); testlink i've test this page both in winxp and linux. in windows, right-click to check out the property of "testlink" you can see it goes to " file:///c:/root:/test.html " and left-click then the browser will open corresponding page, which is exactly what i've been expecting. but in linux here comes my trouble, i click "testlink" it goes to "404 not found", then i check out its property and find it leads to " http://localhost:8080/root/index.html ", it seems tomcat took " /root " as a subdir of " /tomcat/webapps " and messed things up, totally misunderstood my purpose. as far as i know path is always a confusing problem of tomcat, but in linux "/" stands for root of file system, so i'm clearly using an abusolute path, why tomcat still made such mistake while it works well in windows with " C:\\root\test.html" ? and as mentioned above, this link, actually these links, might go to anywhere in local file system, which makes the trouble more complex, so i don't think setup Context or docBase or relative-path could help much, i really need tomcat to be informed that i'm using abusolute path and i don't care it goes out of web project and that's what i want. plz help me out. thanks. and if what i said make you feel somehow offended, it's not my bad feelings just my bad english.. while ( true ) { help me out; } regards. - 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: http header setting problem in servlet
On 4/24/07, Huseyin Sinecan <[EMAIL PROTECTED]> wrote: Thanks for the answer.. Here is the complete code of doGet method: For clarity, here's my entire adaptation of your code: --- package com.example.test; import javax.servlet.http.*; import javax.servlet.*; import java.io.*; public class Something extends HttpServlet { protected void doGet(HttpServletRequest theRequest, HttpServletResponse theResponse) throws ServletException, IOException { theResponse.reset(); theResponse.resetBuffer(); theResponse.setHeader("Request Version", "HTTP/1.1"); theResponse.setStatus(200); theResponse.setHeader("Date", "Wed, 18 Apr 2007 09:24:04 GMT"); theResponse.setHeader("Server", "Tomcat"); theResponse.addCookie(theRequest.getCookies()[0]); theResponse.setHeader("pragma", "no-cache"); // HTTP 1.0 theResponse.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 theResponse.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // a past date theResponse.setDateHeader("Last-Modified", (new java.util.Date()).getTime()); theResponse.setHeader("Connection", "close"); theResponse.setContentType("text/plain"); theResponse.flushBuffer(); String aResponse = "what now?"; PrintWriter aPrintWriter = theResponse.getWriter(); aPrintWriter.write(aResponse); aPrintWriter.flush(); } } --- And here's the result from LiveHTTPHeaders -- hopefully that'll give you something to go on... --- HTTP/1.x 200 OK Date: Tue, 24 Apr 2007 16:32:06 GMT Server: foo/bar <= ignore, that's my own setting on the Connector Set-Cookie: JSESSIONID=746B06EB8432B81A63CBA04725E2F131 Pragma: no-cache Cache-Control: no-cache Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: Tue, 24 Apr 2007 16:32:06 GMT Connection: close Content-Type: text/plain Transfer-Encoding: chunked --- HTH! -- Hassan Schroeder [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: Problem with compiling tomcat native
That's right, debian 4 comes with 3.x and debian comes with 2.x. *Where it worked (deb 3.1r3):* Last login: Tue Apr 24 16:43:54 2007 from x.y.z.w [EMAIL PROTECTED]:~$ bash -version *GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc.* *Where it didn't work (debian 4)* [EMAIL PROTECTED]'s password: Last login: Tue Apr 24 16:40:17 2007 from x.y.z.w Linux vserv-deb 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 vserv-deb:~# bash -version *GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. * I guess is debugging until I found out what changed. Orlando On 4/24/07, Fargusson.Alan <[EMAIL PROTECTED]> wrote: This look right to me, in that /bin/sh is actually bash. So I don't understand why it doesn't work. Perhaps there is some incompatibility in different versions of bash. Is it possible that this work in bash 2.x and not in bash 3.x? Perhaps you can do a "bash -version" on a system ware the configure works, and on a system ware it does not work just to see if they use different versions of bash. -Original Message- From: Orlando Reis [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 8:29 AM To: Tomcat Users List Subject: Re: Problem with compiling tomcat native I am almost sure you are right about the problem, it is a shell problem. I will try having a look at this later but for now I don't have any clues to what might be causing this, I'm going try make some debugging of the script. vserv-deb:~# locate sh|grep bin|grep -v runner|grep -v locale|grep -v icons|grep -v man|grep -v ice|grep -v share|grep -v jdk|grep -v apache|grep -v ssh|grep -v sha|grep -v gnome /bin/bash /bin/rbash -> bash /bin/sh -> bash /sbin/shutdown /usr/bin/bashbug /usr/bin/btcflash /usr/bin/chsh /usr/bin/c_rehash /usr/bin/debconf-show /usr/bin/dpkg-shlibdeps /usr/bin/gettext.sh /usr/bin/instmodsh /usr/bin/omshell /usr/bin/rsh -> ssh /usr/bin/showcfont /usr/bin/showfont /usr/bin/showkey /usr/bin/showrgb /usr/bin/shred /usr/bin/tclsh /usr/bin/tclsh8.4 /usr/bin/xrefresh /usr/local/build/httpd-2.2.4/build/binbuild.sh /usr/local/build/httpd-2.2.4/build/install-bindist.sh.in /usr/sbin/add-shell /usr/sbin/ownership /usr/sbin/remove-shell /var/lib/dpkg/info/binutils.shlibs /var/lib/dpkg/info/libbind9- 0.shlibs A more verbose output of the error: vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# ./configure --with-java-home=$JAVA_HOME --with-apr=/usr/local/apr-httpd checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.10 checking for chosen layout... tcnative checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/local/java.1.6 checking Java platform... checking Java platform... checking for sablevm... NONE adding "-I/usr/local/java.1.6/include" to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding "-I/usr/local/java.1.6/include/linux" to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to "-lssl -lcrypto" adding "-DHAVE_OPENSSL" to CFLAGS setting TCNATIVE_LIBS to "" setting TCNATIVE_LIBS to " /usr/local/apr-httpd/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl" ./configure: line 4280: APR_INCLUDES: command not found ./configure: line 4281: APR_LIBS: command not found ./configure: line 4282: APR_LIB_TARGET: command not found ./configure: line 4283: APR_SO_EXT: command not found ./configure: line 4284: BASH: command not found ./configure: line 4285: BASH_ARGC: command not found ./configure: line 4286: BASH_ARGV: command not found ./configure: line 4287: BASH_LINENO: command not found ./configure: line 4288: BASH_SOURCE: command not found ./configure: line 4289: BASH_VERSINFO: command not found ./configure: line 4290: BASH_VERSION: command not found ./configure: line 4291: CC: command not found ./configure: line 4292: CFLAGS: command not found ./configure: line 4293: CPP: command not found ./configure: line 4294: DIRSTACK: command not found ./configure: line 4295: DUALCASE: command not found ./configure: line 4296: ECHO_C: command not found ./configure: line 4297: ECHO_N: command not found ./co
Re: Stable versions of Tomcat/JDK
Hi Will, Please only reply to the list. I chose to install from the ZIP file on Windows XP, but some install the Windows Service. If you are using tools like Apache Ant along with Tomcat then it is advisable to install it to a directory that doesn't have spaces , for example C:\dev\tomcat\ is less trouble compared with C:\Program Files\Tomcat\ -Rashmi On 4/24/07, Will Holmes <[EMAIL PROTECTED]> wrote: Rashmi, Do you use Windows? If so are you running Tomcat as a Windows Service? Thanks Will -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 5:53 PM To: Tomcat Users List Subject: Re: Stable versions of Tomcat/JDK I use the current latest released (non-beta) version 6.0.10 with the latest JDK --- 1.6.0 - it has been quite stable from my experience so far. Please note that the directory structure in 6.x has changed to a smaller, simpler structure. I was successfully able to upgrade my web applications from 5.5.x to 6.x. -Rashmi On 4/23/07, Will Holmes <[EMAIL PROTECTED]> wrote: > We are looking to upgrade our versions of Tomcat and JDK. What versions > would you recommend? We are currently on Tomcat version 5.0.28 and JDK > version 1.4.11. > > Thanks! > > Will Holmes > Programmer Analyst > Fremont Insurance Company > Ph: 231-924-0302 Ext. 145 > 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: Comet question. Problem reading from http input stream
On 4/24/07, Martin Perez <[EMAIL PROTECTED]> wrote: Hi Rémy, Actually, without using Object*Stream everything seems to work. I'm currently using raw I/O streams and the communication is ok. I guess people on the list would be interesting to know that currently doesn't work with Object*Streams, either when Object*Streams are not specially famous for being a great implementation. It is maybe possible that the streams would want a certain amount of data at once to process it correctly ? I don't remember a known issue about that, but as with Java2D, I would recommend not directly using these "streams" on top of the Servlet API provided streams. Rémy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
charset encoding bug
Hello, I originally posted this as a comment to bug 32499, (http://issues.apache.org/bugzilla/show_bug.cgi?id=32499), and was told to send it to the users mailing list. Bug 32499 was marked as a duplicate of 24970, but it is not a duplicate. Bug 24970 was marked as wont fix, which is appropriate. The justification for 24970 being won't fix is in comment #24 on bug 24970 which reads, "The servlet spec expert group has decided that all Servlets that use a Writer (and this includes all JSPs) must include a charset in the 2.4 servlet spec. Since Tomcat 4 uses the same connectors as Tomcat 5, and Tomcat 5 must set the charset, this will certainly not be fixed." However the code for bug 32499 does not use a servlet or a JSP. As a test, execute this code in a servlet using Tomcat 5.5.17, HttpServletResponse sresp = ... sresp.setContentType("application/xml"); System.out.println(sresp.getContentType()); this will print, application/xml;charset=ISO-8859-1 This bug makes serving xml files particularly difficult as the charset may be set in the xml declaration , or by the first several bytes of the xml file. Often when serving xml, you want to set the mime type as application/xml, and let the client parser determine the charset from the file contents. Tracing through the code, it seems this bug stems from the Response.setLocale(Locale locale) method calling, coyoteResponse.setCharacterEncoding(charset). In the method setCharacterEncoding(String charset), there is the line charsetSet=true; Thanks, Sean __ 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: Comet question. Problem reading from http input stream
Hi Rémy, Actually, without using Object*Stream everything seems to work. I'm currently using raw I/O streams and the communication is ok. I guess people on the list would be interesting to know that currently doesn't work with Object*Streams, either when Object*Streams are not specially famous for being a great implementation. Regards, Martin On 4/24/07, Rémy Maucherat <[EMAIL PROTECTED]> wrote: On 4/23/07, Martin Perez <[EMAIL PROTECTED]> wrote: > Any suggestions? I would try to avoid using directly Object*Stream, to see what happens, and verify the validity of the data which is sent and received. Rémy - 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 with compiling tomcat native
This look right to me, in that /bin/sh is actually bash. So I don't understand why it doesn't work. Perhaps there is some incompatibility in different versions of bash. Is it possible that this work in bash 2.x and not in bash 3.x? Perhaps you can do a "bash -version" on a system ware the configure works, and on a system ware it does not work just to see if they use different versions of bash. -Original Message- From: Orlando Reis [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 8:29 AM To: Tomcat Users List Subject: Re: Problem with compiling tomcat native I am almost sure you are right about the problem, it is a shell problem. I will try having a look at this later but for now I don't have any clues to what might be causing this, I'm going try make some debugging of the script. vserv-deb:~# locate sh|grep bin|grep -v runner|grep -v locale|grep -v icons|grep -v man|grep -v ice|grep -v share|grep -v jdk|grep -v apache|grep -v ssh|grep -v sha|grep -v gnome /bin/bash /bin/rbash -> bash /bin/sh -> bash /sbin/shutdown /usr/bin/bashbug /usr/bin/btcflash /usr/bin/chsh /usr/bin/c_rehash /usr/bin/debconf-show /usr/bin/dpkg-shlibdeps /usr/bin/gettext.sh /usr/bin/instmodsh /usr/bin/omshell /usr/bin/rsh -> ssh /usr/bin/showcfont /usr/bin/showfont /usr/bin/showkey /usr/bin/showrgb /usr/bin/shred /usr/bin/tclsh /usr/bin/tclsh8.4 /usr/bin/xrefresh /usr/local/build/httpd-2.2.4/build/binbuild.sh /usr/local/build/httpd-2.2.4/build/install-bindist.sh.in /usr/sbin/add-shell /usr/sbin/ownership /usr/sbin/remove-shell /var/lib/dpkg/info/binutils.shlibs /var/lib/dpkg/info/libbind9-0.shlibs A more verbose output of the error: vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# ./configure --with-java-home=$JAVA_HOME --with-apr=/usr/local/apr-httpd checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.10 checking for chosen layout... tcnative checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/local/java.1.6 checking Java platform... checking Java platform... checking for sablevm... NONE adding "-I/usr/local/java.1.6/include" to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding "-I/usr/local/java.1.6/include/linux" to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to "-lssl -lcrypto" adding "-DHAVE_OPENSSL" to CFLAGS setting TCNATIVE_LIBS to "" setting TCNATIVE_LIBS to " /usr/local/apr-httpd/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl" ./configure: line 4280: APR_INCLUDES: command not found ./configure: line 4281: APR_LIBS: command not found ./configure: line 4282: APR_LIB_TARGET: command not found ./configure: line 4283: APR_SO_EXT: command not found ./configure: line 4284: BASH: command not found ./configure: line 4285: BASH_ARGC: command not found ./configure: line 4286: BASH_ARGV: command not found ./configure: line 4287: BASH_LINENO: command not found ./configure: line 4288: BASH_SOURCE: command not found ./configure: line 4289: BASH_VERSINFO: command not found ./configure: line 4290: BASH_VERSION: command not found ./configure: line 4291: CC: command not found ./configure: line 4292: CFLAGS: command not found ./configure: line 4293: CPP: command not found ./configure: line 4294: DIRSTACK: command not found ./configure: line 4295: DUALCASE: command not found ./configure: line 4296: ECHO_C: command not found ./configure: line 4297: ECHO_N: command not found ./configure: line 4298: ECHO_T: command not found ./configure: line 4299: EUID: command not found ./configure: line 4300: EXEEXT: command not found ./configure: line 4301: EXTRA_OS_LINK: command not found ./configure: line 4302: GCC: command not found ./configure: line 4303: GROUPS: command not found ./configure: line 4304: HOME: command not found ./configure: line 4305: HOSTNAME: command not found ./configure: line 4306: HOSTTYPE: command not found ./configure: line 4307: IFS: command not found ./configure: line 4308: INCLUDE_OUTPUTS: command not found ./configure: line 4309: INCLUDE_RULES: command not found ./configure: line 4310: INSTALL: command not found ./configure: line 4311: INSTALL_DATA: command not fo
Re: Memory Leak with Comet
On 4/24/07, Reich, Matthias <[EMAIL PROTECTED]> wrote: I did a fresh build this morning from the SVN trunk, and I see the memory leak with both NIO and APR connector. For each browser I run, I have at most 3 active connections at a time. I think, acually there are at most 2 active connections per browser, because by default both IE and FireFox don't open more than 2 connections to a single server. Thus, if I use 4 browser instances for my test, I have at most 12 (or 8) active connections. I have trouble believing that. I think the resources associated with the connections are never released by Tomcat, causing the problem. However, since it works for me, you'll have to look a bit further to find out why, Rémy - 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: http header setting problem in servlet
Hello, Thanks for the answer.. Here is the complete code of doGet method: protected void doGet(HttpServletRequest theRequest, HttpServletResponse theResponse) throws ServletException, IOException { theResponse.reset(); theResponse.resetBuffer(); theResponse.setHeader("Request Version", "HTTP/1.1"); theResponse.setStatus(200); theResponse.setHeader("Date", "Wed, 18 Apr 2007 09:24:04 GMT"); theResponse.setHeader("Server", "Tomcat"); theResponse.addCookie(theRequest.getCookies()[0]); //theResponse.setHeader("Set-Cookie", "JSESSIONID=FixForBuggyProxy;Version=1;Discard;Path=\"/\""); // HTTP 1.1 theResponse.setHeader("pragma", "no-cache"); // HTTP 1.0 theResponse.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 theResponse.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // a past date theResponse.setDateHeader("Last-Modified", (new java.util.Date()).getTime()); //theResponse.setHeader("Set-Cookie2", "JSESSIONID=ForBuggyCachingProxies;Path=\"/\""); // HTTP 1.1 theResponse.setHeader("Connection", "close"); theResponse.setContentType("text/plain"); theResponse.flushBuffer(); String aResponse = ""; try { RequestProcessor aRequestProcessor = new RequestProcessor(); aResponse = aRequestProcessor.processRequest(theRequest); } catch (InvalidReqException e) { System.out.println("EXCEPTION OCCURED: " + e); } //end of try-catch block catch (Exception ex) { System.out.println(ex); } //theResponse.setContentLength(aResponse.length()); PrintWriter aPrintWriter = theResponse.getWriter(); aPrintWriter.write(aResponse); aPrintWriter.flush(); } //end of doGet method I think I am playing with the correct response... And here is an example communication between the client and my servlet application: *** POST /MmpNg/MmpNgServlet?x=y HTTP/1.1 Cookie: JSESSIONID=FixForBuggyProxy User-Agent: OutlookAddin Host: 192.168.10.77 Content-Length: 163 Cache-Control: no-cache "data coming from client" HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Length: 68 Date: Tue, 24 Apr 2007 17:55:10 GMT "data to be sent to client" *** Would you have any comments on this..? Sth is certainly wrong, but I am not able to see it.. Thanks & Regards Huseyin Sinecan Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 4/24/07, Huseyin Sinecan wrote: > I want to set header parameters of http response in my servlet. Are you sure you're working on the right response object? Perhaps you can post a simple but complete example that fails... I just tried the following file as a JSP: -- <% response.setHeader("HooHaa", "whatever"); response.setHeader("Cache-Control", "no-cache"); %> what now? -- :: and can see the headers are set (using LiveHTTPHeaders). -- Hassan Schroeder [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] - Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos.
Authenticating to ActiveDirectory from webapp
What is a good java package that I can use with my webapp to let my customers authenticate against their active directory installation, from my Tomcat 5.5.15 webapp? Right now, I'm authenticating against my app's built-in database, but that's not very extensible, even though it works ok so far. I did some googling yesterday, and turned up a bunch of possibilities, but many of them looked rather complex, and I couldn't find any comparison of them anywhere, so I'm looking for suggestions on an easy-to-implement package that will work for a small number of users. I don't need something that will handle hundreds or thousands of users; a couple-dozen or so max, and maybe less than that. I also don't need any complex permission checking; basically it's going to be checking whether or not they are a member of a given group. Thanks for any suggestions! Dave - 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 with compiling tomcat native
I am almost sure you are right about the problem, it is a shell problem. I will try having a look at this later but for now I don't have any clues to what might be causing this, I'm going try make some debugging of the script. vserv-deb:~# locate sh|grep bin|grep -v runner|grep -v locale|grep -v icons|grep -v man|grep -v ice|grep -v share|grep -v jdk|grep -v apache|grep -v ssh|grep -v sha|grep -v gnome /bin/bash /bin/rbash -> bash /bin/sh -> bash /sbin/shutdown /usr/bin/bashbug /usr/bin/btcflash /usr/bin/chsh /usr/bin/c_rehash /usr/bin/debconf-show /usr/bin/dpkg-shlibdeps /usr/bin/gettext.sh /usr/bin/instmodsh /usr/bin/omshell /usr/bin/rsh -> ssh /usr/bin/showcfont /usr/bin/showfont /usr/bin/showkey /usr/bin/showrgb /usr/bin/shred /usr/bin/tclsh /usr/bin/tclsh8.4 /usr/bin/xrefresh /usr/local/build/httpd-2.2.4/build/binbuild.sh /usr/local/build/httpd-2.2.4/build/install-bindist.sh.in /usr/sbin/add-shell /usr/sbin/ownership /usr/sbin/remove-shell /var/lib/dpkg/info/binutils.shlibs /var/lib/dpkg/info/libbind9-0.shlibs A more verbose output of the error: vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# ./configure --with-java-home=$JAVA_HOME --with-apr=/usr/local/apr-httpd checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.10 checking for chosen layout... tcnative checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/local/java.1.6 checking Java platform... checking Java platform... checking for sablevm... NONE adding "-I/usr/local/java.1.6/include" to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding "-I/usr/local/java.1.6/include/linux" to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to "-lssl -lcrypto" adding "-DHAVE_OPENSSL" to CFLAGS setting TCNATIVE_LIBS to "" setting TCNATIVE_LIBS to " /usr/local/apr-httpd/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl" ./configure: line 4280: APR_INCLUDES: command not found ./configure: line 4281: APR_LIBS: command not found ./configure: line 4282: APR_LIB_TARGET: command not found ./configure: line 4283: APR_SO_EXT: command not found ./configure: line 4284: BASH: command not found ./configure: line 4285: BASH_ARGC: command not found ./configure: line 4286: BASH_ARGV: command not found ./configure: line 4287: BASH_LINENO: command not found ./configure: line 4288: BASH_SOURCE: command not found ./configure: line 4289: BASH_VERSINFO: command not found ./configure: line 4290: BASH_VERSION: command not found ./configure: line 4291: CC: command not found ./configure: line 4292: CFLAGS: command not found ./configure: line 4293: CPP: command not found ./configure: line 4294: DIRSTACK: command not found ./configure: line 4295: DUALCASE: command not found ./configure: line 4296: ECHO_C: command not found ./configure: line 4297: ECHO_N: command not found ./configure: line 4298: ECHO_T: command not found ./configure: line 4299: EUID: command not found ./configure: line 4300: EXEEXT: command not found ./configure: line 4301: EXTRA_OS_LINK: command not found ./configure: line 4302: GCC: command not found ./configure: line 4303: GROUPS: command not found ./configure: line 4304: HOME: command not found ./configure: line 4305: HOSTNAME: command not found ./configure: line 4306: HOSTTYPE: command not found ./configure: line 4307: IFS: command not found ./configure: line 4308: INCLUDE_OUTPUTS: command not found ./configure: line 4309: INCLUDE_RULES: command not found ./configure: line 4310: INSTALL: command not found ./configure: line 4311: INSTALL_DATA: command not found ./configure: line 4312: INSTALL_PROGRAM: command not found ./configure: line 4313: INSTALL_SCRIPT: command not found ./configure: line 4314: JAVA_HOME: command not found ./configure: line 4315: JAVA_HOME_ENV: command not found ./configure: line 4316: JAVA_INC: command not found ./configure: line 4317: JAVA_OS: command not found ./configure: line 4318: JAVA_PLATFORM: command not found ./configure: line 4319: LANG: command not found ./configure: line 4320: LANGUAGE: command not found ./configure: line 4321: LAYOUT: command not found ./configure: line 4322: LC_ADDRESS: command not found ./c
RE: Memory Leak with Comet
I did a fresh build this morning from the SVN trunk, and I see the memory leak with both NIO and APR connector. For each browser I run, I have at most 3 active connections at a time. I think, acually there are at most 2 active connections per browser, because by default both IE and FireFox don't open more than 2 connections to a single server. Thus, if I use 4 browser instances for my test, I have at most 12 (or 8) active connections. Matthias -Original Message- From: Rémy Maucherat [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 4:58 PM To: Tomcat Users List Subject: Re: Memory Leak with Comet On 4/24/07, Reich, Matthias <[EMAIL PROTECTED]> wrote: > If memory allocation of Tomcat continues until I see messages like > > org.apache.coyote.http11.Http11NioProcessor: Error processing request > java.lang.OutOfMemoryError: Java heap space There are leaks that have been fixed in the NIO connector, which exist in 6.0.10. Regardless of the amount of waiting events in your queue, each active Comet connection will use resources. There is also at least one relatively recent thread talking about Comet issues. Rémy - 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: http header setting problem in servlet
On 4/24/07, Huseyin Sinecan <[EMAIL PROTECTED]> wrote: I want to set header parameters of http response in my servlet. Are you sure you're working on the right response object? Perhaps you can post a simple but complete example that fails... I just tried the following file as a JSP: -- <% response.setHeader("HooHaa", "whatever"); response.setHeader("Cache-Control", "no-cache"); %> what now? -- :: and can see the headers are set (using LiveHTTPHeaders). -- Hassan Schroeder [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: Comet question. Problem reading from http input stream
On 4/23/07, Martin Perez <[EMAIL PROTECTED]> wrote: Any suggestions? I would try to avoid using directly Object*Stream, to see what happens, and verify the validity of the data which is sent and received. Rémy - 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: Memory Leak with Comet
On 4/24/07, Reich, Matthias <[EMAIL PROTECTED]> wrote: If memory allocation of Tomcat continues until I see messages like org.apache.coyote.http11.Http11NioProcessor: Error processing request java.lang.OutOfMemoryError: Java heap space There are leaks that have been fixed in the NIO connector, which exist in 6.0.10. Regardless of the amount of waiting events in your queue, each active Comet connection will use resources. There is also at least one relatively recent thread talking about Comet issues. Rémy - 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 with compiling tomcat native
Ok, I understand your point of view, I've checked it and /bin/sh on debian 4 points to /bin/bash, you might be right, question is, how do I do fix this. When I say you might be right is because there are other scripts in jni/native/build which are bourne shell scripts. Those scripts are called when you do a ./configure vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# ls -l build total 156 -rw-r--r-- 1 root root 26635 2007-04-23 20:21 apr_common.m4 -rwxr-xr-x 1 500 root 2115 2007-01-05 17:33 buildcheck.sh -rwxr-xr-x 1 root root 44208 2007-04-23 20:21 config.guess -rwxr-xr-x 1 root root 32448 2007-04-23 20:21 config.sub -rw-r--r-- 1 root root 6302 2007-04-23 20:21 find_apr.m4 -rwxr-xr-x 1 500 root 1156 2007-01-05 17:33 get-version.sh -rwxr-xr-x 1 root root 2631 2007-04-23 20:21 install.sh -rw-r--r-- 1 500 root 3633 2007-01-05 21:57 lineends.pl -rwxr-xr-x 1 500 root 980 2007-01-05 17:33 mkdir.sh drwxr-xr-x 2 500 root 4096 2007-04-02 07:07 rpm -rw-r--r-- 1 root root 6149 2007-04-23 20:21 rules.mk -rw-r--r-- 1 500 root 10421 2007-04-02 05:51 tcnative.m4 On the other hand, that already happened on debian 3.1 and I was able to build the hole thing on a client: apache(with apr and apr-util)/tomcat-native/tomcat-connector Same versions I'm trying to build now. Orlando Reis On 4/23/07, Fargusson.Alan <[EMAIL PROTECTED]> wrote: I just want to make one point clear: Even when you are using bash, if /bin/sh is linked to some other shell, or is a copy of some other shell, then shell scripts may be run by that other shell, and not bash. I have seen problems due to the order in which packages are installed. It seems that some packages link /bin/sh to the shell contained in that package, so even though bash was the default shell to start with, some other shell ends up replacing it, and fails to run configure scripts. -Original Message- From: Orlando Reis [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 12:06 PM To: Tomcat Users List Subject: Re: Problem with compiling tomcat native Thanks for the reply Alan. I'm using bash, and have used bash in Solaris, Linux (Centos, RHE5, Fedora, Ubuntu). None of those platforms gave me a headache, only Debian 4.0, with Debian 3.1I didn't have a problem. Orlando On 4/23/07, Fargusson.Alan <[EMAIL PROTECTED]> wrote: > > It may be that the configure script depends on the default shell (/bin/sh) > being BASH. Does it work if you do "bash configure"? > > -Original Message- > From: Orlando Reis [mailto:[EMAIL PROTECTED] > Sent: Monday, April 23, 2007 4:25 AM > To: users@tomcat.apache.org > Subject: Problem with compiling tomcat native > > > Hi, I'm having some trouble compiling tomcat-native-1.1.10-src, I've done > this before on several different platforms, but for some reason the > lastest > debian (4.0 etch) is giving me problems. > > vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# sh > buildconf > --with-java-home=$JAVA_HOME --with-apr=/usr/local/build/httpd-2.2.4 > /srclib/apr > > Looking for apr source in /usr/local/build/httpd-2.2.4/srclib/apr > Creating configure ... > Generating 'make' outputs ... > rebuilding rpm spec file > vserv-deb:/usr/local/build/tomcat-native-1.1.10-src/jni/native# > ./configure > --with-java-home=$JAVA_HOME --with-apr=/usr/local/apr-httpd > --with-ssl=/usr/local/openssl > checking build system type... i686-pc-linux-gnu > checking host system type... i686-pc-linux-gnu > checking target system type... i686-pc-linux-gnu > checking for a BSD-compatible install... /usr/bin/install -c > checking for working mkdir -p... yes > Tomcat Native Version: 1.1.10 > checking for chosen layout... tcnative > checking for APR... yes > setting CC to "gcc" > setting CPP to "gcc -E" > checking for a BSD-compatible install... /usr/bin/install -c > checking for JDK location (please wait)... /usr/local/java.1.6 > checking Java platform... checking Java platform... > checking for sablevm... NONE > adding "-I/usr/local/java.1.6/include" to TCNATIVE_PRIV_INCLUDES > checking os_type directory... linux > adding "-I/usr/local/java.1.6/include/linux" to TCNATIVE_PRIV_INCLUDES > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for OpenSSL library... using openssl from /usr/local/openssl/lib > and /usr/local/openssl/include > checking OpenSSL library version... ok > checking for OpenSSL DSA support... yes > adding "-I/usr/local/openssl/include" to TCNATIVE_PRIV_INCLUDES > setting TCNATIVE_LDFLAGS to "-L/usr/local/openssl/lib -lssl -lcrypto" > adding "-DHAVE_OPENSSL" to CFLAGS > setting TCNATIVE_LIBS to "" > sett
RE: How do I create a single jar of tomcat embedded on the Mac?
Caldarale, Charles R wrote: > > > > The jar should have a META-INF/MANIFEST.MF file in it (the names must be > upper case). Within this file, there should be a line declaring the > Main-Class of the application. What does yours have in it? > > - Chuck > > i have included the Main-Class and also included a Class-Path to the jars that i wanted to include. -- View this message in context: http://www.nabble.com/How-do-I-create-a-single-jar-of-tomcat-embedded-on-the-Mac--tf3634310.html#a10161935 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: How do I create a single jar of tomcat embedded on the Mac?
Martin Gainty wrote: > > please display the name of the class which is missing (from > ClassDefNotFound) which should be displayed in either > %CATALINA_HOME%/logs/localhost.-MM-DD.log > %CATALINA_HOME%/logs/stdout_MMDD.log > > M-- > > when i try to run the recentley created jar in the terminal i get the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/Container i could not fin that class in any of the external jars, so downloaded one that had it and included it. and still get the same error. -- View this message in context: http://www.nabble.com/How-do-I-create-a-single-jar-of-tomcat-embedded-on-the-Mac--tf3634310.html#a10161934 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]
Regarding the advantages and disadvantages of apache tomcat versus other server formats
Dear sir/madam, This is Saran doing good as an admin, and I have few questions about the Apache Tomcat Server after reading the documentation. In my workplace we are using the Tomcat server version 5.0.28 for the web applications(for reports and scorecards especially) but have plans to move to Oracle application server 10g in future. but I still insist on tomcat server. Can you tell me some advantages(and disadvantages, if any) of tomcat server over the oracle application server 10g, so that we can re-analyse the situation(if there are more advantages that can be considerable than we stay with Tomcat server). Since Oracle application server 10g is advertised and marketed better than Apache Tomcat server, we cannot get into the other side,that is, not getting the exact detailed advantages of apache tomcat server. It will be great if you take concerns over the number of users using the appplication and security of the user and application. Thanks a lot! Saran
Re: http header setting problem in servlet
I assume you've seen this post on implementing httplib? http://www.ethereal.com/lists/ethereal-users/200512/msg00203.html In the meanwhile Curl implements this feature with curl_setopt http://us2.php.net/curl M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Huseyin Sinecan" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 24, 2007 9:29 AM Subject: http header setting problem in servlet Hello all, I want to set header parameters of http response in my servlet. I set parameters as below: ** theResponse.reset(); theResponse.resetBuffer(); theResponse.setHeader("Request Version", "HTTP/1.1"); theResponse.setStatus(200); theResponse.setHeader("Date", "Wed, 18 Apr 2007 09:24:04 GMT"); theResponse.setHeader("Server", "Tomcat"); theResponse.addCookie(theRequest.getCookies()[0]); theResponse.setHeader("pragma", "no-cache"); // HTTP 1.0 theResponse.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 theResponse.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // a past date theResponse.setDateHeader("Last-Modified", (new java.util.Date()).getTime()); theResponse.setHeader("Connection", "close"); theResponse.setContentType("text/plain"); theResponse.flushBuffer(); //.. //some other things... //.. PrintWriter aPrintWriter = theResponse.getWriter(); aPrintWriter.write("this is the string to be put into the body part of the http packet."); aPrintWriter.flush(); ** However, when I check what I am sending as response (using the ethereal network sniffing tool) I see the result below: *** HTTP/1.1 200 OK\r\n Request Version: HTTP/1.1 Response Code: 200 Server: Apache-Coyote/1.1\r\n Content-Length: 68\r\n Date: Tue, 24 Apr 2007 17:55:10 GMT\r\n \r\n Data (68 bytes) *** I am setting header parameters as it should be.. But it doesn't care about my parameters and Tomcat puts some values that it selects itself.. Would anyone has any idea about what I am doing wrong here..? Thanks & Regards Huseyin Sinecan - Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Leak with Comet
Hello, I am sorry that I did not address the memory leak issue to the users list first, before sending this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=42217 I am aware of the fact that memory allocation occurs in Java progams, and that Tomcat will exploit some resource pools before resources are recycled. I am afraid that I did not consider that I should have been more explicit in my description. If memory allocation of Tomcat continues until I see messages like org.apache.coyote.http11.Http11NioProcessor: Error processing request java.lang.OutOfMemoryError: Java heap space when I run my simple test webapp with JAVA_OPTS=-Xmx512m, this looks for me as if there is a memory leak. Surely, the memory leak could be in my Servlet, and the queue which holds events until they are answered asynchronously is the first candidate to look at in more detail. For this reason, the Servlet logs the size of the queue whenever an element is removed from the queue. I saw that the queue size did not increase over the time, but memory consumption of Tomcat did. Therefore, I am pretty sure that there is either a memory leak in Tomcat or I still don't understand how the Comet interfaces shall be used. If I modify the index page of my webapp in a way that it sends only requests to the 'traditional' servlet, memory does not increase. Also, if it sends requests to the Comet servlet which are answered synchronously, memory consumption is stable. Only if comet requests are answered asynchronously, memory does increase. I did not always wait until I saw the OutOfMemoryError, but the effect is reproducible on my machine. Any opinions about this? Regards, Matthias Reich
http header setting problem in servlet
Hello all, I want to set header parameters of http response in my servlet. I set parameters as below: ** theResponse.reset(); theResponse.resetBuffer(); theResponse.setHeader("Request Version", "HTTP/1.1"); theResponse.setStatus(200); theResponse.setHeader("Date", "Wed, 18 Apr 2007 09:24:04 GMT"); theResponse.setHeader("Server", "Tomcat"); theResponse.addCookie(theRequest.getCookies()[0]); theResponse.setHeader("pragma", "no-cache"); // HTTP 1.0 theResponse.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 theResponse.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // a past date theResponse.setDateHeader("Last-Modified", (new java.util.Date()).getTime()); theResponse.setHeader("Connection", "close"); theResponse.setContentType("text/plain"); theResponse.flushBuffer(); //.. //some other things... //.. PrintWriter aPrintWriter = theResponse.getWriter(); aPrintWriter.write("this is the string to be put into the body part of the http packet."); aPrintWriter.flush(); ** However, when I check what I am sending as response (using the ethereal network sniffing tool) I see the result below: *** HTTP/1.1 200 OK\r\n Request Version: HTTP/1.1 Response Code: 200 Server: Apache-Coyote/1.1\r\n Content-Length: 68\r\n Date: Tue, 24 Apr 2007 17:55:10 GMT\r\n \r\n Data (68 bytes) *** I am setting header parameters as it should be.. But it doesn't care about my parameters and Tomcat puts some values that it selects itself.. Would anyone has any idea about what I am doing wrong here..? Thanks & Regards Huseyin Sinecan - Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos.
Re: SEVERE: Invalid message received with signature
This is an unexpected protocol error between mod_jk and Tomcat. As far as I know, there is no open bug concerning the protocol. Can you reproduce it? Does it only occur during high load? If you can easily reproduce it without high load, set your JkLogLevel to trace and post the full log file for a request that shows the problem. Regards, Rainer Sakke Wiik schrieb: > Recently I've had lots of ajp-errors with Tomcat. Any idea what causes > these?: > > --- > org.apache.coyote.ajp.AjpMessage processHeader > SEVERE: Invalid message received with signature 8224? > --- > > Number after "signature" varies. > > Environment: > Win Server 2003 Standard x64 + Service Pack 1, Intel Xeon 64-bit CPU. > Tomcat:5.5.20 with tomcat5.exe built for win64 processor. > Java: Standard Edition 64-bit (build 1.5.0_11-b03) > > > > cheers, > Sakke - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SEVERE: Invalid message received with signature
Recently I've had lots of ajp-errors with Tomcat. Any idea what causes these?: --- org.apache.coyote.ajp.AjpMessage processHeader SEVERE: Invalid message received with signature 8224? --- Number after "signature" varies. Environment: Win Server 2003 Standard x64 + Service Pack 1, Intel Xeon 64-bit CPU. Tomcat:5.5.20 with tomcat5.exe built for win64 processor. Java: Standard Edition 64-bit (build 1.5.0_11-b03) cheers, Sakke - 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: Imposible set default application out of ROOT environment with TOMCAT-5.5.20?
aordin schrieb: > I'm looking for set my application(jetspeed2 portal) like default into > Tomcat 5.5.20, i find some messages spoken about put the application > into /webapps/ROOT/ and it works but works quite bad because my > application show a lot of problems with Javascript. > Is it possible to specify that my default application in > http://localhost:8080 was /webapps/myApplication/ ? And what problems might that be? > I build one /conf/Catalina/localhost/myApplication.xml and > /conf/Catalina/localhost/ROOT.xml Am I right when I guess that you use absolute paths (i. e. something like "/myApplication/...") to reference your JavaScript files? If so, you should fix those paths. And if you don't have a good reason for using absolute paths, change them to be relative. > You should read http://tomcat.apache.org/tomcat-5.5-doc/config/context.html again. There are few situations where setting "path" or "docBase" is allowed. Regards mks - 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: Listener vs. load-on-startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lizhg, lizhg wrote: > Hi all, I have some problem with Listener and load-on-startup, I search > on google and I find this article below, it do a lot good to me, but I > still want to ask , using the init() [and destroy()] of a servlet > [is the same as] using the > contexInitialized() and the contextDestroyed() of a listener? It is generally considered good form to set up application-wide configuration, objects, etc. in a Listener. For this type of use, you want to use a ServletContextListener specifically (there are other types of listeners). If you have a servlet that needs to configure /itself/, then it's perfectly reasonable to use the servlet's init() method for that purpose. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGLfI09CaO5/Lv0PARAqjuAJ0WX1EaGVf6mun6az6cR6/caXe0twCgqCgh V+Z8d9ig1R2HHbrvy7KfrNU= =zeEl -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: Restrict access to ip/contextpath (Tomcat 4.x)
Peder Larsen wrote: >> If you can provide the functionality is to separate contexts then you >> can you the built-in Tomcat features. > > What do you mean? Nesting contexts? Yes. > Do you have/know of a simple example for this? No. For the nested context, the war needs to be outside your hosts appBase. See http://tomcat.apache.org/tomcat-5.5-doc/config/context.html for how to define nested contexts. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Imposible set default application out of ROOT environment with TOMCAT-5.5.20?
Hi list! I'm looking for set my application(jetspeed2 portal) like default into Tomcat 5.5.20, i find some messages spoken about put the application into /webapps/ROOT/ and it works but works quite bad because my application show a lot of problems with Javascript. Is it possible to specify that my default application in http://localhost:8080 was /webapps/myApplication/ ? I build one /conf/Catalina/localhost/myApplication.xml and /conf/Catalina/localhost/ROOT.xml Thank you very much!! Adolfo. My /conf/Catalina/localhost/myApplication.xml is: userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl" roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl" useContextClassLoader="false" debug="0"/> type="javax.sql.DataSource" username="disid.com" password="myApplication" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/myApplicationDB" maxActive="100" maxIdle="30" maxWait="1"/> className="org.apache.catalina.authenticator.FormAuthenticator" characterEncoding="UTF-8"/> --- My /conf/Catalina/localhost/ROOT.xml: userClassNames="org.apache.jetspeed.security.impl.UserPrincipalImpl" roleClassNames="org.apache.jetspeed.security.impl.RolePrincipalImpl" useContextClassLoader="false" debug="0"/> type="javax.sql.DataSource" username="myApplication" password="myApplication" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/myApplicationDB" maxActive="100" maxIdle="30" maxWait="1"/> className="org.apache.catalina.authenticator.FormAuthenticator" characterEncoding="UTF-8"/> - 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: Restrict access to ip/contextpath (Tomcat 4.x)
If you can provide the functionality is to separate contexts then you can you the built-in Tomcat features. What do you mean? Nesting contexts? Do you have/know of a simple example for this? Peder Peder Larsen wrote: > So i wonder if it is possible to restrict access to not only IP addresses, > but also to certain paths within a webapp. Tomcat does not provide this functionality. You would have to write your own custom code. > If i have a webapp, /thewebapp, and i want to restrict the access to > /thewebapp/admins/ area to certain IPs (only allow subnet in my case), is > that possible? If you can provide the functionality is to separate contexts then you can you the built-in Tomcat features. Mark - 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: Listener vs. load-on-startup
The order of events is: Startup: All listeners get called. All filters, load-on-startup servlets get inited. Shutdown: All filters, servlets get destroyed. All listeners get called. So, it is possible for the combination of load-on-startup init + contextDestroyed to do the same job as just using one ServletContextListener. But why do it? IMO load-on-startup was a hack in the early spec versions so that application data could be set up. ServletContextListener was added as the way forward ;) Regards, Jon lizhg wrote: > Hi all,I have some problem with Listener and load-on-startup,I serch on > google and I find this article below,it do a lot good to me, but I still want > to ask , using the init() of a servlet and the contextDestroyed() of a > listener are equal to Iusing the contexInitialized() and the > contextDestroyed() of a > listener? > > On 9 Nov 2001, Dr. Evil wrote: > >> Date: 9 Nov 2001 07:43:17 - >> From: Dr. Evil <[EMAIL PROTECTED]> >> Reply-To: Tomcat Users List <[EMAIL PROTECTED]> >> To: [EMAIL PROTECTED] >> Subject: API 2.3: Listener vs. load-on-startup >> >> >> I have a few classes that need to be loaded by Tomcat before it starts >> to serve any requests. One of these opens a database pool, another >> opens a logger, etc. The traditional way to do this is with >> load-on-startup like this: >> >> >> startlogging >> startlogging >> 1 >> >> >> which calls the init() method of the class. >> >> However, I need to have an object installed into the ServletContext >> object before any requests can be serviced. The init() method of a >> servlet seems to have no access to the ServletContext object (is this >> correct?). > > You have access to the servlet context via the getServletContext() method > of the servlet -- it is pre-initialized to work for you. However, using a > listener is the better way to do this in a Servlet 2.3 environment. > >> Because of this, I am thinking of using the new >> declaration to achieve this same goal. I can declare a listener like >> this: >> >> >> dostartupstuff >> >> >> and then in the dostartupstuff class, I declare a method: >> >> public void contexInitialized(ServletContextEvent e) { ... } >> >> which will be called as soon as the context is created. >> >> Is this the right way to do this? > > Yes. That is exactly what context listeners are designed to do. > > Why is it better than a servlet init() method? Because the container > gives you *no* guarantee that it will keep a servlet loaded for the > lifetime of the application (although many of them do), so if you clean up > your resources in the destroy() method -- such as closing database > connections -- this might happen to you at a bad time. The > contextDestroyed() method of your listener will not get called until the > application is really being shut down. > >> And is there a way I can control >> the order in which listeners are called? >> > > At startup time, listeners are called in the order they are defined in the > deployment descriptor -- at shutdown time, they are called in reverse > order. For more info, see the 2.3 spec: > > http://java.sun.com/products/servlet/download.html > >> Thanks >> > > Craig > > - 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 does not stop if the deployment fails
Tim Lucia wrote: > You can't, and generally don't want to stop Tomcat (the server) when an > application is mis-configured. Instead, you can stop (mark unavailable) > your application. One way to do this is to throw an exception inside a > ServletContextListener, if it detects wrong values inside the configuration > file: You could call System.exit() in the ServletContextListener rather than throw an exception. Mark - 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: Restrict access to ip/contextpath (Tomcat 4.x)
Peder Larsen wrote: > So i wonder if it is possible to restrict access to not only IP addresses, > but also to certain paths within a webapp. Tomcat does not provide this functionality. You would have to write your own custom code. > If i have a webapp, /thewebapp, and i want to restrict the access to > /thewebapp/admins/ area to certain IPs (only allow subnet in my case), is > that possible? If you can provide the functionality is to separate contexts then you can you the built-in Tomcat features. Mark - 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 http 408 error
Cain Marko wrote: > Will it cause tomcat to send down and error page to client with the error > message? Yes - assuming the client is still there. Mark - 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 does not stop if the deployment fails
You can't, and generally don't want to stop Tomcat (the server) when an application is mis-configured. Instead, you can stop (mark unavailable) your application. One way to do this is to throw an exception inside a ServletContextListener, if it detects wrong values inside the configuration file: SEVERE: Exception sending context initialized event to listener instance of class tim.lucia.ApplicationLifecycleListener java.lang.RuntimeException: Bad Configuration at tim.lucia.ApplicationLifecycleListener.contextInitialized(ApplicationLifecyc leListener.java:24) Tim > -Original Message- > From: padam chhetri [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 24, 2007 2:27 AM > To: users@tomcat.apache.org > Subject: Tomcat does not stop if the deployment fails > > Hi All, > > I need to stop the tomcat gracefully(not manually) if the deployment of my > web application fails. > The scenario is this my web application has configuration file if I > enter the > wrong values in the file then the deployment of my appplication fails but > the Tomcat starts up successfully .But at this point I want Tomcat also to > stop > instead of starting up successfully > Thanks in advance > > > Pam > > > - > Ahhh...imagining that irresistible "new car" smell? > Check outnew cars at Yahoo! Autos. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Webserver after webseal
Hello, My Tomcat webserver will be placed after the WebSeal. The users on the workstations will authenticate on the WebSeal and will then have the possibility to open a web application on the Tomcat server. I want to configure my web application so that the login is done automatically with the same user id as the login on the WebSeal (the userid is forwarded inot the HTTP-header). Furthermore I want to have the web application to authorize the user via an LDAP server to retrieve a certain role for the web application. How must the configuration be done in the server.xml and web.xml ? Best regards, Guido Annaert This e-mail and any attached files are confidential and may contain information which is protected by intellectual property rights. If you are not the addressee named above any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is prohibited. If you have received this transmission in error, please notify the sender immediately and destroy this e-mail. This e-mail does not contain any professional advice and does not constitute an offer regarding any financial, banking, insurance or other product service toward the addressee. If you like to obtain specific information, professional advice, an offer, or want to contract you have to contact the KBC company mentioned above, its branch or agent. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, and shall have no liability for any loss or damage suffered by the user, which arise as a result of e-mail transmission. - 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: Classloader Concept
Sorry Leon but you are wrong. What Thomas looks for is common/lib, not server/lib according to http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html it's common/lib that is loaded in common classloader. server/lib is loaded in catalina classloader which is not visible for webapps. To answer Thomas, yes, classes in common/lib get loaded only once in permgen. The problem of loading classes in common/lib is that they get shared. If some webapp call some static setter in JAF or JavaMail (to set a resolver of any kind) this one will be used by all running webapps. This can lead to curious bugs you might take a lot of time to solve. En l'instant précis du 24/04/07 10:42, Leon Rosenberg s'exprimait en ces termes: > i thinks its server/lib you are looking for (or common/endorsed) but > i'm not sure whether java mail has some static fields which will be > screwed by sharing them among all apps. > > leon > > > On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote: >> I need some help to the classloader concept of tomcat... (version 5.5.) >> >> Our Tomcat has about 60 webapps running - right now every webapps have >> in their Web/lib directory the libs for activation and java mail (among >> other libs). As I understand, right now this libs are 60times loaded >> into Permgen - if i will but them into the common/lib of tomcat - they >> are loaded only once info permgen? Any problem to share activation.jar >> and mail.jar inside common/lib for all webapps? >> >> Thanks a lot, >> >> Thomas >> >> - >> 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]
Restrict access to ip/contextpath (Tomcat 4.x)
Hi, I've been reading the docs and found some info about the use of Remote Address Filter. However, my findings is that it only supports restricting access to a whole webapp to given IP addresses. So i wonder if it is possible to restrict access to not only IP addresses, but also to certain paths within a webapp. Example, If i have a webapp, /thewebapp, and i want to restrict the access to /thewebapp/admins/ area to certain IPs (only allow subnet in my case), is that possible? Thanks, Peder
Re: Classloader Concept
i thinks its server/lib you are looking for (or common/endorsed) but i'm not sure whether java mail has some static fields which will be screwed by sharing them among all apps. leon On 4/24/07, Thomas Papke <[EMAIL PROTECTED]> wrote: I need some help to the classloader concept of tomcat... (version 5.5.) Our Tomcat has about 60 webapps running - right now every webapps have in their Web/lib directory the libs for activation and java mail (among other libs). As I understand, right now this libs are 60times loaded into Permgen - if i will but them into the common/lib of tomcat - they are loaded only once info permgen? Any problem to share activation.jar and mail.jar inside common/lib for all webapps? Thanks a lot, Thomas - 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: tomcat process getting killed... Please Help...
We are using Tomcat version 5.5.12 and JDK 1.4.2_12-b03 Just a shot from the hip, but I guess, that's you're problem. Tomcat 5.5 need JDK 1.5 and up, or you'll have to download and install the JDK 1.4 Compatability Package from http://tomcat.apache.org/download-55.cgi Cheers Greg -- 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]
Classloader Concept
I need some help to the classloader concept of tomcat... (version 5.5.) Our Tomcat has about 60 webapps running - right now every webapps have in their Web/lib directory the libs for activation and java mail (among other libs). As I understand, right now this libs are 60times loaded into Permgen - if i will but them into the common/lib of tomcat - they are loaded only once info permgen? Any problem to share activation.jar and mail.jar inside common/lib for all webapps? Thanks a lot, Thomas - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]