Serving static user generated content

2009-07-08 Thread Jan Jonas
Hi everybody, I have the following problem: I have a web application that is deployed in a war files. This web application serves a lot of static content files (the users are able to upload the content (html, imgages ...)). Obviously it is not meaningful to pack the user's content in the war

Re: Serving static user generated content

2009-07-08 Thread Mark Thomas
Jan Jonas wrote: Hi everybody, I have the following problem: I have a web application that is deployed in a war files. This web application serves a lot of static content files (the users are able to upload the content (html, imgages ...)). Obviously it is not meaningful to pack the

Re: Problems downloading files. How to identify the CANCEL button?

2009-07-08 Thread Pid
Sadly, completely irrelevant. Ignore this. p On 7/7/09 23:51, Martin Gainty wrote: at least 2 ways to determine the button selected 1)set a boolean property which is enabled on or off based on executed button class MyAction extends ActionSupport { private boolean submit; private

Re: Problems downloading files. How to identify the CANCEL button?

2009-07-08 Thread Pid
On 7/7/09 19:09, siom...@portosdobrasil.gov.br wrote: Dear all, I need to log some information only after a user downloads or opens a file. I am using a servlet for that and the download part works fine. However I need to identify which button was clicked because in case the user clicks

Re: Problems downloading files. How to identify the CANCEL button?

2009-07-08 Thread André Warnier
Pid wrote: On 7/7/09 19:09, siom...@portosdobrasil.gov.br wrote: Dear all, I need to log some information only after a user downloads or opens a file. I am using a servlet for that and the download part works fine. However I need to identify which button was clicked because in case the

Problem with system property

2009-07-08 Thread CBy
Hi, We have a third-party webapp that sets the following system property: System.setProperty(javax.xml.transform.TransformerFactory,net.sf.saxon.TransformerFactoryImpl); This effectively forces all other webapps to use Saxon as an XLST/XQuery processor, see:

Re: Problem with system property

2009-07-08 Thread André Warnier
CBy wrote: Hi, We have a third-party webapp that sets the following system property: System.setProperty(javax.xml.transform.TransformerFactory,net.sf.saxon.TransformerFactoryImpl); This effectively forces all other webapps to use Saxon as an XLST/XQuery processor, see:

RE: Problem with system property

2009-07-08 Thread Mike Frohme
You could always silo offending applications like that into their own containers - give them their own space and let them not affect the rest of your infrastructure. How you interact with that application/service may dictate your ability to do that cleanly, but those are larger architectural

Tomcat server Not starting when symantec installed!

2009-07-08 Thread Raghu.p
Hi, I have installed Tomcat 6.0.18 in Windows 2003 server previously it is working fine, today I have installed Symantec End Point Protection 11.0 In that same server, then I restarted the server, now tomcat is not starting and it’s not recording any error messages in log files. Then I

RE: Solaris 10 mod_jk problems...

2009-07-08 Thread thekat
Thanks for all the replies.. My build environment seems to be hosed.. so fixing that at the moment.. It seems that Solaris is the odd Duck out on a lot of stuff I do.. :-) I will post back my findings.. and I will probably post a guide on http://www.daemonforums.org/forumdisplay.php?f=31

RE: Problem with system property

2009-07-08 Thread Caldarale, Charles R
From: CBy [mailto:tom...@byrman.demon.nl] Subject: Problem with system property We have a third-party webapp that sets the following system property: System.setProperty(javax.xml.transform.TransformerFactory,net.sf. saxon.TransformerFactoryImpl); Serious anti-social behavior. What is

request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Hi, everybody. Sorry for my poor English and for my ignorance too. We've built an application where we used utf-8 as default encoding (it runs in an English Linux box - default Java encodings will be utf-8). A few days ago, i've added a new Servlet Filter to our application (to

Re: Tomcat server Not starting when symantec installed!

2009-07-08 Thread Tim Funk
Don't run Symantec ? :) Symantec is probably doing 1 of 2 things 1) Noticing tomcat is trying to bind to a socket (it is a webserver) and killing it 2) It has bad heuristics and thinks its a trojan My bet is #1. You probably need to white list tomcat. Actually - you might need to whitelist

RE: Serving static user generated content

2009-07-08 Thread Caldarale, Charles R
From: Jan Jonas [mailto:j...@learnbit.com] Subject: Serving static user generated content Is there an elegant way to server files that are not stored in the webapps directory (something like a RequestDispatcher for files in the file system)? You can configure an additional Context in

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 14:41, Daniel Henrique Alves Lima wrote: Hi, everybody. Sorry for my poor English and for my ignorance too. We've built an application where we used utf-8 as default encoding (it runs in an English Linux box - default Java encodings will be utf-8). A few days ago, i've

RemoteAddressValve

2009-07-08 Thread Leo Donahue - PLANDEVX
I want to restrict web access to a specific web app to only allow it to be available on our domain. If I put the following nested in the Host element of my server.xml, is that the right way to do it? Context path=/mywebapp docBase=mywebapp debug=0 privileged=true Valve

Re: RemoteAddressValve

2009-07-08 Thread Tim Funk
allow is a regex - you probably want this: allow=176\.24\..+ with allow=176.24.*.* - you would also let through 176.240. 176.241. ... 176.249. -Tim Leo Donahue - PLANDEVX wrote: I want to restrict web access to a specific web app to only allow it to be available on our domain. If I put

Re: RemoteAddressValve

2009-07-08 Thread André Warnier
Leo Donahue - PLANDEVX wrote: ... Valve className=org.apache.catalina.valves.RemoteAddrValve allow=176.24.*.*/ I don't know about the context in which you can use this, but about the above, your allow attribute is incorrect. It should be : A comma-separated list of /regular expression

Re: Tomcat server Not starting when symantec installed!

2009-07-08 Thread David kerber
I use SEP 11 with tomcat 5.5, and had no trouble. I installed SEP while TC was running, so maybe it detected that it needed to leave that port open? D Tim Funk wrote: Don't run Symantec ? :) Symantec is probably doing 1 of 2 things 1) Noticing tomcat is trying to bind to a socket (it is a

RES: Problems downloading files. How to identify the CANCEL butto n?

2009-07-08 Thread siomara
The buttons I see [OPEN], [SAVE] and [CANCEL] are not created and controlled by me. They belong to the download manager window that comes automatically with a certain command. The problem I noticed is that by the time this download manager window shows up the entire code on the servlet has been

RE: Tomcat server Not starting when symantec installed!

2009-07-08 Thread Caldarale, Charles R
From: David kerber [mailto:dcker...@verizon.net] Subject: Re: Tomcat server Not starting when symantec installed! I use SEP 11 with tomcat 5.5, and had no trouble. I installed SEP while TC was running, so maybe it detected that it needed to leave that port open? Can't be a simple port

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
On Wed, 2009-07-08 at 14:58 +0100, Pid wrote: Hi, P. Thanks for your answer. If you're using JSP have you also checked that you've got: %@ page contentType=text/html; charset=utf-8 and not: %@ page contentType=text/html; charset=iso-8859-1 The jsps in our application already

RE: RemoteAddressValve

2009-07-08 Thread Leo Donahue - PLANDEVX
Andre, Tim, Thanks for the feedback on the regex. I don't think I can nest a valve inside a context Context path=/mywebapp docBase=mywebapp debug=0 privileged=true Valve className=org.apache.catalina.valves.RemoteAddrValve allow=176\.24\..* / / I tried and I

Re: RemoteAddressValve

2009-07-08 Thread Pid
On 8/7/09 15:01, Leo Donahue - PLANDEVX wrote: I want to restrict web access to a specific web app to only allow it to be available on our domain. If I put the following nested in theHost element of my server.xml, is that the right way to do it? Context path=/mywebapp docBase=mywebapp

Re: RemoteAddressValve

2009-07-08 Thread Mark Thomas
Leo Donahue - PLANDEVX wrote: Andre, Tim, Thanks for the feedback on the regex. I don't think I can nest a valve inside a context You can if you use valid xml. Context path=/mywebapp docBase=mywebapp debug=0 privileged=true Valve

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
IE is the best :-) Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'. http://www.w3schools.com/TAGS/att_form_accept_charset.asp On Wed, 2009-07-08 at 12:11 -0300, Daniel

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 16:11, Daniel Henrique Alves Lima wrote: On Wed, 2009-07-08 at 14:58 +0100, Pid wrote: Hi, P. Thanks for your answer. If you're using JSP have you also checked that you've got: %@ page contentType=text/html; charset=utf-8 and not: %@ page contentType=text/html;

Filter RequestWrapper

2009-07-08 Thread Ivo Silva
Hello, there! I'm trying to implement a filter that takes a given request URL (that contains a dummy folder) like so: http://localhost/context/dummy_folder/page1.jsp This filter takes the dummy_folder part from the URL (just like a URL Rewrite), creates a custom RequestWrapper

Re: Filter RequestWrapper

2009-07-08 Thread André Warnier
Ivo Silva wrote: Hello, there! I'm trying to implement a filter that takes a given request URL (that contains a dummy folder) like so: http://localhost/context/dummy_folder/page1.jsp This filter takes the dummy_folder part from the URL (just like a URL Rewrite), creates a custom

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote: IE is the best :-) Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'. That is only one of the issues (browser inconsistencies). If you want to

