Re: Use JMX to manage applications

2007-06-25 Thread Johnny Kewl
Hi Again LightBulb, In this good article http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html You will find an example JMX client, in SRC for talking directly to Tomcats JMXProxy One thing I dont see in the JMX interface, maybe it is there, is a way to start stop webapp through JMX.

Re: Dynamic form-login-page?

2007-06-25 Thread Jon Wilmoth
To add some more context to this, I was able to successfully use a Struts 1.x action in my web.xml. Struts 1 was based on a servlet vs the ServletFilter that Struts 2.x is based on. Is there anything about this architectural change that would require a different Tomcat configuration? The defa

RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
Okay, I am glad that 1.1.7-ipv4 is working. 1.1.9 would have worked with the "address=0.0.0.0" attribute since it is the IPv6 version. A README file in http://tomcat.heanet.ie/native/ would have been helpful. IPv4 is the 32 bit IP address of a device(computer, router etc.), for example 192.1.1.

Re: Use JMX to manage applications

2007-06-25 Thread Johnny Kewl
Hi LightBulb, If you asking this, because of Robert Bowen question "Programmatically stop/start context" from WebApp, I also wait with anticipation for the JMX solution. I have a feeling that making a light weight JMX client that lives in a servlet, may not be that easy, we'll see what he come

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Ok, say have downloaded version 1.1.7/tcnative-1-ipv4.dll and renamed it as tcnative-1.dll without changing anything else. Now everything seems to work ok - ie no more exceptions. So what is the difference between ipv4 and ipv6 and why dont later versions mention them. They just DONT work so why h

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Lakshmi, Thanks for the reply. If what you say is true then this 'feature' of Tomcat is obviously beyond the understanding of us 'mere mortals'. I have an application to maintain without having to get to grips with the detailed ins-and-outs of the guts of each Web/App/EJB server, etc, that I'm r

How to add -Djava.library.path to tomcat

2007-06-25 Thread Yifan (Eric) Jiang
Hi, I would like to load a library (.dll in windows and .so in linux) in a Java application, so I have to add the path of the library to LD_LIBRARY_PATH (Linux) or PATH (Windows). In addition, I also need to add -Djava.library.path=. However this is only for a standalone java application. But I

no-cache Headers In Authenticated Zones

2007-06-25 Thread Adrian Sutton
Hi all, It seems that Tomcat automatically adds Pragma: no-cache and a pre- dated Expires header whenever the user requests a page that requires container-based authentication. This has come up on the mailing list in the past: http://mail-archives.apache.org/mod_mbox/tomcat-users/200504.mbox/

RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
No, don't try 1.1.0. I had problems with it on all platforms. I compiled the source on Solaris and Linux. If 1.1.9 does not work, check your server.xml configuration file for your connector. Use address ="0.0.0.0" atribute if you care for Ipv4 only. Please refer to my posting to this group on 05

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Steve, I appreciate it 'works without it' - but not a good sales line ie "we aren't sure what it does, probably some technical stuff, but we can't figure it out". A Ferrari works quite well as a pedal car without an engine! Ouch!! But then if everyone who has made it work says 'it makes no diff

Dynamic form-login-page?

2007-06-25 Thread Jon Wilmoth
I'm having problems using FORM authentication and a dynamic login page via Struts 2. I've tried the following web.xml/struts.xml entries with S2.0.8 & Tomcat 5.5.23, but get a 404 "The requested resource (/mywebapp/login.action) is not available" message. FORM /login.action /loginFailure

Re: securing directory

2007-06-25 Thread Rainer Jung
If you really really want to it: Read about exclusion rules in http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html but think twice, if this is robust, i.e. if the web server admin will have a chance to keep this up-to-date. Regards, Rainer tomcat user wrote: Why would you

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Due to the ascii sorted list on a volume then the last entry in http://tomcat.heanet.ie/native/ is actually Version 1.1.9 - and so this is the version I actually have tried, not 1.1.10. OK - so you will now say 'try version 1.1.10' - which I've done and it gives exactly the same exception. Aaargh.

