Re: Issue in migration from struts2.3.35 to struts2.5.22

2020-11-01 Thread James Chaplin
Hello Peer.

I am not sure if any of these suggestions will help or not, but you never know.

There is a blog post 
(http://www.programmers-code.org/2017/10/23/struts-tiles-locale-resolver-cannot-obtain-httpservletrequest/)
 that mentions receiving similar errors due to request.getAttribute("x") calls 
within the JSPs.  You can check your application's JSPs to see if you have any 
similar direct calls, and try what the blog suggests (replace request with 
requestScope), to see if it makes any difference.

There is a commented-out Tiles 1-or-2 context-param entry in the application's 
web.xml from your earlier mailing list post.  It probably will not make a 
difference, but you could try explicitly setting the Tiles 3 equivalent:



org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
/WEB-INF/tiles.xml


in the application's web.xml and see if it makes any difference in the 
application's behaviour.

The error you are getting indicates that the StrutsTilesLocaleResolver for the 
Struts 2 Tiles Plugin cannot locate the ActionContext for the request.  That 
could mean that processing is somehow ending up at one of your JSPs without 
following the normal action execution path.  You might try increasing the log 
levels to DEBUG temporarily to see if that turns up any information that might 
help.

Another suggestion is that you could try temporarily changing your 
application's configuration to use the "defaultStack" interceptor stack (and 
then add any custom interceptors you need), to see if that makes any 
difference.  There maybe something subtle with the interceptors (or ordering) 
that is impacting processing, and the struts.xml from your earlier post has 
custom interceptor stacks, so going back to the basic defaults might help you 
debug further.

Regards,

James.


On 2020/11/01 11:05:43, Peer Mohammad  wrote: 
> I have not used Xwork, index.jsp has  name="cheetta.login" flush="true"/> and cheetta.login is given in struts.xml 
> with action class.This setup is working last 7 years on struts2.3.35 .
> Note sure why its failing on upgraded version.I debugged and saw that 
> Valustack returning null for the request.
> 
> Thanks & Regards,
> Peer M Ansari
> 
> On 2020/10/29 12:57:57, Lukasz Lenart  wrote: 
> > czw., 29 paź 2020 o 11:24 Peer Mohammad  napisał(a):
> > > list of jars for Strust2.5.22
> > >
> > > struts2-core 2.5.22
> > > freemarker -2.3.30
> > > xwork-core -2.3.37
> > 
> > As I said, this is not needed, XWork was merged into Struts Core, you
> > are duplicating classes now
> > 
> > > Caused by: There is no ActionContext for current request! - [unknown 
> > > location]
> > >
> > > at 
> > > org.apache.jsp.index_jsp._jspx_meth_tiles_005finsertDefinition_005f0(index_jsp.java:151)
> > 
> > You are accessing index.jsp directly by
> > 
> > index.jsp
> > 
> > 
> > 
> > Regards
> > -- 
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> > 
> > -
> > 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
> 
> 

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



Re: ./mvnw spring-boot:run struts equivalent

2020-05-30 Thread James Chaplin
Hello Zahid.

 It should be possible to deploy a Struts 2 application on most Java 
application servers that exist these days.  I believe that Struts 2.5.x needs 
an application server supporting a minimum of Servlet API 2.4 / JSP API 2.0.  
Most application servers released in the past 10-15 years should provide those 
API levels.

 Application servers have their own configuration quirks, so you may need 
to play around a little, depending on both the application and the application 
server.  Tomcat and TomEE are usually good starting points to try a basic 
Struts 2 deployment out, or compare against.

 If you are looking at a particular Java application server, you can try 
deploying the Struts 2 Showcase Webapps on a testing instance and see how 
things go.  If the showcase works, it is a good indicator that Struts 2 
applications can probably run on that application server.

 Hope that helps.


