Re: Tiles upgrade Path

2020-03-25 Thread Ken McWilliams
Tiles and sitemesh are for traditional (non - single page applications) development. Tiles has performance advantages over sitemesh. I don't think the OP should experience any blockers with respect to tiles migration and will gain version 3 benefits as well. On Wed., Mar. 25, 2020, 10:40 a.m. M Hu

Re: Architectural considerations

2019-12-23 Thread Ken McWilliams
Regarding being at the right place, no this is a Struts specific mailing list. The concerns you bring up are beyond the scope of Struts2, at least in general. If you needed specific integration help, as you've seen the people here are quite friendly, do feel free to ask. Consider a general Java ma

Re: How to determine if a Windows server is running Apache Struts?

2017-09-06 Thread Ken McWilliams
ot;struts2-core-*.jar" to be sure that your script is able to identify them. If they don't find those, your script is unhappy! On Wed, Sep 6, 2017 at 5:51 PM, Ken McWilliams wrote: > Struts isn't a stand alone program but a framework, typically seen as > project dependency wh

Re: How to determine if a Windows server is running Apache Struts?

2017-09-06 Thread Ken McWilliams
Struts isn't a stand alone program but a framework, typically seen as project dependency which supports web development on the JVM. I don't know the answer to 1) [although I will at the end go though the process I would attempt to find such programs]. 2) No. Struts2 [which is different code base

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 with rest service

2017-07-19 Thread Ken McWilliams
Have you also included the struts2-conventions-plugin? org.apache.struts struts2-convention-plugin 2.5.10.1 struts2-rest-plugin most definitely depends on struts2-conventions-plugin but it isn't a declared dependency. I've thought that was str

Re: Limitations using Struts2-conventions-plugin (lack of multiple configuration roots)

2017-07-12 Thread Ken McWilliams
6-23 23:22 GMT+02:00 Ken McWilliams : > > Yes, something like that. > > > > But I think i can be done in a hackish way without much change. Really it > > is the conventions plugin that is at fault, or rather a lack of > convention > > regarding sharing configuration

Re: Integrate Apache Shiro with Struts2

2017-06-30 Thread Ken McWilliams
ill on shiro 1.3.2, that > demonstrates how to define a custom shiro "realm", where you can do > authentication and authorization. It's really pretty easy to implement, so > it shouldn't take too long to crank out and post up to GitHub. > > Todd Kofford > tkoff...

Re: Integrate Apache Shiro with Struts2

2017-06-29 Thread Ken McWilliams
thentication/authorization > and struts interceptor for "injecting" the shiro subject into the stack. > > I'll start building a more complicated example that uses spring to inject > the shiro parts, and reply back when that's done. > > Todd Kofford > University o

Re: Limitations using Struts2-conventions-plugin (lack of multiple configuration roots)

2017-06-23 Thread Ken McWilliams
nstant); } } return Optional.ofNullable(null); } @Override public void destroy() { } @Override public void init() { } @Override public String intercept(ActionInvocation invocation) throws Exception { return invocation.invo

Re: Integrate Apache Shiro with Struts2

2017-06-22 Thread Ken McWilliams
, 2017 3:23 AM > To: Struts Users Mailing List > Subject: Re: Integrate Apache Shiro with Struts2 > > 2017-06-17 19:08 GMT+02:00 Ken McWilliams : > > If not I hope to follow up with a solution. > > +1 and we can add it to our docs :) &

Re: Limitations using Struts2-conventions-plugin (lack of multiple configuration roots)

2017-06-21 Thread Ken McWilliams
e trade-offs? > • a diagram or visualization that shows how the new model might lay out? > > > thanks, > > adam > > -- > _ > Adam Brin > Director of Technology, Digital Antiquity > 480.965.1278 > > > On

Re: Limitations using Struts2-conventions-plugin (lack of multiple configuration roots)

2017-06-21 Thread Ken McWilliams
s way contributors could develop conventions based code which would be readily mergeable with anyone else's (plugins which use conventions but have no side effects). On Wed, Jun 21, 2017 at 12:39 AM, Lukasz Lenart wrote: > 2017-06-20 21:48 GMT+02:00 Ken McWilliams : > > I like to use the