Re: Windows Native lib

2007-06-25 Thread Steve Ochani
On 25 Jun 2007 at 21:55, Clive Webster wrote: > Have spent the last 8 hours trying to work out how to use the 'native' > library for Tomcat 5.5.23 - without any success. > I hope you realize that you don't *have* to use it. > Have managed to download lots of C++ source code - which is useles

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Nathan, Here's a size 8 foot... ;-) Yep: already seen that link which reports a [730048] error, which is close to my [730047] error - but not quite! Only have a single instance running (not as a service for now - but via 'startup.bat') and if I remove the dll from ${CATALINA_HOME}/bin (which is

Re: Is HttpSession id a GUID

2007-06-25 Thread Ingo Düppe
Hi Chris, you are totally right, I didn't saw the solution. Thx Ingo Christopher Schultz schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ingo, Ingo Düppe wrote: is the http session id a global unique id within a tomcat 6.0.13 cluster? I think a better question is whether th

RE: Windows Native lib

2007-06-25 Thread Nathan Hook
Of course I didn't read your entire email to see that you had already found the tcnative-1.dll file. That clearly would have taken too much time and would have kept me from putting my foot in my mouth. :) So, to try and help AFTER reading your entire email... I did a google search for: "So

RE: Windows Native lib

2007-06-25 Thread Lakshmi Venkataraman
>From my own experience documented in my postings to this group under the subject heading: "Tomcat 5.5, IPv6, APR, HTTP,HTTPS", tcnative-1.1.10 does not work properly. Please try tcnative-1.1.8 or tcnative-1.1.9. --Lakshmi -Original Message- From: Clive Webster [mailto:[EMAIL PROTECTED]

RE: tomcat 6 - invoker servlet?

2007-06-25 Thread Caldarale, Charles R
> From: Leonardo Augusto [mailto:[EMAIL PROTECTED] > Subject: tomcat 6 - invoker servlet? > > I realized that, on tomcat 6.0.13, the "invoker servlet" /servlet/ > doesn't work. That sounds like a good thing. It's unfortunate that it exists at all. http://tomcat.apache.org/faq/misc.html#invoker

RE: Windows Native lib

2007-06-25 Thread Clive Webster
Hi Nathan, Yep: http://tomcat.heanet.ie/native/ is where I downloaded the tcnative-1.dll and openssl.exe from before. And these downloads give me the Tomcat runtime error mentioned in my original email. So if the downloads are correct - then what else can cause the '730047' error code ? -O

RE: Windows Native lib

2007-06-25 Thread Nathan Hook
To get rid of this error message and speed up Tomcat just a small amount you need to install the tcnative-1.dll You can find this .dll file at: http://tomcat.apache.org/tomcat-5.5-doc/apr.html The link to the download area is: http://tomcat.heanet.ie/native/ You will then want to get the lat

Windows Native lib

2007-06-25 Thread Clive Webster
Have spent the last 8 hours trying to work out how to use the 'native' library for Tomcat 5.5.23 - without any success. Have managed to download lots of C++ source code - which is useless since I don't have an MS C++ compiler and don't want to buy one as I live in a Java world not a C++ world !!!

Re: Is HttpSession id a GUID

2007-06-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ingo, Ingo Düppe wrote: > is the http session id a global unique id within a tomcat 6.0.13 cluster? I think a better question is whether the servlet specification guarantees a globally unique session id: it doesn't. The reason I recommend focusing o

Can't override Context className from context.xml located in webapp/META-INF dir

2007-06-25 Thread randy_hoffman
Hi, I am running Tomcat 6.0.13 and when i specify the className attribute in a Context element inside a context.xml file inside the META-INF directory of my webapp, it is ignored. If i move the context.xml file to conf/[Engine]/[Host]/webapp.xml it works. Any ideas? Is this a feature, a bug?

Is HttpSession id a GUID

2007-06-25 Thread Ingo Düppe
Hello, is the http session id a global unique id within a tomcat 6.0.13 cluster? I like to use it as a unique field within the db for user tracking, so it should be unique within the cluster and time. Regards Ingo - To start

Use JMX to manage applications

2007-06-25 Thread lightbulb432
How, from a web application deployed to Tomcat, can you customize the behavior of your web application based on attributes specified in an MBean? The link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html talks a lot about Ant tasks, but that's not really what I'm looking to do. How can you

tomcat 6 - invoker servlet?

2007-06-25 Thread Leonardo Augusto
hi, I realized that, on tomcat 6.0.13, the "invoker servlet" /servlet/ doesn't work. To make it work I had to add in the file /tomcat60/conf/context.xml the parameter "privileged=true" The contents of this file will be loaded for each web application Is there any security issue in tomcat 6.0.13

Re: In-Process Tomcat

2007-06-25 Thread Leon Rosenberg
On 6/25/07, lightbulb432 <[EMAIL PROTECTED]> wrote: > You mention that when you use a static content server, it's generally >> something other that HTTPD. Is there a particular reason for that? What >> static servers have you generally seen in use apart from HTTPD - are >> there >> things that

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl
Even better, thanks Chuck Look at the code in the Tomcat admin (5.5 only) and manager webapps. - Chuck - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

tomcat performance dilemma

2007-06-25 Thread Gabriela Gheorghe
Hi everybody, I am facing a stress-testing problem using Tomcat 5.5 and Axis 1.4, and I really need some ideas about what is happening behind the scenes. This is the configuration: a few web services hosted on Axis 1.4 are deployed on Tomcat. Everything runs on 2 Linux Pentium 4 machines (with h

Re: Multiple instances vs multiple hosts

2007-06-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lb, lightbulb432 wrote: > In production, for organizations that run multiple web applications, would > they run it on different instances of Tomcat (1 instance per web application > or group of related web applications), or all web applications as dif

Re: In-Process Tomcat

2007-06-25 Thread lightbulb432
> You mention that when you use a static content server, it's generally >> something other that HTTPD. Is there a particular reason for that? What >> static servers have you generally seen in use apart from HTTPD - are >> there >> things that just work "better" in the setup you described than oth

RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
> From: Robert Bowen [mailto:[EMAIL PROTECTED] > Subject: Re: Programmatically stop/start context (webapp) > > What the 'tomcat compat package' is. The compatibility package was for running Tomcat 5.5 on JRE 1.4; there is no corresponding package for TC 6, since it requires JRE 1.5. You don't n

RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
> From: Johnny Kewl [mailto:[EMAIL PROTECTED] > Subject: Re: Programmatically stop/start context (webapp) > > I'd love to see the code that gets at those mbeans Look at the code in the Tomcat admin (5.5 only) and manager webapps. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTH

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl
YES, damn good idea... I'm looking at it from an embedded tomcat perspective, but yes sounds good, why not use an exposed interface I'd love to see the code that gets at those mbeans, never done it before if you find an example post it. - Original Message - From: "Robert Bowen

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Robert Bowen
Yes, these are the ones I am following. Specifically the Tomcat 6 how-to. The parts I don't understand are: 1. What the 'tomcat compat package' is. I downloaded MX4J but only copied the mx4j-tools.jar to /tomcat/lib. But in step 1 it says "Install the tomcat compat package". I am hoping not to

Re: Run multiple instances of tomcat on windows

2007-06-25 Thread Cartman
You must create the directory structure... and set the environment vars. CATALINA_HOME/ CATALINA_HOME/bin CATALINA_HOME/common . . . . CATALINA_BASE/ CATALINA_BASE/instance1 CATALINA_BASE/instance1/conf CATALINA_BASE/instance1/webapps . . . CATALINA_BASE/ CATALINA_BASE/instance2 CATALINA_BA

Re: securing directory

2007-06-25 Thread tomcat user
Why would you assume that? because. Not readily, since static content comes from there. You could write a filter to return an error for a request for a prohibited file. Thank you for your help Chuck, I just thought there had to be an easier way. I would think it pretty basic to want to be a

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl
Other post answers first part Second part of you interesting question... What you could try do is intercept the System.out streams... and pass them on. It wont be your fancy log4 formating, but you should be able to see the same stuff, that one see's in Netbeans I think thats all it do

RE: securing directory

2007-06-25 Thread Caldarale, Charles R
> From: tomcat user [mailto:[EMAIL PROTECTED] > Subject: Re: securing directory > > assuming that a file does need to reside directly under > the webapp folder Why would you assume that? > can I secure the webapp directory? Not readily, since static content comes from there. You could write a

RE: Programmatically stop/start context (webapp)

2007-06-25 Thread Caldarale, Charles R
> From: Robert Bowen [mailto:[EMAIL PROTECTED] > Subject: Re: Programmatically stop/start context (webapp) > > The difficulty I am having is getting a clear and concise > guide to using JMX/MX4J in Tomcat 6. There are a bunch of > different guides out there that explain how to do this in > Tom

Re: securing directory

2007-06-25 Thread tomcat user
Chuck, I appreciate the response, but assuming that a file does need to reside directly under the webapp folder, can it be hidden from view. Again, I understand the alternative, but can I secure the webapp directory? On 6/25/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: tomca

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Robert Bowen
Hmmm ... This seems kind of kludgy to me. Would it not be better (easier, more elegant) to use Tomcat's monitoring with JMX to do this? I don't have all the details worked out but I believe that with an MBean I can (at least) monitor the container and the apps running in it and (hopefully) start

RE: securing directory

2007-06-25 Thread Caldarale, Charles R
> From: tomcat user [mailto:[EMAIL PROTECTED] > Subject: securing directory > > I would like to know if anybody can tell me how to restrict > web access to my web app's base directory and its sub directories. Read the servlet spec. Anything under WEB-INF is automatically invisible to everythin

securing directory

2007-06-25 Thread tomcat user
Hi all, I would like to know if anybody can tell me how to restrict web access to my web app's base directory and its sub directories. i.e. webapp "Test1" has a file root.xml (tomcat\webapps\Test1\root.xml) While I do need read access programmatically, I need for web users to not access that fil

Multiple instances vs multiple hosts

2007-06-25 Thread lightbulb432
In production, for organizations that run multiple web applications, would they run it on different instances of Tomcat (1 instance per web application or group of related web applications), or all web applications as different hosts on one instance of Tomcat? (Not taking into account clustering,

Re: Programmatically stop/start context (webapp)

2007-06-25 Thread Johnny Kewl
Syg, interesting question I think, that what would make it tricky, is the actually packaging of the solution. In theory if you do this (I'm writing this blind, excuse the code) import org.apache.catalina.ant.*; StartTask startTask = new StartTask(); startTask.setUsername("admin"); sta

RE: Null

2007-06-25 Thread Propes, Barry L
yeah, this seems like a good solution, too. -Original Message- From: PTS [mailto:[EMAIL PROTECTED] Sent: Saturday, June 23, 2007 12:29 PM To: Tomcat Users List Subject: Re: Null I had to deal with a lot of null values coming back from a database. I may have been reinventing the wheel bu

Re: In-Process Tomcat

2007-06-25 Thread Leon Rosenberg
On 6/25/07, lightbulb432 <[EMAIL PROTECTED]> wrote: Any web application that needs to scale wouldn't use httpd (or > anything else) in front of tomcat, so the question in- or out-process > tomcat doesn't matter. From 5 high performance application I know the > details of, 1 is still using apach

RE: In-Process Tomcat

2007-06-25 Thread Caldarale, Charles R
> From: lightbulb432 [mailto:[EMAIL PROTECTED] > Subject: Re: In-Process Tomcat > > You're actually the first person I've heard to say that apps > that need to scale would not use HTTPD. I've read the exact > opposite on multiple occassions, but as I'm a relative newbie > to Tomcat I'm hoping pe

Re: In-Process Tomcat

2007-06-25 Thread lightbulb432
Any web application that needs to scale wouldn't use httpd (or > anything else) in front of tomcat, so the question in- or out-process > tomcat doesn't matter. From 5 high performance application I know the > details of, 1 is still using apache in front; more out of habbit, > rather than by need.

RE: session dying

2007-06-25 Thread Jacek Munch
Hello, Thanks to syg6 for pointing. -- The solution - when I made session.setMaxInactiveInterval(7200) in jsp file it started working --- without this line I got standard session timieout after 30 minutes despite setting 120 in both web.xml files (for tomcat and for app) Yours Jacek M

LDAP / ActiveDirectory Problem

2007-06-25 Thread Christopher Hartung
Hi there, we are using Tomcat 5.5.23 with LDAP Auth against our ActiveDirectory. Everythings works fine and the user can auth themself. But in our logs we get error messages like this: 25.06.2007 11:07:20 org.apache.catalina.realm.JNDIRealm authenticate SCHWERWIEGEND: Exception performing aut

RE: Port-based virtual hosting

2007-06-25 Thread Caldarale, Charles R
> From: lightbulb432 [mailto:[EMAIL PROTECTED] > Subject: RE: Port-based virtual hosting > > If you somehow have multiple contexts (within the same Host > or Service, or within different ones in your Tomcat instance) > that point to the same WAR file or docBase, are there multiple > "instances"

Re: Run multiple instances of tomcat on windows

2007-06-25 Thread David kerber
Ashish Kulkarni wrote: Hi The problem i am having is, when i installed second instance of tomcat it replaced the windows service for the first tomcat, so i have only one tomcat Use service.bat from the .zip package to create another service. The easiest way to handle this is to do the windows

RE: session dying

2007-06-25 Thread syg6
Change your web.xml, both in tomcat/conf and myApp/WEB-INF to 120. Get rid of session.setMaxInactiveInterval(120). The setMaxInactiveInterval() method of javax.servlet.http.Interface HttpSession takes the timeout in SECONDS, not minutes. So you are setting your session timeout to 2 minutes. Anywa

RE: session dying

2007-06-25 Thread Jacek Munch
Hello, I want my app to last at least 120 minutes. It dies after 30 minutes ... WHY ? Cheers Jacek -Original Message- From: syg6 [mailto:[EMAIL PROTECTED] Sent: Monday, June 25, 2007 1:18 PM To: users@tomcat.apache.org Subject: Re: session dying Not sure what you're trying to do with

Re: session dying

2007-06-25 Thread syg6
Not sure what you're trying to do with 480 and 600 but the session-timeout is specified in minutes. If you want your app to timeout after 30 minutes, put 30 Bob Jacek Munch wrote: > > Hello, > > I looked around this list, and noticed that nobody has the similar > problem. > Seems I

Re: Performance

2007-06-25 Thread syg6
1. This is a question for the http://forum.java.sun.com/forum.jspa?forumID=31 java forum , not Tomcat. 2. Yes, it's an incredibly wasteful way of doing things. Change your sql so the 'extra info' you need is included in the same query. Chances are if you can do it with two queries you can do it w

Performance

2007-06-25 Thread Mohammed Zabin
Hi All I have developed a web site that opens a recordset at start, and while looping through records of the main ResultSet i Open a new ResultSet for each record, to get a specific information, then close it. like this: while( rs.next() ) { Statement stmt = dbConn.createStatement(); ResultSe

session dying

2007-06-25 Thread Jacek Munch
Hello, I looked around this list, and noticed that nobody has the similar problem. Seems I'm setting something wrong. What ? I have a JSP application. I start it with my browser and make it inactive for more than 30 minutes. My session dies, so the user has to login back again. In conf \ web.xlm

Programmatically stop/start context (webapp)

2007-06-25 Thread syg6
Hello, I would like to be able to start and stop my 'cache' webapp from my own 'cache-admin' webapp. These two apps usually run on the same Tomcat instance, but not always. I am not sure if I should use ManagerServlet or HTMLManagerServlet, or Embedded tomcat. I have found some examples on this

Will Tomcat 6 support JSR-196 (Java Authentication SPI for Containers)?

2007-06-25 Thread Guofeng Zhang
Hi, Is there any plan in Tomcat's roadmap that when Tomcat will support JSR-196? Thanks