On 2020/05/29 11:39:21, Zahid Rahman  wrote: 
> Hi,
> 
> > No, you create a web app with it ..
> Just checking. Thanks
> 
> I downloaded  struts-examples-master.zip
> I am opening one app at a time in eclipse to get to know the features while
> following following
> https://struts.apache.org/getting-started/how-to-create-a-struts2-web-application.html
> 
> So for example I open message-resource
> while following the documents for Exception Handling.
> I have to say the documents *perfect*.
> No wonder there is no user-mailing traffic.!
> 
> I also read in one of the archetype configuration files {I can't find it
> right now otherwise I give you precise details }
> *" # workaround for weblogic.*
> param.request = No "
> 
> From that my understanding is that Struts2 can run on freeware  app servers
> like tomcat and Wildfly
> and commercialware ones like weblogic and websphere.
> Do I understand that correctly ?
> 
> Are there any other application  servers ?
> 
> Backbutton.co.uk
> ¯\_(ツ)_/¯
> ♡۶Java♡۶RMI ♡۶
> 
> 
> On Fri, 29 May 2020 at 02:58, Dave Newton  wrote:
> 
> > No, you create a web app with it. The S2 archtypes *are* runnable, or you
> > can create a web app in the typical way, or you can follow a tutorial,
> > including the minimal one at
> >
> > https://struts.apache.org/getting-started/how-to-create-a-struts2-web-application.html
> > .
> >
> >
> > On Thu, May 28, 2020 at 21:51 Zahid Rahman  wrote:
> >
> > > Hi,
> > > I git cloned https://github.com/apache/struts this.
> > > then I ran   ./mvnw clean  package install.
> > >
> > > is there a struts equivalent  *./mvnw spring-boot:run* to run it ?
> > > I tried ./mvnw jetty:run then didn't work.
> > >
> > >
> > > Backbutton.co.uk
> > > ¯\_(ツ)_/¯
> > > 
> > >
> > --
> > em: davelnew...@gmail.com
> > mo: 908-380-8699
> > tw: @dave_newton 
> > li: dave-newton 
> > gh: davelnewton 
> > so: Dave Newton 
> > bl[0]: Bucky Bits 
> > bl[1]: Maker's End Blog 
> > sk: davelnewton_skype
> >
> 

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



Re: Issue adding filter to struts2-archetype-starter project

2020-05-09 Thread James Chaplin
Hello Jonathan.

 As the other replies have pointed out, your code is using/extending 
"import java.nio.file.DirectoryStream.Filter;".  That is an import for a file 
directory filter, and not a servlet filter.

 You will want to replace the old import statement with "import 
javax.servlet.Filter;" instead.

 Some general background on Java Servlets can be found at 
https://docs.oracle.com/javaee/7/tutorial/servlets006.htm#BNAGB or
https://www.oracle.com/java/technologies/filters.html , which might be of 
interest.

 If you type "java tutorial servlet filter" into your favourite search 
engine you should find some results that can help you out with writing a 
servlet filter.

 Hope that helps.

Regards,

 James.

On 2020/05/05 16:13:47, M Huzaifah  wrote: 
> Eyou should use interface Filter in servlet package. Not from nio package
> 
> On Tue, May 5, 2020, 22:40 Dave Newton  wrote:
> 
> > `import java.nio.file.DirectoryStream.Filter` is not a servlet filter.
> >
> > Dave
> >
> 

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



Re: OSGi support

2020-05-09 Thread James Chaplin
Hello Lukasz.

 There is probably some value in keeping the OSGi plugin around, at least 
until it becomes a problem to maintain.  Even with JDK9+ modules, there still 
seem to be use cases for OSGi (a general interest blog post 
https://blog.osgi.org/2018/02/osgi-r7-highlights-java-9-support.html provides 
some interesting reading).

 Maybe reviewing the OSGi plugin in Struts 2.6.x and trying to update it to 
the most recent OSGi standards might help decide on the question ?

Regards,

 James.

On 2020/04/20 18:08:41, Lukasz Lenart  wrote: 
> pon., 20 kwi 2020 o 16:53  napisał(a):
> > >Yeah, I thought about that. Just wondering who widely this
> > >functionality is used and maybe doesn't make sense to support it.
> >
> > As all the buzz is about microservices these days my gut feeling is that 
> > OSGi is pretty much dead.
> 
> I have the same, even with incoming support for modules (or is it
> already there?), OSGi is a dead end anyway.
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> 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: Struts 2.5.23

2020-05-09 Thread James Chaplin
Hello Lukasz.

 The only other possible inclusion I could think of after a quick look at 
open bugs might be a fix for WW-5002.  It was reported as an issue for 2.5.18 
and the last comment indicated it was probably a bug.

 A decision to whether to include a fix for it should consider if: 1) 
WW-5002 is still a bug with 2.5.22 / 2.5.23-SNAPSHOT, and 2) how risky or 
complicated a fix for it might be.

 Does anyone see any other candidates ?

Regards,

 James.

On 2020/05/03 12:21:11, Lukasz Lenart  wrote: 
> Hi,
> 
> I'm going to prepare a test build of Struts 2.5.23 which covers those
> 4 issues. Any other issue should be addressed?
> 
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20WW%20AND%20fixVersion%20%3D%202.5.23
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> 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