Re: JAAS authentication goes OK, but 403 occurs on requesting resources

2008-04-02 Thread Liyi Meng
Hi Chuck, Thanks for your reply. Here is my web.xml consider of security: security-constraint display-nameSecurity Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected --

Re: parsing of .jsp not functional

2008-04-02 Thread Andre Hübner
I found no errors or hits in TomcatLogs but the 200er HTTP-Request only in ApacheLog. Id did now a change. I wrote the mod_jk directives now inside my virtualhost and the parsing is working. afore i had directive JkMount just in global Serverconf to match any Virtualhost. This Part of conf i

RE: Tomcat performance over VMWare

2008-04-02 Thread Karim Zaki
Hi Gabe, I allocated 2 processors to the VM. Regards, Karim - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Issue with Tomcat 5.5 Datasource configuration

2008-04-02 Thread Hanmay Udgiri
Hi I am using a Datasource configuration with tomcat 5.5 and oracle 9i.I want to use a Datasource which is accessible to all web apps. I have added the Resource tag under GlobalNamingResources and a ResourceLink in a context.xml file of a web application. But Here My other web apps are also

Issue with Tomcat 5.5 Datasource configuration

2008-04-02 Thread Hanmay Udgiri
Hi I am using a Datasource configuration with tomcat 5.5 and oracle 9i.I want to use a Datasource which is accessible to all web apps. I have added the Resource tag under GlobalNamingResources and a ResourceLink in a context.xml file of a web application. But Here My other web apps are also

where to put config file in a webapp

2008-04-02 Thread Kimberly Begley
Hi, I have a config file for a web application - currently the absolute path is specified in a java class that's method's are read by a servlet to get the info in the config file - I want to deploy the webapp on a remote server so I'd like to remove the absolute path to the file but can't seem to

RE: where to put config file in a webapp

