Re: UTF-8 charset encoding

2007-11-19 Thread Tremal Naik
2007/11/16, Mark Thomas [EMAIL PROTECTED]: Some standard text I wrote a while ago follows. The most useful bit is probably the URIEncoding attribute on the connector. Thanks Mark, I think I read your paper somewhere before I decided to write to this help request. In fact, if you read carefully

Re: UTF-8 charset encoding

2007-11-19 Thread Tremal Naik
2007/11/19, Ognjen Blagojevic [EMAIL PROTECTED]: Which version of Struts are you using? 1.2.7 does support acceptCharset, as you can see here: Oh, yes, you're right. I'm using version 1.1, that's why probably I don't have that option available. Unfortunately I'm not allowed to upgrade to a

Re: UTF-8 charset encoding

2007-11-19 Thread Tremal Naik
2007/11/19, Ognjen Blagojevic [EMAIL PROTECTED]: I suppose you are using ActionForms. Try to extend ActionForm overriding your reset method which will set the character encoding, before the parameters are processed. Something like this: well, I solved with a Valve that impose a default

Re: UTF-8 charset encoding

2007-11-16 Thread Tremal Naik
2007/11/16, Mohsen Saboorian [EMAIL PROTECTED]: I don't know if this is the best solution. You can create a filter for *.* in your web.xml, with the following piece of code: response.setCharacterEncoding(UTF-8); No, unfortunately the parameters are parsed before any filter is invoked. Hence, a

Re: UTF-8 charset encoding

2007-11-16 Thread Tremal Naik
2007/11/16, Tremal Naik [EMAIL PROTECTED]: No, unfortunately the parameters are parsed before any filter is invoked. Hence, a flag is set on the request that avoids subsequent I tried with valve. It looks fine now. But it's really annoying having to impose a default character encoding using

Re: UTF-8 charset encoding

2007-11-16 Thread Tremal Naik
2007/11/16, Ognjen Blagojevic [EMAIL PROTECTED]: Did you try to put acceptCharset=UTF-8 in the form tag? well, I'm using Struts and it looks the html:form tag doesn't allow any acceptCharset attribute. I tried to set the enctype attribute, but with no effect. Thanks, -- TREMALNAIK

Re: How to get Request from RequestFacade

2007-09-07 Thread Tremal Naik
2007/9/7, Bill Barker [EMAIL PROTECTED]: From his examples below, it looks like he wants access to the TC internals. yes, you're right For the OP's original problem, for obvious security reasons TC makes it very hard to access the internal TC objects behind the various Facades from a webapps

How to get Request from RequestFacade

2007-09-06 Thread Tremal Naik
Hello, I'v been using a valve to perform license checking in my web application. The method invoke(Request request, Response response) had access to the Request and Response objects, allowing me to perform some advanced operations. For instance, I made use of instructions like: Session

Re: How to get Request from RequestFacade

2007-09-06 Thread Tremal Naik
what exactly you want to do with the facade? Seems like you could do what you want with a request or response wrapper instead. --David Tremal Naik wrote: Hello, I'v been using a valve to perform license checking in my web application. The method invoke(Request request, Response response) had

Re: How to get Request from RequestFacade

2007-09-06 Thread Tremal Naik
2007/9/6, David Smith [EMAIL PROTECTED]: Ok... do you need them to modify the request and/or response? Or are you trying to pull some information from the original tomcat internals? ok, I don't need to modify the Request or Response. I'm trying to read them. Maybe a Wrapper is too much... TN

Re: How to get Request from RequestFacade

2007-09-06 Thread Tremal Naik
2007/9/6, Tremal Naik [EMAIL PROTECTED]: ok, I don't need to modify the Request or Response. I'm trying to read them. by the way, I'd be glad if I was able to read the StandardSession. I mean, even if it's not possible reading the Request, maybe it's easier accessing the Session behind

Re: How to get Request from RequestFacade

2007-09-06 Thread Tremal Naik
2007/9/6, David Smith [EMAIL PROTECTED]: help. I'm still unclear as to why you need access those object. If you could say more about that, someone might be able to offer a better way to do what you want. ok, I need to access some of the Catalina Session specific features. In the Valve

Euro symbol

2007-04-03 Thread Tremal Naik
Hello, I have problems with the encoding of the euro symbol. I set the charset to UTF-8 in my page: meta http-equiv=Content-Type content=text/html; charset=UTF-8 I submit a form containing the euro symbol in a client account number text field (typed in Internet Explorer in a Windows

Re: Euro symbol

2007-04-03 Thread Tremal Naik
2007/4/3, David Delbecq [EMAIL PROTECTED]: as the charset used to encode parameters when submitting form. One possible way i know to prevent such problem is 1) set page encoding to utf-8 2) in the form tag add an acceptCharset=UTF-8 parameter 3) call request.setCharacterEncoding(UTF-8) before

Tomcat 5.5: Jre or Jdk?

