Re: struts2 +rest service problem

2017-08-01 Thread Lukasz Lenart
2017-07-19 23:13 GMT+02:00 john lee : > Stacktraces > java.lang.RuntimeException: java.lang.RuntimeException: > java.lang.RuntimeException: java.lang.RuntimeException: > java.lang.reflect.InvocationTargetException > com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerI

Re: struts2 +rest service problem

2017-07-19 Thread john lee
I did add conventions plug-in,  From: Ken McWilliams To: Struts Users Mailing List ; john lee Sent: Wednesday, July 19, 2017 4:52 PM Subject: Re: struts2 +rest service problem As mentioned in the other thread have you added the conventions plug-in? The indicated error indicates

Re: struts2 +rest service problem

2017-07-19 Thread Ken McWilliams
As mentioned in the other thread have you added the conventions plug-in? The indicated error indicates a failure of Struts2 to be able to find what it needs so your posted source should not be at issue. On Wed, Jul 19, 2017 at 3:13 PM, john lee wrote: > > Please help for the struts2 + rest serv

Re: Struts2 Rest Mapper Taking Over Non Rest Json Result

2016-09-20 Thread Ken McWilliams
> To: Struts Users Mailing List > Subject: RE: Struts2 Rest Mapper Taking Over Non Rest Json Result > > to control navigation why not map it? className="org.healthsmart.NonRestfulAction"> name="id">{1}... > GET: /grid/method="index"

RE: Struts2 Rest Mapper Taking Over Non Rest Json Result

2016-09-20 Thread Paul Zepernick
ubject: RE: Struts2 Rest Mapper Taking Over Non Rest Json Result to control navigation why not map it?{1} ... GET: /grid/method="index"when you reference /grid/ struts will call org.healthsmart.NonRestfulAction index method https://struts.apache.org/docs/restfulactionmapper.html

RE: Struts2 Rest Mapper Taking Over Non Rest Json Result

2016-09-20 Thread Martin Gainty
to control navigation why not map it?{1} ... GET: /grid/method="index"when you reference /grid/ struts will call org.healthsmart.NonRestfulAction index method https://struts.apache.org/docs/restfulactionmapper.html or use DMI /WEB-INF/content/hello.jsp

Re: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-06-30 Thread Aleksandr Mashchenko
Hey Ken, Can you be more specific about PUT method isn't working like it should? (some code, links to SO questions) >Struts2 has ActionSupport, it would be nice if similar interfaces already existed for the rest-result type Actually there is RestActionSupport - https://github.com/apache/st

Re: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-06-29 Thread Ken McWilliams
I have not forgotten about this but in setting up a project I like everything to work well, the restful urls and non-restful urls are more less happy. My issue was with POST and PUT requests. The Action uses model-driven, and with POST which calls create() all is well, while PUT which calls update(

RE: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-05-30 Thread Martin Gainty
> From: lukaszlen...@apache.org > Date: Mon, 30 May 2016 08:18:28 +0200 > Subject: Re: struts2-rest-plugin issues getting non-restful urls to cooperate > To: user@struts.apache.org > > 2016-05-27 17:41 GMT+02:00 Ken McWilliams : > > I got it working but I think the doc

Re: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-05-29 Thread Lukasz Lenart
2016-05-27 17:41 GMT+02:00 Ken McWilliams : > I got it working but I think the documentation could be made with more > "hand holding". I'll post a "How to set up struts2 with conventions and > both restful and non-restful urls". Then self-answer the question this > weekend with all the configurati

Re: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-05-27 Thread Ken McWilliams
I got it working but I think the documentation could be made with more "hand holding". I'll post a "How to set up struts2 with conventions and both restful and non-restful urls". Then self-answer the question this weekend with all the configuration and project set-up steps and then post the link h

RE: struts2-rest-plugin issues getting non-restful urls to cooperate

2016-05-26 Thread Aleksandr Mashchenko
Working fine in my project. Can you show your project configuration? --- Regards, Aleksandr - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts2 Rest/Non-Rest Actions

2015-03-10 Thread Lukasz Lenart
2015-03-10 23:17 GMT+01:00 CRANFORD, CHRIS : > What could I missing to where I could have both RESTful and non-RESTful > action code reside in the same action class with varying annotations? I think this isn't possible, there is rest-showcase demo app, did you try it? Regards -- Łukasz + 48 60

Re: Struts2 Rest Plugin

2012-12-03 Thread Lukasz Lenart
2012/11/30 Davis, Chad : > >> I think, the basic idea was to allow cooperate the REST plugin with the >> Convention plugin and code behind is a deprecated plugin that will be >> discarded soon (with 3.x) > > 1) So, it doesn't "depend" on it, in any technical sense? Yes > 2) But it's made to work

RE: Struts2 Rest Plugin

2012-11-30 Thread Davis, Chad
> I think, the basic idea was to allow cooperate the REST plugin with the > Convention plugin and code behind is a deprecated plugin that will be > discarded soon (with 3.x) 1) So, it doesn't "depend" on it, in any technical sense? 2) But it's made to work with the convention plugin, if that plu

Re: Struts2 Rest Plugin

2012-11-30 Thread Lukasz Lenart
2012/11/28 Davis, Chad : > The docs for the REST plugin talk about how it builds on the Convention > plugin ( sometimes it says "code behind" ). However, I don't see that using > the REST plugin pulls in either of these plugins . . . in what sense does it > "build" on them? I think, the basic

Re: Struts2 Rest Plugin

2012-11-28 Thread Ken McWilliams
Just a guess but I want conventions like configuration extended though to tiles results, a lot of the work is done in ConventionUnknownHandler, it looks a bit tricky to keep that functionality without just copying it and adding changes within that code. I'm guessing that is what they did. On Wed,

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Shaun Lim
Hi Chris, It's just: Method public java.lang.String org.apache.commons.lang.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on net.sf.json.JSONException: Error while setting property=arrayListStr type interface java.util.List The program crapped out in JsonLibH

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
I was more looking for the output of all the System.out.println's (*Chris*) On Oct 11, 2012 12:40 PM, "Shaun Lim" wrote: > By the way, mapping to a simple String[] works, but I'm finding it hard to > believe that the plugin does not know how to handle conversions to List.. > > On Thu, Oct 11, 2

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Lukasz Lenart
2012/10/11 Shaun Lim : > By the way, mapping to a simple String[] works, but I'm finding it hard to > believe that the plugin does not know how to handle conversions to List.. Could you prepare a full Maven base example ? Thanks in advance -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ -

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Shaun Lim
By the way, mapping to a simple String[] works, but I'm finding it hard to believe that the plugin does not know how to handle conversions to List.. On Thu, Oct 11, 2012 at 11:54 AM, Shaun Lim wrote: > Method public java.lang.String > org.apache.commons.lang.exception.NestableRuntimeException.ge

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Shaun Lim
Method public java.lang.String org.apache.commons.lang.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on net.sf.json.JSONException: Error while setting property=arrayListStr type interface java.util.List On Thu, Oct 11, 2012 at 11:19 AM, Chris Pratt wrote: > W

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
What's the output of the run with this class & JSON? (*Chris*) On Thu, Oct 11, 2012 at 10:52 AM, Shaun Lim wrote: > Hi Chris, > > I did start off with a List implementation but started changing > stuff around in futile attempts to get something working. Anyway I tried > your suggestion, and am

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Shaun Lim
Hi Chris, I did start off with a List implementation but started changing stuff around in futile attempts to get something working. Anyway I tried your suggestion, and am still getting the same error: //I've a whole bunch of different fields here cause i was testing various things, but "arrayList

Re: Struts2 REST plugin: Passing array in JSON

2012-10-10 Thread Chris Pratt
You *might* need to initialize the countries array. I wouldn't be surprised if internally the JSON library is doing a getCountries().add("CA") and throwing a null pointer exception because getCountries is returning a null. Also, you should really be programming to interfaces, not implementations.

Re: Struts2 REST plugin problems

2011-07-05 Thread Łukasz Lenart
2011/7/4 Aelbery Lee : > Yes. I had set "struts.rest.namespace" in the struts.xml to "/ws". It must work, could you show your action's source code ? Do you map like these below: /ws/model -> ModelAction.index() /ws/mode/1 -> ModelAction.show() Regards -- Łukasz + 48 606 323 122 http://www.lena

Re: Struts2 REST plugin problems

2011-07-03 Thread Aelbery Lee
Yes. I had set "struts.rest.namespace" in the struts.xml to "/ws". -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-REST-plugin-problems-tp3492324p4548572.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: Struts2 REST plugin problems

2011-07-03 Thread Łukasz Lenart
Did you try to specify struts.rest.namespace constant ? It will change what kind of actions are created base on the namespace. http://struts.apache.org/2.2.3/docs/rest-plugin.html#RESTPlugin-Settings Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitur

Re: Struts2 REST plugin problems

2011-07-02 Thread Aelbery Lee
Hi, all. I'm currently using struts 2.2.3. I want to mix normal action with restful action in the same web app. I searched and found here. In my struts.mxl: /WEB-INF/conten

Re: Struts2 REST plugin problems

2010-09-02 Thread Rafael Taboada
Hi folks, I've just resolved my issue. My goal is to add struts-restful-plugin to an struts2 existent app. So i needed to have an url handler If I request http://localhost:8080/myApp/login.action, it must be resolved by DefaultActionMapper If I request http://localhost:8080/myApp/service/client/3

Re: Struts2 REST plugin problems

2010-09-02 Thread Rafael Taboada
Hi folks, I've just resolved my issue. My goal is to add struts-restful-plugin to an struts2 existent app. So i needed to have an url handler If I request http://localhost:8080/myApp/login.action, it must be resolved by DefaultActionMapper If I request http://localhost:8080/myApp/service/client/3

Re: Struts2 REST plugin problems

2010-08-31 Thread Dale Newfield
On 8/31/10 5:17 PM, Rafael Taboada wrote: But I'm having the same problem "HTTP status 404" So it is failing to find any valid action mapping? What do your logs show? This might help you figure out what's going on: http://struts.apache.org/2.x/docs/config-browser-plugin.html My struts.xml lo

Re: Struts2 REST plugin problems

2010-08-31 Thread Rafael Taboada
Hi, I was debugging PrefixBasedActionMapper and a I noticed that: - It gets the right actionmappers "/service" -> org.apache.struts2.dispatcher.mapper.restful2actionmap...@34e6529c "" -> org.apache.struts2.dispatcher.mapper.defaultactionmap...@50e8709d - When I can access the uri /example/HelloW

Re: Struts2 REST plugin problems

2010-08-31 Thread Rafael Taboada
Great, But I'm having the same problem "HTTP status 404" I've downloaded struts-blank2.2.1 and added jars about restful plugin (struts2-rest-showcase-2.2.1) My struts.xml looks like : HelloWorld

Re: Struts2 REST plugin problems

2010-08-31 Thread Dale Newfield
On 8/31/10 4:40 PM, Rafael Taboada wrote: I have in my struts.xml It means, every url that contains 'service' must be mapped with Restful2ActionMapper, everything else use default mapping. Is that correct? What am i missing or doing wrong? Almost. It means that every request that starts w

Re: Struts2 REST plugin problems

2010-08-31 Thread Rafael Taboada
Hi, I've been looking at PrefixBasedActionMapper. What is the way to configure it? I have in my struts.xml It means, every url that contains 'service' must be mapped with Restful2ActionMapper, everything else use default mapping. Is that correct? What am i missing or doing wrong? On Tue, Au

Re: Struts2 REST plugin problems

2010-08-31 Thread Dale Newfield
On 8/31/10 3:15 PM, Rafael Taboada wrote: I migrated my app to 2.1 because I need to use restful plugin, didn't think in 2.2 because it was released just a month ago (i think) and i don't know if it is a good option in production environment. Theoretically any GA (General Availability) release

Re: Struts2 REST plugin problems

2010-08-31 Thread Rafael Taboada
Thanks so much for your answer. I migrated my app to 2.1 because I need to use restful plugin, didn't think in 2.2 because it was released just a month ago (i think) and i don't know if it is a good option in production environment. I'll consider your advice. Thanks On Tue, Aug 31, 2010 at 1:21

Re: Struts2 REST plugin problems

2010-08-31 Thread Dale Newfield
On 8/31/10 2:05 PM, Rafael Taboada wrote: Is there a chance to my traditional actions can co-exist with restful controllers?... If you're looking to have different parts of your url space get processed by different action mappers, the PrefixBasedActionMapper included in 2.2 might be what you'

Re: Struts2 REST plugin problems

2010-08-31 Thread Dale Newfield
On 8/31/10 1:04 PM, Rafael Taboada wrote: I have an struts2.0.14 app working well and I decided to migrate to struts2.1.8. Migration worked well. But when I tried to include rest plugin, my current urls to process some actions don't work. I have a http 404 error as a result. My goal is using res

Re: Struts2 REST plugin problems

2010-08-31 Thread Rafael Taboada
I've just noticed, that rest plugin change the way how i can access to a specific action. When i use http://localhost:8080/myApp/runLogin.action, action mapping is failing. It thinks it is a restful method. and I can access the action putting http://localhost:8080/myApp/runLogin!execute Is there