Limitations using Struts2-conventions-plugin (lack of multiple configuration roots)

2017-06-20 Thread Ken McWilliams
I like to use the conventions plugin but find myself fighting with it more often than not. I think conventions should establish a "convention". Now the plugin certainly does this in the *singular* but say I want restful services handled by conventions, and then I want perhaps a set of packages to

Re: Is it the mailing list for struts2?

2017-06-17 Thread Ken McWilliams
Yes On Sat, Jun 17, 2017 at 9:22 AM, ssmtpmailtesting ssmtpmailtesting < ssmtpmailtest...@gmail.com> wrote: > Can I ask question about struts2 here? > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additio

Integrate Apache Shiro with Struts2

2017-06-17 Thread Ken McWilliams
Looking to Integrate Apache Shiro with Struts2. If anyone on the list has done this I would love to hear about it. If not I hope to follow up with a solution. -- Sent from my C64 using a 300 baud modem

Re: Update request to web site regarding Log4j and "Getting Started" section

2017-06-13 Thread Ken McWilliams
On Tue, Jun 13, 2017 at 12:03 AM, Łukasz Lenart wrote: > Done > > 2017-06-12 20:28 GMT+02:00 Ken McWilliams : > > Sorry... > > > > The following "Getting started" page "How To Create A Struts 2 Web > > Application: > > http://struts.

Re: Update request to web site regarding Log4j and "Getting Started" section

2017-06-12 Thread Ken McWilliams
citly specified even with x.x.x versions, most users would use the latest and keep them in sync. It isn't fun to experience _any_ errors when doing a starting tutorial. On Mon, Jun 12, 2017 at 12:22 PM, Ken McWilliams wrote: > The following "Getting started" page: > >

Update request to web site regarding Log4j and "Getting Started" section

2017-06-12 Thread Ken McWilliams
The following "Getting started" page:

Re: convention plugin struts.xml interceptors

2016-11-01 Thread Ken McWilliams
Am I wrong in assuming that this new package is supposed to be the default? If so it should extend conventions-default and there is some constant that should be set such that conventions uses this package by default. Also, perhaps of greater importance: If conventions was working before then the r

Re: Struts2 Rest Mapper Taking Over Non Rest Json Result

2016-09-20 Thread Ken McWilliams
To solve a similar issue I ended up creating my own ContentTypeHandler. As you already have a result it should be pretty easy to wrap (at least I found it so). The problem is that after doing so all JSON will be handled by your new Content type... While this link shows how to use Jackson, you can

Re: [Question] [struts2-rest-plugin] How shall I handle GET request /orders/{id}/items?

2016-09-07 Thread Ken McWilliams
There isn't a recommended way to handle deeply set lists as per your example... Or I missed it. I'm not a fan of that plugin. It is really trivial to do this without any plugins: https://struts.apache.org/docs/wildcard-mappings.html Wildcards or using the named-pattern matcher (although in the lin

Re: Struts2 documentation and Stack Overflow

2016-08-31 Thread Ken McWilliams
gical progression, not > the disorganized grab bag that Documentation uses. > > If there's a commitment from Struts developers to improve documentation, > they should do it on the struts site. Documentation is a place for the > community to go to contribute their own documentation

Struts2 documentation and Stack Overflow

2016-08-31 Thread Ken McWilliams
StackOverflow is a pretty huge site and a lot of people seek out Struts2 Q&A there, it would be nice if the Struts 2 documentation was available via the new StackOverflow documentation initiative. I was tempted to simply copy good chunks of the existing documentation, there is certainly room for i

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

2016-06-29 Thread Ken McWilliams
use we are to support the index() method, which returns List while the rest of the methods return T. So there are more often than not a ternary operator in the getModel() method. On Mon, May 30, 2016 at 12:18 AM, Lukasz Lenart wrote: > 2016-05-27 17:41 GMT+02:00 Ken McWilliams : > >

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

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