2007-03-29 Thread Tremal Naik
Hello, excuse me for the very simple question, but I'm not able to find a reference for it. I'm trying to use Tomcat 5.5.16 with JRE 1.5 installed. When I start it complains that JAVA_HOME environment variable is required, when I set this variable as my JRE root, it complains that JAVA_HOME

Re: Tomcat 5.5: Jre or Jdk?

2007-03-29 Thread Tremal Naik
2007/3/29, Martin Gainty [EMAIL PROTECTED]: Tomcat officially requires the full JDK, because it needs javac in order to compile JSPs. If you pre-compile all your JSPs, you can get away with running tomcat on a JRE only, but you do so at your own risk. From

Re: Tomcat 5.5: Jre or Jdk?

2007-03-29 Thread Tremal Naik
2007/3/29, Caldarale, Charles R [EMAIL PROTECTED]: was clearly aware of. Unfortunately, it often takes quite a while for the doc to catch up to reality. Not only the documents, but it looks that a bug that has been marked as resolved in version 5.5.9 has not really been resolved or

Re: Tomcat 5.5: Jre or Jdk?

2007-03-29 Thread Tremal Naik
2007/3/29, Tremal Naik [EMAIL PROTECTED]: It really looks that the guys there at Apache don't care of us, ignorant windows users ;) I quote from the bug report: I'm leaving the bug open for Windows, but I really don't care about the problem All my windows clients (who are not developers

Re: Tomcat 5.5: Jre or Jdk?

2007-03-29 Thread Tremal Naik
2007/3/29, Caldarale, Charles R [EMAIL PROTECTED]: I just tried it with 5.5.23, and JRE_HOME without JAVA_HOME works properly on both JRE 5 and 6. ok, thanks, I'll upgrade our clients tomcat. In the meanwhile, a small fix to the windows batches was sufficient. -- TREMALNAIK

server/lib annoys me

2007-03-19 Thread Tremal Naik
Hello to you all, Going further into the building of my application the percentage of classes I need to include into the server/lib folder is growing too much. In a few days all my application will be deployed there instead of the webapps folder! The point is I defined a Valve which performs

Re: server/lib annoys me

2007-03-19 Thread Tremal Naik
I need to perform license checking before the user authenticate. Filters filter the request only after authentication, do they? Thanks TN 2007/3/19, Peter Crowther [EMAIL PROTECTED]: From: Tremal Naik [mailto:[EMAIL PROTECTED] The point is I defined a Valve which performs license checking

Re: server/lib annoys me

2007-03-19 Thread Tremal Naik
2007/3/19, David Delbecq [EMAIL PROTECTED]: I don't understand why you try to do a webapp specific stuff (licence checking) in a server context (a valve). Well, my license is limiting the number of contemporary sessions, i.e. there is a limit on the number of users can be logged in at the same

Re: server/lib annoys me

2007-03-19 Thread Tremal Naik
2007/3/19, David Kerber [EMAIL PROTECTED]: session.invalidate() is complicated? Not at all, but I cannot login the user and then simply redirect him to the login form next time he'll perform some action. This would be confusing. If I could simply use the axe to make my job, my dear, I would

Re: server/lib annoys me

2007-03-19 Thread Tremal Naik
2007/3/19, Tremal Naik [EMAIL PROTECTED]: Please, bear in mind my original question was is it possible avoid using server/lib? I never asked for java/j2ee programming lessons Of course, I accept all suggestions I receive gratefully, I'm not a some kind of troll, the last comment was a specific

Re: server/lib annoys me

2007-03-19 Thread Tremal Naik
2007/3/19, David Delbecq [EMAIL PROTECTED]: How about having your webapp implements some kind on 'license checking service' and, at webapp startup, put it available at the JNDI level? You valve (or realm) could then access this named service and simply issue a 'can i log in one more user?'

How to retrieve principal

2007-02-28 Thread Tremal Naik
Hello, I want to retrieve the user principal where I don't have the request available i.e. I cannot use the method HttpServletRequest.getUserPrincipal() I need in particular the user name. May you suggest something appropriate? -- TREMALNAIK

Re: How to retrieve principal

2007-02-28 Thread Tremal Naik
2007/2/28, Peter Crowther [EMAIL PROTECTED]: We got round this by putting the name into a ThreadLocal variable from a place where we *did* have access to it, then reading it later - messy, I see, you use the same approach as JBoss. So, you mean there is no way to get the user principal using

Re: How to retrieve principal

2007-02-28 Thread Tremal Naik
2007/2/28, Christopher Schultz [EMAIL PROTECTED]: Well, what /do/ you have available? That was my question: What do I have available?. May any of the following be useful? I'm confused, really. Server server = ServerFactory.getServer(); Service service = server.findService(Catalina); Engine

Re: How to retrieve principal

2007-02-28 Thread Tremal Naik
2007/2/28, Christopher Schultz [EMAIL PROTECTED]: How is it that you have code that needs request-specific information, but no access to the request? Are you forced into this situation by other components (through a callback mechanism or something like that)? Or, is this the result of poor

Modifying the response

2006-11-02 Thread Tremal Naik
Hello, I'm using SSLExt to manage https redirection in a Struts 1.1 project. SSLExt (http://sslext.sourceforge.net/) is a framework to let Struts application easily switch back and forth from a secure channel when a page displays sensitive data (i.e. password input forms) If the user requests a

Re: Modifying the response

2006-11-02 Thread Tremal Naik
2006/11/2, Tremal Naik [EMAIL PROTECTED]: I'd like to filter the response to strip the unnecessary query string from the Location header. Should I use a Valve or a Filter or what? I noticed that I can change the header Location after the invoke() call in a Valve: getNext().invoke(request

Re: Modifying the response

2006-11-02 Thread Tremal Naik
2006/11/2, Pid [EMAIL PROTECTED]: Using a valve seems a bit crazy, even a filter seems excessive. ok, what do you suggest? I'm not quite clear on what the problem is; is it that IE is misbehaving, or is it that your app is gaining a query string where it's unnecessary? both. If Mozilla

Re: Modifying the response

2006-11-02 Thread Tremal Naik
2006/11/2, Caldarale, Charles R [EMAIL PROTECTED]: There is a known bug in IE6 that loses the port number while handling redirects. This thread may be related: yes, I use a valve to filter all incoming request to fix this problem. Or it might not be. You could try IE7 to see if that cures

Re: [OT] AIX filtering Explorer?

2006-04-07 Thread Tremal Naik
2006/4/4, Tremal Naik [EMAIL PROTECTED]: I have no problem with Firefox, while IE looks as if it get lost. The secure request does not arrive on the tomcat server. Where did it go? from the Tomcat SSL howto: http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html sslProtocol - It is reported

Re: [OT] AIX filtering Explorer?

2006-04-05 Thread Tremal Naik
2006/4/4, Sheets, Jerald [EMAIL PROTECTED]: Do you have a web proxy in your environment? That would be transparent, or hand-configured. We don't use a proxy to connect to the Tomcat, normally. I've configured it only to inspect the request headers that are sent by the browsers. An example of a

[OT] AIX filtering Explorer?

2006-04-04 Thread Tremal Naik
Hi everybody, I marked this message as OT because it may not pertain to Tomcat, even if I presume so. I have a problem with a Jboss/Tomcat 5.5 installed on an IBM AIX machine. The application redirects user requests to an encrypted channel at login: 1) The browser sends an unsecure request. 2)

