Back button after log out should not show secure content.

2010-11-08 Thread Ken McWilliams
I know it depends on the browser but this is a best effort thing and am looking for input on my current plan. When user signs on send the current date/time of the client along with credentials and record the offset in the session (if any). All subsequent pages will have a hidden date/time field.

Re: Back button after log out should not show secure content.

2010-11-09 Thread Ken McWilliams
/11/9 Ken McWilliams ken.mcwilli...@gmail.com: I know it depends on the browser but this is a best effort thing and am looking for input on my current plan. When user signs on send the current date/time of the client along with credentials and record the offset in the session (if any

Struts2 - implementing SSL

2010-11-09 Thread Ken McWilliams
I'm just looking into this and have never implemented ssl before. I found this: http://code.google.com/p/struts2-ssl-plugin/ and was wondering if anyone here has used it? I looked on this list https://cwiki.apache.org/S2PLUGINS/home.html and didn't see any explicit mention of SSL, nor did I find

View Question

2010-11-16 Thread Ken McWilliams
I'm creating a project as an exercise to better understand web programming/ajax. It is a web app security system. Where by an admin user can sign in and then add/remove users, groups and actions. Then can associate users to groups and actions to groups. I can do this with what I know of tiles

Calling OGNL static method with date argument issue

2010-11-30 Thread Ken McWilliams
In my jsp I have two dates (today and expiryDate) the following works in the JSP: s:date name=today format=-MM-dd / s:date name=expiryDate format=-MM-dd / Now I created two static methods (In a Class called dateUtils.DateRange): /* Calling the following from my JSP:

Calling OGNL static method with date issue

2010-12-01 Thread Ken McWilliams
In my jsp I have two dates (today and expiryDate) the following works in the JSP: s:date name=today format=-MM-dd / s:date name=expiryDate format=-MM-dd / Now I created two static methods (In a Class called dateUtils.DateRange): /* Calling the following from my JSP:

Open Session in View, struts2.2.1, eclipseLink (JPA2)

2010-12-06 Thread Ken McWilliams
Hello, Any advice on how to get Open session in View working with struts2? I've used spring but not well versed with it. Ken. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book Apache Struts 2 Web application Developement states : quote The plug-in will scan ... in Java packages whose names contain struts, struts2, action,

Re: Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
-0700, Ken McWilliams wrote: I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book Apache Struts 2 Web application Developement states : quote The plug-in will scan ... in Java packages whose

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book Apache Struts 2 Web application Developement states : quote The plug-in will scan ... in Java packages whose names contain struts, struts2, action,

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book Apache Struts 2 Web application Developement states : quote The plug-in will scan ... in Java packages whose names contain struts, struts2, action,

Struts2 URL building in action for JSON.

2010-12-18 Thread Ken McWilliams
I want s:url tag like functionality from within my action, so I can build a url with parameters so I can return it as a JSON result. So is there a method I can call from perhaps an AwareInterface that can accomplish this? - To

Struts2 URL building in action for JSOn

2010-12-18 Thread Ken McWilliams
I want s:url tag like functionality from within my action, so I can build a url with parameters so I can return it as a JSON result. So is there a method I can call from perhaps an AwareInterface that can accomplish this? - To

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

2010-12-20 Thread Ken McWilliams
I'm experiencing issues upgrading the struts2-spring-2-jpa-ajax demo found here http://struts.apache.org/2.2.1/docs/struts-2-spring-2-jpa-ajax.html I've set up quite a few 2.2.1 projects I've just had a hard time understanding the spring/hibernate dependencies. I don't suppose anyone has an

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
the list of the lib directory (probably there will be more than one spring library version) 2010/12/20 Ken McWilliams ken.mcwilli...@aerose.com: I'm experiencing issues upgrading the struts2-spring-2-jpa-ajax demo found here http://struts.apache.org/2.2.1/docs/struts-2-spring-2-jpa

Can Struts2 map params of the form a[]=2a[]=3a[]=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=2a=3a=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: getRequestURL and action

2011-01-27 Thread Ken McWilliams
s:url/ gives you the current url. s:url includeParams=get/ gives you the current url with the get parameters. The s:a/ 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:

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
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...a href=s:url includeParams=get

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: s:iterator value = resultList tr s:iterator

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 using

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

2011-02-01 Thread Ken McWilliams
On Tue, 2011-02-01 at 15:53 -0700, Ken McWilliams wrote: 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

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

2011-02-01 Thread Ken McWilliams
; } } On Tue, 2011-02-01 at 18:49 -0500, Dave Newton wrote: On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: s:iterator value = resultList s:iterator value=propertyNames ... I want propertyNames to be evaluated and the result used as the value for the iterator

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

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

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

2011-09-07 Thread Ken McWilliams
... 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 McWilliams wrote: I have a JPA entity, which hibernate is proxying. The following action works

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

2011-09-07 Thread Ken McWilliams
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/set/2011 07.43, Ken McWilliams ken.mcwilli...@gmail.com ha scritto: I have a JPA entity, which

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 ssm...@mainstreamdata.com 11/10/2011 3:06 PM

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 ssm...@mainstreamdata.com 11/10/2011 3:06 PM

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,

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...).

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

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 j...@rodaxsoft.com

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 result/WEB-INF/jsp/myPage. jsp/result those are implied. On Fri, Nov 2, 2012 at 3:27 PM, John Boyer j...@rodaxsoft.com wrote: Hi Jeff: Yes, I'm using the

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

2012-11-02 Thread Ken McWilliams
PM, Ken McWilliams ken.mcwilli...@gmail.comwrote: 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 result/WEB-INF/jsp/myPage. jsp/result those are implied. On Fri, Nov 2, 2012 at 3:27 PM, John Boyer j

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: [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 jan.froehl...@infomotion.dewrote: Hi... I try to secure one of my web applications with tokens. Everything works fine with

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 lukasz.len...@gmail.comwrote: Hi, bean type=com.opensymphony.xwork2.ActionProxyFactory

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.

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 ken.mcwilli...@gmail.comwrote: I

Re: struts2 conventions plugin - how to override result type

2012-11-26 Thread Ken McWilliams
://www.lenart.org.pl/ 2012/11/24 Ken McWilliams ken.mcwilli...@gmail.com: 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 package structure and Identify action names from Java

Re: struts2 conventions plugin - how to override result type

2012-11-28 Thread Ken McWilliams
, 2012 at 1:08 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2012/11/26 Ken McWilliams ken.mcwilli...@gmail.com: I've yet to try this but how do I tie this into conventions. Just add bean type=UnknownHandler class=MyUnknownHandler name=myUnknownHandler/ My issue is that I am

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

Re: struts2 conventions plugin - how to override result type

2012-12-05 Thread Ken McWilliams
from the content under /WEB-INF. On Wed, Nov 28, 2012 at 4:33 PM, Ken McWilliams ken.mcwilli...@gmail.comwrote: Sorry I wrote that before really looking the UnknownHandler, it is the right path. I'll get back with the results, and later I hope to have some questions about run time

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

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

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 ken.mcwilli...@gmail.com 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 that the chaining interceptor

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

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 ken.mcwilli...@gmail.comwrote: I don't know struts1 at all, but if you are afforded that ability to create a custom result type then you

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

Re: Complete list of framework bean keys

2013-04-04 Thread Ken McWilliams
of the register method, one of ConfigurationProvider's interface methods...) On Thu, Apr 4, 2013 at 11:18 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/5 Ken McWilliams ken.mcwilli...@gmail.com: Sometimes I want to override a default framework implementation and the first place I look

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 kenshin...@gmail.com wrote: I asked whether I should do it in a new package because the new Processor is

Re: struts 2 / sitemesh/ s: problem

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

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

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: AJAX Jsp tags

2013-08-11 Thread Ken McWilliams
AM, Alireza Fattahi afatt...@yahoo.com 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 From: Ken McWilliams ken.mcwilli

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: 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)

Custom ConfigurationProvider is not able to find result

2013-09-02 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

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

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. action

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 lukaszlen...@apache.orgwrote: Thanks, but it is already solved with Draft docs

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

2013-09-25 Thread Ken McWilliams
the latter. On Wed, Sep 25, 2013 at 7:32 PM, Ken McWilliams ken.mcwilli...@gmail.comwrote: 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
...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 McWilliams

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

2013-10-10 Thread Ken McWilliams
://www.lenart.org.pl/ 2013/9/26 Ken McWilliams ken.mcwilli...@gmail.com: ...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

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... s:label

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 christal...@yahoo.fr wrote: Hello, How to organize the actions, when you just

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

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 + 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

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 MapString, Object! 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

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

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: struts constant name=struts.ui.theme value=simple / /struts Since you mentioned a single page, you can do that too, you can even have a single struts2 UI tag render under a

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

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 nhoj.patr...@gmail.com 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

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 jim_ander...@jjajava.com wrote: index.jsp is in my hello_world.war file and hello_world.war is at

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

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 lukaszlen...@apache.org wrote: 2014-12-10 18:37 GMT+01:00

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

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:

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 jell...@usbr.gov wrote: Hi All, I have a simple struts action class calling setters on a simple JPA object and for some

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

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

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: 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

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

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

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

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

2016-06-29 Thread Ken McWilliams
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 <lukaszlen...@apache.org> wrote: > 2016-05-27 17:41 GMT+02:00 Ken McWilliams <

Re: Struts2 documentation and Stack Overflow

2016-08-31 Thread Ken McWilliams
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 when maintainers fail > to d

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 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

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

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: 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

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

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: > >

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

2017-07-12 Thread Ken McWilliams
n't happen soon ;-) > > 2017-06-23 23:22 GMT+02:00 Ken McWilliams <ken.mcwilli...@gmail.com>: > > 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

Re: Integrate Apache Shiro with Struts2

2017-06-29 Thread Ken McWilliams
ailto:lukaszlen...@apache.org] > > Sent: Sunday, June 18, 2017 3:23 AM > > To: Struts Users Mailing List <user@struts.apache.org> > > Subject: Re: Integrate Apache Shiro with Struts2 > > > > 2017-06-17 19:08 GMT+02:00 Ken McWilliams <ke

Re: Integrate Apache Shiro with Struts2

2017-06-30 Thread Ken McWilliams
; 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...@ku.edu > > -Original Me

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

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

  1   2   >