RE: Installing the MySql jdbc driver on XP?
Use mysql connector for your jdbc connections and place the jar in the $CATALINA_HOME/common/lib. In terms of using it in your lightweight code, you will have to describe your development practices... are you using an IDE? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing the MySql jdbc driver on XP?
If your using eclipse just place the mysql connector jar in your projects jar list... there are many examples of using DriverManager... search the web. Sorry I cant be of more help but my code uses connection pooling and you need to find and understand the use of DriverManager in its most basic form. Original Message Follows From: "John Najarian" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Subject: RE: Installing the MySql jdbc driver on XP? Date: Thu, 23 Sep 2004 14:12:10 -0700 Thanks Filip, I wanted to configure it to use a Driver Manager also. What I've been having a ton of trouble with is configuring Eclipse. I've downloaded some plugins but the 2nd one I ried to install should have been the 3rd. After knocking that around for a while I found a site which had the missing 2nd plugin and how to... But downloading plugin is taking forever. -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 1:45 PM To: Tomcat Users List Subject: Re: Installing the MySql jdbc driver on XP? there is nothing to do when installing a JDBC driver, especially if it is a type 4. Just copy the JAR file to WEB-INF/lib if you want to use the driver within your webapps, or just add the JAR to your CLASSPATH if you want to run it standalone look for JDBC tutorials Filip - Original Message - From: "John Najarian" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Thursday, September 23, 2004 10:11 AM Subject: Installing the MySql jdbc driver on XP? I am trying to install the JDBC driver on an XP box to use it with a driver manager in Tomcat and to use it as stand alone for simple tests. I find the MySql installation documentation fragmented and difficult to follow. Any ideas would be appreciated. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Securing directory: httpd vs tomcat configuration
Hi I need to secure two directories with a user name and password prompt. Just one is fine at the moment. I know I can do this using httpd but I was wondering if there was a better solution for Tomcat (5), i.e. by configuring something in the server config or web.xml. If anyone has a solution I would be really appreciative. Thanks. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Blank Page when using http://192.168.1.100/
Are you using a router? Original Message Follows From: "Ted Anagnost" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Blank Page when using http://192.168.1.100/ Date: Wed, 1 Dec 2004 00:26:51 -0600 http://localhost/ works http://127.0.0.1/ works http://192.168.1.100/mysite/ works 192.168.1.100 is my internal IP http://192.168.1.100/ displays a BLANK PAGE 1. Why does it display a blank page when using http://192.168.1.100/ 2. What is the proper way to make all of these redirect to 'mysite'? Tomcat 5.0.28 server.xml has: 192.168.1.100 127.0.0.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Blank Page when using http://192.168.1.100/
I woud like to give you an answer but I experienced similar problems accessing my localhost via IP when using a router. Just thought I would give you an area to look at i.e. I don't think its your Tomcat instance. Original Message Follows From: "Ted Anagnost" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Subject: Re: Blank Page when using http://192.168.1.100/ Date: Wed, 1 Dec 2004 01:36:47 -0600 Yes - Original Message - From: "Mark Benussi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 01, 2004 1:34 AM Subject: RE: Blank Page when using http://192.168.1.100/ Are you using a router? Original Message Follows From: "Ted Anagnost" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Blank Page when using http://192.168.1.100/ Date: Wed, 1 Dec 2004 00:26:51 -0600 http://localhost/ works http://127.0.0.1/ works http://192.168.1.100/mysite/ works 192.168.1.100 is my internal IP http://192.168.1.100/ displays a BLANK PAGE 1. Why does it display a blank page when using http://192.168.1.100/ 2. What is the proper way to make all of these redirect to 'mysite'? Tomcat 5.0.28 server.xml has: 192.168.1.100 127.0.0.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpSessionListener Interface - Mail Archive not working so apologies for repost
I am sure this has ben tackled by somebody before. In my web.xml I have Site helpers.SessionHelper My SessionHelper class implements HttpSessionListener and in my local test environment it works fine. But on my Tomcat I get zilch nowt yadda. Any thoughts? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive not working soapologies for repost
Sorry what I mean is that the methods implemented for the HttpSessionListener do not get called when I invoke a new session. Original Message Follows From: Ben Souther <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Tomcat Users List <[EMAIL PROTECTED]> Subject: Re: HttpSessionListener Interface - Mail Archive not working soapologies for repost Date: Wed, 08 Dec 2004 05:53:06 -0500 > My SessionHelper class implements HttpSessionListener and in my local test > environment it works fine. But on my Tomcat I get zilch nowt yadda. > What do you mean when you say you get nothing on Tomcat? What are you trying to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost
Hi Ben, I have not extended httpservlet, I don't see why I would have to do this? package helpers; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class SessionHelper implements HttpSessionListener { public void sessionCreated(HttpSessionEvent sessionEvent) { int x = 1; // Not called } public void sessionDestroyed(HttpSessionEvent sessionEvent) { int x = 2; // Not called } } Original Message Follows From: Ben Souther <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Tomcat Users List <[EMAIL PROTECTED]> Subject: Re: HttpSessionListener Interface - Mail Archive not workingsoapologies for repost Date: Wed, 08 Dec 2004 06:11:51 -0500 > Sorry what I mean is that the methods implemented for the > HttpSessionListener do not get called when I invoke a new session. You've extended HttpServlet, implemented HttpSessionListener, and the code in the sessionCreated(HttpSessionEvent event) method is not being called when you create a new session? Can you post your code? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener Interface - Mail Archive notworkingsoapologies for repost
Solved. For any of you using Websphere Studio to attach and debug a remote Tomcat instance be warned. The line numbers seem to be one out on my class and it worked when I put more than one LOC and a few more debug points (As well as some logging thanks Ben ;) ) Original Message Follows From: Ben Souther <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Tomcat Users List <[EMAIL PROTECTED]> Subject: Re: HttpSessionListener Interface - Mail Archive notworkingsoapologies for repost Date: Wed, 08 Dec 2004 07:00:10 -0500 > I have not extended httpservlet, I don't see why I would have to do > > this? You don't... sorry (was still on first cup of coffeee ;)) You've tried putting println statements in the sessionCreated and sessionDestroyed methods to verify that they're not being called? On Wed, 2004-12-08 at 06:16, Mark Benussi wrote: > Hi Ben, > > I have not extended httpservlet, I don't see why I would have to do this? > > package helpers; > > import javax.servlet.http.HttpSessionEvent; > import javax.servlet.http.HttpSessionListener; > > public class SessionHelper implements HttpSessionListener { > >public void sessionCreated(HttpSessionEvent sessionEvent) { >int x = 1; >// Not called >} >public void sessionDestroyed(HttpSessionEvent sessionEvent) { >int x = 2; >// Not called >} > } > > Original Message Follows > From: Ben Souther <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: Re: HttpSessionListener Interface - Mail Archive not > workingsoapologies for repost > Date: Wed, 08 Dec 2004 06:11:51 -0500 > > > Sorry what I mean is that the methods implemented for the > > HttpSessionListener do not get called when I invoke a new session. > > You've extended HttpServlet, implemented HttpSessionListener, and the > code in the sessionCreated(HttpSessionEvent event) method is not being > called when you create a new session? > > Can you post your code? > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out of memory error
I hit this issue today, for a host of reasons. You are getting this error because the ammount of memory allocated to the JVM running Tomcat has been taken up. This ould be for the following reasons: You are doing some large database reads without using a methodology to read in batches. You are storing large objects in the request or session. You may have memory leaks (A term I hate because it implies that there is a problem in the underlying system but what it actually means is you are keeping references to objects you no longer require). Original Message Follows From: Sergey Livanov <[EMAIL PROTECTED]> Reply-To: Sergey Livanov <[EMAIL PROTECTED]> To: Tomcat users Subject: out of memory error Date: Tue, 26 Apr 2005 17:10:02 +0300 Pls help me to investigate type of error. Sometimes pages are not downloaded. We have looked into Log file and found out a message out of memory. When is this error appeared and what do we have to do to avoid this type of error? 2005-04-25 08:15:10 ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError 2005-04-25 08:15:11 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.OutOfMemoryError -- regards, Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: out of memory error
: ) Yes Matt good point. For future reference if anyone is seeing any disk full issues then they do not have a big enough hard disk... Original Message Follows From: "Dale, Matt" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: "Tomcat Users List" Subject: RE: out of memory error Date: Tue, 26 Apr 2005 15:42:51 +0100 Or you simply don't have enough memory allocated to the JVM and you need to increase it. -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 26 April 2005 15:41 To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org Subject: RE: out of memory error I hit this issue today, for a host of reasons. You are getting this error because the ammount of memory allocated to the JVM running Tomcat has been taken up. This ould be for the following reasons: You are doing some large database reads without using a methodology to read in batches. You are storing large objects in the request or session. You may have memory leaks (A term I hate because it implies that there is a problem in the underlying system but what it actually means is you are keeping references to objects you no longer require). Original Message Follows From: Sergey Livanov <[EMAIL PROTECTED]> Reply-To: Sergey Livanov <[EMAIL PROTECTED]> To: Tomcat users Subject: out of memory error Date: Tue, 26 Apr 2005 17:10:02 +0300 Pls help me to investigate type of error. Sometimes pages are not downloaded. We have looked into Log file and found out a message "out of memory". When is this error appeared and what do we have to do to avoid this type of error? 2005-04-25 08:15:10 ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError 2005-04-25 08:15:11 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception java.lang.OutOfMemoryError -- regards, Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamic to static conversion
Hi Dola, A strategy you could employ is the following. All data for your items can be held in a persistence store of some kind (DB, XML). For each product build an XML representation and then use XSLT to convert each item to a html file. Then when requesting to view an item you can build up a Struts template (Or whatever technology your prefer ;o) ) and insert the static file, wrapping round it all your dynamics (Shopping cart, account details etc). When ever an item is updated you can simply redo the translation. An added benefit is that if you wish to search the content you have static html files you can search using Lucene (Or whatever technology your prefer ;o) ) and you know you are only searching the content, not any of the 'wrapping' of a page. I have used this strategy for my sites and it is very inexpensive in so far as the html for the item is done for you. No runtime presentation logic is required. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: 29 April 2005 14:48 To: Tomcat Users List Subject: Re: Dynamic to static conversion There is no reason I can think of to build static pages dynamically. I know what you are asying, but it makes little sense, I think. However, if you want to get the static equivalent of a dynamic page, all you have to do is to build a little application browser which gets the output of your pages and saves them. You can get the code for doing this pretty much from the COS message classes. Jack On 4/29/05, Dola Woolfe <[EMAIL PROTECTED]> wrote: > Hi, > > A friend of mine has asked me to help him build an > "eBay store". So I need to build a bunch of static > pages. > > I think that it is still a good idea to do so > programmatically (the only way I know how to do it!) > through jsp. Do you agree? > > How would I then convert pseudo-dynamic pages to > static in an automated fashion? > > Or if you have any other ideas or experiences, please > share! > > Many thanks in advance, > > Dola > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Amount of free disk space
I host my sites with a provider who supplied tomcat 5.0 on a UNIX platform. Is there a Java API call I can make to detect how much disk space has been allocated to my account and the current amount used?
[OT] JSP custom taglib issue in duplicate environments
I have two environments with the same mysql DB, both running the same war on tomcat 5.0 and I have a problem which I can only think may lie in my JSP taglib and its extra info. Essentially I call a tag three times in the same page, and depending on taglib arguments the tag should display data between only one of the tags. Instead on my live environment it's doing it at all the stages, this is driving me barmy and if anyone has any experience with a similar problem please let me know. I can provide source if anyone wants to help me get my hands dirty. I almost fell like I should be flushing my taglib after my doStartTag() as it seems the data is being left in the page (My VariableInfo is all nested). Yours desperately...
Client Authentication certificates
Morning all.. I have a web app and for certain areas of the site I wish to restrict access to a Client Authentication certificate. I want to generate a root Certificate for my company domain and then sub domains for a variety of customers. Then I wish to be able to generate certificates for certain users within these sub domains. My questions are: Can I build a root certificate that is not signed by someone like Verisign or any other trusted root? (This is a cost issue). Can I implement the Client Authentication on a server which does not have SSL implemented? Can I implement the Client Authentication on a server which already has an SSL certificate, signed by someone like Verisign and effectively run both? Would appreciate your thoughts and also any pointers on where to start digging. TIA Mark
Client Authentication certificates
Did anyone see this message as Remote host said: 554 delivery error: This user doesn't have an account. Can someone please confirm they got it? -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 23 May 2005 10:38 To: tomcat-user@jakarta.apache.org Subject: Client Authentication certificates Morning all.. I have a web app and for certain areas of the site I wish to restrict access to a Client Authentication certificate. I want to generate a root Certificate for my company domain and then sub domains for a variety of customers. Then I wish to be able to generate certificates for certain users within these sub domains. My questions are: Can I build a root certificate that is not signed by someone like Verisign or any other trusted root? (This is a cost issue). Can I implement the Client Authentication on a server which does not have SSL implemented? Can I implement the Client Authentication on a server which already has an SSL certificate, signed by someone like Verisign and effectively run both? Would appreciate your thoughts and also any pointers on where to start digging. TIA Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Authentication certificates
Thank you ever so much. The certificates will be for a subset of my clients and so I am not that worried. I really appreciate your help. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 23 May 2005 23:13 To: Tomcat Users List Subject: Re: Client Authentication certificates Mark Benussi wrote: > Can I build a root certificate that is not signed by someone like Verisign > or any other trusted root? (This is a cost issue). Yes, but then people have to trust your root certifcate. One of the services Verisign and the other CAs offer (depending on the type of certificate you get) is the verification of the entity that posses the private key associated with the certificate. > Can I implement the Client Authentication on a server which does not have > SSL implemented? No. SSl is a pre-reqisite for CLIENT-CERT authentication > Can I implement the Client Authentication on a server which already has an > SSL certificate, signed by someone like Verisign and effectively run both? Yes, with some caveats. A tomcat connector is SSL enabled or not. It can not be both. Tomcat can have multiple SSL enabled connectors but they must use different ports. Each Tomcat SSL connector can be associated with one, and only one, certificate. HTH, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Client Authentication certificates
Thanks Philip.. ever so much help. I really appreciate this! -Original Message- From: Philippe Johan [mailto:[EMAIL PROTECTED] Sent: 24 May 2005 08:55 To: tomcat-user@jakarta.apache.org Subject: RE: Client Authentication certificates Hi Mark, To answer your questions: - You can create your own Certificate Authority (CA) with no links to any other certificate, institution,... A typical CA certificate is just that: a self-signed certificate (=signed with the private key matching the public key contained inside the certificate). - Client authentication is part of SSL. It is during the SSL hand-shake that the server will request the client certificate. So the short answer would be: NO you can not implement this without SSL. - The CA the server requires for the client certificates can be completely unrelated to the server certificate. So I think your ideal solution would be to have a standard (i.e. Verisign) server certificate, but your own client certificates with their own CA (the one you created yourself). To implement this, your keystoreFile (containing the server and matching CA certificate) will be different from your truststoreFile (containing the client CA certificate). If you go with the really cheap option to create the server certificate yourself as well, you will indeed have the issue mentioned below. But do know that this CA certificate is typically automatically added in the browser store during the generation of the client certificate. Meaning that if 100% of your clients will be accessing this server with a client certificate this is not an issue. Have a look at EJBCA (Enterprise Java Beans Certificate Authority http://ejbca.sourceforge.net/) for the certificate management part. Distributing certificates, and more important the matching private keys, is not an easy thing to do with the OpenSSL command-line tools. Regards, Johan -Original Message- From: Tim Diggins [mailto:[EMAIL PROTECTED] Sent: maandag 23 mei 2005 12:24 To: Tomcat Users List Subject: Re: Client Authentication certificates Hi Mark - I saw it, and... don't know the answers for the second two (don't fully understand the questions) , but yes, you can create your own Certificate Authority, no problem -- however your clients will each then either have to click-through various warning dialogues each time, or they will have to add the root certificate to their list of trusted certificate authorities. How exactly to do this various from browser to browser (and OS to OS sometimes)... --Tim Mark Benussi wrote: > Morning all.. > > > > I have a web app and for certain areas of the site I wish to restrict access > to a Client Authentication certificate. I want to generate a root > Certificate for my company domain and then sub domains for a variety of > customers. Then I wish to be able to generate certificates for certain users > within these sub domains. > > > > My questions are: > > > > Can I build a root certificate that is not signed by someone like Verisign > or any other trusted root? (This is a cost issue). > > Can I implement the Client Authentication on a server which does not have > SSL implemented? > > Can I implement the Client Authentication on a server which already has an > SSL certificate, signed by someone like Verisign and effectively run both? > > > > Would appreciate your thoughts and also any pointers on where to start > digging. > > > > TIA Mark > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT Friday - Random sorting
Hello. I am trying to write a comparator that randomly sorts a collection. I have something like this: new Comparator() { /** * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ public int compare(Object object1, Object object2) { long time = new Date().getTime(); Random random1 = new Random(time); Integer x1 = new Integer(random1.nextInt()); random1.setSeed(++time); Integer x2 = new Integer(random1.nextInt()); return x1.compareTo(x2); } } But sadly to no avail. Has anyone done this before or have any suggestions.
RE: OT Friday - Random sorting
Thanks very much -Original Message- From: Rafal Krupinski [mailto:[EMAIL PROTECTED] Sent: 03 June 2005 09:06 To: Tomcat Users List Subject: Re: OT Friday - Random sorting Mark Benussi wrote: > Hello. > I am trying to write a comparator that randomly sorts a collection. > I have something like this: > > new Comparator() { > /** > >* @see java.util.Comparator#compare(java.lang.Object, > java.lang.Object) > >*/ > > public int compare(Object object1, Object object2) { > long time = new Date().getTime(); > Random random1 = new Random(time); > Integer x1 = new Integer(random1.nextInt()); > random1.setSeed(++time); > Integer x2 = new Integer(random1.nextInt()); > return x1.compareTo(x2); > } > } > > But sadly to no avail. > Has anyone done this before or have any suggestions. try this: new Comparator(){ Random r=new Random();//automatic seed public int compare(Object object1, Object object2){ return r.nextInt(); } public boolean equals(Object obj){return this==obj;} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OT Friday - Random sorting
Even better, thank you! -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Holger Klawitter Sent: 03 June 2005 09:06 To: tomcat-user@jakarta.apache.org Cc: user@excalibur.apache.org Subject: Re: OT Friday - Random sorting Mark Benussi wrote: > Hello. > > > > I am trying to write a comparator that randomly sorts a collection. > > > > I have something like this: > > > > new Comparator() { > > > > /** > >* @see java.util.Comparator#compare(java.lang.Object, > java.lang.Object) > >*/ > > public int compare(Object object1, Object object2) { > > > > long time = new Date().getTime(); > > > > Random random1 = new Random(time); > > Integer x1 = new Integer(random1.nextInt()); > > random1.setSeed(++time); > > Integer x2 = new Integer(random1.nextInt()); > > > > return x1.compareTo(x2); > > } > > } > > > > But sadly to no avail. > > > > Has anyone done this before or have any suggestions. I'd just use java.util.Collections.shuffle(). -- With Kind Regards / Mit freundlichem Gruß Holger Klawitter (listen klawitter de) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Struts form population problem in PRODUCTION
I am submitting a Struts form in my live application but the values seem to be getting lost between my browser and the population of my ActionForm. This only happens if the login page is the first request of the session. If you click around on the site (even once) and then submit the form the values are taken. :S NB This only happens in my live environment (Tomcat 5, LINUX).
RE: Version issue in coding
Well without wishing to sound petty Your development environment should replicate you server environment as closely as possible. Understandably you may develop on windows but run on UNIX but anything else such as Tomcat, JVM, and any 3rd party Jars should be of the same version. The problem is in a JSP I think which I guess you have worked out. -Original Message- From: Amrendra Kumar [mailto:[EMAIL PROTECTED] Sent: 23 June 2005 11:54 To: tomcat-user@jakarta.apache.org Subject: Version issue in coding hi we did coding in tomcat 5.0 on local machine, it's working fine. But when we uploaded to a remote site , i.e web server which has tomcat 5.5.9 and giving this error org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 56) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 93) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax. where I had gone wrong version issue or something else Regards -- Amrendra Kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] UK tomcat hosting recommendations?
Having some fun with my current ISP and was wondering if any of you have UK tomcat recommendations? My technical needs are pretty small; just tomcat 5.0+ installed with mysql 4.0+ etc. My main non-technical requirement is a good UK based support, and any recommendations would be appreciated. P.S. I know I could use a blank Linux hosting option and install it myself but this is not appropriate at the moment, I may consider that in the future.
Re: UK tomcat hosting recommendations?
Julian, Interesting that you recomend nameonthe.net. They have been down since Tuesday morning and none of my customers who host with them are recieveing e-mail or have access to their sites. They have not called me all week and I had to drive to their listed company address to speak to someone. What is your site, is it still up and running and are you getting e-mail? Original Message Follows From: Julian Templeman <[EMAIL PROTECTED]> Reply-To: Julian Templeman <[EMAIL PROTECTED]> To: Tomcat Users List Subject: Re: UK tomcat hosting recommendations? Date: Wed, 6 Jul 2005 13:29:30 +0100 > Having some fun with my current ISP and was wondering if any of you have UK > tomcat recommendations? I'm using www.nameonthe.net for JBoss hosting, and I know they do straight Tomcat as well. I've been pretty happy with them, and the support has been fine the couple of time I've needed to use it. julian (no affiliation except as a paying customer, etc, etc) On 7/5/05, Mark Benussi <[EMAIL PROTECTED]> wrote: > Having some fun with my current ISP and was wondering if any of you have UK > tomcat recommendations? > > > > My technical needs are pretty small; just tomcat 5.0+ installed with mysql > 4.0+ etc. > > > > My main non-technical requirement is a good UK based support, and any > recommendations would be appreciated. > > > > P.S. I know I could use a blank Linux hosting option and install it myself > but this is not appropriate at the moment, I may consider that in the > future. > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: UK tomcat hosting recommendations?
I don't see any mention of their Tomcat support? I said that I needed Tomcat support without having to install it myself -Original Message- From: Oscar Mechanic [mailto:[EMAIL PROTECTED] Sent: 07 July 2005 15:33 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: UK tomcat hosting recommendations? I use webhost.ie They are in Ireland I am in the UK but the service is second to none for me. On Thu, 2005-07-07 at 14:25 +0000, Mark Benussi wrote: > Julian, > > Interesting that you recomend nameonthe.net. They have been down since > Tuesday morning and none of my customers who host with them are recieveing > e-mail or have access to their sites. They have not called me all week and I > had to drive to their listed company address to speak to someone. > > What is your site, is it still up and running and are you getting e-mail? > > Original Message Follows > From: Julian Templeman <[EMAIL PROTECTED]> > Reply-To: Julian Templeman <[EMAIL PROTECTED]> > To: Tomcat Users List > Subject: Re: UK tomcat hosting recommendations? > Date: Wed, 6 Jul 2005 13:29:30 +0100 > > > Having some fun with my current ISP and was wondering if any of you have > UK > > tomcat recommendations? > > I'm using www.nameonthe.net for JBoss hosting, and I know they do > straight Tomcat as well. I've been pretty happy with them, and the > support has been fine the couple of time I've needed to use it. > > julian > (no affiliation except as a paying customer, etc, etc) > > On 7/5/05, Mark Benussi <[EMAIL PROTECTED]> wrote: > > Having some fun with my current ISP and was wondering if any of you have > UK > > tomcat recommendations? > > > > > > > > My technical needs are pretty small; just tomcat 5.0+ installed with > mysql > > 4.0+ etc. > > > > > > > > My main non-technical requirement is a good UK based support, and any > > recommendations would be appreciated. > > > > > > > > P.S. I know I could use a blank Linux hosting option and install it > myself > > but this is not appropriate at the moment, I may consider that in the > > future. > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Recommend a UK Tomcat host
Thanks Gurumoorthy But they are not based in the UK and hence I will have a nightmare with support. -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 08 July 2005 09:52 To: 'Tomcat Users List' Subject: RE: [OT] Recommend a UK Tomcat host http://www.mycgiserver.com/ -Original Message----- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 08 July 2005 09:45 To: 'Tomcat Users List' Cc: 'Struts Users Mailing List' Subject: [OT] Recommend a UK Tomcat host Apologies for the repost to the Tomcat list but I am getting desperate. Can anyone recommend a UK based Tomcat hosting solution? I have been let down by my current ISP (nameonthe.net) which has gone out of business. Your help is greatly appreciated. TIA Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Recommend a UK Tomcat host
Apologies for the repost to the Tomcat list but I am getting desperate. Can anyone recommend a UK based Tomcat hosting solution? I have been let down by my current ISP (nameonthe.net) which has gone out of business. Your help is greatly appreciated. TIA Mark
Re: [OT] Recommend a UK Tomcat host
: ) Just had a sales conversation with them and yes the hike in price is a bit daft. A dedicated server is an option but only if I can get enough of nameonthe.nets previous customers over to them. If ANYONE reading this knows of any customers effected by this ISP's downfall can they let me know and hope that we can get some collective purchasing power. Original Message Follows From: Tim Diggins <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: Tomcat Users List Subject: Re: [OT] Recommend a UK Tomcat host Date: Fri, 08 Jul 2005 10:52:24 +0100 I was just about to recommend postive-internet. They are very good - customer support is good, and they are real tecchies - they understand & respond well if you give a technical support query in technical language (often not the case!). I've really only heard good things about them, and have had a good overall experience of them for the past couple of years. That said, I've never used tomcat with them. (But use them for python/php stuff). The only problem I heard with them is that they don't do much variety in products - namely the leap between "z-hosting" (shared) and deducated/managed servers is quite a hike in price -- Tim Darren Carman wrote: Not sure if they use tomcat or not (the tomcat piccie is displayed in one of their images) but you could ask. I am not with them any more but had 1st class service while I was. http://www.positive-internet.com/products.html -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 08 July 2005 09:45 To: 'Tomcat Users List' Cc: 'Struts Users Mailing List' Subject: [OT] Recommend a UK Tomcat host Apologies for the repost to the Tomcat list but I am getting desperate. Can anyone recommend a UK based Tomcat hosting solution? I have been let down by my current ISP (nameonthe.net) which has gone out of business. Your help is greatly appreciated. TIA Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.37 and 5.0.2?? differences
I am having to change my ISP and was wondering what the main differences were with these two servers. Are Servlet filters supported and more importantly what J2EE does it typically run on? TIA to the legend list that is making my nightmare week a bit better.
RE: Tomcat 4.1.37 and 5.0.2?? differences
Thanks Peter thats perfect. I cant see any magor techincal differences. Original Message Follows From: "Peter Crowther" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: "Tomcat Users List" Subject: RE: Tomcat 4.1.37 and 5.0.2?? differences Date: Fri, 8 Jul 2005 12:54:06 +0100 > From: Mark Benussi [mailto:[EMAIL PROTECTED] > Subject: Tomcat 4.1.37 and 5.0.2?? differences > > > I am having to change my ISP and was wondering what the main > differences were with these two servers. http://jakarta.apache.org/tomcat/index.html 5.0.x is servlet spec 2.4 / JSP 2.0, like 5.5. > Are Servlet filters supported Yes, on both, I believe. > and more importantly what J2EE does it > typically run on? Sorry, don't understand the question? If you mean J2SDK, I rather suspect most providers will be on a 1.4.2_xx release - Tomcat 4.1 and 5.0 both run on that. If you don't mean the SDK version, could you clarify? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1.37 and 5.0.2?? differences
Thanks Rahul but in case it wasnt clear I am downgrading from 5 to 4. Original Message Follows From: Rahul Akolkar <[EMAIL PROTECTED]> Reply-To: Rahul Akolkar <[EMAIL PROTECTED]> To: Tomcat Users List Subject: Re: Tomcat 4.1.37 and 5.0.2?? differences Date: Fri, 8 Jul 2005 08:46:57 -0400 > From: "Peter Crowther" <[EMAIL PROTECTED]> > > From: Mark Benussi [mailto:[EMAIL PROTECTED] > > Subject: Tomcat 4.1.37 and 5.0.2?? differences > > Are Servlet filters supported > > Yes, on both, I believe. Additionally, after the move, you will be able to apply filters to RequestDispatcher includes and forwards as well. > > and more importantly what J2EE does it > > typically run on? > Tomcat is a servlet container, not a full J2EE app server. 5.x.x implements the relevant bits in J2EE 1.4 -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Name On The Net in the UK
If you are a customer or know anyone who uses Name On The Net in the UK as their ISP please send an e-mail to [EMAIL PROTECTED] I have worked long and hard this week to get some answers and can provide them and, more importantly a simple solution. You can reply to this e-mail in relation to this topic but I will not be answering it, as I don't want to have to type answers to individuals. Regards, Mark Benussi
Re: robots.txt
With follow = false or something cant remember the exact syntax Original Message Follows From: Tim Funk <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: Tomcat Users List Subject: Re: robots.txt Date: Thu, 14 Jul 2005 14:14:32 -0400 Place a robots meta tag in the head tag of your html. -Tim Eric J. Pastoor wrote: The msn bot has been hammering one of my webapps for about 2 weeks now. I have a calendar style transaction page that is not password protected. Essentially this calendar goes on forever. This means that the msn bot is basically going on forever. It is making my log files insanely large. Is there a way to create a robots.txt file for basically one servlet instead of everything? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
domain missing from html:rewrite html:link etc
I have recently moved ISPs and my sites are experiencing some strange behaviour. Basically on some of my sites (Not just one) and on some of the links (Not just all) When using html:link (A struts tag library) and the other associated tags (rewrite etc) the domain is missing. This is also seen when using the sslext tag library which made me think that it was a Tomcat configuration as opposed to a code specific thing (The code has been tested in development, system test and another live environment). I am going to give out some addresses so that people can see the problem, but hope this won't attract unhelpful UI comments or activity as I know the sites aren't perfect. First customer: http://www.cibustraining.com/view/menu.do?id=1 The links at the bottom Privacy Policy | Terms & Conditions have this problem. The code for them is: Privacy Policy | Terms & Conditions Second customer http://www.goodcookshop.com/view/menu.do?id=2 The links in the top right Why become a goodcookshop.com member? and Register me have this problem, although the second has an extra slash after the domain and the first one has no domain. The code for them is: Why become a goodcookshop.com member? Register me Finally I attach the server.xml for the original working configuration and the new one which seems to be causing problems. Original www.thegoodcookshop.com www.goodcookshop.co.uk New one www.goodcookshop.com Appreciate your time on this one as I didn't have any joy with google. Cheers, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Placing a LifecycleListener in my server.xml
Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing a LifecycleListener in my server.xml
Thanks Darryl but I need to implement a LifecycleListener. You have implemented a ServletContextListener which only gets called when the Content is started. I need to know when its finished, which is why I am using a LifecycleListener which should be placed in the server.xml Original Message Follows From: "Darryl L. Miles" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: Tomcat Users List Subject: Re: Placing a LifecycleListener in my server.xml Date: Wed, 27 Jul 2005 11:47:17 +0100 Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Placing a LifecycleListener in my server.xml
Thanks Darryl I have followed this guide but don't know how to add the modify the server.xml I attached to reflect this. Also are you saying I should put the class that implements the listener in the server/classes? I am fine with this but wasn't sure if it would all get loaded together as the class is a Singleton that the rest of my code talks to and need to be sure it will have access to the same class instance in the JVM. -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:10 To: Tomcat Users List Subject: Re: Placing a LifecycleListener in my server.xml Sorry did not read properly.. Have you tried: for JARs: $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html *Lifecycle Listeners* If you have implemented a Java object that needs to know when this *Context* is started or stopped, you can declare it by nesting a *Listener* element inside this element. The class name you specify must implement the |org.apache.catalina.LifecycleListener| interface, and it will be notified about the occurrence of the coresponding lifecycle events. Configuration of such a listener looks like this: ... ... Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns. Mark Benussi wrote: > Thanks Darryl but I need to implement a LifecycleListener. You have > implemented a ServletContextListener which only gets called when the > Content is started. I need to know when its finished, which is why I > am using a LifecycleListener which should be placed in the server.xml > > Original Message Follows > From: "Darryl L. Miles" <[EMAIL PROTECTED]> > Reply-To: "Tomcat Users List" > To: Tomcat Users List > Subject: Re: Placing a LifecycleListener in my server.xml > Date: Wed, 27 Jul 2005 11:47:17 +0100 > > Mark Benussi wrote: > >> Anyone have any ideas where on earth I put my class that implements the >> LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a >> context in my server.xml. >> >> > The context is in WEB-INF/web.xml > > as its a webapp specific listener, NOT a global server thing. > > See my article http://www.hibernate.org/301.html as an example (when > used with hibernate) > > -- > Darryl L. Miles > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > . > -- Darryl L. Miles M: 07968 320 114 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
My first JAAS implementation. A few questions.
I am implementing my first JAAS implementation and have some problems/questions. Firstly my commit method of my LoginModule does the following (User and Role both implement Principal) // Create a new User Principal with the user name retrieved from the NameCallback User user = new User(username); // Add the principal to the subject subject.getPrincipals().add(user); for (int i = 0; i < roles.length; i++) { // Iterate the role names retrieved from the database lookup String roleName = roles[i]; // Create a new Role Principal with the role name Role role = new Role(roleName); // Add it to the public credentials to see if it works subject.getPublicCredentials().add(role); // Add it to the private credentials to see if it works subject.getPrivateCredentials().add(role); } return true; In the JSP that the application returns to after doing form based authentication the following occurs Subject = <%= Subject.getSubject(AccessController.getContext()) %> Remote User = <%= request.getRemoteUser() %> User Prinicipal = <%= request.getUserPrincipal() %> But this produces Subject = null Remote User = administrator User Prinicipal = GenericPrincipal[administrator()] Why is the subject null please? The request.isUserInRole() methods for the role names I added to the subject also return false... has anyone got some helpful ideas please? If more source is needed I can gladly provide it if will help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Last question on JAAS I promise
OK I got JAAS working with form authentication. That worked a treat (After a bit of head banging). I then moved to invoking the login from Struts (Or a Servlet for Tomcat users who don't use Struts) The code still gets invoked correctly. IBTJAASCallbackHandler callbackHandler = new IBTJAASCallbackHandler(loginForm.getUserName(), loginForm.getPassword()); LoginContext context = new LoginContext("IBTJAAS", callbackHandler); context.login(); However the request.remoteUser() is now null (Was populated correctly when I used form authentication) and the same for request.isUserInRole() (It returns false, even though the Principal was added to the subject). Any ideas...? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: howto configure JAAS+SSO
Hi Edmund. I am sorry but I don't know much about SSO. However I can tell you about JAAS in Tomcat. In 5 certainly there are issues. Essentially when you call the LoginModule to invoke your JAAS config it works but it does not authenticate the proper session Subject. What you end up doing (Or what I did) was place a request filter in the app that wraps the request with an overridden RequestWrapper and you write your own inUserInRole against the Subject that the LoginModule returns (By placing it in the session) If you want some code, taken from Wendy Smoak and others I can provide. -Original Message- From: Edmund Urbani [mailto:[EMAIL PROTECTED] Sent: 16 August 2005 13:14 To: Tomcat Users List Subject: howto configure JAAS+SSO hello! I'm trying to configure two webapps (slide and jetspeed2) for single-sign-on in the same tomcat instance. Both apps use JAAS and come with their own JAAS login modules. Is it possible to configure these (any?) two apps to share login info with JAAS. I started reading the JAAS docs recently and I tried putting the two login modules into one JAAS login context, but that does not seem to work, because the login module classes won't instantiate properly due to dependencies to their respective webapps. Can SSO be achieved without having the apps share one login context? Will I have to write my own login module(s)? Should I use a (completely) different approach to get SSO? Thanks for any help/advice. Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: howto configure JAAS+SSO [Apologies code attached]
1.Filter to go in web.xml /** * [EMAIL PROTECTED] javax.servlet.Filter Filter} to overide the HttpServletRequest and * overide isUserInRole() using the * [EMAIL PROTECTED] com.ibt.framework.security.tomcat.HttpServletRequestWrapper HttpServletRequestWrapper} * * @author Mark Benussi */ public class HttpServletRequestFilter implements Filter { /** * @see javax.servlet.Filter#destroy() */ public void destroy() { } /** * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, * javax.servlet.ServletResponse, javax.servlet.FilterChain) */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) request; HttpServletRequestWrapper wrappedRequest = new HttpServletRequestWrapper( httpServletRequest); chain.doFilter(wrappedRequest, response); } /** * @see javax.servlet.Filter#init(javax.servlet.FilterConfig) */ public void init(FilterConfig config) throws ServletException { } } 2. Request wrapper /** * Wraps the [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest HttpServletRequest} * @author Mark Benussi */ public class HttpServletRequestWrapper extends javax.servlet.http.HttpServletRequestWrapper { /** * The original [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest HttpServletRequest} */ private HttpServletRequest request = null; /** * Helper to manage any common security methods */ private static SecurityHelper jaasHelper = null; /** * Default constructor * * @param request *The original [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest HttpServletRequest} */ public HttpServletRequestWrapper(HttpServletRequest request) { super(request); if (jaasHelper == null) { jaasHelper = new SecurityHelper(); } this.request = request; } /** * @see javax.servlet.http.HttpServletRequestWrapper#isUserInRole(java.lang.String) */ public boolean isUserInRole(String role) { Subject subject = jaasHelper.getSessionSubject(request, false); return jaasHelper.isSubjectInRole(subject, role); } } 3. When you call youre LoginModule get the Subject and place in the session and then write your own code to validate the Subject has the role required. 4. As for passing the session to your LoginModule, which I wouldn't do in a puristic way as the LoginModule should be able to be used by a wing app just as much as a web app. Contstruct a CallBackHandler with the username and password but also with the session or request. Then in your loginmodule you will have access to the request/session when you invoke handle callback -Original Message- From: Edmund Urbani [mailto:[EMAIL PROTECTED] Sent: 16 August 2005 15:14 To: Tomcat Users List Subject: Re: howto configure JAAS+SSO Mark Benussi wrote: >Hi Edmund. > >I am sorry but I don't know much about SSO. > >However I can tell you about JAAS in Tomcat. In 5 certainly there are >issues. Essentially when you call the LoginModule to invoke your JAAS config >it works but it does not authenticate the proper session Subject. What you >end up doing (Or what I did) was place a request filter in the app that >wraps the request with an overridden RequestWrapper and you write your own >inUserInRole against the Subject that the LoginModule returns (By placing it >in the session) > >If you want some code, taken from Wendy Smoak and others I can provide. > > > thanks. I'm currently considering to write my own login module in order to share authentication data across login contexts. i would need to access session cookies from the module and i'm not sure how/if this can be done yet. i've never written a requestwrapper myself, so i can't really tell how hard/complicated that would be. i'd be glad, if you could provide me with some code to look at. that could certainly help me decide on how to go on about that SSO requirement. Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: howto configure JAAS+SSO
Hi Wendy, Sure I can explain what happens but not why. When you call the LoginModule with an optional Subject and CallBack the code works fine for me, i.e. it calls the LoginModule and I do everything I need, placing the Principals into the Subject. However... and this is where I don't want to say anything sweeping in case I have just simply misunderstood the Subject that is authenticated via the LoginModule has no visibility to Tomcat. If I could find a way to replace the session Subject with the one passed back from the LoginModule.getSubject() I would be ok, but I couldn't, so I placed the authorised Subject in the session and overrode the request.isUserInRole() to authorise against the Subject I placed in the session. One of these days I might ask the Tomcat dev list what I was doing wrong but got comments from other developers saying they had the same problem [All the JAAS examples do it the way I have described in some shape or form] Its not that bid a deal, and if you just use the Request wrapper I have attached you know that in the future you can remove the filter if you go to WebSphere or something like that. -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: 16 August 2005 17:44 To: Tomcat Users List Subject: Re: howto configure JAAS+SSO From: "Mark Benussi" <[EMAIL PROTECTED]> > However I can tell you about JAAS in Tomcat. In 5 certainly there are > issues. Essentially when you call the LoginModule to invoke your JAAS > config > it works but it does not authenticate the proper session Subject. Can you explain more about this? I just _finally_ got the jsp-examples webapp that ships with Tomcat changed over to Kerberos authentication. Am I about to run into problems? > What you end up doing (Or what I did) was place a request filter in the > app that > wraps the request with an overridden RequestWrapper and you write your own > inUserInRole against the Subject that the LoginModule returns (By placing > it > in the session) > > If you want some code, taken from Wendy Smoak ... .. who took it from one of Craig's tomcat-user posts. ;) http://wiki.wsmoak.net/cgi-bin/wiki.pl?TomcatRequestWrapper -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please recommend a Low Cost Tomcat Hosting platform
Paul, I use a company called name on the net who work out at £100 a year. They support WAR deployment in a pure sense (my only comment would be they provide a Tomcat 5 container). Support is good, they are a small company and from that point of view you always get a quick response. Original Message Follows From: Paul Taylor <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Tomcat Users List Subject: Please recommend a Low Cost Tomcat Hosting platform Date: Tue, 04 Jan 2005 14:32:12 + Hi I have a Tomcat 4 Application ready to deploy as a WAR. It uses database pooling to connect to a MYSQL database. I recently selected a Tomcat hosting platform to deploy my application but the deployment is non -standard you have to copy various parts of the WAR to different locations which dont match the standard deployment and it doesnt use database pooling to connect to MYSQL. I have been unable to get my application to run on it because these issues. This is not a high performance website and I do not need/cannot afford a dedicated server I just want to easily be able to deploy my application. I am based in the UK so a UK/English Speaking host would be preferable. Could anyone recommend a hostthat provides this straight forward deployment facilities. Thanks paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please recommend a Low Cost Tomcat Hosting platform
apols www.nameonthe.net Original Message Follows From: Paul Taylor <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Mark Benussi <[EMAIL PROTECTED]> CC: tomcat-user@jakarta.apache.org Subject: Re: Please recommend a Low Cost Tomcat Hosting platform Date: Tue, 04 Jan 2005 14:49:00 + I tried nameonthenet.co.uk and it cant find it and nameonthenet.com is up for sale Mark Benussi wrote: Paul, I use a company called name on the net who work out at £100 a year. They support WAR deployment in a pure sense (my only comment would be they provide a Tomcat 5 container). Support is good, they are a small company and from that point of view you always get a quick response. Original Message Follows From: Paul Taylor <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Tomcat Users List Subject: Please recommend a Low Cost Tomcat Hosting platform Date: Tue, 04 Jan 2005 14:32:12 + Hi I have a Tomcat 4 Application ready to deploy as a WAR. It uses database pooling to connect to a MYSQL database. I recently selected a Tomcat hosting platform to deploy my application but the deployment is non -standard you have to copy various parts of the WAR to different locations which dont match the standard deployment and it doesnt use database pooling to connect to MYSQL. I have been unable to get my application to run on it because these issues. This is not a high performance website and I do not need/cannot afford a dedicated server I just want to easily be able to deploy my application. I am based in the UK so a UK/English Speaking host would be preferable. Could anyone recommend a hostthat provides this straight forward deployment facilities. Thanks paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]web development fee
What country are you based in? Original Message Follows From: "epyonne" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Subject: [OT]web development fee Date: Wed, 5 Jan 2005 06:51:50 -0600 Sorry if this is a little off topic. I have been developing Java web application for my employer for a while, but these are all running on our company's intranet only. Now someone is asking me to develop an eCommerce site. I don't know how to charge him. Can someone please give me some ideas of the going rate and what kind of contractual agreement I need? Is there anything else I need to watch out for? I plan to use a commercial hosting company to host the site. Any help will be very much appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please recommend a Low Cost Tomcat Hosting platform
H Paul, Yes in terms of the logging and connection pooling I had that problem and so I implemented the commons database pooling and use log4j to do my logging. Sorry it wasn't so clear for you Original Message Follows From: Paul Taylor <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Mark Benussi <[EMAIL PROTECTED]>,Tomcat Users List Subject: Re: Please recommend a Low Cost Tomcat Hosting platform Date: Fri, 07 Jan 2005 15:36:32 + Review of noname.net I made the mistake of selecting a Shared VM trial thinking I could get way with it but I couldnt. I managed to get my basic application running, although deployment was a very hit a and miss affair, Tomcat Manager didnt work properly and I didnt receive satisfactory explanations of what was going on. But I wanted to implement database connection pooling and changes to the tomcat logging and this was not possible so I requested an upgrade to a trial to a private JVM, but was told only one trial per customer is allowed. At least they give a free trial but Im checking out http://www.servlets.com/isps/ and deciding on someone else to try. Paul Mark Benussi wrote: Let me know how you get on Paul, and feel free to let them know I referred you ; ) As a tip I would recommend the following: If you have any custom XMl with external DTD then ask them to make sure your account has external access to retrieve the DTD's (They don't do this by default). Also if you need SSL ask them now as they need to do some specifics with your host IP address. Cheers, Mark Benussi Original Message Follows From: Paul Taylor <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: Tomcat Users List Subject: Re: Please recommend a Low Cost Tomcat Hosting platform Date: Tue, 04 Jan 2005 16:26:40 + I've taken a look at the recommended options and this is my view from looking at the Websites provided. 1. WebConnexions has very little information regarding JSPs (there is only one question regarding Java on Support) and the pricing ids unfairly skewed to be cheaper for US accounts. Im a bit dubious about it because I have already signed up with a supposed Java Host and found it lacking. 2. MythicBeasts is very flexible but would require me to deal with the administration of the whole machine which isnt something I really want todo, having deployed by application I want to just leave it be as much as possible. 3. NameOnTheNet looks promising, they only seem to do Java Hosting and there is alot of support information and they are based in the UK so I think I might give them a try. 4. AssortedInternet look OK, but they seem to cover so many different types of hosting I am unsure of how important Java Hosting is, also based in US. Paul Taylor wrote: Hi I have a Tomcat 4 Application ready to deploy as a WAR. It uses database pooling to connect to a MYSQL database. I recently selected a Tomcat hosting platform to deploy my application but the deployment is non -standard you have to copy various parts of the WAR to different locations which dont match the standard deployment and it doesnt use database pooling to connect to MYSQL. I have been unable to get my application to run on it because these issues. This is not a high performance website and I do not need/cannot afford a dedicated server I just want to easily be able to deploy my application. I am based in the UK so a UK/English Speaking host would be preferable. Could anyone recommend a hostthat provides this straight forward deployment facilities. Thanks paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 24X7 deployment tips
Hi Sunil, I think they keyword for your scenario is clustering. Running multiple syncronised applications and databases allows you to take down servers during quiet periods and still maintain a service via the other servers whilst they are upgraded one by one. Saying that I have worked on global .coms that always allow for some down time during large releases / maintenance. It is not going to be easy but I am sure you appreciate that. One more thing that may cause a headache is session persistence under some Tomcat clustering models. Thats all i can think of but i'm sure you will get better advice than mine. Original Message Follows From: sunil goyal <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: tomcat-user@jakarta.apache.org Subject: 24X7 deployment tips Date: Tue, 11 Jan 2005 09:30:39 -0800 (PST) Hi all, I am looking for resources for building and deploying 24X7 large scale web applications using Java. Can anyone point towards any good books/links for the same? If I am trying to deploy an application via apache/tomcat on a linux platform, is it possible to upgrade certain servlets without actually shutting down the server. What kind of principle is generally followed in real life applications for the same? Any help in this regard is appreciated. Thanks Regards Sunil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: 24X7 deployment tips
Ah good old memory leaks, I see more and more messages regarding this although thankfully I have never experienced it myself. The reason this is off topic is that I was wondering if anyone has ever found a way of recovering leaked memory, without restarting the JVM? Original Message Follows From: Phillip Qin <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: 'Tomcat Users List' Subject: RE: 24X7 deployment tips Date: Tue, 11 Jan 2005 12:43:46 -0500 I use Tomcat Manager (actually catalina-ant taks) to deploy my webapps from my dev box to remote linux server. I don't have to shutdown server by doing that. However, I do sometimes run into "Out Of Memory" issues after I deploy applications hundreds times. -Original Message- From: sunil goyal [mailto:[EMAIL PROTECTED] Sent: January 11, 2005 12:31 PM To: tomcat-user@jakarta.apache.org Subject: 24X7 deployment tips Hi all, I am looking for resources for building and deploying 24X7 large scale web applications using Java. Can anyone point towards any good books/links for the same? If I am trying to deploy an application via apache/tomcat on a linux platform, is it possible to upgrade certain servlets without actually shutting down the server. What kind of principle is generally followed in real life applications for the same? Any help in this regard is appreciated. Thanks Regards Sunil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:41e40d46139271361782364! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTMLArea v. fckeditor
My 2 pence worth is that whilst all these are great, intergating them with existing functionality such as asset manegment (Images, documents etc) is such a pain that it is best to do your own. Original Message Follows From: Oleg <[EMAIL PROTECTED]> Reply-To: Oleg <[EMAIL PROTECTED]> To: Tomcat Users List , David Wall <[EMAIL PROTECTED]> Subject: Re: HTMLArea v. fckeditor Date: Wed, 16 Feb 2005 19:56:48 -0800 Isnt HTMLArea IE only? I used FCKeditor for about a year, love it. After much searching, I think it is the best. On Fri, 11 Feb 2005 11:28:25 -0800, David Wall <[EMAIL PROTECTED]> wrote: > > See http://www.fckeditor.net/ > > Aside from the odd name (we do have to give credit after all!), that does look like a nice one. Has anybody used it enough to know how stable it is? I noted that it's on 2.0, which is good, but it's not considered final. I like that it appears to be a bit more active than HTMLArea. > > David > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Getting other Sessions
You need to implement a Session Listener like this. public class SessionHelper implements HttpSessionListener { private static Hashtable sessionsById = null; /** * @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent) */ public void sessionCreated(HttpSessionEvent sessionEvent) { if (sessionsById == null) { sessionsById = new Hashtable(); } HttpSession session = sessionEvent.getSession(); String sessionId = session.getId(); sessionsById.put(sessionId, session); } /** * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent) */ public void sessionDestroyed(HttpSessionEvent sessionEvent) { } } Then you can access the sessions via this session helpers Hashtable. Finally you need to add the following to your web.xml. blah SessionHelper .. etc Cheers, Mark Original Message Follows From: Bernhard Slominski <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: 'Tomcat Users List' Subject: AW: Getting other Sessions Date: Wed, 23 Feb 2005 10:31:00 +0100 Hi Matt, Joseph, you're right, I was not reading Joseph's question properly, I thought he want wants "all objects IN the session". I also can't think of another solution than Antony mentioned earlier. Bernhard -Ursprüngliche Nachricht- Von: Dale, Matt [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 23. Februar 2005 10:25 An: Tomcat Users List Betreff: RE: Getting other Sessions Hi, That doesn't answer Joseph's question. It tells him how to access the objects in his own session but not how to access other peoples sessions. I would be interested to see how this is done as well. Ta Matt -Original Message- From: Bernhard Slominski [mailto:[EMAIL PROTECTED] Sent: 23 February 2005 09:17 To: 'Tomcat Users List' Subject: AW: Getting other Sessions Hi, HttpSession.getAttributeNames() should do what you want! From the javadoc: "getAttributeNames public java.util.Enumeration getAttributeNames() Returns an Enumeration of String objects containing the names of all the objects bound to this session." Cheers Bernhard -Ursprüngliche Nachricht- Von: Joseph Shraibman [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 23. Februar 2005 05:18 An: tomcat-user@jakarta.apache.org Betreff: Getting other Sessions I want to make an admin page in my application. I needs to be able to get access to all the current Session objects to access their attributes. Is this possible? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: realm configuration
Just done this this morning: CREATE VIEW fw_user_roles AS SELECT USERS.USER_NAME AS USER_NAME, ROLES.NAME AS ROLE_NAME FROM fw_users AS USERS, fw_user_role_rltns AS RLTNS , fw_roles AS ROLES WHERE USERS.DATA_KEY = RLTNS.PRIMARY_KEY AND ROLES.DATA_KEY = RLTNS.SECONDARY_KEY ORDER BY USER_NAME, ROLE_NAME Unfortunately looks like I may have to update my version of mysql to 5.??? -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 02 March 2005 11:24 To: Tomcat Users List Subject: Re: realm configuration Use a view -Tim Nathan Coast wrote: > Hi, > > I have the following db structure for my user / role tables: > > User User-Role Role > -- --- -- >id -- user_id > usernamerold_id --- id > passwordrolename > > > Is there a realm implementation that support this structure? > > AFAICT, the JDBC and DataSourceRealm classes require the following > structure: > > User User-Role > -- --- > username -- username > passwordrole_name > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: realm configuration
That sql isn't mysql specific. Should work for you fine. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 02 March 2005 12:33 To: Tomcat Users List Subject: Re: realm configuration I guess (I don't use mysql) -Tim Mark Benussi wrote: > Just done this this morning: > > CREATE VIEW fw_user_roles AS SELECT USERS.USER_NAME AS USER_NAME, ROLES.NAME > AS ROLE_NAME > FROM fw_users AS USERS, fw_user_role_rltns AS RLTNS , fw_roles AS ROLES > WHERE USERS.DATA_KEY = RLTNS.PRIMARY_KEY > AND ROLES.DATA_KEY = RLTNS.SECONDARY_KEY > ORDER BY USER_NAME, ROLE_NAME > > Unfortunately looks like I may have to update my version of mysql to 5.??? > > -Original Message- > From: Tim Funk [mailto:[EMAIL PROTECTED] > Sent: 02 March 2005 11:24 > To: Tomcat Users List > Subject: Re: realm configuration > > Use a view > > -Tim > > Nathan Coast wrote: > >>Hi, >> >>I have the following db structure for my user / role tables: >> >> User User-Role Role >>-- --- -- >> id -- user_id >> usernamerold_id --- id >> passwordrolename >> >> >>Is there a realm implementation that support this structure? >> >>AFAICT, the JDBC and DataSourceRealm classes require the following >>structure: >> >> User User-Role >>-- --- >> username -- username >> passwordrole_name >> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to access web site from other computers
Not wishing to be fussy but you don't have to have a static IP. You can have a dynamic IP and there are various companies that will manage this for free https://www.dyndns.org/ Some routers like my UK BT ADSL modem come with functionality that notifies dyndns as soon as the dynamic IP changes. -Original Message- From: Ramu, Vinod [mailto:[EMAIL PROTECTED] Sent: 08 March 2005 16:32 To: Tomcat Users List Subject: RE: How to access web site from other computers The IP allocated to your machine must be STATIC. If you built a internet site then ask your internet service provider to allocate a static IP to your machine. Otherwise, if you have built a intranet site talk to your system administrator, probably he will find a domain controller. -Original Message- From: U K Laxmi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 11:13 AM To: Tomcat Users List Subject: How to access web site from other computers I've a web application developed using apache and tomcat on windows 2000 machine. I can access the application locally. ie. using http://localhost/web/JSP/login.html and also using machine name ie. http://dummy/web/JSP/login.html. My computer is in network. But i'm unable access my web application from other computers. What should i do to make my web application available on other machines as well? Any other s/w i need? Pls suggest. __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: url of caller?
Worth mentioning this as I have been down this path. Symantec Intenet Security products and the like, will remove this header. I actually contemplated writing to Symantec about this only this morning (I think I have too much time on my hands). http://service1.symantec.com/SUPPORT/nip.nsf/docid/2002042913273736?Open&src=&docid=2002110811290836&nsf=nip.nsf&view=docid&dtype=&prod=&ver=&osv=&osv_lvl= (Search for Referrer) http://service1.symantec.com/SUPPORT/nip.nsf/docid/2002110811290836?Open&src=&docid=2002042913273736&nsf=nip.nsf&view=docid&dtype=&prod=&ver=&osv=&osv_lvl= Original Message Follows From: "Pawson, David" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: "Tomcat Users List" Subject: url of caller? Date: Tue, 22 Mar 2005 14:13:55 - Is it possible to determine the url of the webpage from which a particular servlet was called please? I.e. the target of a 'back' action on the browser? public java.lang.String getRequestURI() is the 'current' page, I need the calling page. Regards DaveP. snip here * -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: caching pattern
If you are caching content, e.g. pages I would recommend using XSL to transform the data into html, or jsp if you need. At startup and then whenever it is changed. For data, implement a persistence pattern (Data extends BaseData class, Persistence extends BasePersistence class). Then for any data you want to cache extend the BaseData to override the CRUD methods to hold data in a Hashtable by key lookup (Assuming your data can be looked up using a single key). Implement a time to live Timer (Say an hour) and then every time your data is read, update its time stamp for the timer to ignore. -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 29 March 2005 14:17 To: tomcat-user@jakarta.apache.org Subject: Re: caching pattern A listing of some names, and some static content, the content is pulled from the database, but is infrequently changed >From: QM <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: Tomcat Users List >Subject: Re: caching pattern >Date: Mon, 28 Mar 2005 18:19:28 -0600 > >On Mon, Mar 28, 2005 at 04:47:30PM +, Didier McGillis wrote: >: Im looking for an idea of how to setup a caching pattern? > >That's awful vague ;) > >What sort of caching? Content, data, other? > >Depending on what you're trying to do, and your desire/willingness to >use third-party tools, you may not have to write it yourself from >scratch. > >-QM > >-- > >software -- http://www.brandxdev.net/ >tech news -- http://www.RoarNetworX.com/ >code scan -- http://www.JxRef.org/ > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: caching pattern
The content or the data? -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 29 March 2005 15:59 To: tomcat-user@jakarta.apache.org Subject: RE: caching pattern Are there any good examples of this? >From: "Mark Benussi" <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: "'Tomcat Users List'" >Subject: RE: caching pattern >Date: Tue, 29 Mar 2005 14:54:24 +0100 > >If you are caching content, e.g. pages I would recommend using XSL to >transform the data into html, or jsp if you need. At startup and then >whenever it is changed. > >For data, implement a persistence pattern (Data extends BaseData class, >Persistence extends BasePersistence class). Then for any data you want to >cache extend the BaseData to override the CRUD methods to hold data in a >Hashtable by key lookup (Assuming your data can be looked up using a single >key). Implement a time to live Timer (Say an hour) and then every time your >data is read, update its time stamp for the timer to ignore. > >-Original Message- >From: Didier McGillis [mailto:[EMAIL PROTECTED] >Sent: 29 March 2005 14:17 >To: tomcat-user@jakarta.apache.org >Subject: Re: caching pattern > >A listing of some names, and some static content, the content is pulled >from > >the database, but is infrequently changed > > >From: QM <[EMAIL PROTECTED]> > >Reply-To: "Tomcat Users List" > >To: Tomcat Users List > >Subject: Re: caching pattern > >Date: Mon, 28 Mar 2005 18:19:28 -0600 > > > >On Mon, Mar 28, 2005 at 04:47:30PM +, Didier McGillis wrote: > >: Im looking for an idea of how to setup a caching pattern? > > > >That's awful vague ;) > > > >What sort of caching? Content, data, other? > > > >Depending on what you're trying to do, and your desire/willingness to > >use third-party tools, you may not have to write it yourself from > >scratch. > > > >-QM > > > >-- > > > >software -- http://www.brandxdev.net/ > >tech news -- http://www.RoarNetworX.com/ > >code scan -- http://www.JxRef.org/ > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: caching pattern
Ill put something together and send it to you, not the list as I think people mind large files being posted. Will try and get it out by 5pm BST -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 29 March 2005 18:12 To: tomcat-user@jakarta.apache.org Subject: RE: caching pattern data, or as they say in new england datur >From: "Mark Benussi" <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: "'Tomcat Users List'" >Subject: RE: caching pattern >Date: Tue, 29 Mar 2005 16:01:08 +0100 > >The content or the data? > >-Original Message- >From: Didier McGillis [mailto:[EMAIL PROTECTED] >Sent: 29 March 2005 15:59 >To: tomcat-user@jakarta.apache.org >Subject: RE: caching pattern > >Are there any good examples of this? > > >From: "Mark Benussi" <[EMAIL PROTECTED]> > >Reply-To: "Tomcat Users List" > >To: "'Tomcat Users List'" > >Subject: RE: caching pattern > >Date: Tue, 29 Mar 2005 14:54:24 +0100 > > > >If you are caching content, e.g. pages I would recommend using XSL to > >transform the data into html, or jsp if you need. At startup and then > >whenever it is changed. > > > >For data, implement a persistence pattern (Data extends BaseData class, > >Persistence extends BasePersistence class). Then for any data you want to > >cache extend the BaseData to override the CRUD methods to hold data in a > >Hashtable by key lookup (Assuming your data can be looked up using a >single > >key). Implement a time to live Timer (Say an hour) and then every time >your > >data is read, update its time stamp for the timer to ignore. > > > >-Original Message- > >From: Didier McGillis [mailto:[EMAIL PROTECTED] > >Sent: 29 March 2005 14:17 > >To: tomcat-user@jakarta.apache.org > >Subject: Re: caching pattern > > > >A listing of some names, and some static content, the content is pulled > >from > > > >the database, but is infrequently changed > > > > >From: QM <[EMAIL PROTECTED]> > > >Reply-To: "Tomcat Users List" > > >To: Tomcat Users List > > >Subject: Re: caching pattern > > >Date: Mon, 28 Mar 2005 18:19:28 -0600 > > > > > >On Mon, Mar 28, 2005 at 04:47:30PM +, Didier McGillis wrote: > > >: Im looking for an idea of how to setup a caching pattern? > > > > > >That's awful vague ;) > > > > > >What sort of caching? Content, data, other? > > > > > >Depending on what you're trying to do, and your desire/willingness to > > >use third-party tools, you may not have to write it yourself from > > >scratch. > > > > > >-QM > > > > > >-- > > > > > >software -- http://www.brandxdev.net/ > > >tech news -- http://www.RoarNetworX.com/ > > >code scan -- http://www.JxRef.org/ > > > > > >- > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Proper way to open threads in a servlet
I would place your e-mail in a MailManager that queues the messages and sends them out on a TimerTask (Every 10 seconds???). Secondly from a pernickety perspective I would not have a Servlet doing any of what you described. At least place this code a level down in a Manager class that can coordinate with the MailManager. -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 11:39 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: [OT] Proper way to open threads in a servlet Your question is not really Tomcat so I put it Off Topic. On Fri, 1 Apr 2005 15:24:10 +1000 "Steve Vanspall" <[EMAIL PROTECTED]> wrote: > Hi there, > > I am concerned that opening a thread in my serlvet using new Thread(Runnable) style code, is causing a massive hang in my system. > I don't understand why this hang your system !?... You can't do like this but don't forget to daemonize your thread. If you don't want your thread to run in the same JVM as Tomcat, you can send a message to a daemon; then the daemon (in another JVM and/or another server) will receive the messages and treat them (in new Threads). To send messages, you can use JMS (so, you need a JMS server) or sockets TCP or UDP (see java.net). > Basically what the thread does is email people to notify them of a change in an order on the system. > > I want the emails to be sent in a separate thread so that the user doesn't have to wait for this to complete to return to the system. > > Basically the email is a non crucial part, the action has already been performed. I know this isn't specifically a Tomcat question, but I thought I would ask it anyway. > > The two ways this could work is that the email is placed in a queue, that is checked periodically, or just somehow the email(s) are sent in the background, but without opening a new thread using code. > > Can anyone give me some pointers on how to do this. Yes I have been searching around, but haven't found much information. > > Tahnks in advance > > Steve > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can i use javax.management.timer.Timer?
Am I allowed to ask what it is and how it differs from java.util.Timer? Just like to educate myself from time to time... -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: 30 August 2005 12:12 To: Tomcat Users List Subject: RE: can i use javax.management.timer.Timer? yes you can use it. its plain JMX so check out how to use it regardless of tomcat (standalone mode) and do the same thing in tomcat but by using tomcat's mbean server. -Original Message- From: Ittay Dror [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 2:00 PM To: Tomcat Users List Subject: can i use javax.management.timer.Timer? Hi, If javax.management.timer.Timer can be used inside tomcat, can you please give an example of how? Thanx, Ittay -- === Ittay Dror ([EMAIL PROTECTED]) Application Team Leader, R&D Qlusters Inc. +972-3-6081994 Fax: +972-3-6081841 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT Friday] Parse HTML file to underlying text
I know I missed the Friday deadline but... Has anyone any recommendations for parsing html. I use Lucene and the example has its own HTML parser but I was wondering if anyone has used an existing project or whether there is some built in functionality in an Apache lib to convert Hello World To Hello World Your thoughts are appreciated.
RE: What's better, having one large servlet or many small ones?
Many small ones. -Original Message- From: Raueber Hotzenplotz [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 10:50 To: tomcat-user@jakarta.apache.org Subject: What's better, having one large servlet or many small ones? Hello Should I have one handler with many methods or more handlers with less methods (1-2)? Thanks! ___ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mysql connection with JSP
jdbc:mysql://:3306/?user=&password= However on a design front I would never personally look up a database connection in a JSP. Others may disagree. -Original Message- From: Cengiz Yazgan [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 11:46 To: 'Tomcat Users List'; 'Tomcat Users List' Subject: mysql connection with JSP Hi everybody I want to connect a mysql database with jsp code. Can anybody help me to write a connection string. Thx. Cengiz YAZGAN Sistem Mühendisi/System Engineer DorukNet Tel / Phone : +90 212 326 92 00 / 447 Fax : +90 212 227 28 11 E-mail : [EMAIL PROTECTED] http://www.doruk.net.tr http://www.doruk.net.tr/english.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] How much RAM can java use
This was probably one of the best threads I have 'listened' to in ages. I am researching setting up my own Tomcat hosting. This is going to be of use. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 20:48 To: Tomcat Users List Subject: Re: [OT] How much RAM can java use Chuck, Ryan, thanx, you were extremely helpful! regards Leon On 10/6/05, J. Ryan Earl <[EMAIL PROTECTED]> wrote: > Leon Rosenberg wrote: > > >Debian 3.1, kernel 2.6.x-smp (32 bit) > >or > >Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) > > > >Hardware: AMD Opteron and Xeon64 (both 64 bit) > > > >SUN jdk1.5 and/or jdk1.4.2 > > > >4 GB total RAM for 32-bit linux, with 3/1 memory partitioning > >16GB total RAM for 64-bit linux. > > > > > I've tested 32/64 bit JVMs extensively and done considerable amount of > JAVA_OPTS tuning for my company's application. On a 32-bit machine you > can't reliably go above a -Xms=1600m without getting OOM errors. With a > 3/1 split your virtual page table size for the entire JVM process must > be below 3GB total virtual memory. That's 3GB allocated, not commited. > The JVM allocates a lot more memory besides the heap. > > With the 64-bit JVMs, the sky's the limit, however the 64-bit address > also make your application take up more space relative to a 32-bit JVM. > A 3.2GB 64-bit heap space isn't going to double the amount of identical > objects you can create as compared to a 32-bit 1.6GB heap space because > all pointer references will occupy twice the space. > > -ryan > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]