2016-05-24 Thread Ken McWilliams
I'm following these instructions to get restful and non-restful urls to cooperate: http://struts.apache.org/docs/rest-plugin.html#RESTPlugin-RESTandnon-RESTfulURL%27sTogetherConfiguration Having followed the instructions on that page I've been able to set up a project _only_ containing restful ur

Re: Editing a JPA entity

2016-01-07 Thread Ken McWilliams
Just my two cents, you can avoid the lookup by using a JPQL UPDATE query. If used to update a single record you avoid the lookup. If versioning is an issue this may not be ideal (still you could manually set the version), also if you expect to reuse objects you lose the ability to proxy, if those a

Re: S2: How to tell if a response has been committed from an interceptor?

2016-01-06 Thread Ken McWilliams
Well you go down the chain create the result and then back up the chain. So when going back up the response should already be committed. see: https://struts.apache.org/docs/writing-interceptors.html //modified code from above link to clarify public String intercept(ActionInvocation invocation

Re: struts2.5 - Action class is not called

2015-11-16 Thread Ken McWilliams
I think you should be able to add a more precise definition ahead of the wild card definition (one without a wildcard) and get the behaviour expected. On Mon, Nov 16, 2015 at 1:07 PM, Emi wrote: > > using wild cards in action. If you don't want to switch between methods >> dynamically, >> > Use

Re: struts2.5 - Action class is not called

2015-11-16 Thread Ken McWilliams
Well you are using wild cards in the action name. If you don't want to switch between methods dynamically, that is you _always_ want to call execute then you should remove the "*" from the name, remove the method parameter, and then struts2 will assume execute should be called by default. On Mon,

Re: TokenInterceptor locking HTTP session for entire action invocation?

2015-07-13 Thread Ken McWilliams
Could a Striped lock not be used? If done, machinery would need to be introduced which would quickly go beyond s2's prerogative. For instance an interceptor could have this magic locking service injected and then say: For User X, is token Y in use? Or for any user is token Y in use? But then this b

Re: OGNL making me nutty

2015-03-26 Thread Ken McWilliams
Is there a method in gov.usbr.mechdb.struts.GovernorAction class called "action" which takes nothing and returns a String? On Thu, Mar 26, 2015 at 5:05 PM, Ellson, Jared wrote: > Hi All, > > I have a simple struts action class calling setters on a simple JPA object > and for some reason the sett

Re: Struts 2.3.15 and Tiles 3 Plugin

2015-01-14 Thread Ken McWilliams
The steps for integration from scratch is here(useful to understand what the plugin is doing exactly): http://stackoverflow.com/questions/13337938/how-to-integrate-struts-2-with-tiles-3 The steps assume maven. Of further use regarding tiles3 integration this may also be useful: http://stackoverflow

Re: Struts 2 support of Java 8

2014-12-11 Thread Ken McWilliams
@Paweł, I must admit I had a similar problem, but it was not one with struts2. When deploying with Glassfish you have to use the latest version 4.1 or lambda expressions in services will cause it to fail. Considering the 4.1 was very recently released this was a big pain. On Thu, Dec 11, 2014 at 1

Re: Struts 2 support of Java 8

2014-12-10 Thread Ken McWilliams
I'm using struts2 with Java 8 without issues. It will be awhile before struts2 will *require* Java 8, being a popular framework in the business world, accessibility is highly valued. On Wed, Dec 10, 2014 at 10:43 AM, Lukasz Lenart wrote: > 2014-12-10 18:37 GMT+01:00 Schlachter, Gary : > > I have

Re: Upgrading from Struts 2.0 to 2.3.16

2014-07-16 Thread Ken McWilliams
I'd be of the mind that during the upgrade that some how the resource: '/mmr/jsp/templates/layout_ admin_window.jsp' and other folders were somehow moved and that "org.apache.tiles. TilesException: ServletException including path" is perfectly accurate. Generally you don't want templates to be expo

Re: Hello World does not work.

2014-07-05 Thread Ken McWilliams
What IDE are you using? Knowing the IDE someone might be willing to give "click by click" instructions. On Sat, Jul 5, 2014 at 7:23 AM, Jim Anderon wrote: > > index.jsp is in my hello_world.war file and hello_world.war is at > /var/lib/tomcat6/webapps/hello_world/hello_world.war. > > I have use