Adding new jars to Tomcat library.

2009-07-08 Thread SarcasmMonster
In Tomcat 6.0, when I add a new jar to the CATALINA_HOME/lib/ do I have to restart Tomcat before it's picked up? I added an MySQL jars so I can use the JNDI datasource but it is getting a class not found when I deploy my app. When I restarted my test Tomcat, it found it. I thought that class

Re: Filter RequestWrapper

2009-07-08 Thread Ivo Silva
Thanks for your reply, André! I believe my situation is a bit more complex than a simple URL Rewrite. Short explanation: My aim is to create a RequestWrapper with a custom Session so that the target page has access to some specific variables that cannot be store in the regular session due to

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 17:14, André Warnier wrote: Daniel Henrique Alves Lima wrote: IE is the best :-) Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'. That is only one of the issues (browser

Re: Adding new jars to Tomcat library.

2009-07-08 Thread Pid
On 8/7/09 17:45, SarcasmMonster wrote: In Tomcat 6.0, when I add a new jar to the CATALINA_HOME/lib/ do I have to restart Tomcat before it's picked up? I added an MySQL jars so I can use the JNDI datasource but it is getting a class not found when I deploy my app. When I restarted my test

Re: Filter RequestWrapper

2009-07-08 Thread Pid
On 8/7/09 18:00, Ivo Silva wrote: Thanks for your reply, André! I believe my situation is a bit more complex than a simple URL Rewrite. Short explanation: My aim is to create a RequestWrapper with a custom Session so that the target page has access to some specific variables that cannot be

Re: Filter RequestWrapper

2009-07-08 Thread Ivo Silva
Thanks for your reply, Pid! I'm not sure I understand your explanation. Here's the sequence: 1. Request (browser) 2. My Filter (generates a wrapped request and passes it to the chain) 3. page1.jsp (my wrapped request is here and I can access everything just fine) The following steps are the

RE: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Caldarale, Charles R
From: Pid [mailto:p...@pidster.com] Subject: Re: request.setCharacterEncoding() request.getParameter() 11) Check any .java files are also encoded in UTF-8? Might need one of the grandees to say whether that is meaningful. The encoding of the .java files shouldn't matter, as long as the

RE: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Caldarale, Charles R
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: request.setCharacterEncoding() request.getParameter() A short overview : Great how-to; any interest in adding it to the FAQ? http://wiki.apache.org/tomcat/FAQ/CharacterEncoding - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL

Strange delays after about 800 users on a server -- tomcat 4.1.27, apache 2.0.54, LB/SSL on a Cisco ACE

2009-07-08 Thread Shaun Qualheim
Hello all -- Running with the following: *3 Dell Poweredge 1950 servers (2x quad core xeons, 8 GB RAM, 146 GB 15k SAS in Raid 1) running CentOS 5.1 x86_64 *Apache 2.0.54 with mod_jk *Tomcat 4.1.27-LE *jdk1.5.0_15 These 3 servers are behind a Cisco ACE load balancer. We're using SSL

Re: Adding new jars to Tomcat library.

2009-07-08 Thread SarcasmMonster
Thanks for the reply. Is there a way to get around this? I'd like to be able to do something like this http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html without restarting Tomcat. As far as I can tell from the article, I need the jars in CATALINA_HOME/lib/. -- View

usage of @resource annotation

2009-07-08 Thread alla winter
I can sucessfully access the DataStore using JNDI, but cannot access it when I am using @RESOURCE annotation. I do not use JPA. I though that I do not need JPA for @RESOURCE annotation Here it is the code: * private* @Resource (mappedName=jdbc/Cobra) DataSource ds; *public* DataSource

Re: usage of @resource annotation

2009-07-08 Thread Mark Thomas
alla winter wrote: TOMCAT 5.5.25; Windows XP, JDK 1.5.0_17. Currently I am trying to use Tomcat from IBM RAD What makes you think annotations are even supported with that combination? Hint: read the 2.4 Servlet spec. Mark

Re: usage of @resource annotation

2009-07-08 Thread alla winter
I would appreciate if you can tell me specifically what is wrong. thanks On Wed, Jul 8, 2009 at 1:04 PM, Mark Thomas ma...@apache.org wrote: alla winter wrote: TOMCAT 5.5.25; Windows XP, JDK 1.5.0_17. Currently I am trying to use Tomcat from IBM RAD What makes you think annotations are

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Hi, everybody. Thanks for the answers ! Just to make myself clear: 1. Always to set request charset before doing anything else fixes the bug; 2. When the bug is on, only input data (request) is wrong. Previously utf-8 encoded data is rendered right (response). At

