You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hallgrímur Th. Björnsson" <ha...@skyrr.is> on 2010/03/23 12:44:27 UTC

org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Hi,

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.

If I put struts2-core-2.1.8.jar in the classpath, loading the application triggers the error message:


WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
        at com.sun.enterprise.web.WebContainer.createFilterInstance(WebContainer.java:715)
        at com.sun.enterprise.web.WebModule.createFilterInstance(WebModule.java:1948)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:248)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)


When I remove the jar, I can load the application until I hit the error:
java.lang.ClassNotFoundException: org.apache.struts2.interceptor.ServletRequestAware
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        ... 115 more

Which indicates that Struts isn't in the classpath.

Does anyone have any idea what is wrong?

Thanks.

Re: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Brian Thompson <el...@gmail.com>.
Target blank isn't necessarily available (e.g. writing the site in xhtml 1.1)

-Brian



On Tue, Mar 23, 2010 at 10:06 AM, Robert Graf-Waczenski <rg...@lsoft.com> wrote:
> Hi!
>
> How about using
>
> target="_blank"
>
> instead of onclick?
>
> Robert
>
> Gustavo Felisberto schrieb:
>>
>> Hello,
>>
>> This is a JS thing. Try:
>> onclick="javascript:window.open('%{genererRapportPDF}'); return false;"
>>
>> Gustavo
>>
>> -----Mensagem original-----
>> De: Celinio Fernandes [mailto:cel975@yahoo.com] Enviada: terça-feira, 23
>> de Março de 2010 13:03
>> Para: Struts Users Mailing List
>> Assunto: [Struts 2.1.8] s:url : how to open in a new window ?
>>
>> Hi,
>> I am using Struts 2.1.8.
>> In a JSP, I have a link which calls an action. I want to open that link in
>> a
>> new window. The following code works :
>>  <s:url id="genererRapportPDF" action="affichePDF" windowState="" />
>> <s:a href="%{genererRapportPDF}"
>> onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a>
>>      The problem is that it also calls the action / opens the link in the
>> current
>> window.
>> How to avoid that ?
>> Thanks.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Robert Graf-Waczenski <rg...@lsoft.com>.
Hi!

How about using

target="_blank"

instead of onclick?

Robert

Gustavo Felisberto schrieb:
> Hello,
>
> This is a JS thing. Try:
> onclick="javascript:window.open('%{genererRapportPDF}'); return false;"
>
> Gustavo
>
> -----Mensagem original-----
> De: Celinio Fernandes [mailto:cel975@yahoo.com] 
> Enviada: terça-feira, 23 de Março de 2010 13:03
> Para: Struts Users Mailing List
> Assunto: [Struts 2.1.8] s:url : how to open in a new window ?
>
> Hi,
> I am using Struts 2.1.8.
> In a JSP, I have a link which calls an action. I want to open that link in a
> new window. The following code works :
>  <s:url id="genererRapportPDF" action="affichePDF" windowState="" /> 
>   <s:a href="%{genererRapportPDF}"
> onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a> 
>  
>   
>   
> The problem is that it also calls the action / opens the link in the current
> window.
> How to avoid that ?
> Thanks.  
>  
>
>
>       
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>   




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Gustavo Felisberto <gu...@wit-software.com>.
Hello,

This is a JS thing. Try:
onclick="javascript:window.open('%{genererRapportPDF}'); return false;"

Gustavo

-----Mensagem original-----
De: Celinio Fernandes [mailto:cel975@yahoo.com] 
Enviada: terça-feira, 23 de Março de 2010 13:03
Para: Struts Users Mailing List
Assunto: [Struts 2.1.8] s:url : how to open in a new window ?

Hi,
I am using Struts 2.1.8.
In a JSP, I have a link which calls an action. I want to open that link in a
new window. The following code works :
 <s:url id="genererRapportPDF" action="affichePDF" windowState="" /> 
  <s:a href="%{genererRapportPDF}"
onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a> 
 
  
  
The problem is that it also calls the action / opens the link in the current
window.
How to avoid that ?
Thanks.  
 


      


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Brian Thompson <el...@gmail.com>.
What if I'm using the app, and I want to open the link in a new tab
instead?  Or how about, I want to open it in the same tab and just use
the back button once I'm done looking at the PDF?

-Brian



On Tue, Mar 23, 2010 at 8:02 AM, Celinio Fernandes <ce...@yahoo.com> wrote:
> Hi,
> I am using Struts 2.1.8.
> In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works :
>  <s:url id="genererRapportPDF" action="affichePDF" windowState="" />
>   <s:a href="%{genererRapportPDF}" onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a>
>
>
> The problem is that it also calls the action / opens the link in the current window.
> How to avoid that ?
> Thanks.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by "Hallgrímur Th. Björnsson" <ha...@skyrr.is>.
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 <ha...@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 <ha...@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/

RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by Martin Gainty <mg...@hotmail.com>.
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 <ha...@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 <ha...@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/

Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by Wes Wannemacher <we...@wantii.com>.
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 <ha...@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 <ha...@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


Re: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Celinio Fernandes <ce...@yahoo.com>.
Thanks, that works :)

--- On Tue, 3/23/10, Florin Cazacu <fl...@cst.ro> wrote:


From: Florin Cazacu <fl...@cst.ro>
Subject: Re: [Struts 2.1.8] s:url : how to open in a new window ?
To: "Struts Users Mailing List" <us...@struts.apache.org>
Date: Tuesday, March 23, 2010, 9:36 AM


Hello,

You can avoid opening of the link in the current window removing the href attribute from <s:a> tag.

Florin Cazacu.

Celinio Fernandes wrote:
> Hi,
> I am using Struts 2.1.8.
> In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works :
>  <s:url id="genererRapportPDF" action="affichePDF" windowState="" />   <s:a href="%{genererRapportPDF}" onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a>       The problem is that it also calls the action / opens the link in the current window.
> How to avoid that ?
> Thanks.   
> 
>         


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




      

Re: [Struts 2.1.8] s:url : how to open in a new window ?

Posted by Florin Cazacu <fl...@cst.ro>.
Hello,

You can avoid opening of the link in the current window removing the 
href attribute from <s:a> tag.

Florin Cazacu.

Celinio Fernandes wrote:
> Hi,
> I am using Struts 2.1.8.
> In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works :
>  <s:url id="genererRapportPDF" action="affichePDF" windowState="" /> 
>   <s:a href="%{genererRapportPDF}" onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a>   
>   
>   
> The problem is that it also calls the action / opens the link in the current window.
> How to avoid that ?
> Thanks.  
>  
>
>
>       
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[Struts 2.1.8] s:url : how to open in a new window ?

Posted by Celinio Fernandes <ce...@yahoo.com>.
Hi,
I am using Struts 2.1.8.
In a JSP, I have a link which calls an action. I want to open that link in a new window. The following code works :
 <s:url id="genererRapportPDF" action="affichePDF" windowState="" /> 
  <s:a href="%{genererRapportPDF}" onclick="javascript:window.open('%{genererRapportPDF}');">Generation</s:a>   
  
  
The problem is that it also calls the action / opens the link in the current window.
How to avoid that ?
Thanks.  
 


      

RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by "Hallgrímur Th. Björnsson" <ha...@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 <ha...@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


RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by "Hallgrímur Th. Björnsson" <ha...@skyrr.is>.
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 <ha...@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


Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/23 Hallgrímur Th. Björnsson <ha...@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