Re: Struts2 namespace confusion

2014-05-24 Thread Ken McWilliams
What he explains is likely the result of a search action also mapped in the default namespace. On 2014-05-24 9:35 AM, "John Patrick" wrote: > > Not seen this happen myself, what strut > > Not seen this happen myself, what struts jar's do you have as it might be > something like the convention plug

OT: Architectural Semantics: Model View Presenter

2014-04-08 Thread Ken McWilliams
Marked as OT because this more of a conceptual issue and has to do with talking to .NET developers regarding framework difference than with framework use. I'm trying to wrap my head around the Model View Pattern (MVP) pattern. My issue is that I can't really differentiate it from what I do in Stru

Re: Struts 2: Howto render output as HTML?

2014-03-02 Thread Ken McWilliams
If you want this behaviour for the whole application then set struts.ui.theme to simple, inside struts.xml. Like so: Since you mentioned a single page, you can do that too, you can even have a single struts2 UI tag render under a different theme, these various options are listed here: http:

Re: REST question

2014-02-11 Thread Ken McWilliams
Sounds like you have used the Open Session in View method... probably provided by a custom interceptor, when adding the rest plugin you have changed your action to the rest package and forgot to put your interceptor back in place, so now you don't have a hibernate session and the view generates thi

Re: S2 how to determine if a session exists from an Interceptor

2014-02-06 Thread Ken McWilliams
The OP has abstracted away most of the details, he is working with Map! The session is not generally struts2s responsibility it, generally it is maintained by the web container. Tomcat/Glassfish, etc. And generally you would consider it in such an environment to always exist. What kind of container

Re: Struts + Spring

2014-01-25 Thread Ken McWilliams
Could you please explain further what it is you are trying to do. Struts2 does things differently, if you are open to change there is probably a nice way to resolve your issue. If we know a bit more... I'm certain we could supply a much better answer than telling you to use the "chain" result type.

Re: Tiles with Annotations

2014-01-02 Thread Ken McWilliams
I arrived at the same conclusion when trying to remove my tiles configuration. I upgraded to tiles 3 in the process and wrote a custom result handler (sorry a custom "unknown result handler"). It is invoked when conventions isn't able to find an appropriate result. Here is a stack overflow Q & A

Re: Struts Validation

2013-12-13 Thread Ken McWilliams
Have the action extend ActionSupport and have the class implement its own: public validate(void). Look at the code of ActionSupport (or JavaDoc) for how to set error messages, if an error is set, after validate() executes, Struts2 will assume an error has occurred and the action will return "input

Re: In which action, do i write boolean tests ( SGBD or LDAP )

2013-12-13 Thread Ken McWilliams
Write an interceptor then apply it to the actions, assuming that the rules for what to access can be encoded in the url. If not it then probably belongs in the service tier. On Thu, Dec 12, 2013 at 3:01 AM, Chris wrote: > Hello, > > How to organize the actions, when you just want check the pass

Re: Passing jsp tag attribute to Struts 2 tags

2013-10-21 Thread Ken McWilliams
Untested, and I didn't check the docs... but your expression in attribute "key" of the following would require double evaluation. This is because an attribute is a simple String or an OGNL expression. Your value in key requires that concatenation occur after evaluation... In stead an expression

Re: Re: Re: Url rewriting of .action to .jsp

2013-10-10 Thread Ken McWilliams
+ 48 606 323 122 http://www.lenart.org.pl/ > > 2013/9/26 Ken McWilliams : > > ...more often than not, NOT what I want (wrt: "Maybe it's just me but for > > some reason this is more often than not what I want (I want the model > > towards the request but not towards the

Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
...more often than not, NOT what I want (wrt: "Maybe it's just me but for some reason this is more often than not what I want (I want the model towards the request but not towards the view), so I need to forgo ModelDriven."). Sorry everyone! On Wed, Sep 25, 2013 at 7:39 PM, Ken M

Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
under the latter. On Wed, Sep 25, 2013 at 7:32 PM, Ken McWilliams wrote: > Not sure if this is the place to bring this up, this is an annoyance > coming from ModelDriven may offer a solution... > > Issue: It's hard to get past the model if you want to add more attributes >

Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
Not sure if this is the place to bring this up, this is an annoyance coming from ModelDriven may offer a solution... Issue: It's hard to get past the model if you want to add more attributes to the action. Also when using ModelDriven the same view of the action is applied from the HTTP side as the

Re: Issues with docs

2013-09-16 Thread Ken McWilliams
Still you can't have users going to improper content, how would they know it works elsewhere? The content missing on the page (code) is a significant issue. On Sun, Sep 15, 2013 at 11:16 PM, Lukasz Lenart wrote: > Thanks, but it is already solved with Draft docs > > http://struts.apache.org/deve

Re: Inquiry

2013-09-08 Thread Ken McWilliams
It's a good idea to put your action classes into packages. Not on the topic of the question exactly but the long inheritance chain on your action is suspicious. Consider struts2 Interceptors and since you are using Spring inject what you need where you need it. > class="GenericPresenta

Understanding Struts2 Internals : Result Configuration

2013-09-05 Thread Ken McWilliams
The following is a direct copy of a question at SO which has been repeated here for completeness but can be found here with nice syntax highlighting : http://stackoverflow.com/questions/18650377/understanding-struts2-internals-result-configuration In an effort to understand how struts2 loads its

Custom ConfigurationProvider is not able to find result

2013-09-01 Thread Ken McWilliams
Probably something silly but the following is just a rough effort at proving to myself that I can add a new action though a configuration provider... It adds the package and action but there is something wrong with the result. If the results name is set to "error" I get there is no mapping for res

Re: Interceptor in various struts.xml

2013-08-27 Thread Ken McWilliams
Not looking that closely but both your packages extend "struts-default" if you want the interceptors/results of package "default" to be available to package "M1" you should extend "default" on that package rather than "struts-default"... On Tue, Aug 27, 2013 at 5:04 PM, Thomas Lionel SMETS (prof)

Re: Interceptor in various struts.xml

2013-08-27 Thread Ken McWilliams
To be clear, the term "submodule" to me indicates some type of encapsulation... you know that the includes only make one big XML file? If this is a new project consider the struts2-conventions-plugin, if it is in use I don't think your configuration should need to grow beyond more than one xml file

Re: AJAX Jsp tags

2013-08-11 Thread Ken McWilliams
me and sanity. On Sat, Aug 10, 2013 at 3:05 AM, Alireza Fattahi wrote: > Thanks for your comment. > Did you have any experience with struts jquery tag or other tags too? > Or you complete suggest that we write our own tags ! > > > > ~Regards, > ~~Alireza Fattahi > &g

Re: AJAX Jsp tags

2013-08-08 Thread Ken McWilliams
Don't use a JSP AJAX tag library. The dojo JSP tags didn't work well not because of dojo or an fault of the tag authors, the technologies simply don't mesh. It's as sane to program Java via XML as it is to program JavaScript via XML. XML is used for configuration. At first glance you think you'll

Re: struts 2 ajax choice

2013-05-14 Thread Ken McWilliams
I don't suppose you would consider neither as a valid choice? The short is the JS APIs are the intended intended to be used with JS not XML. When you use these integrated tag libraries you end up with a brittle solution. They can only factor in so much with XML. It makes about as much sense as wra

Re: struts 2 / sitemesh/

2013-05-09 Thread Ken McWilliams
I know very little about sitemesh integration and am away from my development machine but I think the integration guides mention you need to use the StrutsPrepareFilter followed by the SiteMeshFilter filter followed by the StrutsExecute filter. Guessing but the SiteMeshFilter might be a custom one

Re: generating taglib using Ant and Java 6

2013-04-10 Thread Ken McWilliams
Has anyone here checked out the suitability of using the Tile auto tag project for struts2? http://tiles.apache.org/tiles-autotag/index.html On Wed, Apr 10, 2013 at 8:37 AM, Steven Yang wrote: > I asked whether I should do it in a new package > because the new Processor is no longer using the

Re: Complete list of framework bean keys

2013-04-04 Thread Ken McWilliams
register method, one of ConfigurationProvider's interface methods...) On Thu, Apr 4, 2013 at 11:18 PM, Lukasz Lenart wrote: > 2013/4/5 Ken McWilliams : > > Sometimes I want to override a default framework implementation and the > > first place I look is in struts-default.xml

Complete list of framework bean keys

2013-04-04 Thread Ken McWilliams
Sometimes I want to override a default framework implementation and the first place I look is in struts-default.xml but I don't think it contains all possible bean keys. Is such a list maintained? For instance I want to provide a custom ConfigurationProvider but see no reference to a configuratio

Re: Struts 1.1 and Tiles 2 compatability

2013-03-11 Thread Ken McWilliams
The link would be useful: http://stackoverflow.com/questions/13337938/how-to-integrate-struts-2-with-tiles-3 On Mon, Mar 11, 2013 at 3:29 PM, Ken McWilliams wrote: > I don't know struts1 at all, but if you are afforded that ability to > create a custom result type then you should

Re: Struts 1.1 and Tiles 2 compatability

2013-03-11 Thread Ken McWilliams
I don't know struts1 at all, but if you are afforded that ability to create a custom result type then you should be able to manually invoke tiles (at any version including version 3, which if you're going to put in the effort should be your target). Here is how something similar was done with Strut

Re: Not setting instance member value in destination action using action chaining?

2013-03-02 Thread Ken McWilliams
2013 at 3:01 PM, Ken McWilliams >wrote: > > > This was already addressed on SO: > > > > > http://stackoverflow.com/questions/15159827/not-setting-instance-member-value-in-destination-action-using-action-chaining > > We explained that chain was a result and tha

Re: Not setting instance member value in destination action using action chaining?

2013-03-02 Thread Ken McWilliams
This was already addressed on SO: http://stackoverflow.com/questions/15159827/not-setting-instance-member-value-in-destination-action-using-action-chaining We explained that chain was a result and that the chaining interceptor did not process additional parameters and so they would not be included,

Re: struts2 and WebSphere dynacache

2013-02-13 Thread Ken McWilliams
Even then the solution is very limited. The OP probably wants to cache all popular pages/reports, in many cases the same action will be responsible... a singleton clearly can't address that. It could be addressed with an object pool that was keyed to actions, parameters and values and managed by a

Re: struts2 conventions plugin - how to override result type

2012-12-05 Thread Ken McWilliams
file) and feeds that string as a tiles definition: The thing now is to define a convention for locating templates that makes sense. Someway of dynamically generating tiles definitions from the content under /WEB-INF. On Wed, Nov 28, 2012 at 4:33 PM, Ken McWilliams wrote:

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 conventions plugin - how to override result type

2012-11-28 Thread Ken McWilliams
ov 28, 2012 at 1:08 PM, Lukasz Lenart wrote: > 2012/11/26 Ken McWilliams : > > I've yet to try this but how do I tie this into conventions. > > Just add > name="myUnknownHandler"/> > > > My issue is that I am following conventions, there are JSPs located a

Re: struts2 conventions plugin - how to override result type

2012-11-26 Thread Ken McWilliams
; -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > > 2012/11/24 Ken McWilliams : > > Using struts2-convention-plugin-2.3.1.2 currently. > > > > I want conventions to still automatically find my actions, that is > > determine struts2 packages from java packa

Re: Load Struts2 configuration from DB

2012-11-13 Thread Ken McWilliams
If struts fails to find the action configuration it will try to use an instance of com.opensymphony.xwork2.UnknownHandlerManager to create a valid configuration. So this seems like the extension point I need. On Tue, Nov 13, 2012 at 12:38 AM, Ken McWilliams wrote: > I thought it would

Load Struts2 configuration from DB

2012-11-12 Thread Ken McWilliams
I thought it would be interesting if I could create an interceptor stack from already defined interceptors and store that definition in a database. I also wanted to store action mappings (packages, actionName, method) along with the name of the class which was to be associated with the action. Any

Re: How to implement custom ActionProxyFactory

