Re: [Resin-interest] Filters and jsp:include

2006-10-19 Thread Daniel López
Hi again,

In the end, I have been able to solve my problem by accessing the 
request attribute "javax.servlet.include.request_uri" which contains the 
URI of the request that is being included.

Reading the servlet spec., I don't find it very clear if the 
".getRequestURI()" method on the request passed to the filter has to 
return the original request or the included one. As it specifies that 
the request has to add some data about the included request, as 
attributes, it seems to imply that the request method's have to return 
the original data... but then why forwarded requests do not?

In any case, I'm not so sure it that would qualify as a bug in Resin or 
simply an interpretation of a unclear spec.

I just wanted to state one solution, in case someone comes across the 
same issue.

Cheers!
D.
---
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Centre for Information and Technology
Balearic Islands University
(SPAIN)
---

[EMAIL PROTECTED] escribió:

> --- Daniel López <[EMAIL PROTECTED]> wrote:
> 
> 
>>Hi there,
>>
>>I'm having a problem with servlet filters and requests accessed through 
>>jsp:include, but as it is my first attempt I'm not sure if I'm 
>>forgetting something or it's a Resin bug.
> 
> 
> Hi Daniel,
> 
> I filed this as a bug: http://bugs.caucho.com/view.php?id=1414
> 
> Thanks for the report and test case!
 >
> Emil Ong
> Software Engineer
> Caucho Technology, Inc.
> Tel. (858) 456-0300
> mailto:[EMAIL PROTECTED]


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Filters and jsp:include

2006-10-16 Thread Daniel Lopez
Up until 2.4, filters were only applied to the original request and
"sub-requests" handled by RequestDispatcher were not treated. But that was
changed in version 2.4 and those web.xml attributes were added specifically
for that purpose. That's why I upgraded to Resin 3.0 :)

If I understood correctly the specificacion, the filters should take into
account the new URL, I cannot understand why it would be otherwise. I'll
check the spec again tomorrow to verify that, but I think so.

Thanks,
D.


> i'm not expert, but as far as I know, an include is not an http request.
The filter is 
> only activate for the requested url.
> So this depends on where is the main page where you put the  problem. If the page is something like /index.hml it is normal that the
filter is not 
> activated.
> 
> Now I had some problems with filters, on pages directly (not included),
and I'm not sure 
> this is a reliable process, or maybe there is something I did not
understand also.
> 


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Filters and jsp:include

2006-10-16 Thread Riccardo Cohen
i'm not expert, but as far as I know, an include is not an http request. The 
filter is 
only activate for the requested url.
So this depends on where is the main page where you put the  Hi there,
> 
> I'm having a problem with servlet filters and requests accessed through 
> jsp:include, but as it is my first attempt I'm not sure if I'm 
> forgetting something or it's a Resin bug.
> 
> Settings: At web.xml I have a filter defined as:
> 
>
>  ProxyFilter
>  /ca/agenda/*
>  INCLUDE
>  REQUEST
>
> 
> I access the file with:
> 
> 
> I'm using Resin 3.0.21 and I changed the descriptor to 2.4, so it is 
> supposed to work. Some tests I did:
> 
> If I copy the URL directly in my browser, it works and I can see the 
> debug messages of my filter. That verifies the browser is working.
> If I remove the REQUEST, then using my broser 
> does NOT work, as expected. That would indicate the dispatcher options 
> are being read.
> 
> The only "symptom" one can see is that no matter what I do, the filter 
> is not processed when using jsp:include or RequestDispatcher.include (I 
> testes just in case).
> 
> Anything I'm missing or should I report it as a bug?
> Cheers!!
> D.
> ---
> Daniel Lopez Janariz ([EMAIL PROTECTED])
> Web Services
> Centre for Information and Technology
> Balearic Islands University
> (SPAIN)
> ---
> 
> ___
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
> 

-- 
Très cordialement,

Riccardo Cohen
ligne directe : 02-47-49-63-24
---
Articque
http://www.articque.com
Moulin des Roches
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest