Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Mohamed SIDI
You have to copy the jar in your classpath and redeploy your application
after, it should work

2011/5/27 Martin Gainty 

>
> copy xwork-core-2.2.1.jar to WEB-INF\lib
>
> Martin
> __
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> 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: Thu, 26 May 2011 16:52:29 -0400
> From: em...@encs.concordia.ca
> To: user@struts.apache.org
> Subject: When start tomcat6  always got "java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!
>
> Hello,
>
> struts2.2.3, when tomcat6 is started, always got:
>
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor
>
> But the class is in the attached jar file.
>
> Could someone tell me why I got the exception for all action class please?
>
> Thanks alot!
> Emi
> --
>
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.struts2.ServletActionContext;
> import com.opensymphony.xwork2.ActionSupport;
>
> public class ActionClass  extends ActionSupport
> {
>public String execute() throws Exception
>{
>   HttpServletRequest  req = ServletActionContext.getRequest();
>   HttpServletResponse res = ServletActionContext.getResponse();
>   return SUCCESS;
>}
> }
>
> ==
> 2011-05-26 16:48:00,539 ERROR finder.ClassFinder.error:38 - Unable to
> read class [ActionClass]
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor
>at
>
> com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:780)
>at
>
> com.opensymphony.xwork2.util.finder.ClassFinder.(ClassFinder.java:165)
>at
>
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:376)
>at
>
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:334)
>at
>
> org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
>at
>
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
>at
>
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
>at
>
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
>at
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
>at
>
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:195)
>at
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
>at
>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
>at
>
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
>at
>
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
>at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
>at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
>at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
>at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
>at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
>at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
>at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
>at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>  

Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Maurizio Cucchiara
I don't think that the exception is referring to the xwork library, the
xwork library is present (see the stacktrace).
It seems rather that the xwork ClassFinder is not able to find your
ActionClass.


On 27 May 2011 09:56, Mohamed SIDI  wrote:

> You have to copy the jar in your classpath and redeploy your application
> after, it should work
>
> 2011/5/27 Martin Gainty 
>
> >
> > copy xwork-core-2.2.1.jar to WEB-INF\lib
> >
> > Martin
> > __
> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> >
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> > dient lediglich dem Austausch von Informationen und entfaltet keine
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > 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: Thu, 26 May 2011 16:52:29 -0400
> > From: em...@encs.concordia.ca
> > To: user@struts.apache.org
> > Subject: When start tomcat6  always got "java.lang.NoClassDefFoundError:
> > com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor"
> Error!
> >
> > Hello,
> >
> > struts2.2.3, when tomcat6 is started, always got:
> >
> > java.lang.NoClassDefFoundError:
> > com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor
> >
> > But the class is in the attached jar file.
> >
> > Could someone tell me why I got the exception for all action class
> please?
> >
> > Thanks alot!
> > Emi
> > --
> >
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> > import org.apache.struts2.ServletActionContext;
> > import com.opensymphony.xwork2.ActionSupport;
> >
> > public class ActionClass  extends ActionSupport
> > {
> >public String execute() throws Exception
> >{
> >   HttpServletRequest  req = ServletActionContext.getRequest();
> >   HttpServletResponse res = ServletActionContext.getResponse();
> >   return SUCCESS;
> >}
> > }
> >
> >
> ==
> > 2011-05-26 16:48:00,539 ERROR finder.ClassFinder.error:38 - Unable to
> > read class [ActionClass]
> > java.lang.NoClassDefFoundError:
> > com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor
> >at
> >
> >
> com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:780)
> >at
> >
> >
> com.opensymphony.xwork2.util.finder.ClassFinder.(ClassFinder.java:165)
> >at
> >
> >
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:376)
> >at
> >
> >
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:334)
> >at
> >
> >
> org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
> >at
> >
> >
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
> >at
> >
> >
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
> >at
> >
> >
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
> >at
> > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
> >at
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:195)
> >at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
> >at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
> >at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
> >at
> >
> >
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
> >at
> > org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
> >at
> >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
> >at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
> >at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
> >at
> >
>

RE: Struts File Upload Issue

2011-05-27 Thread VijayaRajan.S
Hi Alejandro,

It sometimes happens even for very small files.

Regards,
Vijayarajan S

-Original Message-
From: Alejandro García Gil [mailto:alejandro.garcia@gmail.com] 
Sent: Friday, May 27, 2011 11:51 AM
To: Struts Users Mailing List
Subject: Re: Struts File Upload Issue

Have you exceeded the maximum size of the file?


2011/5/26 Paweł Wielgus 

> Hi,
> maybe validation is not permitting action to be called in this situations?
>
> Best gretings,
> Paweł Wielgus.
>
>
> 2011/5/26  :
> > Hi,
> >
> >
> >
> > I have a query regarding file upload functionality in Struts. I am
> > having a screen from where I can upload multiple files. When files are
> > browsed and submit button is clicked, it will first hit a filter,
> > validate the user and calls the action method where uploading the files
> > to the repository is done. It happens fine normally. But rarely when
> > submit is clicked in UI, it goes to the filter, validates the user and
> > doesn't call the action method. It fails somewhere between the filter
> > and the action class. It doesn't throw any exceptions from the framework
> > too.
> >
> >
> >
> > First we thought, it happens when big files are uploaded. Then we found
> > even for small files, this happens occasionally. Below is the JRE
> > details being used.
> >
> > Java version = J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223ifx-20080811
> > (JIT enabled)
> >
> >
> >
> > I couldn't figure out why this is happening. Any suggestion regarding
> > this is most welcome.
> >
> >
> >
> > Thanks in advance,
> >
> > Vijay S
> >
> >
> > This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information.
> > If you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
> > Any unauthorized review, use, disclosure, dissemination, forwarding,
> printing or copying of this email or any action taken in reliance on this
> e-mail is strictly prohibited and may be unlawful.
> >
>
>
>
> --
> Pozdrawiam,
> Paweł Wielgus.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful.

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



RE: Struts File Upload Issue

2011-05-27 Thread Jason Pyeron
> -Original Message-
> From: vijayaraja...@cognizant.com 
> [mailto:vijayaraja...@cognizant.com] 
> Sent: Friday, May 27, 2011 6:58
> To: user@struts.apache.org
> Subject: RE: Struts File Upload Issue
> 
> Hi Alejandro,
> 
> It sometimes happens even for very small files.

Is there a proxy between you and the server?

Can you produce the problem by accessing it on 127.0.0.1?


> 
> Regards,
> Vijayarajan S
> 
> -Original Message-
> From: Alejandro García Gil [mailto:alejandro.garcia@gmail.com]
> Sent: Friday, May 27, 2011 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: Struts File Upload Issue
> 
> Have you exceeded the maximum size of the file?
> 
> 
> 2011/5/26 Paweł Wielgus 
> 
> > Hi,
> > maybe validation is not permitting action to be called in 
> this situations?
> >
> > Best gretings,
> > Paweł Wielgus.
> >
> >
> > 2011/5/26  :
> > > Hi,
> > >
> > >
> > >
> > > I have a query regarding file upload functionality in 
> Struts. I am 
> > > having a screen from where I can upload multiple files. 
> When files 
> > > are browsed and submit button is clicked, it will first hit a 
> > > filter, validate the user and calls the action method where 
> > > uploading the files to the repository is done. It happens fine 
> > > normally. But rarely when submit is clicked in UI, it goes to the 
> > > filter, validates the user and doesn't call the action method. It 
> > > fails somewhere between the filter and the action class. 
> It doesn't 
> > > throw any exceptions from the framework too.
> > >
> > >
> > >
> > > First we thought, it happens when big files are uploaded. Then we 
> > > found even for small files, this happens occasionally. 
> Below is the 
> > > JRE details being used.
> > >
> > > Java version = J2RE 1.5.0 IBM J9 2.3 Linux x86-32 
> > > j9vmxi3223ifx-20080811 (JIT enabled)
> > >
> > >
> > >
> > > I couldn't figure out why this is happening. Any suggestion 
> > > regarding this is most welcome.
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > > Vijay S
> > >
> > >
> > > This e-mail and any files transmitted with it are for the 
> sole use 
> > > of the
> > intended recipient(s) and may contain confidential and privileged 
> > information.
> > > If you are not the intended recipient, please contact the 
> sender by 
> > > reply
> > e-mail and destroy all copies of the original message.
> > > Any unauthorized review, use, disclosure, dissemination, 
> forwarding,
> > printing or copying of this email or any action taken in 
> reliance on 
> > this e-mail is strictly prohibited and may be unlawful.
> > >
> >
> >
> >
> > --
> > Pozdrawiam,
> > Paweł Wielgus.
> >
> > 
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> This e-mail and any files transmitted with it are for the 
> sole use of the intended recipient(s) and may contain 
> confidential and privileged information.
> If you are not the intended recipient, please contact the 
> sender by reply e-mail and destroy all copies of the original message.
> Any unauthorized review, use, disclosure, dissemination, 
> forwarding, printing or copying of this email or any action 
> taken in reliance on this e-mail is strictly prohibited and 
> may be unlawful.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


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



RE: Struts File Upload Issue

2011-05-27 Thread Martin Gainty

did you determine which class validation is producing the error?

i assume cognizant is paying you t&m 

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> From: jpye...@pdinc.us
> To: user@struts.apache.org
> Subject: RE: Struts File Upload Issue
> Date: Fri, 27 May 2011 07:06:23 -0400
> 
> > -Original Message-
> > From: vijayaraja...@cognizant.com 
> > [mailto:vijayaraja...@cognizant.com] 
> > Sent: Friday, May 27, 2011 6:58
> > To: user@struts.apache.org
> > Subject: RE: Struts File Upload Issue
> > 
> > Hi Alejandro,
> > 
> > It sometimes happens even for very small files.
> 
> Is there a proxy between you and the server?
> 
> Can you produce the problem by accessing it on 127.0.0.1?
> 
> 
> > 
> > Regards,
> > Vijayarajan S
> > 
> > -Original Message-
> > From: Alejandro García Gil [mailto:alejandro.garcia@gmail.com]
> > Sent: Friday, May 27, 2011 11:51 AM
> > To: Struts Users Mailing List
> > Subject: Re: Struts File Upload Issue
> > 
> > Have you exceeded the maximum size of the file?
> > 
> > 
> > 2011/5/26 Paweł Wielgus 
> > 
> > > Hi,
> > > maybe validation is not permitting action to be called in 
> > this situations?
> > >
> > > Best gretings,
> > > Paweł Wielgus.
> > >
> > >
> > > 2011/5/26  :
> > > > Hi,
> > > >
> > > >
> > > >
> > > > I have a query regarding file upload functionality in 
> > Struts. I am 
> > > > having a screen from where I can upload multiple files. 
> > When files 
> > > > are browsed and submit button is clicked, it will first hit a 
> > > > filter, validate the user and calls the action method where 
> > > > uploading the files to the repository is done. It happens fine 
> > > > normally. But rarely when submit is clicked in UI, it goes to the 
> > > > filter, validates the user and doesn't call the action method. It 
> > > > fails somewhere between the filter and the action class. 
> > It doesn't 
> > > > throw any exceptions from the framework too.
> > > >
> > > >
> > > >
> > > > First we thought, it happens when big files are uploaded. Then we 
> > > > found even for small files, this happens occasionally. 
> > Below is the 
> > > > JRE details being used.
> > > >
> > > > Java version = J2RE 1.5.0 IBM J9 2.3 Linux x86-32 
> > > > j9vmxi3223ifx-20080811 (JIT enabled)
> > > >
> > > >
> > > >
> > > > I couldn't figure out why this is happening. Any suggestion 
> > > > regarding this is most welcome.
> > > >
> > > >
> > > >
> > > > Thanks in advance,
> > > >
> > > > Vijay S
> > > >
> > > >
> > > > This e-mail and any files transmitted with it are for the 
> > sole use 
> > > > of the
> > > intended recipient(s) and may contain confidential and privileged 
> > > information.
> > > > If you are not the intended recipient, please contact the 
> > sender by 
> > > > reply
> > > e-mail and destroy all copies of the original message.
> > > > Any unauthorized review, use, disclosure, dissemination, 
> > forwarding,
> > > printing or copying of this email or any action taken in 
> > reliance on 
> > > this e-mail is strictly prohibited and may be unlawful.
> > > >
> > >
> > >
> > >
> > > --
> > > Pozdrawiam,
> > > Paweł Wielgus.
> > >
> > > 
> > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> > 
> > This e-mail and any files transmitted with it are for the 
> > sole use of the intended recipient(s) and may contain 
> > confidential and privileged information.
> > If you are not the intended recipient, please contact the 
> > sender by reply e-mail and destroy all copies of the original message.
> > Any unauthorized review, use, disclosure, dissemination, 
> > forwarding, printing or copying of this email or any action 
> > taken in reliance on this e-mail is strictly prohibited and 
> > may be unlawful.
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> > 
> > 
> 
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -   -
> - Jason Pyeron  PD Inc. http://www.pdinc.us -
> - Principal Consultant  10 West 24th Street #100-
> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
> -  

Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Miguel
Hi,

I'm using spring to inject dependencies in my application. 
I added a module I had previously developed that had the code in some
class (request is a HttpServletRequest):

private String getIpAddress() {
request = ServletActionContext.getRequest();
...
}

This now seems wrong on a few levels:
a) it creates a dependency in the containing project to struts that
shouldn't be there (the ServletActionConfiguration)
b) My database integration tests fail because on their context of
execution there is no ServletActionContext

I was thinking of a solution that involves injecting the request onto
the class. In the test environment I'll have no problems, I'll just
inject a mock HttpServletRequest.

However, in my application, I fail to see how I can inject the proper
request onto that class. Struts injects a request onto the actions. I'm
using spring-plugin. But @autowire-ing the request doesn't work, and in
my springcontext.xml, I fail to see how to fetch struts' request (whose
spring bean would be XXX in the following code):





Is what I am trying to achieve possible?

Regards,

Miguel Almeida



Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Dave Newton
What specifically do you need an actual request for? This strikes me
as coupling your design to the servlet spec, and there's rarely a
strong reason to do that past the web layer itself. The idea on
injecting a request just seems wrong.

Is that a Struts 2 interceptor you're trying to inject it in to?

Dave

On Friday, May 27, 2011, Miguel  wrote:
> Hi,
>
> I'm using spring to inject dependencies in my application.
> I added a module I had previously developed that had the code in some
> class (request is a HttpServletRequest):
>
>         private String getIpAddress() {
>                         request = ServletActionContext.getRequest();
>                         ...
>         }
>
> This now seems wrong on a few levels:
> a) it creates a dependency in the containing project to struts that
> shouldn't be there (the ServletActionConfiguration)
> b) My database integration tests fail because on their context of
> execution there is no ServletActionContext
>
> I was thinking of a solution that involves injecting the request onto
> the class. In the test environment I'll have no problems, I'll just
> inject a mock HttpServletRequest.
>
> However, in my application, I fail to see how I can inject the proper
> request onto that class. Struts injects a request onto the actions. I'm
> using spring-plugin. But @autowire-ing the request doesn't work, and in
> my springcontext.xml, I fail to see how to fetch struts' request (whose
> spring bean would be XXX in the following code):
>
>                  scope="prototype">
>                 
> 
>
> Is what I am trying to achieve possible?
>
> Regards,
>
> Miguel Almeida
>
>

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



Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Miguel
Hi Dave,

On Fri, 2011-05-27 at 08:10 -0400, Dave Newton wrote:

> What specifically do you need an actual request for? This strikes me
> as coupling your design to the servlet spec, and there's rarely a
> strong reason to do that past the web layer itself. The idea on
> injecting a request just seems wrong.
> 
> Is that a Struts 2 interceptor you're trying to inject it in to?
> 

It's an hibernate interceptor. It kicks in when you're committing the
transaction to the database. This audit interceptor stores who changed
what information. In very simple terms:

date || user || property || old value || new value || ipaddress||
2011-05-27 13:18 || dnewton || patient[22].age || 27 || 40 ||
83.999.21.21||

This class is the one responsible for:
a) detecting what changes are being made
b) Detecting who made the changes 
c) log that info onto the database.

This interceptor extends an org.hibernate.EmptyInterceptor (that kicks
in with methods like onSave, onDelete, etc). I need the
HttpServletRequest because it's the only way I've found to:
a) retrieve the username (request.getUserPrincpal.getName)
b) retrieve the user's IP address.

Do you see any other better alternative and/or a solution to my previous
mails' question?

Thanks a lot for your quick reply!

Miguel Almeida


Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Andrew Lee
Dave is right that it suggests its bad design but if you really need it you
can get your action to implement servletrequestaware:

http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/interceptor/package-summary.html

Might be better to create a threadlocal in an interceptor to store t
relevant info in a dto and access it that way-it seems a more cross cutting
concern. You definitely don't want pass t request to your service/dao
layers!
 On 27 May 2011 13:10, "Dave Newton"  wrote:


Struts2 Plugins inside IoC

2011-05-27 Thread Frans Thamura
hi all

i found that springmvc register all their bean in the appcontex.xml

any reason, why struts2 better rather using this method

thx

F


Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Miguel
On Fri, 2011-05-27 at 13:24 +0100, Miguel wrote:

> Hi Dave,
> 
> On Fri, 2011-05-27 at 08:10 -0400, Dave Newton wrote:
> 
> > What specifically do you need an actual request for? This strikes me
> > as coupling your design to the servlet spec, and there's rarely a
> > strong reason to do that past the web layer itself. The idea on
> > injecting a request just seems wrong.
> > 


Following my previous email and agreeing with you on this,  I might, of
course, get off the request hook by changing the request injection with
injecting, for example, those two properties (username and ipaddress) to
this class, but the underlying problem is the same: I'm not seeing how I
can inject that requests' username and IP address to that class...


Re: Struts2 Plugins inside IoC

2011-05-27 Thread Mohamed SIDI
Can you be more clear about what you like to understand

2011/5/27 Frans Thamura 

> hi all
>
> i found that springmvc register all their bean in the appcontex.xml
>
> any reason, why struts2 better rather using this method
>
> thx
>
> F
>



-- 


Cordialement

Mohamed


Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Dave Newton
On Friday, May 27, 2011, Miguel wrote:
> Following my previous email and agreeing with you on this,  I might, of
> course, get off the request hook by changing the request injection with
> injecting, for example, those two properties (username and ipaddress) to
> this class, but the underlying problem is the same: I'm not seeing how I
> can inject that requests' username and IP address to that class...

I'd probably keep a session-scoped bean containing the desired
properties and inject that into the Hibernate interceptor. Spring
understands session-scoped beans; fill the bean on login, etc.

I guess I thought that Hibernate interceptors were normally
singletons, but maybe not.

Dave

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



Re: [OT] Re: Job postings

2011-05-27 Thread erikweber
If you need any consulting or development in the Java client-side area (Swing, 
JFC/AWT, core Java, etc.), feel free to give me a shout. Also I do C++ GUI 
development, particularly with DirectX.

I used to be a server-side developer but have focused on client development for 
the past seven years or so. If you want someone to strictly do Struts I'm sure 
I'd be rustier than your other candidates but . . . I live in Atlanta and have 
a successful "telecommuting" record behind me so you never know. Thought I 
would reach out.

Thanks and good luck.

Erik


-Original Message-
>From: Robert Taylor 
>Sent: May 26, 2011 10:01 AM
>To: Struts Users Mailing List 
>Subject: Re: [OT] Re: Job postings
>
>Hello,
>
>Currently we are only considering candidates in the Atlanta, GA area.
>Telecommuting is an option; however, you will be required to be onsite
>at various times.
>
>Thanks,
>
>/robert
>- Original Message - 
>From: "Mohamed SIDI" 
>To: "Struts Users Mailing List" 
>Sent: Thursday, May 26, 2011 9:41 AM
>Subject: Re: [OT] Re: Job postings
>
>
>> Hello there,
>>
>> This may be one of the most important opportunity what about one witch is
>> located in France ? there are some conditions to candidate :)
>>
>> 2011/5/26 Robert Taylor 
>>
>>> Hi Dale,
>>>
>>> We have a posting on the AJUG site.
>>> I've also been to the latest AJUG meetings.
>>> When I was there, 6 companies stood up and declared many openings
>>> for Java developers.
>>>
>>> Thanks for the advice.
>>>
>>> /robert
>>> - Original Message - From: "Dale Newfield" 
>>>
>>> To: "Struts Users Mailing List" 
>>> Sent: Thursday, May 26, 2011 9:06 AM
>>>
>>> Subject: [OT] Re: Job postings
>>>
>>>
>>>  On 5/26/11 7:51 AM, Martin Gainty wrote:

> does'nt dale live down there?
>

 Thanks for thinking of me.  The reason I've been scarce around these 
 parts
 lately is that I finally had to get a "real" job at the end of last 
 year, so
 I no longer have as much time to respond to questions here, and I'm no
 longer in the market for a job.  I'm now working at Turner 
 Entertainment,
 and we're also looking for senior level folks, but we've been having 
 quite a
 difficult time finding well qualified candidates ourselves.  In Atlanta 
 my
 first suggestion would be to post to the Atlanta Java Users' Group job
 mailing list, but seeing as we're still looking I'm not sure how much 
 that
 advice is worth.

 -Dale

  On Thu, May 26, 2011 at 4:50 PM, Robert Taylor> >wrote:
>>
>>  Greetings,
>>>
>>> I'm a Java team lead for a company in Atlanta Ga.
>>> My team has 2 positions open for senior level Java/Struts developers.
>>> I was wondering if its okay to post on this list regarding these open
>>> positions.
>>>
>>> /robert
>>>
>>
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>> -- 
>>
>>
>> Cordialement
>>
>> Mohamed
>> 
>
>
>-
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org
>


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



RE: Struts2 Plugins inside IoC

2011-05-27 Thread Ilya Kazakevich
Use struts2-spring plugin to configure actions as spring beans.
I use it and it is very cool:

Instead of 
http://www.jetbrains.com
"Develop with pleasure!"

-Original Message-
From: Mohamed SIDI [mailto:mhm.s...@gmail.com] 
Sent: Friday, May 27, 2011 4:45 PM
To: Struts Users Mailing List
Subject: Re: Struts2 Plugins inside IoC

Can you be more clear about what you like to understand

2011/5/27 Frans Thamura 

> hi all
>
> i found that springmvc register all their bean in the appcontex.xml
>
> any reason, why struts2 better rather using this method
>
> thx
>
> F
>



-- 


Cordialement

Mohamed


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



Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Miguel
On Fri, 2011-05-27 at 09:00 -0400, Dave Newton wrote:

> On Friday, May 27, 2011, Miguel wrote:
> > Following my previous email and agreeing with you on this,  I might, of
> > course, get off the request hook by changing the request injection with
> > injecting, for example, those two properties (username and ipaddress) to
> > this class, but the underlying problem is the same: I'm not seeing how I
> > can inject that requests' username and IP address to that class...
> 
> I'd probably keep a session-scoped bean containing the desired
> properties and inject that into the Hibernate interceptor. Spring
> understands session-scoped beans; fill the bean on login, etc.
> 

I never used session-scoped beans, would you mind shedding some light on
this please?  The link
http://struts.apache.org/2.2.3/docs/spring-session-components-workarounds.html 
in http://struts.apache.org/2.2.3/docs/spring-plugin.html (To use 
session-scoped components with Spring and Struts, see...) leads to an empty 
page. What session are we referring to, the http session?


> I guess I thought that Hibernate interceptors were normally
> singletons, but maybe not.
> 

I believe they can have any scope. In this case they need to be
prototype exactly due to the fact that they need the user's details and
the list of changes he's making.

Miguel


Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Emi Lu

Good morning,

Thank you very much for your inputs!

To figure out which jar is missing, I downloaded the xwork-core.jar and 
complied it.


The following files fixed the problem:
=
. lib/asm-4.0_RC1.jar
. lib/asm-commons-4.0_RC1.jar

For people might see the same error, a summary list of my libs (some 
libs for my other feature only, E.g., quartz, jdbc driver, etc)


---
activation.jar
antlr-3.2.jar
aopalliance-1.0.jar
asm-4.0_RC1.jar
asm-commons-4.0_RC1.jar
cglib-2.2.jar
commons-beanutils-1.8.3.jar
commons-collections-3.2.1.jar
commons-dbcp-1.2.2.jar
commons-digester-2.0.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
commons-logging-api-1.1.1.jar
commons-pool-1.5.4.jar

displaytag-1.2.jar
displaytag-export-poi-1.2.jar
dom4j-1.6.1.jar

freemarker.jar
iText-5.0.6.jar
javassist.jar
jcommon-1.0.16.jar
jfreechart-1.0.13.jar
jstl.jar
junit-4.8.1.jar
log4j-1.2.16.jar
mail.jar
mybatis-3.0.3.jar
mybatis-spring-1.0.0-RC3.jar
mysql-connector-java-5.1.13-bin.jar
ognl-3.0.1.jar
org.springframework.aop-3.0.5.RELEASE.jar
org.springframework.asm-3.0.5.RELEASE.jar
org.springframework.aspects-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.context-3.0.5.RELEASE.jar
org.springframework.context.support-3.0.5.RELEASE.jar
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.instrument-3.0.5.RELEASE.jar
org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
org.springframework.jdbc-3.0.5.RELEASE.jar
org.springframework.jms-3.0.5.RELEASE.jar
org.springframework.orm-3.0.5.RELEASE.jar
org.springframework.oxm-3.0.5.RELEASE.jar
org.springframework.spring-library-3.0.5.RELEASE.libd
org.springframework.test-3.0.5.RELEASE.jar
org.springframework.transaction-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar
org.springframework.web.portlet-3.0.5.RELEASE.jar
org.springframework.web.servlet-3.0.5.RELEASE.jar
org.springframework.web.struts-3.0.5.RELEASE.jar
poi-3.8-beta1-20110307.jar
poi-ooxml-3.8-beta1-20110307.jar
poi-ooxml-schemas-3.8-beta1-20110307.jar
postgresql-9.0-801.jdbc4.jar
quartz-1.8.5.jar
slf4j-api-1.6.1.jar
spring-tx-3.0.5.RELEASE.jar
standard.jar
stax-api-1.0.1.jar
struts2-codebehind-plugin-2.2.3.jar
struts2-config-browser-plugin-2.2.3.jar
struts2-convention-plugin-2.2.3.jar
struts2-core-2.2.3.jar
struts2-dojo-plugin-2.2.3.jar
struts2-jasperreports-plugin-2.2.3.jar
struts2-jfreechart-plugin-2.2.3.jar
struts2-jquery-plugin-3.0.0.jar
struts2-spring-plugin-2.2.3.jar
struts2-tiles-plugin-2.2.3.jar

tiles-api-2.0.7.jar
tiles-core-2.0.7.jar
tiles-jsp-2.0.7.jar
xbean.jar
xwork-core-2.2.3.jar








On 05/27/2011 06:04 AM, Maurizio Cucchiara wrote:

I don't think that the exception is referring to the xwork library, the
xwork library is present (see the stacktrace).
It seems rather that the xwork ClassFinder is not able to find your
ActionClass.


On 27 May 2011 09:56, Mohamed SIDI  wrote:


You have to copy the jar in your classpath and redeploy your application
after, it should work

2011/5/27 Martin Gainty



copy xwork-core-2.2.1.jar to WEB-INF\lib

Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede

unbefugte

Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
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: Thu, 26 May 2011 16:52:29 -0400
From: em...@encs.concordia.ca
To: user@struts.apache.org
Subject: When start tomcat6  always got "java.lang.NoClassDefFoundError:
com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor"

Error!


Hello,

struts2.2.3, when tomcat6 is started, always got:

java.lang.NoClassDefFoundError:
com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor

But the class is in the attached jar file.

Could someone tell me why I got the exception for all action class

please?


Thanks alot!
Emi
--

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class ActionClass  

Re: Struts2 Plugins inside IoC

2011-05-27 Thread Jeff Black
Hi Frans.  
 
I found your question a little vague.  Would you mind adding some more detail?
 
jb
/
 

From: Frans Thamura 
To: Struts Users Mailing List 
Sent: Friday, May 27, 2011 7:34 AM
Subject: Struts2 Plugins inside IoC

hi all

i found that springmvc register all their bean in the appcontex.xml

any reason, why struts2 better rather using this method

thx

F

Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Dave Newton
Are you really using all of those S2 plugins?

You should not deploy plugins you are not using, as they may change
fundamental S2 behavior.

If nothing else it is almost certainly a bad idea to include both the
codebehind (deprecated) and convention plugins. It's unusual to use
both the Dojo and jQuery plugins simultaneously.

Dave

On Fri, May 27, 2011 at 10:03 AM, Emi Lu  wrote:
> Good morning,
>
> Thank you very much for your inputs!
>
> To figure out which jar is missing, I downloaded the xwork-core.jar and
> complied it.
>
> The following files fixed the problem:
> =
> . lib/asm-4.0_RC1.jar
> . lib/asm-commons-4.0_RC1.jar
>
> For people might see the same error, a summary list of my libs (some libs
> for my other feature only, E.g., quartz, jdbc driver, etc)
>
> ---
> activation.jar
> antlr-3.2.jar
> aopalliance-1.0.jar
> asm-4.0_RC1.jar
> asm-commons-4.0_RC1.jar
> cglib-2.2.jar
> commons-beanutils-1.8.3.jar
> commons-collections-3.2.1.jar
> commons-dbcp-1.2.2.jar
> commons-digester-2.0.jar
> commons-fileupload-1.2.2.jar
> commons-io-2.0.1.jar
> commons-lang-2.5.jar
> commons-logging-1.1.1.jar
> commons-logging-api-1.1.1.jar
> commons-pool-1.5.4.jar
>
> displaytag-1.2.jar
> displaytag-export-poi-1.2.jar
> dom4j-1.6.1.jar
>
> freemarker.jar
> iText-5.0.6.jar
> javassist.jar
> jcommon-1.0.16.jar
> jfreechart-1.0.13.jar
> jstl.jar
> junit-4.8.1.jar
> log4j-1.2.16.jar
> mail.jar
> mybatis-3.0.3.jar
> mybatis-spring-1.0.0-RC3.jar
> mysql-connector-java-5.1.13-bin.jar
> ognl-3.0.1.jar
> org.springframework.aop-3.0.5.RELEASE.jar
> org.springframework.asm-3.0.5.RELEASE.jar
> org.springframework.aspects-3.0.5.RELEASE.jar
> org.springframework.beans-3.0.5.RELEASE.jar
> org.springframework.context-3.0.5.RELEASE.jar
> org.springframework.context.support-3.0.5.RELEASE.jar
> org.springframework.core-3.0.5.RELEASE.jar
> org.springframework.expression-3.0.5.RELEASE.jar
> org.springframework.instrument-3.0.5.RELEASE.jar
> org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
> org.springframework.jdbc-3.0.5.RELEASE.jar
> org.springframework.jms-3.0.5.RELEASE.jar
> org.springframework.orm-3.0.5.RELEASE.jar
> org.springframework.oxm-3.0.5.RELEASE.jar
> org.springframework.spring-library-3.0.5.RELEASE.libd
> org.springframework.test-3.0.5.RELEASE.jar
> org.springframework.transaction-3.0.5.RELEASE.jar
> org.springframework.web-3.0.5.RELEASE.jar
> org.springframework.web.portlet-3.0.5.RELEASE.jar
> org.springframework.web.servlet-3.0.5.RELEASE.jar
> org.springframework.web.struts-3.0.5.RELEASE.jar
> poi-3.8-beta1-20110307.jar
> poi-ooxml-3.8-beta1-20110307.jar
> poi-ooxml-schemas-3.8-beta1-20110307.jar
> postgresql-9.0-801.jdbc4.jar
> quartz-1.8.5.jar
> slf4j-api-1.6.1.jar
> spring-tx-3.0.5.RELEASE.jar
> standard.jar
> stax-api-1.0.1.jar
> struts2-codebehind-plugin-2.2.3.jar
> struts2-config-browser-plugin-2.2.3.jar
> struts2-convention-plugin-2.2.3.jar
> struts2-core-2.2.3.jar
> struts2-dojo-plugin-2.2.3.jar
> struts2-jasperreports-plugin-2.2.3.jar
> struts2-jfreechart-plugin-2.2.3.jar
> struts2-jquery-plugin-3.0.0.jar
> struts2-spring-plugin-2.2.3.jar
> struts2-tiles-plugin-2.2.3.jar
>
> tiles-api-2.0.7.jar
> tiles-core-2.0.7.jar
> tiles-jsp-2.0.7.jar
> xbean.jar
> xwork-core-2.2.3.jar
>
>
>
>
>
>
>
>
> On 05/27/2011 06:04 AM, Maurizio Cucchiara wrote:
>>
>> I don't think that the exception is referring to the xwork library, the
>> xwork library is present (see the stacktrace).
>> It seems rather that the xwork ClassFinder is not able to find your
>> ActionClass.
>>
>>
>> On 27 May 2011 09:56, Mohamed SIDI  wrote:
>>
>>> You have to copy the jar in your classpath and redeploy your application
>>> after, it should work
>>>
>>> 2011/5/27 Martin Gainty
>>>

 copy xwork-core-2.2.1.jar to WEB-INF\lib

 Martin
 __
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>>>
>>> unbefugte

 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
 Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 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 cont

Re: Upgrading Struts 1.1 to Struts 2 with tiles

2011-05-27 Thread Sachin Lale
I solve this problem by creatig duplicate tiles.xml (tiles 2 
configuration) which will be used by Struts2 and the other tiles-defs by 
struts1. The other change i have to made is to duplicate my layout.jsp 
for tiles 2. And then every thing is working fine.


On 24-05-2011 23:29, Sachin Lale wrote:

Hi,
I might not understand what null definition means. Also i don't want 
to loose the current flow of struts 1.1 (using TilesPlugin) and also 
Struts2 to work using old tiles definition. I am using tile 2.2.2 and 
followed the instructions given on 
http://tiles.apache.org/framework/migration/configuration.html#Reusing_old_Tiles_configuration_files 
got NullPointerException 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs.  
So i rename my my tiles-defs.xml fiel to tiles.xml and got the same 
exception as given below.

org.apache.tiles.impl.InvalidTemplateException: Cannot render a null template
Thanks for help.

Best regards,
Sachin


On 24-05-2011 00:12, Martin Gainty wrote:

it seems you are supplying a null template definition  e.g.
<%@ taglib uri="http://struts.apache.org/tags-tiles";  prefix="tiles" %>

   
   
   

WEB-INF/struts-config.xml



s



to implement tiles in struts2.x use 
org.apache.struts2.tiles.listener.StrutsTilesListener

web.xml would contain


org.apache.struts2.tiles.StrutsTilesListener



Martin Gainty
__
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor 
kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy 
másolatának készítése nem megengedett.  Ez az üzenet csak ismeret 
cserét szolgál és semmiféle jogi alkalmazhatósága sincs.  Mivel az 
electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi 
felelöség nem terhelhet ezen üzenet tartalma miatt.


Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede 
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. 
Diese Nachricht dient lediglich dem Austausch von Informationen und 
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten 
Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den 
Inhalt uebernehmen.

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: Mon, 23 May 2011 22:48:01 +0530
> From: sachin.l...@krishagni.com
> To: user@struts.apache.org
> Subject: Upgrading Struts 1.1 to Struts 2 with tiles
>
> Hi,
> I want to upgrade my application to Struts 2.2.3 from struts 1.1. I 
want

> to migrate this on shared resource basis i.e. running both Struts1 and
> struts2 in parallel each handling different action extension (*.action
> and *.do). Though i could successfully created the Struts2 action 
class

> and request is getting routed correctly but i am facing problems with
> re-using struts-tiles. I added below lines in web.xml
> 
> struts2
> 
org.apache.struts2.dispatcher.FilterDispatcher

> 
> 
> struts2
> *.action
> 
> 
> 
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG

> /WEB-INF/tiles-defs.xml
> 
> 
> 
org.apache.tiles.extras.complete.CompleteAutoloadTilesListener

> 
>
> But it is throwing below action while forwarding request from struts2
> action to tile.
>
> org.apache.tiles.impl.InvalidTemplateException: Cannot render a 
null template
> 
org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:51)
> 
org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
> 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
> 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
> 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
> 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
> 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
> 
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
> 
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
> 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
> 
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.ja

Struts2 resource property and dynamic population of action in jsp file

2011-05-27 Thread Sachin Lale

  Hi,
I have two questions:
1. In Jsp while displaying text box and i want this to populate from 
ApplicationResource.properties file. I did this be adding getText() 
method like below. Is this the only way?



2. I want the 'action' property of s:form tag to be populated 
dynamically. For this i added a instance variable in my action 
'onsubmitAction' and setting this value before action forward to result.
 or . 
But this is not working. Is there any way for this use case.


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



Re: Struts2 resource property and dynamic population of action in jsp file

2011-05-27 Thread Dave Newton
On Fri, May 27, 2011 at 10:40 AM, Sachin Lale wrote:
> 1. In Jsp while displaying text box and i want this to populate from
> ApplicationResource.properties file. I did this be adding getText() method
> like below. Is this the only way?
> 

Nope; you can use the "key" tag attribute to define the property name
and label key at once.

JSP: 
Resource: name=Full Name

> 2. I want the 'action' property of s:form tag to be populated dynamically.
> For this i added a instance variable in my action 'onsubmitAction' and
> setting this value before action forward to result.
>  or . But
> this is not working. Is there any way for this use case.

Not sure; I might consider doing this a different way, though, perhaps
through a custom JSP-based tag (possibly a thin layer over an existing
tag).

(Why that way? I find it more informative, and it allows some
interesting games to be played.)

In any case, which version of S2 are you using?

Dave

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



Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Emi Lu

Are you really using all of those S2 plugins?



You should not deploy plugins you are not using, as they may change
fundamental S2 behavior.

If nothing else it is almost certainly a bad idea to include both the
codebehind (deprecated) and convention plugins.


I use both struts1(history libs for some tags) + struts2.

I removed codebehind & convention jars. It seems no error for now.



It's unusual to use
both the Dojo and jQuery plugins simultaneously.


Confirmed. Two tags are used in jsp for now:

<%@ taglib prefix="sj" uri="/struts-jquery-tags"  %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>


Is dojo deprecated?

Thank you,
Emi





Dave

On Fri, May 27, 2011 at 10:03 AM, Emi Lu  wrote:

