Hi,

    <servlet-mapping>
        <servlet-name>Checkout</servlet-name>
        <url-pattern>/Checkout</url-pattern>
    </servlet-mapping>

That's the only mapping I have for it. I will try the url pattern.


The checkout servlet gets invoked, (I see a null pointer thrown from it)
then it gets redirected to the filter. 

I saw an example somewhere that had the mappings altered. That's all.

Thanks again,
Jay
-----Original Message-----
From: Milanez, Marcus [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 03, 2008 6:30 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RES: Servlet Filter Not Intercepting?

Hi Jay,

Your configuration seems to be fine.. Is your Checkout servlet ever invoked,
cause you haven't posted your servlet-mapping tags. Have you tried mapping
your filter using url-patterns, instead of servlet-name ? And only one more
question, what do you mean by 'turn off invonking the resource' ?

Yours,

Marcus Milanez


-----Mensagem original-----
De: Jay Liu [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 3 de janeiro de 2008 01:49
Para: 'Tomcat Users List'
Assunto: RE: Servlet Filter Not Intercepting?

Thanks Marcus.

Here's my filter setup. I just created it fresh in netbeans so I'd be
surprised if there is a problem.

I woke up this morning, realizing I forgot to turn off invoking the
resource. Would that matter?

    <filter>
        <filter-name>UserFilter</filter-name>
        <filter-class>store.filters.UserFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>UserFilter</filter-name>
        <servlet-name>Checkout</servlet-name>
    </filter-mapping>
    <servlet>
        <servlet-name>Checkout</servlet-name>
 
<servlet-class>com.inifim.commerce.store.servlets.transactions.Checkout</ser
vlet-class>
    </servlet>

I only have one filter right now.

Thanks again,
Jay

-----Original Message-----
From: Milanez, Marcus [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 02, 2008 5:21 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RES: Servlet Filter Not Intercepting?

Hi,

Yes, filters atre supposed to intercept a requets just before it is
accessed. Could you please post your filter config written in your web.xml
file?

Yours,

Marcus Milanez
http://sumatrablog.wordpress.com

-----Mensagem original-----
De: Jay Liu [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 1 de janeiro de 2008 18:36
Para: users@tomcat.apache.org
Assunto: Servlet Filter Not Intercepting?

Hi all,

 

I'm having a problem with filters. I setup filter to block access to a
resource unless the user is authenticated.

 

I've noticed that the resource is accessed then the filter kicks in and then
loads.

 

I thought filters were supposed to intercept the request before the resource
is accessed?

 

Is there something wrong with my xml configuration?

 

Thanks,

Jay


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to