2012-11-12 Thread Ken McWilliams
Thank you Łukasz! Knew it should be obvious... embarrassingly obvious. I'll start a new thread concerning what I'd like to do with it, to seek advice. On Mon, Nov 12, 2012 at 1:14 AM, Łukasz Lenart wrote: > Hi, > > name="myProxyFactory" > class="org.apache.struts2.impl.MyActionProxyFactory"/> >

Re: [Struts2] SessionToken Interceptor used with json Result and Javascript Calls

2012-11-07 Thread Ken McWilliams
Can you share the interceptor stack configuration for your normal JSP's and the stack configuration for the json actions? On Wed, Nov 7, 2012 at 5:37 AM, Jan Fröhlich wrote: > Hi... > > I try to secure one of my web applications with tokens. > Everything works fine with basic jsp pages. But in o

Re: [Struts 2] How do I migrate an action with no result name to an annotation?

2012-11-02 Thread Ken McWilliams
Oh! With conventions you don't write any annotations! Simply create /WEB-INF/content/my-action.jsp then the action "my-action" will be found. You should stick to actions with hyphens as that is what conventions expects. You can't replace all of struts.xml with annotations. What Jeff proposes would

Re: [Struts 2] How do I migrate an action with no result name to an annotation?

2012-11-02 Thread Ken McWilliams
ri, Nov 2, 2012 at 3:55 PM, Ken McWilliams wrote: > I don't understand, your result always has a name. The default is > "success" and the type is by default "dispatcher". So when you simply write > /WEB-INF/jsp/myPage. > jsp those are implied. > > &g

Re: [Struts 2] How do I migrate an action with no result name to an annotation?

2012-11-02 Thread Ken McWilliams
I don't understand, your result always has a name. The default is "success" and the type is by default "dispatcher". So when you simply write /WEB-INF/jsp/myPage. jsp those are implied. On Fri, Nov 2, 2012 at 3:27 PM, John Boyer wrote: > Hi Jeff: > > Yes, I'm using the plugin. Unfortunately, th

Re: [Struts 2] How do I migrate an action with no result name to an annotation?

2012-11-02 Thread Ken McWilliams
Since you are using annotations I assume you are using the struts2-conventions-plugin? If so, then the package structure after "struts2" or "action" is taken to be the namespace. If this is not the case then you would need to override it. On Fri, Nov 2, 2012 at 1:55 PM, John Boyer wrote: > Hi J

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-04 Thread Ken McWilliams
I'm not familiar with this application but simply look at the documentation for the struts2-json-plugin, you can specify a json result and you can specify include and exclude parameters (so you just return the part(s) of your Action you want). In this way you could define a new map, put a key of "r

Struts2 authentication, validation, and roles

2012-10-02 Thread Ken McWilliams
Asking for the consideration of a struts2 feature enhancement. The roles interceptor depends on container based security, it is a bit of a pain to set up and portability is complicated by needing to cover more documentation steps (how to secure your application on Glassfish, Weblogic, Tomcat...).

Struts2 annotation with parameter when using json plugin

2012-09-13 Thread Ken McWilliams
Simply I want to evaluate a property of my action and use it's value within an annotation. The following is exactly where I want to use it: I want to define a excludeProperties parameter at run time. Consider the following annotation which currently works on the action: @Result(name = "success",

Re: Struts 2 Initialization Plugin

2011-11-10 Thread Ken McWilliams
The better solution is dependency injection with Spring, use the struts2-spring-plugin. On Thu, 2011-11-10 at 15:09 -0500, Eric Reed wrote: > You should have an initialization servlet run at startup that can create such > an object. > > > >>> Scott Smith 11/10/2011 3:06 PM >>> > In struts 1, I

Re: Struts 2 Initialization Plugin

2011-11-10 Thread Ken McWilliams
The better solution is dependency injection with Spring, use the struts2-spring-plugin. On Thu, 2011-11-10 at 15:09 -0500, Eric Reed wrote: > You should have an initialization servlet run at startup that can create such > an object. > > > >>> Scott Smith 11/10/2011 3:06 PM >>> > In struts 1, I

Re: Struts2-json-plugin serialization issue with a Hibernate backed JPA entity