Re: STRUTS2 + REST + SPRING Problem

2010-04-20 Thread jonathan doklovic
Are you using the struts-spring plugin? If so, I found I had to include: struts.objectFactory.spring.autoWire = name struts.objectFactory.spring.autoWire.alwaysRespect = true to get beans autowired by name. autowiring using auto or type wasn't working in my app so I had to do it by name. - J

Re: Struts2+ReST-plugin prolems need help!!!

2009-05-28 Thread Stuart Ellidge
Hi, I’m not an expert with the internals of the REST plugin, but am using it fairly extensively. By and large we use annotations in our classes to determine results (see org.apache.struts2.convention.annotation.Results) but it is certainly possible to define some globals and it is definitely po

RE: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread Martin Gainty
let the StrutsDispatcher handle the navigation details you'll have to fill in any necessary java classes as well as input/output jsps but the basic structure is outlined in struts.xml illustrated below Martin Gainty __ Verzicht und Vertraulichkeitanm

Re: Struts2+ReST-plugin prolems need help!!!

2009-05-19 Thread Dave Newton
xnpeng wrote: I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot of problems unresolved. With rest-plugin and convention-plugin,all action-mapping are done automatically,manual action-mapping in struts.xml cannot work.so, 1, I cannot define global-error-result; 2,

Re: Struts2 REST

2009-03-23 Thread Li
thanks maplye ~

Re: Struts2 REST

2009-03-22 Thread maplye
2009/3/23 Li : > Hey guys, > > I am a fan of REST and I am excited that Struts2 started supportting REST > architecture. I have used Struts REST plug-in to create a demo struts rest > application with the help of Struts 2 REST showcase. Interestingly I found > out the "content" under WEB-INF is a

Re: Struts2 rest plugin - making default response to xml

2009-03-05 Thread Dave Newton
mahanare wrote: I am wondering if it is possible to use default response of the rest action using rest plugin to xml? instead of http://<>/orders.xml if i can make it http://<>/orders as the action for a POST method in a form submssion and the response should be xml. Essentially i do not want t

Re: Struts2 rest plugin :struts.convention.action.*, possible values

2009-02-20 Thread mahanare
Thanks > These values, as well as the rest, are documented on the convention > plugin page: > > http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Configurationreference > > Dave > > > -- View this message in context: http://www.nabble.com/Struts2-rest-plugin-%3A

Re: Struts2 rest plugin :struts.convention.action.*, possible values

2009-02-20 Thread Dave Newton
mahanare wrote: I would like to know where can i get all possible values for structs constants? It's a string, you can make it anything you want. I'm almost positive the other possible value is "false". You can make it anything you want. These values, as well as the rest, are doc

Re: struts2-rest-plugin-2.1.5 problem

2009-01-05 Thread Lukasz Lenart
2009/1/5 Ercan Kayaonu : > Thank you for your quick reply. > I tried using maven, but it couldn't find 2.1.5 one. Summary of mvn > messages: Try to use that http://people.apache.org/builds/struts/2.1.5/ it works for me Regards -- Lukasz http://www.lenart.org.pl/ ---

Re: struts2-rest-plugin-2.1.5 problem

2009-01-04 Thread Wendy Smoak
On Sun, Jan 4, 2009 at 7:25 PM, Ercan Kayaonu wrote: > Thank you for your quick reply. > I tried using maven, but it couldn't find 2.1.5 one. Summary of mvn > messages: Struts 2.1.5 has not been voted on and is not an official release -- standard disclaimers apply. :) If you didn't intend to ve

Re: struts2-rest-plugin-2.1.5 problem

2009-01-04 Thread Ercan Kayaonu
Thank you for your quick reply. I tried using maven, but it couldn't find 2.1.5 one. Summary of mvn messages: Downloading: http://repo1.maven.org/maven2/org/apache/struts/struts2-rest-plugin/2.1.5/struts2-rest-plugin-2.1.5.jar [WARNING] An error occurred during dependency resolution. Failed to

Re: struts2-rest-plugin-2.1.5 problem

2009-01-04 Thread Dave Newton
Have you included the dependencies of the REST plugin? - Original Message > From: Ercan Kayaonu > To: user@struts.apache.org > Sent: Sunday, January 4, 2009 8:57:55 PM > Subject: struts2-rest-plugin-2.1.5 problem > > Hi folks, > > I just registered to the user list and new to struts