Good morning,

Thank you very much for your inputs!

To figure out which jar is missing, I downloaded the xwork-core.jar and
complied it.

The following files fixed the problem:
=
. lib/asm-4.0_RC1.jar
. lib/asm-commons-4.0_RC1.jar

For people might see the same error, a summary list of my libs (some libs
for my other feature only, E.g., quartz, jdbc driver, etc)

---
activation.jar
antlr-3.2.jar
aopalliance-1.0.jar
asm-4.0_RC1.jar
asm-commons-4.0_RC1.jar
cglib-2.2.jar
commons-beanutils-1.8.3.jar
commons-collections-3.2.1.jar
commons-dbcp-1.2.2.jar
commons-digester-2.0.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
commons-logging-api-1.1.1.jar
commons-pool-1.5.4.jar

displaytag-1.2.jar
displaytag-export-poi-1.2.jar
dom4j-1.6.1.jar

freemarker.jar
iText-5.0.6.jar
javassist.jar
jcommon-1.0.16.jar
jfreechart-1.0.13.jar
jstl.jar
junit-4.8.1.jar
log4j-1.2.16.jar
mail.jar
mybatis-3.0.3.jar
mybatis-spring-1.0.0-RC3.jar
mysql-connector-java-5.1.13-bin.jar
ognl-3.0.1.jar
org.springframework.aop-3.0.5.RELEASE.jar
org.springframework.asm-3.0.5.RELEASE.jar
org.springframework.aspects-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.context-3.0.5.RELEASE.jar
org.springframework.context.support-3.0.5.RELEASE.jar
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.instrument-3.0.5.RELEASE.jar
org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
org.springframework.jdbc-3.0.5.RELEASE.jar
org.springframework.jms-3.0.5.RELEASE.jar
org.springframework.orm-3.0.5.RELEASE.jar
org.springframework.oxm-3.0.5.RELEASE.jar
org.springframework.spring-library-3.0.5.RELEASE.libd
org.springframework.test-3.0.5.RELEASE.jar
org.springframework.transaction-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar
org.springframework.web.portlet-3.0.5.RELEASE.jar
org.springframework.web.servlet-3.0.5.RELEASE.jar
org.springframework.web.struts-3.0.5.RELEASE.jar
poi-3.8-beta1-20110307.jar
poi-ooxml-3.8-beta1-20110307.jar
poi-ooxml-schemas-3.8-beta1-20110307.jar
postgresql-9.0-801.jdbc4.jar
quartz-1.8.5.jar
slf4j-api-1.6.1.jar
spring-tx-3.0.5.RELEASE.jar
standard.jar
stax-api-1.0.1.jar
struts2-codebehind-plugin-2.2.3.jar
struts2-config-browser-plugin-2.2.3.jar
struts2-convention-plugin-2.2.3.jar
struts2-core-2.2.3.jar
struts2-dojo-plugin-2.2.3.jar
struts2-jasperreports-plugin-2.2.3.jar
struts2-jfreechart-plugin-2.2.3.jar
struts2-jquery-plugin-3.0.0.jar
struts2-spring-plugin-2.2.3.jar
struts2-tiles-plugin-2.2.3.jar

tiles-api-2.0.7.jar
tiles-core-2.0.7.jar
tiles-jsp-2.0.7.jar
xbean.jar
xwork-core-2.2.3.jar








On 05/27/2011 06:04 AM, Maurizio Cucchiara wrote:


I don't think that the exception is referring to the xwork library, the
xwork library is present (see the stacktrace).
It seems rather that the xwork ClassFinder is not able to find your
ActionClass.


On 27 May 2011 09:56, Mohamed SIDIwrote:


You have to copy the jar in your classpath and redeploy your application
after, it should work

2011/5/27 Martin Gainty



copy xwork-core-2.2.1.jar to WEB-INF\lib

Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede


unbefugte


Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
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: Thu, 26 May 2011 16:52:2

Re: When start tomcat6 always got "java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor" Error!

2011-05-27 Thread Dave Newton
On Fri, May 27, 2011 at 11:29 AM, Emi Lu wrote:
> Confirmed. Two tags are used in jsp for now:
>
> <%@ taglib prefix="sj" uri="/struts-jquery-tags"              %>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

Hmm, okay.

> Is dojo deprecated?

Has been for some time, don't recall for sure how long.

Dave

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



Re: Struts2 resource property and dynamic population of action in jsp file

2011-05-27 Thread Sachin Lale

Thanks Dave.
I am using Struts 2.2.3. For #2 question i have a common jsp which is 
used for both Add and Edit operation. So on the basis of whether it is 
add/edit i want to set appropriate action.
Well one tweak just now came in my mind is to set the action name in 
request scope and use this as OGNL in setting form action.


Best regards,
Sachin

On 27-05-2011 20:30, Dave Newton wrote:

On Fri, May 27, 2011 at 10:40 AM, Sachin Lale wrote:

1. In Jsp while displaying text box and i want this to populate from
ApplicationResource.properties file. I did this be adding getText() method
like below. Is this the only way?


Nope; you can use the "key" tag attribute to define the property name
and label key at once.

JSP:
Resource: name=Full Name


2. I want the 'action' property of s:form tag to be populated dynamically.
For this i added a instance variable in my action 'onsubmitAction' and
setting this value before action forward to result.
  or. But
this is not working. Is there any way for this use case.

Not sure; I might consider doing this a different way, though, perhaps
through a custom JSP-based tag (possibly a thin layer over an existing
tag).

(Why that way? I find it more informative, and it allows some
interesting games to be played.)

In any case, which version of S2 are you using?

Dave

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



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