"Daniel Henrique Alves Lima" <email_danie...@yahoo.com.br> wrote in message 
news:1246314288.10803.6.ca...@magnaopus.no-ip.biz...
> Yes !
>
> Now imagine my frustration with ooffice escaping a ';' :-(
>
> Browser, wget and other applications seems to work ok with URL encoded
> jsessionid.
>

The custom valve isn't that complicated (but of course, it ties you to 
Tomcat, and may need to be updated when you change from major releases).  It 
would probably look something like:

public class MySessionValve extends ValveBase {

      public void invoke(Request request, Response response)
      throws IOException, ServletException {
           String sessionID = getSessionId(request);
           if(sessionID != null) {
                request.setRequestedSessionId(sessionID);
           }
           getNext().invoke(request, response);
      }

      private String getSessionId(Request request) {
         // Logic to extract the sessionID from the request here
      }
}

On all supported versions of Tomcat, this will be invoked before 
authentication (or at least if you don't make major changes to the 
configuration).

If this was my project, I'd probably take the big one-time pain of creating 
a Tag to decide how to encode links (based on user-agent or otherwise) and 
change all my pages to use it.  Otherwise, a Filter that wraps the response 
and overrides getWriter is probably easier than trying to wrap the TC 
internal Response.

>
> On Tue, 2009-06-30 at 00:00 +0200, André Warnier wrote:
>> Daniel Henrique Alves Lima wrote:
>> ...
>> Hi.
>> If I understand what you are trying to do :
>> 1) a client enters your application, authenticates, navigates, and
>> displays a result html page.
>> 2) on this page, is a button that says "get this page as PDF"
>> 3) the client clicks on that button, and is supposed to receive the same
>> page, but this time as a PDF.
>> 4) At the server side, you want to use OOo to create the PDF version
>> from the html page
>> 5) and OOo is capable, given a URL, to retrieve this page, and then
>> given appropriate commands, to return a PDF version of the page.
>> 6) But OOo has trouble with the "jsessionid" part of the URL, although
>> it needs it in order to retrieve the page on behalf of the client.
>> Right ?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> -- 
> "If there must be trouble, let it be in my day,
> that my child may have peace."
>
> Thomas Paine 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to