Re: How to retrieve an user Principal?

2006-03-17 Thread Tremal Naik
2006/3/16, Mladen Turk [EMAIL PROTECTED]: Yes. Servlet spec 2.4 Thank you very much. Persons like you make me loosing faith in the Open Source. I think I'll call the guys at IBM... -- TREMALNAIK - To unsubscribe, e-mail:

Re: How to retrieve an user Principal?

2006-03-17 Thread Tremal Naik
2006/3/17, Mladen Turk [EMAIL PROTECTED]: Go and troll somewhere else. sorry, I thought you where pissing on me. I didn't understand your real intentions. I will manage the request to get what I'm looking for. Thanks, -- TREMALNAIK

Re: context.xml: ClassNotFoundException

2006-03-16 Thread Tremal Naik
2006/3/16, Filip Hanik - Dev Lists [EMAIL PROTECTED]: your valve classes have to be in common/lib or common/classes or server/lib or server/classes for security purposes, the best place would be server/lib or server/classes Filip Well, I put the classes in a jar deployed in server/lib ok,

How to retrieve an user Principal?

2006-03-16 Thread Tremal Naik
Hello, how can i retrieve an user principal? I don't want to get it from the request, but directly from the underlying security framework. My application, when developed in Jboss, uses an instruction like the following: org.jboss.security.SecurityAssociation.getPrincipal(); Is there something

Re: How to retrieve an user Principal?

2006-03-16 Thread Tremal Naik
2006/3/16, Caldarale, Charles R [EMAIL PROTECTED]: ??? That doesn't make any sense to me. There may be may users connected to Tomcat at any given time; if you don't get the one corresponding to a specific request (or associated session), what do you think you're getting? well, I don't know

Re: How to retrieve an user Principal?

2006-03-16 Thread Tremal Naik
2006/3/16, Mladen Turk [EMAIL PROTECTED]: JBoss getPrincipal() figures that from the request, Maybe, but it doesn't require I pass the request as an argument, ir returns the principal from whenever I call it in the code, simply, even in those classes which doesn't have a request variabile. It

Re: context.xml: ClassNotFoundException

2006-02-24 Thread Tremal Naik
2006/2/23, Caldarale, Charles R [EMAIL PROTECTED]: Can you verify that the following does not exist: conf\Catalina\[hostname]\CiccioPasticcio.xml where [hostname] is usually localhost? the file exists, but it's identical to the one I put in my app META-INF. Even if I delete it, it's

context.xml: ClassNotFoundException

2006-02-23 Thread Tremal Naik
Hello, I have a problem with Tomcat 5.5 I created a file CiccioPasticcio.war with my application. I have to filter user requests using Tomcat Valves, so I wrote a context.xml file with the following Context cookies=true crossContext=false Valve