2011-09-07 Thread Ken McWilliams
ok at [1], particoularly the section called "root > object". > That's because I'm afraid that json plugin is trying to serialize your EJB > service. > HTH > > [1] struts.apache.org/2.2.3/docs/json-plugin.html > > Maurizio Cucchiara > > Il giorno 07/

Re: Struts2-json-plugin serialization issue with a Hibernate backed JPA entity

2011-09-07 Thread Ken McWilliams
t\\[.*\\]\\.fieldHandler\\..*" }) }) And it all works... Just tested the shorter ".*\\.fieldHandler\\..*" and it works too, which is much better because now there is one solution for all such instrumented entities! On Tue, 2011-09-06 at 22:20 -0600, Ken McWil

Struts2-json-plugin serialization issue with a Hibernate backed JPA entity

2011-09-06 Thread Ken McWilliams
I have a JPA entity, which hibernate is proxying. The following action works as it explicitly states the properties to include, however what I would much rather do is use excludeProperties to remove the problematic property. The problem property when serialized causes a "Positioned Update not su

Re: sending the report directly to the printer

2011-02-28 Thread Ken McWilliams
This requirement would only make sense to me if this is in an intranet where you have direct access to the printers. Then you could somehow get your app to talk a print server. It would be quite possible to make an intelligent guess as to which printer in the company to send the printout to based

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
arrayList.remove("class"); return arrayList; } } On Tue, 2011-02-01 at 18:49 -0500, Dave Newton wrote: > On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: > > > > > > ... > > > > I want propertyNames to be evaluated and the result

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
ynamically with OGNL. Print Table On Tue, 2011-02-01 at 15:53 -0700, Ken McWilliams wrote: > It looks like I need to use a PropertyAccessor and > ognl.MapPropertyAccessor specific

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
It looks like I need to use a PropertyAccessor and ognl.MapPropertyAccessor specifically. Are there any demos in how to use it, can one use it directly from the JSP? On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: > Hello I have a list of properties from a POJO as found us

struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
Hello I have a list of properties from a POJO as found using introspection. I want to iterate over a result set for each row, and iterate over a list of property names for each cell in a table. Something like: //I want propertyNames to be evaluated and the result used

Re: getRequestURL and action

2011-01-27 Thread Ken McWilliams
As mentioned earlier in the thread the s2 a tag and s2 url tag have many very similar attributes. On Thu, 2011-01-27 at 17:36 -0500, Dave Newton wrote: > On Thu, Jan 27, 2011 at 5:26 PM, Doctor John Carter wrote: > > > The only little thing I Don't like... > >en_US > > "> > > English > >

RE: getRequestURL and action

2011-01-27 Thread Ken McWilliams
This question on Stack Overflow is very similar to your issue: http://stackoverflow.com/questions/4773063/tiles2-struts-switch-locale The parameter name for which the i18n interceptor determines the language is configurable, I have not tried this but it may be possible to specify a session_locale

Re: getRequestURL and action

2011-01-27 Thread Ken McWilliams
gives you the current url. gives you the current url with the get parameters. The tag also shares the above properties but is also a link. http://struts.apache.org/2.x/docs/tag-reference.html On Thu, 2011-01-27 at 18:33 +0100, Doctor John Carter wrote: > > > > >

Can Struts2 map params of the form "a[]=2&a[]=3&a[]=4" to String[]

2011-01-21 Thread Ken McWilliams
Using jQuery, it is not a big deal to set $.ajaxSettings.traditional = true; such that jquery encodes in the form: "a=2&a=3&a=4" but it is enough of a nuisance for me to check if I can set something in struts2.2.1 to avoid this.

Re: Dependancy Madness: Struts 2.2.1 spring 2.5 (preferably later ie: 3) and JPA2 backed with Hibernate

2010-12-21 Thread Ken McWilliams
u post the > list of the lib directory (probably there will be more than one spring > library version) > > 2010/12/20 Ken McWilliams : > > I'm experiencing issues upgrading the struts2-spring-2-jpa-ajax demo > > found here > > http://struts.apache.org/2

  1   2   >