RE: usage of @resource annotation

2009-07-08 Thread Caldarale, Charles R
From: alla winter [mailto:alla1.win...@gmail.com] Subject: Re: usage of @resource annotation I would appreciate if you can tell me specifically what is wrong. Is it too hard to read the servlet spec? Questions to ask yourself: 1) What servlet spec version supports use of annotations? 2)

RE: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
On Wed, 2009-07-08 at 12:29 -0500, Caldarale, Charles R wrote: From: Pid [mailto:p...@pidster.com] Subject: Re: request.setCharacterEncoding() request.getParameter() 11) Check any .java files are also encoded in UTF-8? Might need one of the grandees to say whether that is meaningful.

Re: usage of @resource annotation

2009-07-08 Thread alla winter
thanks On Wed, Jul 8, 2009 at 1:28 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: alla winter [mailto:alla1.win...@gmail.com] Subject: Re: usage of @resource annotation I would appreciate if you can tell me specifically what is wrong. Is it too hard to read the

RE: Adding new jars to Tomcat library.

2009-07-08 Thread Caldarale, Charles R
From: SarcasmMonster [mailto:paradoxical.reason...@gmail.com] Subject: Re: Adding new jars to Tomcat library. Is there a way to get around this? Not if you want Tomcat to manage the DB connection pool. Installing the JDBC driver jar is a one-time thing; can't you schedule a few-second

RE: Adding new jars to Tomcat library.

2009-07-08 Thread SarcasmMonster
Thanks. I knew about the alternative, but I was hoping I can take advantage of IOC. Whatever :sleep: Not if you want Tomcat to manage the DB connection pool. Installing the JDBC driver jar is a one-time thing; can't you schedule a few-second outage at some convenient time? The reason why I

RE: Adding new jars to Tomcat library.

2009-07-08 Thread Martin Gainty
a few IOC Containers to consider PICO favors constructor injection 1 DataSource at a time Hivemind: supports both constructor and setter injection Supports webwork like interceptors Avalon: must implement Avalon specific interfaces quite invasive and the least developed of the 3 IOC containers

Re: mod_jk on Windows 2008 x64

2009-07-08 Thread Rainer Jung
On 07.07.2009 12:44, Alexander Diedler wrote: Hello, Yes, it is an AMD Opteron CPU with 64-Bit. I install the Apache Webserver in 32-bit Tomcat in 32 Bit, with 64-Bit tomcat6.exe Java JDK from Sun site in 64-bit Version mod_jk Binaries from the 32-bit folder of Tomcat FTP Server because

Re: Solaris 10 mod_jk problems...

2009-07-08 Thread Rainer Jung
On 08.07.2009 15:24, thekat wrote: Thanks for all the replies.. My build environment seems to be hosed.. so fixing that at the moment.. It seems that Solaris is the odd Duck out on a lot of stuff I do.. :-) I will post back my findings.. and I will probably post a guide on

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote On Wed, 2009-07-08 at 18:14 +0200, André Warnier wrote: 6) In your application, you can decide to interpret this series of bytes, as a string in the UTF-8 encoding, and decode it as such into Unicode *characters*. Forget about any parameters to specify the

AW: Serving static user generated content

2009-07-08 Thread Jan Jonas
Hi Chuck, thanks for your reply. Could you please give me a more detailed example? How can I define a new webapp that is not directly available in the browser (to prevent the files from being downloaded without a valid session - maybe limit the access to requests from localhost?!) and how can

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, On 7/8/2009 9:41 AM, Daniel Henrique Alves Lima wrote: Today i've found a bug on our application: Except for a multipart/form, all non-English characters (like á and ç) sent in HttpServletRequest was messed up. Sorry for the terse

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Hi, Chris. The only missing item in my checklist (What can you recommend to just make everything work?) is the first one (Set URIEncoding=UTF-8 on your Connector in server.xml). I didn't know that Most web browsers today do not specify the character set of a request. Well, better

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Another question: Even when response's content type is not text (like pdf/odt/doc or image streams), should i set the response charset ? Does application/pdf; charset=UTF-8 make sense ? On Wed, 2009-07-08 at 19:23 -0300, Daniel Henrique Alves Lima wrote: Hi, Chris. The only

Re: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote: Another question: Even when response's content type is not text (like pdf/odt/doc or image streams), should i set the response charset ? Does application/pdf; charset=UTF-8 make sense ? No. It only makes sense for MIME types that start with text/ (such

RE: request.setCharacterEncoding() request.getParameter()

2009-07-08 Thread Martin Gainty
i would suggest starting at request (that way only your request is affected) widen scope when you want the same encoding for all other webapps http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String) some background on UTF-8 vs