2008-04-02 Thread Caldarale, Charles R
From: Kimberly Begley [mailto:[EMAIL PROTECTED] Subject: where to put config file in a webapp Currently it is in WEB-INF Normally, such a properties or config file would be placed in WEB-INF/classes, and accessed via ServletContext.getResourceAsStream(). I read online that I could put the

Re: where to put config file in a webapp

2008-04-02 Thread Kimberly Begley
Great thanks - it's not actually in a servlet - just a java class of methods so I guess I could pull it out of the java class and put it into the servlet that is calling the method - if that makes sense - I was just hoping to avoid that. Thanks for the advice - much appreciated. On Wed, Apr 2,

Re: where to put config file in a webapp

2008-04-02 Thread David Smith
Caldarale, Charles R wrote: From: Kimberly Begley [mailto:[EMAIL PROTECTED] Subject: where to put config file in a webapp Currently it is in WEB-INF Normally, such a properties or config file would be placed in WEB-INF/classes, and accessed via ServletContext.getResourceAsStream().

RE: where to put config file in a webapp

2008-04-02 Thread Peter Crowther
From: Kimberly Begley [mailto:[EMAIL PROTECTED] Great thanks - it's not actually in a servlet - just a java class of methods so I guess I could pull it out of the java class and put it into the servlet that is calling the method - if that makes sense - I was just hoping to avoid that. Can

Re: where to put config file in a webapp

2008-04-02 Thread Kimberly Begley
very cool - yes sorry I never seem to give enough detailed info - thanks for reading my mind! you have my wants described very clearly! I will give it a go - thanks!! On Wed, Apr 2, 2008 at 10:08 PM, Peter Crowther [EMAIL PROTECTED] wrote: From: Kimberly Begley [mailto:[EMAIL PROTECTED]

Re: where to put config file in a webapp

2008-04-02 Thread Ingmar Lötzsch
You also can use ResourceBundle (if you need only Strings) or ListResourceBundle. 1. ResourceBundle Save your configuration in com.x.y.z.MyConfig.properties (or in the default package) In your Java class type ResourceBundle bundle = ResourceBundle.getBundle(com.x.y.z.MyConfig); (=

Re: Deleting context xml files

2008-04-02 Thread Mark H. Wood
Oh, yes, I've seen that too. I've spent so much time fighting this problem that I now keep both 'ctx.xml' and 'ctx.xml.saved' in each host directory, and always edit the .saved version and copy it over, so that I don't lose my work when Tomcat destroys the live context file. But I haven't seen

Re: where to put config file in a webapp

2008-04-02 Thread Ingmar Lötzsch
I forgot to change line 113: old version Object[][] contents = resources.toArray(new Object[0][0]); new version Object[][] contents = resources.toArray(emptyObjectArray); Ingmar - To start a new topic, e-mail:

How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
I'm developing a system that will generate a file dynamically, and i want to make it possible to be downloaded from server after it's created. The problem is that when i link the file, the response i get is that it doesn't exist. After a few tests we've figured out that if the file existed

Tomcat 5.5 and keep-alive and http connector

2008-04-02 Thread Andrew Miehs
Dear List, How does enabling keep-alives effect the number of threads required by tomcat? Assuming: maxKeepAliveRequest = -1 1000 online users - each with 2 connections Does this mean that I will have 2000 threads open - one per connection? ie: Is the the connection assigned a thread

Command line parameters inside webapps ?

2008-04-02 Thread Maxim Veksler
Hello everyone, Can I read from my webapp a command line parameters passed to tomcat when it's loaded ? Something of the -Dsomeparameter=somevalue, alternatively can I get access to environment variables passed to tomcat on it's initialization from my webapp ? What I'm trying to do is allow

Re: Command line parameters inside webapps ?

2008-04-02 Thread David kerber
Yes. You can use System.getProperty( myPropertyName, defaultValue ) to retrieve system parameters set on startup with -DmyPropertyName=myPropertyValue Maxim Veksler wrote: Hello everyone, Can I read from my webapp a command line parameters passed to tomcat when it's loaded ? Something of

RE: Command line parameters inside webapps ?

2008-04-02 Thread Caldarale, Charles R
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxim Veksler Subject: Command line parameters inside webapps ? Something of the -Dsomeparameter=somevalue Any system property (a -D setting) can be read by any Java method, unless not prohibited by security settings (extremely

Re: Command line parameters inside webapps ?

2008-04-02 Thread Maxim Veksler
On Wed, Apr 2, 2008 at 6:36 PM, David kerber [EMAIL PROTECTED] wrote: Yes. You can use System.getProperty( myPropertyName, defaultValue ) to retrieve system parameters set on startup with -DmyPropertyName=myPropertyValue Great thank you. Maxim Veksler wrote: Hello everyone, Can I

RE: Tomcat 5.5 and keep-alive and http connector

2008-04-02 Thread Caldarale, Charles R
From: Andrew Miehs [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5 and keep-alive and http connector The only thing I could find related to this was from the Tomcat 6.0 documentation on http://people.apache.org/~fhanik/http.html It appears that the chart at the bottom of the above page

Re: Command line parameters inside webapps ?

2008-04-02 Thread Maxim Veksler
On Wed, Apr 2, 2008 at 6:37 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxim Veksler Subject: Command line parameters inside webapps ? Something of the -Dsomeparameter=somevalue Any system property (a -D

Re: Tomcat 5.5 and keep-alive and http connector

2008-04-02 Thread Andrew Miehs
On 02/04/2008, at 5:51 PM, Caldarale, Charles R wrote: From: Andrew Miehs [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5 and keep-alive and http connector The only thing I could find related to this was from the Tomcat 6.0 documentation on http://people.apache.org/~fhanik/http.html It appears

N00b Installation Question

2008-04-02 Thread Lizard Lizard
Greetings! I am trying to setup/configure Tomcat 6.0 under Vista. I am mostly following the examples in the Eclipse Cookbook. Tomcat is running; I get the appropriate startup page when I go to localhost:8080 However, I cannot get my first example to work properly. Here's all of the relevant

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
Typically when you're generating dynamic content like that, you don't serve it in the same way as a file on the file system does. Instead you usually serve it from memory, or from a database if you had need to store it somewhere. If you deploy within an EAR you'll find that writing to the file

application folder name in webapps folder in tomcat through java servletlistner

2008-04-02 Thread Raghuveer
I have HelloServlet ,HelloServletContextListener in 3 different applications in tomcat tomcat_homewebapps\AppHello1 tomcat_homewebapps\AppHello2 tomcat_homewebapps\AppHello3 How to identify in my listner class what is the folder/context name in my server. public void

Re: N00b Installation Question

2008-04-02 Thread David Smith
I'll give you a hint ... case matters. Take a really close look at what you've setup in your web.xml and what you've named your servlet. extenXLSTestbed != ExtenXLSTestbed. --David Lizard Lizard wrote: Greetings! I am trying to setup/configure Tomcat 6.0 under Vista. I am mostly following

RE: N00b Installation Question

2008-04-02 Thread Caldarale, Charles R
From: Lizard Lizard [mailto:[EMAIL PROTECTED] Subject: N00b Installation Question The class is in package ExtenXLSTestbed. servlet-classextenXLSTestbed.ServletClass/servlet-class Case matters. I have tried several variants on the URL, including

RE: unable to locate package in 5.5 source

2008-04-02 Thread Raminder Singh
Mark, Thanks for your feedback. Can you please explain: 1) whats the best way to replace or how to use same code functionality which is provided by tomcat5 package in tomcat 5.0? 2) Which package in tomcat 5.5 maps to tomcat5 package of tomcat 5.0?? 3) Are all files from tomcat5 package

Re: N00b Installation Question

2008-04-02 Thread Lizard Lizard
On Wed, Apr 2, 2008 at 12:06 PM, David Smith [EMAIL PROTECTED] wrote: I'll give you a hint ... case matters. Take a really close look at what you've setup in your web.xml and what you've named your servlet. extenXLSTestbed != ExtenXLSTestbed. Gack. I kept looking for case errors -- I know it

Re: N00b Installation Question

2008-04-02 Thread Lizard Lizard
On Wed, Apr 2, 2008 at 12:06 PM, David Smith [EMAIL PROTECTED] wrote: I'll give you a hint ... case matters. Take a really close look at what you've setup in your web.xml and what you've named your servlet. extenXLSTestbed != ExtenXLSTestbed. I double-checked; the typo was in my post to this

Re: N00b Installation Question

2008-04-02 Thread Lizard Lizard
I have solved the problem. Norton was blocking connections. :) Looking at the logs helped. Thanks for that suggestion. I have unblocked it in Norton. Now I need to research the security issues more; I do not want a public server, I want it to only accept connections from localhost. Are there

Re: N00b Installation Question

2008-04-02 Thread David Smith
In that case, you'll have to take a look at your logs for clues to what's happening. Can you post relevant parts of your logs for when your webapp was started and when you tried to request the servlet? --David Lizard Lizard wrote: On Wed, Apr 2, 2008 at 12:06 PM, David Smith [EMAIL

RE: N00b Installation Question

2008-04-02 Thread Caldarale, Charles R
From: Lizard Lizard [mailto:[EMAIL PROTECTED] Subject: Re: N00b Installation Question I do not want a public server, I want it to only accept connections from localhost. RTFM: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html Set the address attribute of whatever Connector elements

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
Ok... I've made some research on that too... I'm actually generating a report (.pdf file) with jasper, and it already enables me to export it to an outputstrem, as in this code: memoryPDF = new FileOutputStream(test); this.bytes =

Re: unable to locate package in 5.5 source

2008-04-02 Thread Mark Thomas
Raminder Singh wrote: Mark, Thanks for your feedback. Can you please explain: 1) whats the best way to replace or how to use same code functionality which is provided by tomcat5 package in tomcat 5.0? 2) Which package in tomcat 5.5 maps to tomcat5 package of tomcat 5.0?? 3) Are all files

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Caldarale, Charles R
From: Guilherme Orioli [mailto:[EMAIL PROTECTED] Subject: Re: How can I refresh tomcat in the java code? memoryPDF = new FileOutputStream(test); Don't create a FileOutputStream, use ServletResponse.getOutputStream() instead. Make sure you set the content type to application/pdf, of course.

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
What he said :) FYI, serving PDFs in particular can be a bloody mess because of Acrobat STILL not being able to get their s**t together when it comes to their browser plug-in. I wrote a Wiki entry on the Struts Wiki some time ago that might help:

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Caldarale, Charles R
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Subject: RE: How can I refresh tomcat in the java code? FYI, serving PDFs in particular can be a bloody mess because of Acrobat STILL not being able to get their s**t together when it comes to their browser plug-in. I finally gave up and

Re: N00b Installation Question

2008-04-02 Thread Lizard Lizard
On Wed, Apr 2, 2008 at 1:10 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Lizard Lizard [mailto:[EMAIL PROTECTED] Subject: Re: N00b Installation Question I do not want a public server, I want it to only accept connections from localhost. RTFM:

Tomcat and virtual host routing behind a Proxy

2008-04-02 Thread David Tonhofer
Hi there, A question about Tomcat virtual host routing behind a reverse proxy. I have worked on this for a couple of hours and looks as if Tomcat does the unexpected (sale bête!) Here's the idea: I am (reverse) proxing requests from Apache to a Tomcat instance running on localhost. I also

Issue with Tomcat 5.5 Datasource configuration

2008-04-02 Thread Hanmay Udgiri
Hi I am using a Datasource configuration with tomcat 5.5 and oracle 9i.I want to use a Datasource which is accessible to all web apps. I have added the Resource tag under GlobalNamingResources and a ResourceLink in a context.xml file of a web application. But Here My other web apps are also

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
ok... here's what i'm doing... in system out, something like a pdf file is printed... itś probably there... just don't know how to show it from the button i'm clicking on: public String geraReportBois(){ try{ //Generating the report String caminho_arquivo = new File().getAbsolutePath() +

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
It just doesn't show the Download dialog on the screen when i click the button... 2008/4/2, Guilherme Orioli [EMAIL PROTECTED]: ok... here's what i'm doing... in system out, something like a pdf file is printed... itś probably there... just don't know how to show it from the button i'm

Re: Checking tomcat metrics in a non-intrusive way

2008-04-02 Thread wicket0123
What is processingTime unit, millisecond? Is that the sum of all requests processed? And, to get the average, I divide that by requestCount? Rainer Jung-3 wrote: So, I looked at JMX Console and see that under RequestProcessor for Catalina it shows all the HTTP request processor threads.

getRemotePort() returns -1 sometimes

2008-04-02 Thread Sebastiaan van Erk
Hi, I have a tomcat servlet set up in Tomcat 6.0.16 behind Apache 2.2.4 with mod_proxy and a ProxyPass with ajp:// to a servlet. Now it sometimes happens to me that a call of request.getRemotePort() in the doPost() method of the servlet returns -1. When this happens it keeps happening until

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Alan Chaney
You don't need the redirect. The response to the request IS the pdf file. HTH Guilherme Orioli wrote: It just doesn't show the Download dialog on the screen when i click the button... 2008/4/2, Guilherme Orioli [EMAIL PROTECTED]: ok... here's what i'm doing... in system out, something like

getOutputStrem errors in Tomcat 6

2008-04-02 Thread Srivastava, Abhay
Hello, I have a deployed a web application on Tomcat v6. My web app gets data from the mysql database. I am continously getting getoutstream errors in catalina.out. Can anyone help me here ? Why am I getting this error and how can I resolve it ?

permissions to read/write files outside webapps directory?

2008-04-02 Thread Kimberly Begley
Hi, I've just deployed my webapp on the remote server (tomcat5 and red hat linux) - everything is displaying properly but when the user uploads a file for processing it is failing - looking in the log files it appears that tomcat can't read or write files outside the webapps directory by these

Re: getOutputStrem errors in Tomcat 6

2008-04-02 Thread Mark Thomas
Srivastava, Abhay wrote: Hello, I have a deployed a web application on Tomcat v6. My web app gets data from the mysql database. I am continously getting getoutstream errors in catalina.out. Can anyone help me here ? Why am I getting this error and how can I resolve it ? You are unlikely

Re: How to force HTTPS on some of Struts-based site

2008-04-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gordon, Hyatt, Gordon wrote: | The intent is as follows: | | For the main site: plain HTTP access | | For the administration and sample submission areas, require | authentication over HTTPS | | Disallow DELETE and PUT methods from all areas. [snip]