struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hallgrímur Th. Björnsson <hallgrimur.bjorns...@skyrr.is>
Subject RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Date Wed, 24 Mar 2010 21:51:22 GMT
Hi,

Hmm, I'll need to test that.

I'm using Glassfish v3. 

I did have servlet-api.jar in the classpath but after I removed it, I got a classNotFoundException.

Then I really started messing around and copied javax.servlet.jar from the Glassfish/modules
directory to my domain/lib/ext directory, as a desperate measure.

Apparently, then it picked up the javax.servlet.filter class but I again got the RE: org.apache.struts2.dispatcher.FilterDispatcher
cannot be cast to 	javax.servlet.Filter exception.

The program works in Tomcat and JBoss.

PS. I'm not Danish.


-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: 24. mars 2010 21:26
To: Struts Users Mailing List
Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter


The chief Struts build and release engineer from ohio put that into the latest 2.1.8 distro..

 

import javax.servlet.Filter

public class FilterDispatcher implements StrutsStatics, Filter {


d/l the struts-2.1.8 distro if you need that functionality

 

my danish is rusty but here goes

*Tak a Miget*

Martin Gainty 
______________________________________________ 

Note de déni et de confidentialité 
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.



 

> Date: Wed, 24 Mar 2010 10:12:45 -0400
> Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
> From: wesw@wantii.com
> To: user@struts.apache.org
> 
> That error doesn't make a lot of sense... Check a few of the following -
> 
> Which version of Glassfish are you using (2.x, 3)
> 
> Restart glassfish
> 
> Make sure that you don't have servlet.jar or jsp-api.jar in your /WEB-INF/lib
> 
> Deploy the app to another container (jetty or tomcat) to make sure
> that your app isn't the problem
> 
> As you can see, I'm grasping straws...
> 
> -Wes
> 
> 2010/3/23 Hallgrímur Th. Björnsson <hallgrimur.bjornsson@skyrr.is>:
> > Hi,
> >
> > I found where to change the filter settings.
> >
> > I get the exact same errors with the different filters:
> >
> > java.lang.ClassCastException: org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
cannot be cast to javax.servlet.Filter
> >
> > For all 3 filters you suggested.
> >
> > Kveðja / Regards,
> > Hallgrímur
> >
> >
> > -----Original Message-----
> > From: Hallgrímur Th. Björnsson [mailto:hallgrimur.bjornsson@skyrr.is]
> > Sent: 23. mars 2010 11:54
> > To: Struts Users Mailing List; lukasz.lenart@gmail.com
> > Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
> >
> > Hi,
> >
> > Thanks for the reply.
> >
> > Where is this typically changed? In an XML file or in the code?
> >
> > Kveðja / Regards,
> > Hallgrímur
> >
> >
> > -----Original Message-----
> > From: Lukasz Lenart [mailto:lukasz.lenart@googlemail.com]
> > Sent: 23. mars 2010 11:49
> > To: Struts Users Mailing List
> > Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
> >
> > 2010/3/23 Hallgrímur Th. Björnsson <hallgrimur.bjornsson@skyrr.is>:
> >> I am fairly new to Struts. I'm trying to get an application which uses Struts
to work on Glassfish v3. I have made it work on JBoss and Tomcat.
> >
> > Try to use one of these
> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
> >
> > or (when you are using Sutemesh)
> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
> > org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> >
> >
> > Regards
> > --
> > Łukasz
> > http://www.lenart.org.pl/
> > Kapituła Javarsovia 2010
> > http://javarsovia.pl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/
Mime
View raw message