Re: Benefits of using Filter as front controller

2012-08-14 Thread Struts Two
>> I remember more than one case where I found WAS / Websphere Portal to 
>> implement a very ... say ... at least ... imaginative interpretation of the 
>> specs

That is exactly the point,the compromise of "clear-cut" sections of spec in 
favor of "unclear, murky, interpretive" sections of spec in struts 2 much like 
IBM. There is no "interpretation" on whether a Servlet can/should be used to 
server resource but when it comes to filters there is. And quite rightfully 
so,  as there may be darn compelling reasons to do so, since things quite few 
often do not follow patterns put in black and white. I am not trying to stir an 
endless discussion on what interpretation is correct as there will be no 
consensus. And I do not know what has been the darn compelling reason that 
could have not gotten away with using a Servlet as front controller in struts 
2, but I would have loved to have the option of using a Servlet as my front 
controller in struts 2. 

With all said, I did not mean to belittle struts 2 or take a jab at any struts 
2 contributor in my previous comment. And I believe it is very honorable of you 
to try make the tool available to the development community for free by putting 
a lot of work in your free and personal time. I just wanted to reflect the 
opinion for some spectrum of struts user community though may be small in 
numbers.


- Original Message -
From: Rene Gielen 
To: Struts Users Mailing List 
Cc: 
Sent: Tuesday, August 14, 2012 12:10:56 PM
Subject: Re: Benefits of using Filter as front controller

So far I fail to see where Struts 2 deviates from or violates the spec.
The fact that _usually_ a front controller - a concept not to be found
at all in the servlet spec - is implemented as servlet does not mean
that it _has_ to be implemented that way, unless the spec says or
clearly implies otherwise. For what I found in the and cited earlier,
this is not the case.

That WAS *interprets* the spec in a different way - especially when it
comes to a tooling level that has nothing to do with the spec whatsoever
(parsing web.xml to generate loadbalancing / proxy webserver
configuration) - is a totally different story. To some extent I
understand the rationale behind this, implying a servlet mapping should
exist for a given URL - but besides IBM claiming this has to be the
case, I haven't found any evidence so far. Interestingly, when it comes
to IBM support saying Struts 2 deviates from the spec, I remember more
than one case where I found WAS / Websphere Portal to implement a very
... say ... at least ... imaginative interpretation of the specs. I'm
not quite sure if them saying that Struts 2 deviates makes a case for
this being a fact to count on. But again, I'm happy to hear I'm wrong if
someone could clearly point out what I might have missed when reading
the spec.

Side note - sorry to say, but in my very personal and for sure not
representative experience, every time a "some application servers might
have issues" case arises, there is a good chance that _some_ of them
share a common product line name, starting with "W" :) And well, going
through hell when deploying apps to WAS* is something I suffered from
myself many times, with various different frameworks and technology
stacks in use.

I'll try to wrap up my points:
- the filter-based dispatching addressed real and serious technical
integration issues, and was able to solve them
- if it would violate the spec, we would *have to* remove it again, or
at least deliver a then spec conform dispatcher servlet as alternative -
so far there seems to be no evidence this is the case
- the Struts team *can for sure do much better* in documenting the
possible glitches, especially after what we learned from this thread and
your experiences; we should point out that using a filter dispatcher
might impose the need to add a default dummy servlet mapping to help
some application servers

BTW: I agree, Spring MVC became a great framework once they dropped the
inheritance-based controller madness, replacing it with annotation based
POJO configuration and heavy AOP magic. Nevertheless, Struts 2 has a lot
of sweet spots even over Spring MVC, as to my opinion as a user of both :)

Cheers,
- René

Am 14.08.12 15:46, schrieb Struts Two:
> What people are missing here is that using filters and deviating from the 
> spec as front controller would cause quite a few issues when some 
> applications servers are used. I quite clearly remember that I went through 
> hell to deploy my applications on WebSphere applications with an Http server 
> as front Web server. WebSphere goes through web.xml files and uses Servlet 
> URL mappings to generate the plugin file for resource mapping and filters are 
> ignored. Even when I opened a pmr, I was told by support that struts 2 
> deviates from the Spec. when you pick a framework, you got to be

Re: Benefits of using Filter as front controller

2012-08-14 Thread Struts Two
What people are missing here is that using filters and deviating from the spec 
as front controller would cause quite a few issues when some applications 
servers are used. I quite clearly remember that I went through hell to deploy 
my applications on WebSphere applications with an Http server as front Web 
server. WebSphere goes through web.xml files and uses Servlet URL mappings to 
generate the plugin file for resource mapping and filters are ignored. Even 
when I opened a pmr, I was told by support that struts 2 deviates from the 
Spec. when you pick a framework, you got to be aware that these things may cost 
you dearly down the road depending on what application servers you use or you 
plan to migrate.

As much as I have been an avid struts user [specially struts 1], I personally 
think that you should seriously consider Spring MVC / MVC Portlet against any 
other framework. I ,per se, have had a great experience with Spring MVC which 
somehow brings up the good memories of struts 1 [once everything is put in the 
context of its time]



- Original Message -
From: "umeshawas...@gmail.com" 
To: Struts Users Mailing List 
Cc: 
Sent: Monday, August 13, 2012 2:05:45 PM
Subject: Re: Benefits of using Filter as front controller

Rene
Thanks for such a detailed explanation and descrbing each and every aspects
Now even I can say and explains things in much more and good way
Sent from BlackBerry® on Airtel

-Original Message-
From: Rene Gielen 
Date: Mon, 13 Aug 2012 20:00:04 
To: Struts Users Mailing List
Reply-To: "Struts Users Mailing List" 
Subject: Re: Benefits of using Filter as front controller

Grabbed me a copy of Servlet Spec 2.4:


SRV.6.1 What is a filter?
A filter is a reusable piece of code that can transform the content of
HTTP requests, responses, and header information. Filters do not
generally create a response or respond to a request as servlets do,
rather they modify or adapt the requests for a resource, and modify or
adapt responses from a resource.


"do not generally" is way different from "may not", right?

Reading both the relevant parts of the spec and the API docs again, I
cannot see any violation of the servlet specification by using a Filter
for doing the dispatching, rather than a Servlet.

The other part is how requests are mapped, which imposes the question if
a servlet mapping matching the request URL must exist:


SRV.11.1 Use of URL Paths
[...]
1. The container will try to find an exact match of the path of the
request to the path of the servlet. A successful match selects the servlet.
2. The container will recursively try to match the longest path-prefix.
This is done by stepping down the path tree a directory at a time, using
the ’/’ character as a path separator. The longest match determines the
servlet selected.
(ad 2.: Previous versions of this specification made use of these
mapping tech- niques as a suggestion rather than a requirement, allowing
servlet con- tainers to each have their different schemes for mapping
client requests to servlets.)
3. If the last segment in the URL path contains an extension (e.g.
.jsp), the servlet container will try to match a servlet that handles
requests for the extension. An extension is defined as the part of the
last segment after the last ’.’ character.
4. If neither of the previous three rules result in a servlet match, the
container will attempt to serve content appropriate for the resource
requested. If a "default" servlet is defined for the application, it
will be used.


Point 4 is crucial. As to my opinion, it doesn't state clearly if a
default mapping must exist or not, which leaves it IMO up to the container.

That said, most frameworks use dispatcher servlets, and WebWork / Struts
2 once did as well.

The rationale behind switching to the Filter architecture was to deal
better with integrating technologies such a Sitemesh or Portlet, which
both profit from splitting the dispatching in more than one phase. This
could only be accomplished by using filters rather than servlets. Since
then, e.g. all major problems with sitemes integration magically
disappeared.

So my point of view is that there is nothing wrong with using filters
for dispatching. If the container interprets the servlet spec in an
opposite way, a dummy default servlet mapping should do the trick.

Nevertheless I'm happy to hear about points I might have missed or
misinterpreted.

- René

Am 8/13/12 16:01 , schrieb Paul Benedict:
> I'll take back what I said and reserve opinion until further research.
> I'll be interested in what you all find. For the record, the Spring
> Framework has its front-controllers as servlets.
> 
> http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/web/servlet/package-summary.html
>  
> 
> Paul
> 
> On Mon, Aug 13, 2012 at 8:53 AM,   wrote:
>> Yes this was one of the point I w

Regression from WW-3810? NPE in UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-08 Thread struts . rgm
Like I said a couple of days ago, this doesn't actually seem to hurt anything, 
but I thought that Łukasz might want to have a look at this exception.
Has anyone else seen this with 2.3.4 or newer snapshots?

-rgm


On Jun 6, 2012, at 2:23 PM, struts@spamgourmet.com wrote:

> Running Struts 2.3.4 build #481 on JBoss 5 I'm getting the following 
> NullPointerException on startup.  It seems benign, and happens with devMode 
> either true or false.
> 
> 2012-06-06 12:50:18,539 INFO  
> [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
> Overriding property struts.i18n.reload - old value: false new value: true
> 2012-06-06 12:50:18,539 INFO  
> [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
> Overriding property struts.configuration.xml.reload - old value: false new 
> value: true
> 2012-06-06 12:50:18,539 INFO  
> [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
> Overriding property struts.freemarker.templatesCache.updateDelay - old value: 
> 1800 new value: 0
> 2012-06-06 12:50:18,539 INFO  
> [org.apache.struts2.config.BeanSelectionProvider] (HDScanner) Loading global 
> messages from global
> 2012-06-06 12:50:18,637 ERROR 
> [org.apache.struts2.convention.PackageBasedActionConfigBuilder] (HDScanner) 
> Unable to scan named packages
> java.lang.NullPointerException
>   at 
> com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:199)
>   at 
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:428)
>   at 
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:387)
>   at 
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:345)
>   at 
> org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
>   at 
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:244)
>   at 
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
>   at 
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
>   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
>   at 
> org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
>   at 
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.init(StrutsPrepareFilter.java:50)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
>   at 
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
>   at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
>   at 
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>   at 
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>   at 
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>   at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>   at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
> 



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



NPE at at xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-06 Thread struts . rgm
Running Struts 2.3.4 build #481 on JBoss 5 I'm getting the following 
NullPointerException on startup.  It seems benign, and happens with devMode 
either true or false.

2012-06-06 12:50:18,539 INFO  
[com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
Overriding property struts.i18n.reload - old value: false new value: true
2012-06-06 12:50:18,539 INFO  
[com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
Overriding property struts.configuration.xml.reload - old value: false new 
value: true
2012-06-06 12:50:18,539 INFO  
[com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) 
Overriding property struts.freemarker.templatesCache.updateDelay - old value: 
1800 new value: 0
2012-06-06 12:50:18,539 INFO  [org.apache.struts2.config.BeanSelectionProvider] 
(HDScanner) Loading global messages from global
2012-06-06 12:50:18,637 ERROR 
[org.apache.struts2.convention.PackageBasedActionConfigBuilder] (HDScanner) 
Unable to scan named packages
java.lang.NullPointerException
at 
com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:199)
at 
org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:428)
at 
org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:387)
at 
org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:345)
at 
org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:244)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.init(StrutsPrepareFilter.java:50)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
at 
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at 
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at 
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)



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



Re: Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
Chris,

Surrounding it with quotes would mean that I'd have to change all my UI 
templates, as well as my theme templates.   Note how my theme template expects 
a Boolean (not a String) attribute, below:

> < <#if parameters.required?default(false)>
> <  required="true"<#rt/>
> < 


From my perspective this represents a regression from 2.3.1.2, where what I had 
previously worked fine.
It could be due to FreeMarker change, since I also have this in my log:

Caused by: freemarker.template.TemplateModelException: Argument type mismatch; 
can not unwrap argument #1 (class: freemarker.ext.beans.BooleanModel, toString: 
"true") to class java.lang.String
at 
freemarker.ext.beans.SimpleMemberModel.createArgumentTypeMismarchException(SimpleMemberModel.java:175
at 
freemarker.ext.beans.SimpleMemberModel.unwrapArguments(SimpleMemberModel.java:123)
at 
freemarker.ext.beans.SimpleMemberModel.unwrapArguments(SimpleMemberModel.java:100)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)



On May 25, 2012, at 1:58 PM, struts@spamgourmet.com wrote:

> After installing Struts 2.3.4, it appears that dynamic attributes must be 
> strings now?
> 
> I've modified text.ftl in my custom theme like this (diff output):
> 23c23
> < 
> ---
> > 
> 46,54d45
> < <#if parameters.required?default(false)>
> <  required="true"<#rt/>
> < 
> < <#if parameters.autofocus?default(false)>
> <  autofocus="autofocus"<#rt/>
> < 
> < <#if parameters.pattern?? >
> <  pattern="${parameters.pattern?html}"<#rt/>
> < 
> 62c53
> < />
> 
> 
> So that I can use dynamic attributes / HTML5 goodness like this:
> 
> <@s.text type="email" key="user.email" required=true autofocus=true />
> 
> But now Struts 2.3.4 blows up with this message:
> 
> 
> Method public java.lang.String 
> org.apache.struts2.util.StrutsUtil.translateVariables(java.lang.String) threw 
> an exception when invoked on org.apache.struts2.util.StrutsUtil@540948a7
> The problematic instruction:
> --
> ==> assignment: value=struts.translateVariables(keyValue)!keyValue [on line 
> 27, column 3 in /themes/simple/dynamic-attributes.ftl]
>  in include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on 
> line 52, column 1 in /themes/simple/text.ftl]
>  in include "/${parameters.templateDir}/simple/text.ftl" [on line 25, column 
> 1 in /themes/my-custom-theme/text.ftl]
> --
> 
> I made sure to update my simple theme, perhaps I missed some template files?  
> Can anyone help?



Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
After installing Struts 2.3.4, it appears that dynamic attributes must be 
strings now?

I've modified text.ftl in my custom theme like this (diff output):
23c23
< 
---
> 
46,54d45
< <#if parameters.required?default(false)>
<  required="true"<#rt/>
< 
< <#if parameters.autofocus?default(false)>
<  autofocus="autofocus"<#rt/>
< 
< <#if parameters.pattern?? >
<  pattern="${parameters.pattern?html}"<#rt/>
< 
62c53
< />


So that I can use dynamic attributes / HTML5 goodness like this:

<@s.text type="email" key="user.email" required=true autofocus=true />

But now Struts 2.3.4 blows up with this message:


Method public java.lang.String 
org.apache.struts2.util.StrutsUtil.translateVariables(java.lang.String) threw 
an exception when invoked on org.apache.struts2.util.StrutsUtil@540948a7
The problematic instruction:
--
==> assignment: value=struts.translateVariables(keyValue)!keyValue [on line 27, 
column 3 in /themes/simple/dynamic-attributes.ftl]
 in include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on line 
52, column 1 in /themes/simple/text.ftl]
 in include "/${parameters.templateDir}/simple/text.ftl" [on line 25, column 1 
in /themes/my-custom-theme/text.ftl]
--

I made sure to update my simple theme, perhaps I missed some template files?  
Can anyone help?

Bug? 2.3.3 struts2-blank.war fails to deploy on JBoss 5

2012-05-07 Thread struts . rgm
I recently tried to upgrade our app from 2.3.1.2 to 2.3.3, but got an error in 
startup.   To determine if it was "just me" I tried deploying the 
struts2-blank.war file in my JBoss 5.1 system, but got the attached error.  It 
seems that the application cannot load "struts-default.xml" anymore.

The juicy part is:   java.lang.IllegalArgumentException: URI scheme is not 
"file"

Is it possible for me to configure Struts2 2.3.3 (and by extension XWork 2.3.3) 
to work with JBoss 5.1?

Sincerely,
Roland McIntosh

---
2012-05-07 13:11:38,005 FINE  
[javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) JSF1018: 
[/struts2-blank] Configuration option 'com.sun.faces.expressionFactory' set to 
'com.sun.el.ExpressionFactoryImpl'
2012-05-07 13:11:38,005 FINE  
[javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) JSF1018: 
[/struts2-blank] Configuration option 'com.sun.faces.disableUnicodeEscaping' 
set to 'false'
2012-05-07 13:11:38,005 FINE  
[javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) JSF1018: 
[/struts2-blank] Configuration option 'com.sun.faces.duplicateJARPattern' set 
to '^tmp\d+(\S*\.jar)'
2012-05-07 13:11:38,008 FINE  
[javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) No FacesServlet 
found in deployment descriptor - bypassing configuration
2012-05-07 13:11:38,084 ERROR [org.apache.struts2.dispatcher.Dispatcher] 
(HDScanner) Dispatcher initialization failed
Unable to load configuration. - Class: java.io.File
File: File.java
Method: 
Line: 366 - java/io/File.java:366:-1
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
at 
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at 
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)


Caused by: Caught exception while loading file struts-default.xml - Class: 
java.io.File
File: File.java
Method: 
Line: 366 - java/io/File.java:366:-1
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:950)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:155)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:122)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:205)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 71 more
Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.(File.java:366)
at 
com.opensymphony.xwork2.util.FileManager$JBossFileRevision.build(FileManager.java:240)
at 
com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:143)
at 
com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:105)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:935)
... 75 more
2012-05-07 13:11:38,087 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/struts2-blank]]
 (HDScanner) Exception starting filter struts2
Unable to load configuration. - Class: java.io.File
File: File.java
Method: 
Line: 366 - java/io/File.java:366:-1




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



Re: Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
Replying to my own post after reading some source code.  If you have additional 
advice to add, I'd love to hear it.

I have now learned about the ConversionErrorInterceptor:
http://struts.apache.org/2.0.14/docs/conversion-error-interceptor.html

http://struts.apache.org/2.3.1.2/xwork-core/apidocs/com/opensymphony/xwork2/interceptor/ConversionErrorInterceptor.html

http://struts.apache.org/2.3.1.2/struts2-core/apidocs/org/apache/struts2/interceptor/StrutsConversionErrorInterceptor.html

To get better control of this behavior, it seems I need to implement a 
FieldValidator.  Then I can use the "repopulateField" property, as described 
here:
http://struts.apache.org/2.2.3/docs/conversion-validator.html

In addition, I believe my result templates should be checking "hasError" with 
something like:

   <#if  !( action.hasErrors() && fieldErrors?keys?seq_contains("userGroupId")) 
>
... do something with userGroupId as an integer ...

Sincerely,
rgm

On Mar 15, 2012, at 11:09 AM, struts@spamgourmet.com wrote:

> I've got accessor/mutators on my action for an integer ID parameter like this:
>  NewUserAction {
>  int _userGroupId = -1;
>  // execute, validate,  other methods
>  setUserGroupId( int id ) { this._userGroupId = id; }
>  getUserGroupId() { return _userGroupId; }
>  }
> 
> But when I access this action with invalid / fuzz-test parameters like 
> "/newuser.action?userGroupId=ASDF" I get this warning:
> 
>2012-03-15 10:34:34,741 WARN  
> [com.opensymphony.xwork2.ognl.OgnlValueStack] (http-0.0.0.0-8080-1) Error 
> setting expression 'userGroupId' with value '[Ljava.lang.String;@1ed15b50'
>ognl.MethodFailedException: Method "setUserGroupId" failed for object 
> com.example.rgm.NewUser@4eeec90c [java.lang.NoSuchMethodException: 
> com.example.rgm.NewUser.setUserGroupId([Ljava.lang.String;)]
>   at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1292)
>   at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1481)
> 
> This would be OK, provided that my result saw the parameter's initial value 
> of -1, however it seems that the FreeMarker Result that I'm using actually 
> gets the "userGroupId" parameter as this invalid value.  I expect that it 
> would call NewUser.getUserGroupId() instead of using a temporary (invalid!) 
> value from the ValueStack.  Is there an XWork configuration parameter that 
> avoids polluting the ValueStack after this type of exception, or do I have to 
> write all my templates in such a way that I can't rely on integer types?
> 
> When returning the ERROR result, Freemarker template processing is choking on 
> this line:
> 
> view-usergroup-error.ftl:
><#-- A user group was specified,  show information about the chosen 
> group if it's valid. -->
>   <#if  (userGroupId >= -1)>   
> 
>freemarker.template.TemplateException: The only legal comparisons are 
> between two numbers, two strings, or two dates.
>Left  hand operand is a freemarker.ext.beans.StringModel
>Right hand operand is a freemarker.template.SimpleNumber
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
I've got accessor/mutators on my action for an integer ID parameter like this:
  NewUserAction {
  int _userGroupId = -1;
  // execute, validate,  other methods
  setUserGroupId( int id ) { this._userGroupId = id; }
  getUserGroupId() { return _userGroupId; }
  }

But when I access this action with invalid / fuzz-test parameters like 
"/newuser.action?userGroupId=ASDF" I get this warning:

2012-03-15 10:34:34,741 WARN  [com.opensymphony.xwork2.ognl.OgnlValueStack] 
(http-0.0.0.0-8080-1) Error setting expression 'userGroupId' with value 
'[Ljava.lang.String;@1ed15b50'
ognl.MethodFailedException: Method "setUserGroupId" failed for object 
com.example.rgm.NewUser@4eeec90c [java.lang.NoSuchMethodException: 
com.example.rgm.NewUser.setUserGroupId([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1292)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1481)

This would be OK, provided that my result saw the parameter's initial value of 
-1, however it seems that the FreeMarker Result that I'm using actually gets 
the "userGroupId" parameter as this invalid value.  I expect that it would call 
NewUser.getUserGroupId() instead of using a temporary (invalid!) value from the 
ValueStack.  Is there an XWork configuration parameter that avoids polluting 
the ValueStack after this type of exception, or do I have to write all my 
templates in such a way that I can't rely on integer types?

When returning the ERROR result, Freemarker template processing is choking on 
this line:

view-usergroup-error.ftl:
<#-- A user group was specified,  show information about the chosen 
group if it's valid. -->
<#if  (userGroupId >= -1)>   

freemarker.template.TemplateException: The only legal comparisons are 
between two numbers, two strings, or two dates.
Left  hand operand is a freemarker.ext.beans.StringModel
Right hand operand is a freemarker.template.SimpleNumber



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



Re: File download fails in Firefox and Chrome

2012-01-13 Thread Struts Two
Thank you very much for your reply. Your suggestion worked though in IE the 
file is opened in a new tab as opposed to save but it works on Firefox. 



- Original Message -
From: Eric Lentz 
To: Struts Users Mailing List 
Cc: 
Sent: Friday, January 13, 2012 11:22:02 AM
Subject: Re: File download fails in Firefox and Chrome

> Not setting the Content-disposition is header, makes the firefox to 
prompt for the download but it uses the action for filename ie 
Ticket.action. > Has anyone faced a similar issue or can provide a hint on 
how to fix the issue

Yep, saw this problem just this week.

I ran the request through software that would allow me to view the header 
and I saw that only the filename appeared in the contentDisposition, no 
"filename="...
Add a field to your action class called contentDisposition and assign it 
like this:
contentDisposition = "filename=\"" + filename + "\"";

This assumes you are using the stream result in a manner similar to this:
        
                1024
        

I included the contentDisposition in the result like this:

        
                ${contentType}
                filename=${contentDisposition}"
                1024
        

But that didn't work, because Struts took whatever was in my 
contentDisposition in my action versus using the param. So _the above 
doesn't work_ because it would drop the "filename=" portion. If you used a 
different variable name, then it would probably work, but I didn't go back 
and try. In theory, this would work:

        
                ${myContentType}
                filename=${myContentDisposition}"
                1024
        

Assuming you had myContentType and myContentDisposition in your action.

Hope that helps.

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



Re: File download fails in Firefox and Chrome

2012-01-13 Thread Struts Two
The fact is that I set content disposition programatically in the following line

getServletResponse().setHeader("Content-Disposition",
                ("attachment;filename=\"" + 
attachment.getName().trim().replaceAll(" ", "_") + "\""));
in the action as opposed to configuration. I was working with no issue until a 
month ago for over a year and suddenly it has stopped working



- Original Message -
From: Eric Lentz 
To: Struts Users Mailing List 
Cc: 
Sent: Friday, January 13, 2012 11:22:02 AM
Subject: Re: File download fails in Firefox and Chrome

> Not setting the Content-disposition is header, makes the firefox to 
prompt for the download but it uses the action for filename ie 
Ticket.action. > Has anyone faced a similar issue or can provide a hint on 
how to fix the issue

Yep, saw this problem just this week.

I ran the request through software that would allow me to view the header 
and I saw that only the filename appeared in the contentDisposition, no 
"filename="...
Add a field to your action class called contentDisposition and assign it 
like this:
contentDisposition = "filename=\"" + filename + "\"";

This assumes you are using the stream result in a manner similar to this:
        
                1024
        

I included the contentDisposition in the result like this:

        
                ${contentType}
                filename=${contentDisposition}"
                1024
        

But that didn't work, because Struts took whatever was in my 
contentDisposition in my action versus using the param. So _the above 
doesn't work_ because it would drop the "filename=" portion. If you used a 
different variable name, then it would probably work, but I didn't go back 
and try. In theory, this would work:

        
                ${myContentType}
                filename=${myContentDisposition}"
                1024
        

Assuming you had myContentType and myContentDisposition in your action.

Hope that helps.

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



File download fails in Firefox and Chrome

2012-01-13 Thread Struts Two
Hi everyone:

I have an application in Struts 2.1.8 that has been running for the past two 
years with no issue. However; recently I have noticed the all file downloads on 
Firefox and Chrome fails while IE is okay. I know it has something with 
content-dispositon but  I have not been able to fix it. The code is as follows:




public String execute() {
        Attachment attachment = ticketLocal.findAttachment(getAttachmentId());
        setInputStream(new ByteArrayInputStream(attachment.getAttachment()));
        getServletResponse().setHeader("Content-Disposition",
                ("attachment; filename=\"" + 
attachment.getName().trim().replaceAll(" ", "_") + "\""));
        return Action.SUCCESS;

    }

Not setting the Content-disposition is header, makes the firefox to prompt for 
the download but it uses the action for filename ie Ticket.action. Has anyone 
faced a similar issue or can provide a hint on how to fix the issue


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



Re: struts2 in weblogic 10.3

2011-11-01 Thread Struts Two
Hi:

I know based on my experience that I had quite some trouble running struts 2 on 
WebSphere which led to opening quite a few PMRS with IBM. And in many occasions 
it happened to be the issue with existing struts 2 design that breaks the Spec 
such as  using filters to server resources and etc and then you are left in 
catch 22 situation where you get no support from application server vendor as 
finger pointed to struts 2 deviation from the Spec and the current design can 
not be changed. If you are in the process of choosing a framework for your 
application, you may want to take a look at Spring MVC as well.



- Original Message -
From: Frans Thamura 
To: Struts Users Mailing List ; jlm...@gmail.com
Cc: 
Sent: Tuesday, November 1, 2011 8:06:19 AM
Subject: Re: struts2 in weblogic 10.3

Can we know?

Where do you put ur struts.xml and can share ur war structure
On Nov 1, 2011 6:00 PM,  wrote:

> I'm using Struts 2 with WL withou problems for months. You meed to check
> your app.
> Sent via BlackBerry from T-Mobile
>
> -Original Message-
> From: Frans Thamura 
> Date: Tue, 1 Nov 2011 17:16:16
> To: Struts Users Mailing List
> Reply-To: "Struts Users Mailing List" 
> Subject: Re: struts2 in weblogic 10.3
>
> Hi all
>
> Just test our code, springmvc run well.
>
> Does this mean struts2, not weblogic ready?
>
> F
> On Nov 1, 2011 3:31 PM, "Maurizio Cucchiara" 
> wrote:
>
> > Looks like weblogic is trying to loading the same library twice:
> > - from :C:/Users/user/.m2/repository/org/apache/struts/struts2-core/
> > 2.2.3.1/s
> > - and  from
> >
> F:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/me9saz/war/WEB-INF/lib/
> >
> > Anyway, I'm sure that you will be luckier asking this kind of question
> > to the user ML.
> >
> > Twitter     :http://www.twitter.com/m_cucchiara
> > G+          :https://plus.google.com/107903711540963855921
> > Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
> >
> > Maurizio Cucchiara
> >
> >
> >
> > On 31 October 2011 07:43, vickyfaizal  wrote:
> > > Unable to load configuration. - bean -
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> > For additional commands, e-mail: dev-h...@struts.apache.org
> >
> >
>
>


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



freemarker radio tag with map literals [solved, kind of]

2011-10-13 Thread struts . rgm
I'm having a hard time using the freemarker syntax radio tag.  This works fine:
<@s.radio name="cars" list=[ "ford", "toyota" ] />

But using a literal map does not:
<@s.radio name="cars" list={ "ford" : "mustang",  "toyota":"prius" } />

The web page renders:
"freemarker.ext.beans.HashAdapter$1$1$1@7e29d49f" as both the value and label.  
 I experimented with various listValue parameters to no avail.

Other things I've tried that also don't work:

* Creating a map using OGNL syntax:  list="#{  ... }" -- FM chokes on the # -- 
"expecting number" error
* using <@s.set name="carList" value="%{ #{ ... } }" />

If this is ever figured out it'd be great to note it in the examples section of 
this document:
http://struts.apache.org/2.2.3.1/docs/radio.html  (probably also the doc for 
select)

As well as mentioning freemarker map literal particulars on this document:
http://struts.apache.org/2.2.3/docs/freemarker-tags.html


UPDATE -- After a few hours and checking of source code, I came up with this 
solution:

<#assign cars = {'ford':'Fusion', 'toyota':'Prius'} />
<@s.radio name="cars" list=cars listKey="key" listValue="%{ getText( value ) }" 
/>

I would have expected it to work without the listKey and listValue attributes.
If you have additional insight I'd love to hear it.

Thanks,

-rgm

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



Example for optgroup doesn't work

2011-09-19 Thread struts . rgm
Regarding:
http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/components/OptGroup.html
and
http://struts.apache.org/2.2.3.1/docs/optgroup.html

The example given at the bottom, when translated in to Freemarker tag syntax, 
doesn't work.  Here's my FM version:

 <@s.select label="My Selection" name="mySelection" 
   value="POPEYE"
   list={'SUPERMAN':'Superman', 'SPIDERMAN':'spiderman'} >
<@s.optgroup label="Adult"
list={'SOUTH_PARK':'South Park'} />
<@s.optgroup label="Japanese"
list={'POKEMON':'pokemon','DIGIMON':'digimon','SAILORMOON':'Sailormoon'} /> 


This causes the following exception:

freemarker.core.InvalidReferenceException: Expression 
optGroupInternalListUiBean.parameters.list is undefined on line 36, column 8 in 
mx/themes/securelink/optgroup.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:100)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
...

If I try and simplify it and use the OGNL syntax I get a different error:
 <@s.select label="My Selection" name="mySelection" value="%{'POPEYE'}"
   list="%{#{'SUPERMAN':'Superman', 'SPIDERMAN':'spiderman'}}" >


...
Caused by: freemarker.core.ParseException: Error on line 29, column 22 in 
*/tests/select-list.ftl
Found string literal: 'SUPERMAN'
Expecting: number in */tests/select-list.ftl
at freemarker.core.FMParser.notStringLiteral(FMParser.java:84)
at freemarker.core.FMParser.numberLiteralOnly(FMParser.java:147)

Can anyone provide guidance here for using FM literals with select lists?

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



Documentation: Checkbox "false" injection

2011-07-20 Thread struts . rgm
The "using checkboxes" page at  
http://struts.apache.org/2.2.3/docs/using-checkboxes.html  says:

The framework automatically tracks the checkboxes used by a form (so 
you don't have to). If a checkbox is missing, a default value for the checkbox 
(usually false) is injected. The checkbox control can then turn on-and-off 
values as needed,

Questions:

 * How is the string "false" injected?  Is there a way to control the behavior 
of the injection or the injected value?
 * Can the document be updated to include these examples? (shall I open a JIRA 
issue against the docs?)

Criticism:

 * Note that the documentation paragraph terminates with a comma instead of a 
full-stop.
 * Also note that the "Full Detailed Example" at the bottom of the page is 
perhaps too detailed to clearly demonstrate the subject matter

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



FieldErrors for a specific form ID

2011-07-19 Thread struts . rgm
After perusing the source code I don't feel like this is possible, but if y'all 
know otherwise please give me a heads-up even if just to confirm my suspicion.
It appears that Struts2 does know the ID of the current form, but this 
information is not used for an xwork validation context -- which appears to be 
either at the action or method level.  Some thought would have to go into how 
best to put a solution on the ValueStack for backwards compatibility.

To refresh your memories (from yesterday) here's the situation I found myself 
in:

<#--
  tl;dr --   Is it possible to set a validation context specific to a form ID, 
or to add field errors
  to a data structure representing one unique form?

  These three forms share an input with the same name, but could be distinct 
instances of domain objects.
  If one is submitted and does not validate(), the FieldError is shown on all 
three
  forms instead of just the one that was submitted.

  Furthermore, since each textfield is named "msg" then "getMsg()" is called 
via OGNL for all forms,
  so all inputs have the same value after submission.  It'd be great if the 
tags could first check a form-specific data structure for value and error info.
-->
<#list [ 1, 2, 3 ] as idx >

  <@s.form id="ff${idx?c}">
<#--
  Struts does not generate unique IDs automatically in this case,
  so for valid HTML you must provide the ID explicitly.  No action param is
  defined, so the form will submit to the same page.
-->

<@s.hidden name="msg.id" value="${idx?c}" />
<@s.textfield name="msg" labelposition="left" label="Message ${idx?c}" />
<@s.submit />
  






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



Using string literals or references to objects in @s.url?

2011-07-12 Thread struts . rgm
Which of these is more correct when using Struts2 freemarker tag dynamic 
attributes for @s.url:

<@s.url action="viewitem" itemid="${item.itemid?c}"  />
or
<@s.url action="viewitem" itemid=item.itemid />

I've been favoring the second example, since it doesn't require me to remember 
to do "?c" for my integer arguments, and appears to properly exclude parameters 
that have null values from the resulting URL.

This is common enough that I believe the "Attribute Types" section of the 
freemarker tags document should include an example for an integer.   It could 
mention that you might prefer to pass the freemarker variable instead of 
passing the argument as a string, where you'll be required to remember to use 
"?c" for numbers to avoid a comma being passed resulting in 
ognl.MethodFailException for the integer-only setter.
http://struts.apache.org/2.2.3/docs/freemarker-tags.html

Or maybe it's "obvious."

-rgm

Documentation styles missing some classes?

2011-07-11 Thread struts . rgm
This could be intentional, but I believe the "space.css" style stylesheet lost 
the CSS class definition for ".tipMacro."  This makes the docs look a little 
less nice in v2.2.3 than in v2.0.14.
Compare the green package heirarchy tip boxes between:
http://struts.apache.org/2.0.14/docs/localization.html
and
http://struts.apache.org/2.2.3/docs/localization.html




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



Re: Namespace sitemesh decorators? Namespace from freemarker result?

2011-07-05 Thread struts . rgm
Dear Roland-from-last-week,

The normal ConfigDecoratorMapper does what you want.  Since namespaces in 
Struts look like a "path" in the URL, you can simply apply a decorator to the 
pattern for the namespace.  For example, in your decorators.xml, do:


/yournamespace/*


There is no need for your templates to declare their decorator using the meta 
tag and thus invoke the PageDecoratorMapper.

love,
alert roland


On Jun 28, 2011, at 3:44 PM, struts@spamgourmet.com wrote:

> I have two namespaces,  "admin" and " (the default namespace).  I'd like to 
> re-use the same result template for both, but decorate them differently.
> 
> My templates declare their decorator using the meta tag, like this:  name="decorator" content="admin" />
> Then, in decorators.xml, I have defined:  page="admin.ftl" />
> 
> I'd like to generalize this to have one decorator per namespace, and remove 
> the meta tag in my files.  How can I get DecoratorMapper to be namespace 
> aware?  Should I write my own NamespaceDecoratorMapper extends 
> AbstractDecoratorMapper?  How would the DecoratorMapper get access to the 
> ServletActionContext?
> 
> Alternately, I could keep my current system and simply use  name="decorator" content="${namespace}" /> in my result templates, then 
> implement my BaseAction's getNamespace as:
> 
> String getNamespace() {
>  return ServletActionContext.getActionMapping().getNamespace();
> }
> 
> What do you guys think?  Has anyone implemented namespace-specific sitemesh 
> decorators before?
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Namespace sitemesh decorators? Namespace from freemarker result?

2011-06-28 Thread struts . rgm
I have two namespaces,  "admin" and " (the default namespace).  I'd like to 
re-use the same result template for both, but decorate them differently.

My templates declare their decorator using the meta tag, like this: 
Then, in decorators.xml, I have defined: 

I'd like to generalize this to have one decorator per namespace, and remove the 
meta tag in my files.  How can I get DecoratorMapper to be namespace aware?  
Should I write my own NamespaceDecoratorMapper extends AbstractDecoratorMapper? 
 How would the DecoratorMapper get access to the ServletActionContext?

Alternately, I could keep my current system and simply use  in my result templates, then 
implement my BaseAction's getNamespace as:

String getNamespace() {
  return ServletActionContext.getActionMapping().getNamespace();
}

What do you guys think?  Has anyone implemented namespace-specific sitemesh 
decorators before?

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



RedirectAction supports "anchor" param

2011-06-21 Thread struts . rgm
I've opened this minor documentation issue as:
https://issues.apache.org/jira/browse/WW-3652

Affected files will be:
src/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
  (needs javadoc updates)

-Roland

Re: optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
https://issues.apache.org/jira/browse/WW-3209

I wonder if I've just run into this unresolved issue.

On Jun 20, 2011, at 5:37 PM, struts@spamgourmet.com wrote:

> Is it possible for optgroup to support some of the attributes that other 
> UIBeans have, such as "cssClass" and "id" ?
> 
> I created my own theme and edited optgoup.ftl to check for 
> parameters.cssClass??, but it appears that this is not enough.  Perhaps some 
> of the universal HTML attributes should be broken out of UIBean so that tags 
> like optgroup can use them too?
> 
> Can anyone suggest a workaround?
> 
> -Roland
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
Is it possible for optgroup to support some of the attributes that other 
UIBeans have, such as "cssClass" and "id" ?

I created my own theme and edited optgoup.ftl to check for 
parameters.cssClass??, but it appears that this is not enough.  Perhaps some of 
the universal HTML attributes should be broken out of UIBean so that tags like 
optgroup can use them too?

Can anyone suggest a workaround?

-Roland

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



Re: jsp caching problem

2011-06-13 Thread struts . rgm
For the browser-side issues, you might try using the "autocomplete="off"" 
attribute on the form tag.  See:
https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#How_to_Turn_Off_the_Autocompletion_Feature

It may differ for Google Chrome and IE.

-Roland

On Jun 13, 2011, at 10:46 AM, Jason Pyeron - jpye...@pdinc.us wrote:

>> -Original Message-
>> From: Arpan 
>> Sent: Monday, June 13, 2011 11:41
>> To: Struts Users Mailing List
>> Subject: jsp caching problem
>> 
>> Hi All,
>> 
>> Do any one know how to solve caching problem in jsp.
>> My requirement is that, it should not display previously 
>> submitted credit card number and passwords.
>> Whenever I put the first number, my page shows all other 
>> numbers previously entered as a suggession.
>> 
> 
> This is an issue with the browser, but as a rule of thumb serving this type of
> page over https will cause the browser to behave differently. Also remember 
> that
> the credit card field suggestions would only be on a given clients machine 
> with
> only their numbers.
> 
> 
> 
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -   -
> - Jason Pyeron  PD Inc. http://www.pdinc.us -
> - Principal Consultant  10 West 24th Street #100-
> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
> -   -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Re: Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
Some more minor points on this issue, relating to the document at:
http://struts.apache.org/2.2.3/xwork-core/apidocs/com/opensymphony/xwork2/TextProvider.html

* "Implementing classes can delegate TextProviderSupport" -- clarifying the 
verb "delegate" or providing an example would be really useful in this javadoc.
* "Messages will be searched in multiple resource bundles" -- It's not entirely 
clear that this sentence is talking about TextProviderSupport.  It seems like 
it's talking about the interface, and not an implementation of it.
* several typos:  "startinag",  "the users configured locale" should read "the 
user's configured locale", "implemntation"

I'm not complaining, I'm especially appreciative that there are any docs at 
all, but this particular one could use sprucing up for better readability and 
understanding of framework tie-in points.  It might be nice to have some of 
this explanation on TextProviderFactory too:
http://struts.apache.org/2.2.3/xwork-core/apidocs/com/opensymphony/xwork2/TextProviderFactory.html

That page says: "This factory enables users to provide and correctly initialize 
a custom TextProvider."
It could really benefit from a statement like ".. and here's how:  Your text 
provider is injected  "


On Jun 8, 2011, at 2:17 PM, struts@spamgourmet.com wrote:

> This is a question that has come up before, but I've not seen it answered 
> fully (I searched the list first!).  Here's what I've got so far.
> 
> Goals:
> Implement a custom resource provider that gets searched BEFORE the 
> action-level, interface-level, or package-level ".properties" files, and gets 
> its resources from the database.  If the resource is not found, then 
> fall-back to the normal Struts2 resolution chain of checking action, 
> interface, package, global / defaults.
> 
> Theory / Help:
> Struts 2 supports hooking your own TextProvider implementations in by 
> registering the bean with a name and setting a constant in "struts.xml":
> 
> class="com.example.struts2.DBTextProvider" scope="default" />
>
> 
> My implementation of DBTextProvider is here:
> http://pastebin.com/w1StdfGM
> 
> Note that it doesn't actually DO anything on its own -- it simply calls 
> getTextProvider().getText(... ).   I followed ActionSupport's lead by doing 
> that.  I had planned on hooking in the custom stuff in each implemented 
> method, then calling the "normal" method explicitly if it's not found.  It 
> occurs to me that I might not need to do that explicitly if my TextProvider 
> were first in line of a list of alternatives.
> 
> This test-case does not work -- all of my package-level resources are 
> ignored, and I see many messages in my JBoss log like:
> WARN  [org.apache.struts2.util.TextProviderHelper] (http-0.0.0.0-8080-5) The 
> default value expression 'menu.search.users' was evaluated and did not match 
> a property.  The literal value 'menu.search.users' will be used.
> 
> Could someone point me in the right direction?  What's wrong with my 
> DBTextProvider?
> 
> Sincerely,
> 
> Roland McIntosh
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
This is a question that has come up before, but I've not seen it answered fully 
(I searched the list first!).  Here's what I've got so far.

Goals:
Implement a custom resource provider that gets searched BEFORE the 
action-level, interface-level, or package-level ".properties" files, and gets 
its resources from the database.  If the resource is not found, then fall-back 
to the normal Struts2 resolution chain of checking action, interface, package, 
global / defaults.

Theory / Help:
Struts 2 supports hooking your own TextProvider implementations in by 
registering the bean with a name and setting a constant in "struts.xml":




My implementation of DBTextProvider is here:
http://pastebin.com/w1StdfGM

Note that it doesn't actually DO anything on its own -- it simply calls 
getTextProvider().getText(... ).   I followed ActionSupport's lead by doing 
that.  I had planned on hooking in the custom stuff in each implemented method, 
then calling the "normal" method explicitly if it's not found.  It occurs to me 
that I might not need to do that explicitly if my TextProvider were first in 
line of a list of alternatives.

This test-case does not work -- all of my package-level resources are ignored, 
and I see many messages in my JBoss log like:
WARN  [org.apache.struts2.util.TextProviderHelper] (http-0.0.0.0-8080-5) The 
default value expression 'menu.search.users' was evaluated and did not match a 
property.  The literal value 'menu.search.users' will be used.

Could someone point me in the right direction?  What's wrong with my 
DBTextProvider?

Sincerely,

Roland McIntosh

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



Re: Hash tags

2011-06-01 Thread struts . rgm
Yes, I believe the document should be updated to add an anchor example.  As 
Dave mentioned, I'll file a JIRA ticket for that.

Explaining my other sentence, I saw that the extended class also supported the 
"location" and "parse" parameters in addition to "anchor."
However, the constructor for the ServletActionRedirectResult doesn't look at 
these, so I'm not sure if they're usable in  elements -- especially 
since "location" is the same thing as "actionName."

I just meant that these other parameters ought to be mentioned in the docs too, 
IF it turns out that they're usable.
Maybe a section could be added entitled:

Additional Parameters (Inherited from ServletRedirectResult)
* location - same as actionName (do not use).  The location to go to after 
execution.
* parse - boolean, true by default.  If set to false, the location param will 
not be parsed for Ognl expressions
* anchor - optional.  Also known as "fragment" or colloquially as "hash."  You 
can specify an anchor for a result.

On Jun 1, 2011, at 12:24 PM, Jason Pyeron - jpye...@pdinc.us wrote:

>> -Original Message-
>> From: struts@spamgourmet.com
>> Sent: Wednesday, June 01, 2011 12:59
>> To: user@struts.apache.org
>> Subject: Re: Hash tags
>> 
>> I tried that first, but it yields 
>> "viewuser#userPreferences.action."  I found the answer by 
>> diving into the source code.  The key insight is that this is 
>> called an "anchor" (not a hash).
>> This works:
>> 
>> 
>>  viewuser
>>  userPreferences
>> 
>> 
>> This document should be updated:
>> http://struts.apache.org/2.2.3/docs/redirect-action-result.html
> 
> To add an anchor example?
> 
>> 
>> The example at the bottom is clearly intended to be a 
>> "complete" example, but ignores the attributes supported by 
>> the extended class:
>> 
> http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/dispatche
> r/ServletRedirectResult.html
> 
> Could you explain that statement?
> 
> 
> 
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -   -
> - Jason Pyeron  PD Inc. http://www.pdinc.us -
> - Principal Consultant  10 West 24th Street #100-
> - +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
> -   -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Re: Hash tags

2011-06-01 Thread struts . rgm
I tried that first, but it yields "viewuser#userPreferences.action."  I found 
the answer by diving into the source code.  The key insight is that this is 
called an "anchor" (not a hash).
This works:


  viewuser
  userPreferences


This document should be updated:
http://struts.apache.org/2.2.3/docs/redirect-action-result.html

The example at the bottom is clearly intended to be a "complete" example, but 
ignores the attributes supported by the extended class:
http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/dispatcher/ServletRedirectResult.html


On Jun 1, 2011, at 11:43 AM, Dave Newton - davelnew...@gmail.com wrote:

> On Wed, Jun 1, 2011 at 11:51 AM,  wrote:
>> Does the redirectAction result support [...] a hash tag to append?
>> 
>> For example, this:
>> > hash="userPreferences">viewuser
> 
> What happens when you try it?
> 
> Did you try viewuser#userPreferences? I don't
> know if that'd work or not, but easy enough to find out.
> 
> Dave
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



Hash tags

2011-06-01 Thread struts . rgm
Does the redirectAction result support a parameter or attribute defining a hash 
tag to append?

For example, this:
viewuser

Might yield:
   /context/viewuser.action#userPreferences

I don't see any such thing on the document:
   http://struts.apache.org/2.2.3/docs/redirect-action-result.html

Thank you,
-Roland

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



Re: Migration from 2.1.8 to 2.2.1.1

2011-03-30 Thread Struts Two
It is not the question whether it concerns me or not, it is the process that 
some (big) companies follow. When we started the projected in struts 2, we 
involved the legal team with regard to licenses involved, we got the approval. 
Now before I try to upgrade my struts 2 which involves a new license other than 
Apache 2, I have to involve the legal team which makes a simple upgrade overly 
complex. I believe that struts 2 team should at least keep core files under 
Apache 2 license [much like struts 1.x]. It does not make sense that struts 2 
is 
licensed under Apache 2 while some of its dependencies are licensed differently 
which makes you wonder what is Apache 2 licensed struts 2 and what is not. 
Without those core components there is no struts 2.

Nothing with regard to MPL concerns me as it is the same one used by Firefox 
but 
the red-tape and processes followed by some companies may deem it otherwise to 
avoid lawsuits, etc.



- Original Message 
From: Dave Newton 
To: Struts Users Mailing List 
Sent: Wed, March 30, 2011 9:29:48 AM
Subject: Re: Migration from 2.1.8 to 2.2.1.1

What about the MPL concerns you?

On Wednesday, March 30, 2011, Struts Two  wrote:
> None of the javaassist's dual licenses is (modified) Apache license. I
> understand some software applications that use plugins to have different open
> sources licenses as they are optional. But once a library is added as a
> dependency with a different open source license than Apache 2, it will cause
> quite a few issues at least from legal perspective.
>
> is there any version of javaassist or an alternative library with Apache 2
> license? does existing javaassit licenses limits or puts extra restriction on
> Apache 2 license that comes with struts 2?
>
>
>
>
>
> - Original Message 
> From: Lukasz Lenart 
> To: Struts Users Mailing List 
> Sent: Wed, March 30, 2011 12:58:02 AM
> Subject: Re: Migration from 2.1.8 to 2.2.1.1
>
> Just read through release notes:
> http://struts.apache.org/2.2.1/docs/version-notes-221.html
> http://struts.apache.org/2.2.1/docs/version-notes-2211.html
>
> If you aren't running your application on JBoss you must add Javassist
> library as a dependency
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
>
> 2011/3/29 Struts Two :
>> Hello All:
>>
>> is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files
>> replacement or there is more to it? I remember when I migrated from 2.0.14 to
>> 2.1.8 I had to go through a wiki page for migration to work, is there such
> WIKI
>> page? I am only using tiles plugin and no other plugins are there. I would
>> appreciate any tips/links or yes or no answers.
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



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



Re: Migration from 2.1.8 to 2.2.1.1

2011-03-30 Thread Struts Two
None of the javaassist's dual licenses is (modified) Apache license. I 
understand some software applications that use plugins to have different open 
sources licenses as they are optional. But once a library is added as a 
dependency with a different open source license than Apache 2, it will cause 
quite a few issues at least from legal perspective.

is there any version of javaassist or an alternative library with Apache 2 
license? does existing javaassit licenses limits or puts extra restriction on 
Apache 2 license that comes with struts 2? 





- Original Message 
From: Lukasz Lenart 
To: Struts Users Mailing List 
Sent: Wed, March 30, 2011 12:58:02 AM
Subject: Re: Migration from 2.1.8 to 2.2.1.1

Just read through release notes:
http://struts.apache.org/2.2.1/docs/version-notes-221.html
http://struts.apache.org/2.2.1/docs/version-notes-2211.html

If you aren't running your application on JBoss you must add Javassist
library as a dependency


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/3/29 Struts Two :
> Hello All:
>
> is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files
> replacement or there is more to it? I remember when I migrated from 2.0.14 to
> 2.1.8 I had to go through a wiki page for migration to work, is there such 
WIKI
> page? I am only using tiles plugin and no other plugins are there. I would
> appreciate any tips/links or yes or no answers.
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



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



Migration from 2.1.8 to 2.2.1.1

2011-03-29 Thread Struts Two
Hello All:

is Migration from 2.1.8 to 2.2.1.1 straightforward involving only jar files 
replacement or there is more to it? I remember when I migrated from 2.0.14 to 
2.1.8 I had to go through a wiki page for migration to work, is there such WIKI 
page? I am only using tiles plugin and no other plugins are there. I would 
appreciate any tips/links or yes or no answers.




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



Localization for SiteMesh decorators

2011-01-28 Thread struts . rgm
This seems like a documentation bug.  This page:
http://struts.apache.org/2.2.1.1/docs/localization.html
Says "Internationalizing SiteMesh decorators is possible, but there are quirks. 
See SiteMesh Plugin for more."
Unfortunately, the link in the documentation is invalid.  After using Google to 
find the proper SiteMesh Plugin page, there is nothing mentioned about 
localization.

I propose the following:

* The link to the SiteMesh Plugin page should be fixed in the 
"localization.html" page.
* The SiteMesh Plugin page should actually include a section on localization, 
detailing the quirks

In the mean time -- can anyone point me to a SiteMesh localization document?  
I'm especially interested in how a freemarker decorator might be able to access 
resources from a different namespace.

-Roland

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
I did try that -- but unless simple/text.ftl changes, there will *still* be an 
unwanted "class='inputError'" before my cssClass and cssErrorClass attributes 
are handled by css.ftl.  Your example produces the following broken tag:



It's closer -- but I believe that a change needs to be made in the 
simple/text.ftl template to check for existence of the "cssClass" attribute, or 
determine if it's being called from the css_xhtml theme's text.ftl, in which 
case it could decide not to handle adding the inputError error class (because 
it would know that css.ftl handled the situation).  I plan on extending 
css_xhtml myself to deal with this problem, but was hoping to verify this issue 
with someone else, and get it on the dev team's radar if it's a real problem.

On Dec 13, 2010, at 6:32 PM, Li Ying - liying.cn.2...@gmail.com wrote:

> I read the source code of [simple/css.ftl],
> it looks like trying to combine [cssClass] and [cssErrorClass].
> 
> So you can try:
> 
> <@s.textfield name="port" value=port key="service.port" maxsize="5"
> cssClass="prop-port"
> cssErrorClass="inputError"
> />
> 
> see if the result is what you want?
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
When a validation error occurs with the css_xhtml theme, the CSS class for a 
form input does not have the correct class attributes, if a "cssClass" has been 
supplied.   Instead of class "inputError" joining the existing "class" which is 
specified by the "cssClass" form tag attribute, two separate class attributes 
are added to the element.  Google Chrome only sees the first CSS class.

AKA:
Given the following struts2 freemarker snippet:

<@s.textfield name="port" value=port key="service.port" maxsize="5" 
cssClass="prop-port" /> 

When a validation error occurs, I end up with a form input element like:



I would expect one single class attribute containing both class values 
separated by a space, like  class="prop-port inputError"
I'm using Struts 2.2.1.  I do see code meant to handle this in simple/css.ftl, 
but I'm not sure why that isn't being used.
Instead, I seem to be getting the code from simple/text.ftl, which blindly adds 
a "class" attribute without checking about errors.

Does anyone have any suggestions?

-Roland

Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread struts . rgm
I have an action and freemarker result that includes an external Javascript 
file.  This javascript files needs to be able to use the getText() method.  I 
figured I'd name it "util.js.ftl" so that accessing it directly caused the 
sitemesh-freemarker filter to catch it, but this throws a NullPointerException 
(maybe because there's no ActionContext?):

GET /myservlet/util.js.ftl
java.lang.NullPointerException

org.apache.struts2.sitemesh.FreemarkerDecoratorServlet.process(FreemarkerDecoratorServlet.java:176)

org.apache.struts2.sitemesh.FreemarkerDecoratorServlet.doGet(FreemarkerDecoratorServlet.java:130)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:85)

com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)

com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:82)
rss.web.filter.SkinFilter.doFilter(SkinFilter.java:98)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
The action is simple and just returns SUCCESS.


index.ftl


Is there a recommended way for a result template to load external files such 
that they are separate GET requests from the browser, but are still parsed 
through the Sitemesh-Freemarker filters and servlets, with access to the value 
stack?  If I simply <#include "*/util.js.ftl" /> then the content is inlined -- 
this is not what I'm after.

I am using Struts 2.2.1 with Sitemesh+Freemarker Decorators as described on the 
sitemesh-plugin.html doc in the "Full Integration" section.

Sincerely,
Roland

export to excel - displaytag

2010-10-25 Thread Struts User
Hi all,

I am trying to export data to excel using diplaytag. I am able to save the
excel file but the file is empty. Any help is greatly appreciated.
I am setting the export filter and display-tag properties as below.

*web.xml:*


ResponseOverrideFilter

org.displaytag.filter.ResponseOverrideFilter



ResponseOverrideFilter
*.do


ResponseOverrideFilter
*.jsp


*displaytag.properties*

#sort.behavior=list
#sort.amount=list
basic.empty.showtable=true
basic.msg.empty_list=Query returned no results.
basic.msg.empty_list_row= Query returned no
results.
#paging.banner.placement=top
#paging.banner.onepage=
export.types=csv excel xml pdf rtf
export.excel=true
export.csv=true
export.xml=true
export.pdf=true
export.rtf=true
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
export.pdf.class=org.displaytag.export.DefaultPdfExportView
export.rtf.class=org.displaytag.export.DefaultRtfExportView
# if set, file is downloaded instead of opened in the browser window
export.excel.filename=logging_report.xls
export.excel.include_header=true

*Table.jsp*




 











Thanks.


Re: AW: [S2] trim textfield

2010-09-15 Thread mailtolouis2020-struts
Thanks!





From: Adrian Ost 
To: Struts Users Mailing List 
Sent: Tue, September 14, 2010 4:26:55 PM
Subject: AW: [S2] trim textfield

This one worked for me.

public class StringTrimInterceptor extends AbstractInterceptor {

/* (non-Javadoc)
 * @see 
com.opensymphony.xwork2.interceptor.AbstractInterceptor#intercept(com.opensymphony.xwork2.ActionInvocation)

 */
@Override
public String intercept(ActionInvocation pActionInvocation) throws 
Exception 
{
// trim params
Map params = pActionInvocation.getInvocationContext().getParameters();  
  

for (Object o : params.entrySet()) {
Entry e = (Entry) o;
if (e.getValue() instanceof String[]) {
String[] values = (String[]) e.getValue();
List newvalues = new ArrayList(); 
for (String string : values) {
newvalues.add(string.trim());
}
e.setValue(newvalues.toArray(new String[newvalues.size()]));
}
}
pActionInvocation.getInvocationContext().setParameters(params);
return pActionInvocation.invoke();
}
}




-- 
---
Adrian Ost
Applikations-Entwickler


Tel.:

+49 89 322986 591

Fax:

+49 89 322986 570

Mobile: 

+49 172 8389 591

E-Mail: 

adrian@mindmatics.de


---



www.mindmatics.com
www.mopay.com
www.clanmo.com

MindMatics AG, Marcel-Breuer-Str. 18
80807 Muenchen, Germany
---

The contents of this e-mail are confidential.
If you received this e-mail in error, please
notify us immediately and delete the e-mail.

Ust-IdNr. DE211603599
Registergericht München: HRB 131369
Vorstand: Ingo Lippert (Vorsitzender), Christian Hinrichs, Armin Barbalata
Aufsichtsratsvorsitzender: Olav Ostin
---



> -Ursprüngliche Nachricht-
> Von: mailtolouis2020-str...@yahoo.com 
> [mailto:mailtolouis2020-str...@yahoo.com] 
> Gesendet: Dienstag, 14. September 2010 17:20
> An: Struts Users Mailing List
> Betreff: Re: [S2] trim textfield
> 
> Hi Dave,
> 
> Hope u can commit it when u free, it quite useful though 
> 
> 
> 
> 
> ________
> From: Dave Newton 
> To: Struts Users Mailing List 
> Sent: Tue, September 14, 2010 3:55:03 PM
> Subject: Re: [S2] trim textfield
> 
> Not by default. I'd probably just write an interceptor with 
> optional "excludes"... I had one I was going to commit but 
> never did then I was busy for a year.
> 
> On Tue, Sep 14, 2010 at 10:50 AM,  
>  wrote:
> > Hi,
> >
> > In struts2 is there anyway to set to trim the value in textfield or 
> > textarea when it set to action/model?
> >
> > Regards
> > LV
> >
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


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

Re: [S2] trim textfield

2010-09-14 Thread mailtolouis2020-struts
Hi Dave,

Hope u can commit it when u free, it quite useful though 





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Tue, September 14, 2010 3:55:03 PM
Subject: Re: [S2] trim textfield

Not by default. I'd probably just write an interceptor with optional
"excludes"... I had one I was going to commit but never did then I was
busy for a year.

On Tue, Sep 14, 2010 at 10:50 AM,   wrote:
> Hi,
>
> In struts2 is there anyway to set to trim the value in textfield or textarea
> when it set to action/model?
>
> Regards
> LV
>

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

[S2] trim textfield

2010-09-14 Thread mailtolouis2020-struts
Hi,

In struts2 is there anyway to set to trim the value in textfield or textarea 
when it set to action/model?

Regards
LV


redirect with parameter in struts

2010-08-23 Thread Struts User
Hi,

Is it possible in struts1 to include a parameter in the action redirection.
If I have a web application say, http://www..xyz.com/welcome.do and I want
to redirect it to http://www.xyz.com/welcomeredirect.do?cmp=company1 while
value of "cmp" will be assigned dynamically. how can I achieve this? Any
help or suggestion is greatly appreciated.

Thanks


[S2] warning message

2010-08-20 Thread mailtolouis2020-struts
Hi,

When using  I got this warning message in the log
WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:60 - Error setting 
expression 'struts.token' with value '[Ljava.lang.String;@16b8a16c'

WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:60 - Error setting 
expression 'struts.token.name' with value '[Ljava.lang.String;@45e5a9b3'

How can I avoid that?


Regards
Louis


Re: [S2] 2.2.1 Appended .xhml to back of the url

2010-08-17 Thread mailtolouis2020-struts
Hi,

Thanks, yes look like it work. But this cause  other problem on rest now.
For e.g, I call a rest controller like this /user-controller/ABC.json, it will 
set "ABC.json"  to the rest controller instead of "ABC"

Any clue?

Regards
LV







From: Dave Newton 
To: Struts Users Mailing List 
Cc: lukasz.len...@gmail.com
Sent: Tue, August 17, 2010 11:23:34 AM
Subject: Re: [S2] 2.2.1 Appended .xhml to back of the url

Okay, so extrapolate, and try setting it to an empty string.

On Tue, Aug 17, 2010 at 6:20 AM,  wrote:

> Hi,
>
> This solution not work for me, because it now append .action to back
> instead of
> xhtml. This causing all my spring security filter not work.
>
> Regards
> LV
>
>
>
>
> ________
> From: Lukasz Lenart 
> To: Struts Users Mailing List 
> Sent: Tue, August 17, 2010 10:41:19 AM
> Subject: Re: [S2] 2.2.1 Appended .xhml to back of the url
>
> Did you try to define
> struts.action.extension=action,,
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Kapituła Javarsovia 2010 http://javarsovia.pl
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>


Re: [S2] 2.2.1 Appended .xhml to back of the url

2010-08-17 Thread mailtolouis2020-struts
Hi,

This solution not work for me, because it now append .action to back instead of 
xhtml. This causing all my spring security filter not work.

Regards
LV





From: Lukasz Lenart 
To: Struts Users Mailing List 
Sent: Tue, August 17, 2010 10:41:19 AM
Subject: Re: [S2] 2.2.1 Appended .xhml to back of the url

Did you try to define
struts.action.extension=action,,


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl

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

Re: [S2] 2.2.1 Appended .xhml to back of the url

2010-08-17 Thread mailtolouis2020-struts
Hi,

Here is the constant I define in struts.xml






  



In struts.xml I also have some global result/exception defined, and some 
default 
package define.

Regards
Louis





From: Lukasz Lenart 
To: Struts Users Mailing List 
Sent: Tue, August 17, 2010 10:30:02 AM
Subject: Re: [S2] 2.2.1 Appended .xhml to back of the url

2010/8/17  :
> After upgrade to 2.2.1, struts appended .xhtml to the url, is there anyway to
> turn it off like what 2.1.8.1 was?

What you have in struts.properties or/and in struts.xml ?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl

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

[S2] 2.2.1 Appended .xhml to back of the url

2010-08-17 Thread mailtolouis2020-struts
Hi,

After upgrade to 2.2.1, struts appended .xhtml to the url, is there anyway to 
turn it off like what 2.1.8.1 was?  


Thanks
LV


Re: [ANN] Struts 2.2.1 GA release available

2010-08-17 Thread mailtolouis2020-struts
The struts-2.2.1-src.zip source link is wrong







From: Lukasz Lenart 
To: Struts Users Mailing List ; em...@encs.concordia.ca
Sent: Mon, August 16, 2010 8:12:01 PM
Subject: Re: [ANN] Struts 2.2.1 GA release available

2010/8/16 Emi Lu :
> Cannot find the file:
>
> http://apache.parentinginformed.com/struts/binaries/struts-2.2.1-all.zip
>
> Not Found
>
> The requested URL /struts/binaries/struts-2.2.1-all.zip was not found on
> this server.

A tiny mistake, should be
http://apache.parentinginformed.com/struts/binaries/struts2-2.2.1-all.zip


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl

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

[S2] validation short-circuit

2010-08-11 Thread mailtolouis2020-struts
Hi,

In the validation, short-circuit is for when the validation failed, the 
following not get rules not get evaluate.

Is there anything similar like this, but when one field validation pass, the 
rest no need to get evaluate?

Regards
LV


Re: Mix SpringMVC 3.0 with Struts2

2010-07-30 Thread Struts Two
And why do you want to mix Struts 2 with Spring 3.0MVC? It is understandable if 
you want to use Spring DI with struts 2, however; if you already have Spring 
3MVC, I think you should stick to it.




- Original Message 
From: Frans Thamura 
To: Struts Users Mailing List 
Sent: Thu, July 29, 2010 6:49:31 PM
Subject: Mix SpringMVC 3.0 with Struts2

hi all

I try to mix Struts2 2.2.1 with SpringMVC 3.0

i got a Validator error when ass Struts2, but if i remove struts2, the code
work well

i believe there is a problem with the validation

any tips for the exclude ? i see that struts2 using spring 2.5.6, this is my
exclusions

am i put in the wrong depedency? if yes, where i must put it, or ...



   org.apache.struts
   struts2-spring-plugin
   2.2.1
   
   
org.springframework
spring


org.springframework
spring-core


   



-- 
Frans Thamura
Meruvian.

We grow because we share the same believe.

Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info

We provide services to migrate your apps to Java (web), in amazing fast and
reliable.




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



Struts2 + REST - how to include/exclude properties of the model

2010-07-26 Thread mailtolouis2020-struts
Hi,

I know in json result type we can configure something like this

  
 
total,
 page,
records,
gridData.*,
userdata.*
  


Can we do the same in rest controller using annotation?

Re: REST URLs

2010-07-26 Thread mailtolouis2020-struts
Thanks Kevin




From: Kevin Jones 
To: Struts Users Mailing List 
Sent: Mon, July 26, 2010 3:05:30 PM
Subject: Re: REST URLs

I've heard back from Jeromy Evans. He's happy for me to post the code.
Unfortunately it may not be until the weekend as I'm on the road at
the moment,

Kevin

On 26 July 2010 14:11, Kevin Jones  wrote:
> There is a cached copy of the site here
>
>http://webcache.googleusercontent.com/search?q=cache:http://www.blueskyminds.com.au/url-hierarchy/
>/
> (you'll need to follow cached copies of the other links as well)
>
> I've sent Jeromy Evans an email asking if it's OK to post his code.
> If/when he replies I'll put it somewhere where it can be downloaded,
>
> Kevin
>
> On 26 July 2010 12:36, Arun Kumar Boppudi  wrote:
>> http://www.blueskyminds.com.au/url-hierarchy/ is not available.
>> -- AB
>>
>>
>> On Mon, Jul 26, 2010 at 4:30 PM, Kevin Jones  wrote:
>>
>>> Yes it is.
>>>
>>> Look at the REST plugin but then you'll need some more processing.
>>>
>>> Jeromy Evans (who was/is a Struts commiter) posted an example a while ago.
>>>
>>> Look at this thread here
>>> http://www.mail-archive.com/iss...@struts.apache.org/msg12194.html
>>>
>>> The example is supposed to be at:
>>> http://www.blueskyminds.com.au/url-hierarchy/
>>> but the link is broken at the moment.
>>>
>>> I've used the code as an example and it all seems to work.
>>>
>>> Ping me if you can't get the code and I can send it to you (it's
>>> licensed under the Apache license so it's OK to share),
>>>
>>> Kevin Jones
>>>
>>> On 26 July 2010 09:00, Arun Kumar Boppudi 
>>> wrote:
>>> > Is there anyway we can use /client/{clientId}/business/{businessId} kind
>>> of
>>> > URLs in Struts 2.0?
>>> >
>>> > -- AB
>>> >
>>>
>>>
>>>
>>> --
>>> Kevin
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>
>
>
> --
> Kevin
>



-- 
Kevin

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

Accessing scoped variables via tags

2010-07-14 Thread mailtolouis2020-struts
Hi,

In this document 
https://cwiki.apache.org/WW/application-session-request-objects-in-jsp.html





That is not work

But


and this



are work.

I think the doc need to update.

Re: [S2] post JSON to REST

2010-07-12 Thread mailtolouis2020-struts
Hi,

Ok, I found my problem, I was using restTemplate to do the post, and it set the 
content type to application/json;charset=UTF-8, so now my question is how to 
configure rest-plugin to accept application/json;charset=UTF-8 and handle by 
json lib?

Regards
LV






From: Frans Thamura 
To: Struts Users Mailing List 
Sent: Mon, July 12, 2010 3:51:49 PM
Subject: Re: [S2] post JSON to REST

We use http post

But dunno how to send via json rpc
(m)

-Original Message-
From: mailtolouis2020-str...@yahoo.com
Date: Mon, 12 Jul 2010 07:29:53 
To: Struts Users Mailing List
Reply-To: "Struts Users Mailing List" 
Subject: [S2] post JSON to REST



Hi,



Sorry if this is double posted, because I didn't receive the mail which I post.

I'm new to the struts2 rest plugin, I hope someone can help me.

I'm trying to post a json data to a UserController, I can see create method is 
invoked, but the json data is not set to the UserController.

Here is the json data:
{"user":{"userName":"TestUser","userEmail":"testu...@yahoo.com"}}

In my UserController, I've defined these getter/setter

public void setModel(UserBean bean)
public UserBean getModel()
public void setUser(UserBean bean)
public UserBean getUser()
public void  setUserName(String name)
public String getUserName()
public void setUserEmail(String email)
public String getUserEmail()

>From the log, I can c getModel(), validate(), create() are called, but no one 
setting anything to the controller.

Do I need to do extra thing to receive the json data?

The GET is working fine when I want to get some data from the UserController.

I've been searching the net pass 2 days, unfortunately most info are about GET, 
not POST or PUT.

I hope your guys can help me.

THanks
LV


[S2] post JSON to REST

2010-07-12 Thread mailtolouis2020-struts


Hi,



Sorry if this is double posted, because I didn't receive the mail which I post.

I'm new to the struts2 rest plugin, I hope someone can help me.

I'm trying to post a json data to a UserController, I can see create method is 
invoked, but the json data is not set to the UserController.

Here is the json data:
{"user":{"userName":"TestUser","userEmail":"testu...@yahoo.com"}}

In my UserController, I've defined these getter/setter

public void setModel(UserBean bean)
public UserBean getModel()
public void setUser(UserBean bean)
public UserBean getUser()
public void  setUserName(String name)
public String getUserName()
public void setUserEmail(String email)
public String getUserEmail()

>From the log, I can c getModel(), validate(), create() are called, but no one 
setting anything to the controller.

Do I need to do extra thing to receive the json data?

The GET is working fine when I want to get some data from the UserController.

I've been searching the net pass 2 days, unfortunately most info are about GET, 
not POST or PUT.

I hope your guys can help me.

THanks
LV

Re: Struts time picker does not render in IE7/IE8

2010-06-29 Thread Struts Two
What is meant is do not use "struts dojo plugin". However, you can use dojo 
framework (which is a great framework) with struts 2



- Original Message 
From: Dale Newfield 
To: Struts Users Mailing List 
Cc: john.vargh...@smartonline.com
Sent: Tue, June 29, 2010 10:36:08 AM
Subject: Re: Struts time picker does not render in IE7/IE8

On 6/29/10 9:03 AM, john.vargh...@smartonline.com wrote:
> Hi friendsany suggesstions?

My suggestion is "don't use dojo".

-Dale

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



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



Re: Upgrade from 1.2 to 1.3x

2010-05-25 Thread Struts Two
Look at the following page for migration from 1.2 to 1.3:

http://wiki.apache.org/struts/StrutsUpgradeNotes12to13



- Original Message 
From: Søren Blidorf 
To: struts-u...@jakarta.apache.org
Sent: Tue, May 25, 2010 6:23:51 AM
Subject: Upgrade from 1.2 to 1.3x

Hi.



I am upgrading my struts app to 1.3.10 from 1.2



In my web.xml I have configured taglib like this:



  

/WEB-INF/struts-bean.tld

/WEB-INF/struts-bean.tld

  

  

/WEB-INF/struts-html.tld

/WEB-INF/struts-html.tld

  

  

/WEB-INF/struts-logic.tld

/WEB-INF/struts-logic.tld

  

  

/WEB-INF/struts-tiles.tld

/WEB-INF/struts-tiles.tld

  

  

/WEB-INF/struts-nested.tld

/WEB-INF/struts-nested.tld

  



Is that still ok to do? From the struts Wiki it looks like I have to refer
directly to http://struts.apache.org/tags-bean



Soren, DK



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



Re: Websphere/Struts issue with form based authentication

2010-05-15 Thread Struts Two
The problem should be due to the fact struts two breaks Servelt 2.4 spec by 
using a filter to access resources as opposed to servlet.

I had a similar issue. Search for posting with title

There is no Action mapped for namespace / and action name j_security_check

I think I should have mentioned the solution there when you use form-based 
authentication.

--- On Fri, 5/14/10, Jesse Hill  wrote:

> From: Jesse Hill 
> Subject: Websphere/Struts issue with form based authentication
> To: user@struts.apache.org
> Received: Friday, May 14, 2010, 6:59 PM
> Hello everyone,
> 
> I have a struts2 app (2.0.14) running on Websphere (version
> 6.1.x and 7.x) and when I try to access a struts action that
> is protected by Websphere security constraints and form
> based authentication, I get the following messages in the
> log:
> 
> [5/14/10 14:34:14:169 EDT] 0092 SRTServletRes
> W   WARNING: Cannot set status. Response
> already committed.
> [5/14/10 14:34:14:185 EDT] 0092 SRTServletRes
> W   WARNING: Cannot set header. Response
> already committed.
> 
> This is perhaps similar to the problem in:
> http://www.mail-archive.com/user@struts.apache.org/msg68306.html
> 
> But the solutions presented there do not resolve this
> issue. I have the invokefilterscompatibility variable set
> correctly and am running with the patches.
> 
> I can access protected static files without seeing the log
> messages - it only occurs when I invoke a protected struts
> action. So /myapp/static.html will redirect to the login
> page without the log messages, but /myapp/struts.action
> causes the errors to print as part of the redirect.
> 
> Any ideas?
> 
> Thanks very much,
> Jesse
> 
> 
> 
>       
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



RE: Struts2 on Websphere portal 6.1.0.0

2010-04-22 Thread Struts Two
Set the the following properties in custom properties of your Websphere 
application server

com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true
com.ibm.ws.webcontainer.invokefilterscompatibility = true



--- On Thu, 4/22/10, Prabahar  wrote:

> From: Prabahar 
> Subject: RE: Struts2 on Websphere portal 6.1.0.0
> To: user@struts.apache.org
> Received: Thursday, April 22, 2010, 7:24 AM
> 
> Please find the attached error log...
> http://old.nabble.com/file/p28325070/DisplayTag.txt
> DisplayTag.txt 
> -- 
> View this message in context: 
> http://old.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-tp18761735p28325070.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 



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



RE: Struts2 on Websphere portal 6.1.0.0

2010-04-19 Thread Struts Two
When you run struts 2 on Websphere 6.1, there are a few properties you need to 
add to your Server custom properties. Without these properties set, you will 
not be able to run struts2. IBM portal server is bacisally and enterprise file 
that runs on Websphere application server, and I think you need to set those 
properties.

--- On Mon, 4/19/10, Griffith, Michael *  wrote:

> From: Griffith, Michael * 
> Subject: RE: Struts2 on Websphere portal 6.1.0.0
> To: "Struts Users Mailing List" 
> Received: Monday, April 19, 2010, 2:59 PM
> The problem is the URI parameter in
> your display tag table. This is how
> DT invokes the action/HTTP request that originally got the
> request for
> the table in the table. It should be something like:
> requestURI="search.action" where the value is the action of
> the page.
> 
> MG
> 
> -Original Message-
> From: Prabahar [mailto:prabahar.durais...@lntinfotech.com]
> 
> Sent: Monday, April 19, 2010 3:17 AM
> To: user@struts.apache.org
> Subject: Re: Struts2 on Websphere portal 6.1.0.0
> 
> 
> I am facing an issue with Struts 2 portlet which uses
> Display Tag. I
> have implemented a code to display a list using Display
> Table and also
> implemented Sorting option. It is working fine with IBM WAS
> 7.0 and the
> same code is not working with IBM Portal Server 6.1
> 
> It is displaying the data, but when i click on the
> pagination link
> (First, Last, Next..) and the column header (to sort) then
> i am getting
> page can not be found.
> 
> I have even mentioned page cotext, but still i am facing
> this issue. I
> have also added the display tag portlet support jar
> (displaytag-portlet-1.2.jar) along with displaytag-1.2.jar
> and its
> supporting jars.
> 
>  sort="list"
> defaultsort="2"
> pagesize="2" requestURI="">
>          sortable="true"
> property="name">
>          property="address">
>     
> 
> I have a doubt in the requestURI parameter... what exactly
> i should give
> to that parameter. I have also used requestURIContext as
> well, but no
> improvement.
> 
> 
> 
> Nils-Helge Garli wrote:
> > 
> > Thanks for the summary, although I disagree with your
> conclusion ;)
> > 
> > Nils-H
> > 
> > On Fri, Aug 1, 2008 at 2:21 AM, Struts Two 
> wrote:
> >> I am running Struts2.0.11.1 on Websphere 6.1.0.17
> NOT THE WEBSPHERE 
> >> PORTAL. You need to keep the followings in mind:
> >> 1- You need to have at least fixpack 13 or 15 ( I
> am not sure which 
> >> one, otherwise you CAN NOT RUN STRUTS 2 ON WAS)
> >> 2- Struts 2.0.11.2 has problems running on
> Websphere 6.1 (it is 
> >> missing a patch), so you need to downgrade to
> 2.0.11.1 till next 
> >> release (2.0.11.3 or 2.0.12)
> >> 3- Once the above you are done with above steps,
> you need to set the 
> >> following custom property for WAS server:
> >>
> com.ibm.ws.webcontainer.invokefilterscompatibility   = 
> true
> >> If you do not set the above property, you can not
> run struts 2 on WAS
> 
> >> as well.
> >> However; I did a project using struts on Websphere
> portal 6.0. IBM 
> >> provides its own customized struts that works with
> portal (which is 
> >> based on struts1), and it is pretty good. I
> recommend use the IBM's 
> >> struts that comes with Portal server as you would
> have a hard time 
> >> using struts 2 with websphere portal.
> >> Hope this helps,
> >>
> >>
> >>
> >> - Original Message 
> >> From: Dinesh Narayanan 
> >> To: user@struts.apache.org
> >> Sent: Thursday, July 31, 2008 3:26:20 PM
> >> Subject: Struts2 on Websphere portal 6.1.0.0
> >>
> >> Has Anybody tried Struts2 (Struts-2.0.11.2) on
> Websphere portal
> 6.1.0..0? 
> >> I
> >> am running into issues when I tried  a very
> simple JSR168 example.  
> >> Any help would be appreciated. Is there some
> example of struts2 
> >> sample in websphere portal 6.1?
> >>
> >> A) My portlet.xml contains the following entries
> 
> >>         
>    viewNamespace
> >>         
>    /view
> >>     
>    
> >>
> >>   
> >>   
> >>         
>    defaultViewAction
> >>         
>    index
> >>   
> >>
> >>
> >> B) My struts.xml is
> >> 
> >>  extends="struts-portlet-default"
> namespace="/view&qu

STRUTS2 + REST + SPRING Problem

2010-04-13 Thread mailtolouis2020-struts
Hi All,
 
Our requirement is use to use STRUTS + REST + SPRING.
 
We are stuck with the below problem:
 
Rest controllers are not able to autowire the spring beans. So i am not able to 
inject the spring beans to the rest controllers that are created using 
convention plugin.
 
1) We configured the struts configuration as below:
 

<
bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="myMapper" 
class="com.xxx.mapper.Struts2RestMapper" />










2) Struts2RestMapper is a custom ActionMapper to invoke the struts mapper or 
Rest mapper based on the request url. This is working fine however, rest 
controller is not working correctly due to failed dependencies.
 
3) Rest controller is pasted below.

@Results
({

@Result(name="success", type="redirectAction", params = {"actionName" , 
"userrest"})

})

public
class UserrestController extends ValidationAwareSupport implements 
ModelDriven, Validateable {

private UserDetails user = null;

private String userSignInId;

@Autowired

private UserDetailsService userService;

public void validate() {

//if (user.getClientName() == null || model.getClientName().length() ==0) {

// addFieldError("clientName", "The client name is empty");

//}

System.
out.println("validate Method invoked");

}

// GET /userrest

public HttpHeaders index() {

//list = messagesService.getAll();

System.
out.println("Index method invoked");

return new DefaultHttpHeaders("index").disableCaching();

}

public Object getModel() {

return user;

}

// GET /userrest/1

public HttpHeaders show() {

System.
out.println("show Method invoked");

return new DefaultHttpHeaders("show");

}

public void setId(String id) {

System.
out.println("setID Method invoked");

if (id != null) {

this.user = userService.loadUserByUsername(id);

}

this.userSignInId = id;

}

}

Please can some one guide me on how to get the rest controller to pick the 
spring beans (ie., userService in the above example) correctly.

Kind Regards

LV

Re: Websphere 6.1 and Struts 1.3

2010-04-05 Thread Struts Two
I am running 1.3.10 on WAS 6.1 with no issues. Have installed the latest 
Websphere fixpacks and test.

However; if you struts version is 1.1 or 1.2, you may need to add the following 
property:

prependSlashToResource = true

to custom properties of your server.

--- On Mon, 4/5/10, Darshan Shroff  wrote:

> From: Darshan Shroff 
> Subject: Re: Websphere 6.1 and Struts 1.3
> To: user@struts.apache.org
> Received: Monday, April 5, 2010, 9:35 AM
> 
> Hi, 
> 
> I am facing a similar issue. Any update on this. ?
> 
> Regards,
> Darshan Shroff
> shroffdars...@gmail.com
> 
> 
> newton.dave wrote:
> > 
> > IIRC it's not necessary to use the extension when
> defining actions. That'd
> > actually kind of defeat one of the purposes of having
> a definable
> > extension.
> > 
> > 
> > --- On Tue, 6/10/08, Martin 
> wrote:
> > 
> >> From: Martin 
> >> Subject: Re: Websphere 6.1 and Struts 1.3
> >> To: "Struts Users Mailing List" 
> >> Date: Tuesday, June 10, 2008, 1:53 PM
> >> struts-config.xml
> >> 
> >> 
> >>         
>    
> >>         
>    
> >>      
> >>    >> type="com.schpro.action.AdminAction">
> >>        name="configure"
> >> path="/jsp/admin.jsp" />
> >>        name="projectsearch"
> >> path="/projectsearch.do" />
> >>     
> >> 
> >> you have admin defined as path instead of
> >> 'admin.do'
> >> 
> >> Martin
> >>   - Original Message - 
> >>   From: Sury Balasubramanian 
> >>   To: user@struts.apache.org
> 
> >>   Sent: Tuesday, June 10, 2008 1:30
> PM
> >>   Subject: Websphere 6.1 and Struts
> 1.3
> >> 
> >> 
> >>   Hello all,
> >>   I am having an issue with a
> webapp developed on struts
> >> 1.3 on Websphere 6.1.07 (running on AIX). The
> webapp when
> >> compiled, tested and run on Windows (websphere
> 6.1.015)
> >> works fine. The problem is as follows. The
> application
> >> installs properly. If i login and directly access
> a JSP i
> >> don't have an issue at all. If I use a url
> >>   http://:/sp/admin.do 
> (struts
> >> url). Users get the following error:
> >> 
> >>   "Error 404: Parsing error
> processing resource path
> >> /WEB-INF/struts-config.xml" 
> >> 
> >>   The following files are
> attached:
> >> 
> >>   web.xml
> >>   struts-config.xml
> >>   trace on websphere when the
> struts request is sent
> >> 
> >> 
> >>   The following were already
> checked:
> >>   struts.xml is referred to with a
> leading slash
> >> /WEB-INF/struts.xml in the web.xml as prescried by
> IBM.
> >>   the server property of leading
> slash is also set to make
> >> sure we read the leading slash. 
> >> 
> >> 
> >>   Is this a good place to post this
> or on the websphere
> >> forum? Is there something missing on the
> config.xml that
> >> websphere specifically validates? 
> >> 
> >>   Thanks
> >> 
> >>   Sury
> >> 
> >> 
> >> 
> >>
> --
> >> 
> >> 
> >>  
> >>
> -
> >>   To unsubscribe, e-mail:
> >> user-unsubscr...@struts.apache.org
> >>   For additional commands, e-mail:
> >> user-h...@struts.apache.org
> > 
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Websphere-6.1-and-Struts-1.3-tp17760714p28138386.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/

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



Re: Struts 2 - Global Validation

2010-02-04 Thread mailtolouis2020-struts
Hi,

I've similar problem with you and posted the similar question just not long 
ago, but still not found any solution yet.

Look like struts2 not supporting this feature anymore :(

Pls let me know if you find any solution. Thanks.

LV





From: Arulmani V A 
To: Struts Users Mailing List 
Sent: Wed, February 3, 2010 8:27:27 PM
Subject: Struts 2 - Global Validation

Hi, 

Any idea how to do global validation in Struts 2 ?

For example, in Struts 1, I can define all global regular expression 
validations in a file called validation-regexpr.xml such as :




http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>




alpha
[A-Za-z]*




The above global regular expressions can be reused in other validation files as 
follows : 



http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>








mask
${alpha}







I could not get information on how to do this in Struts 2, no luck with the 
Struts2 e-books also. Any help in this regard will be greatly appreciated 

Regards
Arul




  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/

Re: [S2] Validation - globally define regex

2010-01-22 Thread mailtolouis2020-struts
Hi,

Could someone tell me does struts2 support it?

Regards
LV





From: "mailtolouis2020-str...@yahoo.com" 
To: Struts Users Mailing List 
Sent: Thu, January 21, 2010 12:24:13 PM
Subject: [S2] Validation - globally define regex

Hello,

In struts 1, I can define the regex in one file like this


alphaNumeric
[A-Za-z0-9]*


and use like this in

mask
${alphaNumeric}



Could anyone tell me how to achieve this in Struts 2 ?

I've this in validation rule and I want to put the regex in another variable, I 
tried used  tag, but it not accept < >.






  
   
  
  
 


Thanks
LV

[S2] Validation - globally define regex

2010-01-21 Thread mailtolouis2020-struts
Hello,

In struts 1, I can define the regex in one file like this


alphaNumeric
[A-Za-z0-9]*


and use like this in

mask
${alphaNumeric}



Could anyone tell me how to achieve this in Struts 2 ?

I've this in validation rule and I want to put the regex in another variable, I 
tried used  tag, but it not accept < >.






  
   

Re: [S2] Does global exception mapping work with interceptor?

2010-01-13 Thread mailtolouis2020-struts
Thanks Gabriel, it is working now!




From: Gabriel Belingueres 
To: Struts Users Mailing List 
Sent: Tue, January 12, 2010 7:06:59 PM
Subject: Re: [S2] Does global exception mapping work with interceptor?

Is your custom interceptor _before_ the exception interceptor in your
interceptor stack? If that's the case, then the exception interceptor
is not "catching" exceptions from your interceptor because it executes
after.

2010/1/12  :
> Hello,
>
> I've defined a global exception mapping and global result, when Exception 
> happen it will go to my custom error page. It work fine in Action if Action 
> throw any exception. But if my interceptor throw exception, it won't go to my 
> error page.
>
> Is there anyway to make it work?
>
> Thanks
> LV

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

[S2] Does global exception mapping work with interceptor?

2010-01-12 Thread mailtolouis2020-struts
Hello,

I've defined a global exception mapping and global result, when Exception 
happen it will go to my custom error page. It work fine in Action if Action 
throw any exception. But if my interceptor throw exception, it won't go to my 
error page.

Is there anyway to make it work? 

Thanks
LV

Re: drop down list auto suggest feature using Struts1.1/JSP/Javascript

2010-01-11 Thread Struts Two
You can also use Dojo with Struts 1. I am currently using dojo 1.3.2 with 
struts 1.3.10 with no issues whatsoever.

--- On Mon, 1/11/10, Paul Benedict  wrote:

> From: Paul Benedict 
> Subject: Re: drop down list auto suggest feature using 
> Struts1.1/JSP/Javascript
> To: "Struts Users Mailing List" 
> Received: Monday, January 11, 2010, 2:35 AM
> Look into Java Web Parts. It's an
> ajax framework that's compatible
> with Struts 1.
> 
> On Sun, Jan 10, 2010 at 8:21 AM, sri2003 
> wrote:
> >
> > Hi,
> >
> > Need to have a drop down list with populated values;
> but when the user wants
> > to select a value, he can either type in the first few
> letters or select it
> > from the drop down list with the mouse or both.
> >
> > example: a drop down list has 10 values. the user
> > clicks on the drop down and it allows him to type in
> the box or select the
> > value from the drop down, but if he type "A" it will
> just to all the values
> > starting with "A" and if he continues to type "Al" it
> will further goto all
> > the values that start with "Al" e.g. "Alex" and
> "Albert".
> >
> > How do i go about doing this using
> Struts1.1/JSP/Javascript?
> >
> > Any sample code/example would be great.
> >
> > Thanks in advance
> > --
> > View this message in context: 
> > http://old.nabble.com/drop-down-list-auto-suggest-feature-using-Struts1.1-JSP-Javascript-tp27098731p27098731.html
> > Sent from the Struts - User mailing list archive at
> Nabble.com.
> >
> >
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php

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



Re: Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Thanks Paul, What I mean is not exaclty one session per user rather
preventing or detecting the session which is getting copied when any one
does CTRL+N or in IE7 opens application new TAB. 
In above said cases session remains to be same however session data is
replaced with the recentely logged in user's data. 
This creates problem when employee logs in one window and same employee
tries to log as admin in CTRL+Ned window as admin which will result in
employee session data being replaced by admin data



-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964689.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Hi All - Is there any way in Struts2 to handle session sharing across
browsers.
My problem: 
User logs in -> session created, user does CTRL+N and opens child window 
now he logs in as admin-> session created (it does not create new session)
and now parent window has the admin session, and session data is of admin.
This problem is seen only when browser windows are opened by CTRL+N.

Please suggest 
-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964416.html
Sent from the Struts - User mailing list archive at Nabble.com.


Re: [S2] can't use ENUM type

2009-12-23 Thread mailtolouis2020-struts
Hi,

Thanks,my getComboBox accepting ComboBoxType, and I use 
@package.path.comboboxt...@sex is working fine now.

Regards
LV




From: Steven Yang 
To: Struts Users Mailing List 
Sent: Wed, December 23, 2009 1:26:48 AM
Subject: Re: [S2]  can't use ENUM type

what does "getComboBox" accepting? an Enum value or Enum array?
if an Enum value then you have to do @{include full package
path}comboboxt...@sex

On Wed, Dec 23, 2009 at 12:15 AM,  wrote:

> Hi,
>
> I got problem to using ENUM type in , here is my code:
>
>name="user.sex"
>   list="getComboBox(ComboBoxType.SEX)"
>   listKey="key"
>   listValue="value"
>   value="user.sex"/>
>
> but if I change to use String (e.g: list="getComboBox('SEX')"),
> and do the conversion in the action then it working fine.
>
> Is it a bug?
>
> Regards
> LV


[S2] can't use ENUM type

2009-12-22 Thread mailtolouis2020-struts
Hi,

I got problem to using ENUM type in , here is my code:



but if I change to use String (e.g: list="getComboBox('SEX')"),
and do the conversion in the action then it working fine.

Is it a bug?

Regards
LV

Re: [Struts 2.1.8] Dojo with Tiles: works or not ?

2009-12-17 Thread Struts Two
I am using struts 2.1.8 with Tiles 2.0.5 and Dojo toolkit 1.3.2 [not struts 
dojo plugin] and I have no problem.

--- On Thu, 12/17/09, Celinio Fernandes  wrote:

> From: Celinio Fernandes 
> Subject: [Struts 2.1.8] Dojo with Tiles: works or not ?
> To: "Struts Users Mailing List" 
> Received: Thursday, December 17, 2009, 2:36 PM
> Hi,
> I already posted a message about my problem, yesterday.
> I followed this example here : 
> http://struts.apache.org/2.1.8.1/docs/struts-2-spring-2-jpa-ajax.html
> It works well.
> However if i put the JSP pages inside Tiles, then it does
> not work.
> What happens is that the page seems to refresh all the time
> and grows exponentially (one page inside another inside
> another etc).
> 
> Is there a know problem with Dojo in combination with Tiles
> ?
> http://www.dojotoolkit.org/tags/tiles
> 
> Not too sure if it's a big issue or just a minor
> modification i need to do in my Tiles template or the JSPs
> to make it work.
> 
> Perhaps some issue with the  Dojo tag ?
> 
> I do not think I need to copy-paste any code for more
> details. The header, footer, menu are very classic.
> Does anyone have any idea ?
> thanks for helping.
> 
> 
> 
>       


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.

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



Re: [S2] i18n not using default bundle

2009-12-11 Thread mailtolouis2020-struts
I think that is not how the resource bundle work, it is better always set the 
value without the language suffix 

resources is just a folder name where I store my properties file. 




From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Fri, December 11, 2009 9:47:15 AM
Subject: Re: [S2] i18n not using default bundle

no need to put resources.

On Fri, Dec 11, 2009 at 2:45 PM, Saeed Iqbal  wrote:

> Why dont you just give it the value global-message_zh_CN
>
>
> On Fri, Dec 11, 2009 at 2:44 PM,  wrote:
>
>> yes, I did have
>> > value="resources.global-message"/>
>>
>> so to make it work, what I do now is in my resources folder, I'll have
>> global-message.properties, global-message_en.properties and
>> global-message_zh_CN.properties (an empty file)
>>
>>
>>
>>
>> 
>> From: Saeed Iqbal 
>> To: Struts Users Mailing List 
>> Sent: Fri, December 11, 2009 5:41:44 AM
>> Subject: Re: [S2] i18n not using default bundle
>>
>> why dont you just use this
>>
>> struts.custom.i18n.resources=package
>>
>> and put your CN file name in there.
>>
>> On Thu, Dec 10, 2009 at 10:31 PM, 
>> wrote:
>>
>> > Thanks.
>> >
>> > That is what I plan to do if that is nothing to do with struts.
>> >
>> > Regards
>> > LV
>> >
>> >
>> >
>> > 
>> > From: Alex Siman 
>> > To: user@struts.apache.org
>> > Sent: Thu, December 10, 2009 4:54:26 PM
>> > Subject: Re: [S2] i18n not using default bundle
>> >
>> >
>> > The trick is simple:
>> > create an empty file:
>> > global-message_zh_CN.properties
>> >
>> > This is not Struts 2 problem, but Java ResourceBundle's.
>> > You can read more here:
>> > http://old.nabble.com/Struts2-%2B--I18N-td24973817.html#a24978732
>> >
>> > mailtolouis2020-str...@yahoo.com wrote:
>> > >
>> > > Hello,
>> > >
>> > > I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.
>> > >
>> > > I got 2 properties in my application:
>> > > global-message.properties(store Chinese Language)
>> > > global-message_en.properties (store English Language)
>> > >
>> > > When I run my application, and set my browser language to Chinese
>> > (zh-CN),
>> > > I expect when there is no global-message_zh_CN.properties file, struts
>> > > should use the default global-message.properties file, but it is not,
>> it
>> > > use global-message_en.properties.
>> > >
>> > > If I remove some key in the global-message_en.properties, then it is
>> look
>> > > for global-message.properties file, that is expected.
>> > >
>> > >
>> > > So could someone tell me is this a bug, or that's the way the design
>> is
>> > or
>> > > some setting I need to do?
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > Regards
>> > > LV
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://old.nabble.com/-S2--i18n-not-using-default-bundle-tp26727458p26730713.html
>> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>>
>>
>>
>> --
>> Saeed Iqbal
>> Independant Consultant
>> J2EE - Application Architect / Developer
>>
>
>
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>
>


-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


Re: [S2] i18n not using default bundle

2009-12-11 Thread mailtolouis2020-struts
yes, I did have 


so to make it work, what I do now is in my resources folder, I'll have 
global-message.properties, global-message_en.properties and 
global-message_zh_CN.properties (an empty file)





From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Fri, December 11, 2009 5:41:44 AM
Subject: Re: [S2] i18n not using default bundle

why dont you just use this

struts.custom.i18n.resources=package

and put your CN file name in there.

On Thu, Dec 10, 2009 at 10:31 PM,  wrote:

> Thanks.
>
> That is what I plan to do if that is nothing to do with struts.
>
> Regards
> LV
>
>
>
> 
> From: Alex Siman 
> To: user@struts.apache.org
> Sent: Thu, December 10, 2009 4:54:26 PM
> Subject: Re: [S2] i18n not using default bundle
>
>
> The trick is simple:
> create an empty file:
> global-message_zh_CN.properties
>
> This is not Struts 2 problem, but Java ResourceBundle's.
> You can read more here:
> http://old.nabble.com/Struts2-%2B--I18N-td24973817.html#a24978732
>
> mailtolouis2020-str...@yahoo.com wrote:
> >
> > Hello,
> >
> > I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.
> >
> > I got 2 properties in my application:
> > global-message.properties(store Chinese Language)
> > global-message_en.properties (store English Language)
> >
> > When I run my application, and set my browser language to Chinese
> (zh-CN),
> > I expect when there is no global-message_zh_CN.properties file, struts
> > should use the default global-message.properties file, but it is not, it
> > use global-message_en.properties.
> >
> > If I remove some key in the global-message_en.properties, then it is look
> > for global-message.properties file, that is expected.
> >
> >
> > So could someone tell me is this a bug, or that's the way the design is
> or
> > some setting I need to do?
> >
> >
> >
> >
> >
> > Regards
> > LV
> >
>
> --
> View this message in context:
> http://old.nabble.com/-S2--i18n-not-using-default-bundle-tp26727458p26730713.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


Re: [S2] i18n not using default bundle

2009-12-10 Thread mailtolouis2020-struts
Thanks.

That is what I plan to do if that is nothing to do with struts.

Regards
LV




From: Alex Siman 
To: user@struts.apache.org
Sent: Thu, December 10, 2009 4:54:26 PM
Subject: Re: [S2] i18n not using default bundle


The trick is simple:
create an empty file:
global-message_zh_CN.properties

This is not Struts 2 problem, but Java ResourceBundle's.
You can read more here: 
http://old.nabble.com/Struts2-%2B--I18N-td24973817.html#a24978732

mailtolouis2020-str...@yahoo.com wrote:
> 
> Hello,
> 
> I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.
> 
> I got 2 properties in my application:
> global-message.properties(store Chinese Language)
> global-message_en.properties (store English Language)
> 
> When I run my application, and set my browser language to Chinese (zh-CN),
> I expect when there is no global-message_zh_CN.properties file, struts
> should use the default global-message.properties file, but it is not, it
> use global-message_en.properties.
> 
> If I remove some key in the global-message_en.properties, then it is look
> for global-message.properties file, that is expected.
> 
> 
> So could someone tell me is this a bug, or that's the way the design is or
> some setting I need to do?
> 
> 
> 
> 
> 
> Regards
> LV
> 

-- 
View this message in context: 
http://old.nabble.com/-S2--i18n-not-using-default-bundle-tp26727458p26730713.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Re: [S2] i18n not using default bundle

2009-12-10 Thread mailtolouis2020-struts
Hi,

I tried both, move up and remove just leave Chinese Language there, both still 
the same, it still take the resource from _en.properties.

Here is my setting


  


Whether I set struts.locale or not, it make no different. By the way, what is 
this setting mean?

Regards
LV





From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Thu, December 10, 2009 2:01:43 PM
Subject: Re: [S2] i18n not using default bundle

Set the constant variable in struts.xml or struts.properties
variable for i8nl

On Thursday, December 10, 2009, carl ballantyne
 wrote:
> Hi LV,
>
> When you say you set your browser to Chinese are you simply moving Chinese up 
> the list of prefered languages or are you removing all english from prefered 
> languages. Because if it is the former then I think it would still look for 
> an *_en.properties file over the default.
>
> Cheers,
> Carl.
>
> Quoting mailtolouis2020-str...@yahoo.com:
>
>
> Hello,
>
> I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.
>
> I got 2 properties in my application:
> global-message.properties(store Chinese Language)
> global-message_en.properties (store English Language)
>
> When I run my application, and set my browser language to Chinese  (zh-CN), I 
> expect when there is no global-message_zh_CN.properties  file, struts should 
> use the default global-message.properties file,  but it is not, it use 
> global-message_en.properties.
>
> If I remove some key in the global-message_en.properties, then it is  look 
> for global-message.properties file, that is expected.
>
>
> So could someone tell me is this a bug, or that's the way the design  is or 
> some setting I need to do?
>
>
>
>
>
> Regards
> LV
>
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

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

[S2] i18n not using default bundle

2009-12-10 Thread mailtolouis2020-struts
Hello,

I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.

I got 2 properties in my application:
global-message.properties(store Chinese Language)
global-message_en.properties (store English Language)

When I run my application, and set my browser language to Chinese (zh-CN), I 
expect when there is no global-message_zh_CN.properties file, struts should use 
the default global-message.properties file, but it is not, it use 
global-message_en.properties.

If I remove some key in the global-message_en.properties, then it is look for 
global-message.properties file, that is expected.


So could someone tell me is this a bug, or that's the way the design is or some 
setting I need to do?





Regards
LV

Re: How to get the key name

2009-12-03 Thread mailtolouis2020-struts
Ok, now I know what you mean the key, you mean ${getText(label.name)} ?
But that is not that I want, if I hard code the key name there, that defeat the 
whole reuse purpose.
I want something similar like fieldName but for key. fieldName is a constant 
variable from struts, when I write the code like this
error.required = ${getText(fieldName)} is required.

and if I have these 2 tag in jsp:



In runtime when validation error, it will search for user.name and user.email 
property in the resource bundle files.

So, if I've this
user.name = Name
user.email = Email 
in the resource bundle files,

Then it will display correctly as
Name is required.
Email is required.

But in my resource bundle files, I only have
label.name = Name
label.email = Email

Which map to the key, so I need to find a way to get it.

Hope you can understand, sorry for my poor description.

Regards
LV





From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Thu, December 3, 2009 12:29:30 PM
Subject: Re: How to get the key name

No not that

key="i8nl.nameKey"

Send me your file

On Thu, Dec 3, 2009 at 5:27 PM,  wrote:

> No, I changed my property to this
> error.required = ${getText(key)} is required.
>
> It is not working.
>
>
>
> ____
> From: Saeed Iqbal 
> To: Struts Users Mailing List 
> Sent: Thu, December 3, 2009 9:56:29 AM
> Subject: Re: How to get the key name
>
> Yes key is in struts. See the docs.
>
> On Thu, Dec 3, 2009 at 2:54 PM,  wrote:
>
> > Hi,
> >
> > Sorry, I think you misunderstanding my question.
> >
> > My main question is fieldName give me the name attribute value, but I
> want
> > to get my key attribute value, is there anything like fieldKey or
> something
> > ?
> >
> >  > required="true"/>
> >
> > fieldName = user.name
> >  ?? = label.name
> >
> > Thanks
> > LV
> >
> >
> >
> > 
> > From: Saeed Iqbal 
> > To: Struts Users Mailing List 
> > Sent: Thu, December 3, 2009 2:13:20 AM
> > Subject: Re: How to get the key name
> >
> > You use the key attribute instead of label
> >
> > On Wednesday, December 2, 2009, Siddiq Syed  wrote:
> > >
> > > Try this,
> > >
> > > 
> > > 
> > >
> > > -siddiq.
> > >
> > >
> > > Louis Voo wrote:
> > >>
> > >> Hi,
> > >>
> > >> I've this text field in my jsp
> > >>
> > >>  > >> required="true"/>
> > >>
> > >> and this property in the resource bundle
> > >>
> > >> error.required = ${getText(fieldName)} is required.
> > >> label.name = Name
> > >>
> > >>
> > >> When there is validation error, it looking for user.name property, it
> > is
> > >> fine because I'm using fieldName, so my question is there anyway I can
> > get
> > >> key name? So that I can use the label.name property.
> > >>
> > >>
> > >> Regards
> > >> LV
> > >>
> > >
> > > --
> > > View this message in context:
> > http://old.nabble.com/How-to-get-the-key-name-tp26613714p26613875.html
> > > Sent from the Struts - User mailing list archive at Nabble.com.
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant (Freelance)
> > J2EE - Application Architect / Developer
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
>
>
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> J2EE - Application Architect / Developer
>



-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


Re: How to get the key name

2009-12-03 Thread mailtolouis2020-struts
No, I changed my property to this
error.required = ${getText(key)} is required.

It is not working.




From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Thu, December 3, 2009 9:56:29 AM
Subject: Re: How to get the key name

Yes key is in struts. See the docs.

On Thu, Dec 3, 2009 at 2:54 PM,  wrote:

> Hi,
>
> Sorry, I think you misunderstanding my question.
>
> My main question is fieldName give me the name attribute value, but I want
> to get my key attribute value, is there anything like fieldKey or something
> ?
>
>  required="true"/>
>
> fieldName = user.name
>  ?? = label.name
>
> Thanks
> LV
>
>
>
> 
> From: Saeed Iqbal 
> To: Struts Users Mailing List 
> Sent: Thu, December 3, 2009 2:13:20 AM
> Subject: Re: How to get the key name
>
> You use the key attribute instead of label
>
> On Wednesday, December 2, 2009, Siddiq Syed  wrote:
> >
> > Try this,
> >
> > 
> > 
> >
> > -siddiq.
> >
> >
> > Louis Voo wrote:
> >>
> >> Hi,
> >>
> >> I've this text field in my jsp
> >>
> >>  >> required="true"/>
> >>
> >> and this property in the resource bundle
> >>
> >> error.required = ${getText(fieldName)} is required.
> >> label.name = Name
> >>
> >>
> >> When there is validation error, it looking for user.name property, it
> is
> >> fine because I'm using fieldName, so my question is there anyway I can
> get
> >> key name? So that I can use the label.name property.
> >>
> >>
> >> Regards
> >> LV
> >>
> >
> > --
> > View this message in context:
> http://old.nabble.com/How-to-get-the-key-name-tp26613714p26613875.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> J2EE - Application Architect / Developer
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



-- 
Saeed Iqbal
Independant Consultant (Freelance)
J2EE - Application Architect / Developer


Re: How to get the key name

2009-12-03 Thread mailtolouis2020-struts
Hi,

Sorry, I think you misunderstanding my question.

My main question is fieldName give me the name attribute value, but I want to 
get my key attribute value, is there anything like fieldKey or something ?



fieldName = user.name
 ?? = label.name 

Thanks
LV




From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Thu, December 3, 2009 2:13:20 AM
Subject: Re: How to get the key name

You use the key attribute instead of label

On Wednesday, December 2, 2009, Siddiq Syed  wrote:
>
> Try this,
>
> 
> 
>
> -siddiq.
>
>
> Louis Voo wrote:
>>
>> Hi,
>>
>> I've this text field in my jsp
>>
>> > required="true"/>
>>
>> and this property in the resource bundle
>>
>> error.required = ${getText(fieldName)} is required.
>> label.name = Name
>>
>>
>> When there is validation error, it looking for user.name property, it is
>> fine because I'm using fieldName, so my question is there anyway I can get
>> key name? So that I can use the label.name property.
>>
>>
>> Regards
>> LV
>>
>
> --
> View this message in context: 
> http://old.nabble.com/How-to-get-the-key-name-tp26613714p26613875.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-- 
Saeed Iqbal
Independant Consultant (Freelance)
J2EE - Application Architect / Developer

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

Re: [S2] xhtml theme freemarker syntax

2009-12-03 Thread mailtolouis2020-struts
Thanks for the info.




From: Greg Lindholm 
To: Struts Users Mailing List 
Sent: Wed, December 2, 2009 8:55:51 PM
Subject: Re: [S2] xhtml theme freemarker syntax

Easy to find in the Freemarker docs.

http://freemarker.org/docs/ref_directive_t.html

On Wed, Dec 2, 2009 at 10:47 AM,   wrote:
> Hi,
>
> I'm trying to modify xhtml theme to suite our need, but I'm not familiar with 
> freemarker. Could someone explain these few tags mean?
>
> <#rt/>
> <#lt/>
> <#t/>
>
>  Regards
> LV

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

[S2] xhtml theme freemarker syntax

2009-12-02 Thread mailtolouis2020-struts
Hi,

I'm trying to modify xhtml theme to suite our need, but I'm not familiar with 
freemarker. Could someone explain these few tags mean?

<#rt/>
<#lt/>
<#t/>

 Regards
LV

Re: textfield label localized

2009-11-28 Thread mailtolouis2020-struts
Hi,

Thanks for the answer, both are working now.


Regards
LV




From: KamHon Eng 
To: Struts Users Mailing List 
Sent: Sat, November 28, 2009 9:41:32 AM
Subject: Re: textfield label localized


or


shoud working

On Sat, Nov 28, 2009 at 4:53 AM,   wrote:
> Hi,
>
> Can someone tell me how to make the label use my resource bundle value? I've 
> tried this
>  theme="xhtml"/>
> and
>  theme="xhtml"/>
> both are not working.
>
> But this work:
> 
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>



-- 
Best Regard,

Kam Hon

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

Re: textfield label localized

2009-11-28 Thread mailtolouis2020-struts
Hi,

Thanks, its work now by using key.

Regards
LV




From: Saeed Iqbal 
To: Struts Users Mailing List 
Sent: Sat, November 28, 2009 1:54:48 AM
Subject: Re: textfield label localized

There are 2 ways to go about this

1) within Struts tags

use key=""

where your i8nl key should go in.

But for that to work your struts needs to know where all the i8nl values are
located.

Define a constant for it in struts.xml

or create a struts.properties to contain this

struts.custom.i18n.resources=package

where my i8nl file is called package.properties located in the same folder
where struts.xml is present

2) use fmt tag

JSTL tag for i8nl





Make sure the jstl jar(s) are on your dependency list.

On Sat, Nov 28, 2009 at 1:53 AM,  wrote:

> Hi,
>
> Can someone tell me how to make the label use my resource bundle value?
> I've tried this
>  theme="xhtml"/>
> and
>  maxlength="35" theme="xhtml"/>
> both are not working.
>
> But this work:
> 
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>



-- 
Saeed Iqbal
http://www.iqbalconsulting.com
Struts - J2EE - Application Architect / Developer


textfield label localized

2009-11-27 Thread mailtolouis2020-struts
Hi,

Can someone tell me how to make the label use my resource bundle value? I've 
tried this

and

both are not working.

But this work:


in my resource bundle properties file
I've this
label.name = Name 

THanks

L.V


Re: RE: Adding Json to existing action

2009-10-27 Thread Struts Two
What I meant was either to use Json Plugin for struts 2. Read the following 
Wiki page:

http://cwiki.apache.org/WW/json-plugin.html

The JSON plugin is bundled with Struts since 2.1.7. Or you can write your 
customized Struts 2 Result type for JSON and register it in your struts2.xml 
for use [does not make sense to do that if you are using 2.1.7+].

To learn how to do that, take a look at the a sample provided in struts 2 in 
action. That should do it as well.

Hope this helps.




--- On Tue, 10/27/09, Michael Varlik  wrote:

> From: Michael Varlik 
> Subject: Re: RE: Adding Json to existing action
> To: "Struts Users Mailing List" 
> Received: Tuesday, October 27, 2009, 3:50 PM
> I just noticed a mistake I made. When
> adding the parameter to the result I also have to add a
> getJsonData() method to the action, right?
> I have added this method which actually calls execute().
> Now I don't get "null" as a result anymore but I get
> "success" which is also not what I expected.
> 
> I guess I have missed something. Since this is the first
> time I use struts, I have no idea what I did wrong. Any
> hints are appreciated.
> 
> Cheers,
> Markus
> 
>  Original-Nachricht ----
> > Datum: Tue, 27 Oct 2009 16:09:25 +0100
> > Von: "Michael Varlik" 
> > An: "Struts Users Mailing List" ,
> user@struts.apache.org
> > Betreff: Re: RE: Adding Json to existing action
> 
> > Thanks for that hint. I have extended my mapping by
> adding " > name=root>jsonData" to my action
> mapping's result tag. Now I don't get any
> > Exception and the server log looks just fine. However,
> the value returned
> > by the action is just "null".
> > Do you have any idea what could be wrong here?
> > 
> > Cheers,
> > Markus
> > 
> >  Original-Nachricht 
> > > Datum: Tue, 27 Oct 2009 09:39:01 -0400
> > > Von: "Mike Baranski" 
> > > An: "\'Struts Users Mailing List\'" 
> > > Betreff: RE: Adding Json to existing action
> > 
> > > I do this to pass parameters, using prototype
> js:
> > > 
> > > 
> > >      value="%{'form_door' + door.id}"/>
> > > 
> > >      name="door_description" value="getText(#foo)"/>
> > >     
> > >          id="door_url" action="unlock"> > > value="door.id"/>
> > >          method="POST" action="unlock" id="%{#form_name}"
> > > onsubmit="return false;">
> > >        
>     
> > >        
>     
> > >        
>      > > value="/pages/door-control/images/locked.png"
> />
> > >        
>      > > src="%{locked_image}" onclick="%{'new
> Ajax.Updater(\\'' + #foo +'\\',
> > \\''
> > > +
> > > #door_url + '\\', {evalScripts: true}); return
> false;'}"/>
> > >        
> 
> > > 
> > > 
> > > 
> > > >-Original Message-----
> > > >From: Struts Two [mailto:struts...@yahoo.ca]
> > > >Sent: Tuesday, October 27, 2009 9:24 AM
> > > >To: Struts Users Mailing List
> > > >Subject: Re: Adding Json to existing action
> > > >
> > > >You can either use Json plugin or write your
> own customized result type
> > > >that return JSON.
> > > >
> > > >--- On Tue, 10/27/09, Michael Varlik 
> wrote:
> > > >
> > > >> From: Michael Varlik 
> > > >> Subject: Adding Json to existing action
> > > >> To: user@struts.apache.org
> > > >> Received: Tuesday, October 27, 2009,
> 1:07 PM
> > > >> Hi,
> > > >>
> > > >> I need to call an existing struts action
> within my
> > > >> application from a
> > > >> JavaScript function. I thought it might
> be possible to
> > > >> create an additional entry in the struts
> mapping file like
> > > >> this:
> > > >>
> > > >>  > > >> class="com.mypackage.MyAction"
> method="getData">
> > > >> 
> > > >> 
> > > >>
> > > >> and then call the action with
> "getDataJson.action".
> > > >> Unfortunately, when I try this a
> NullPointerException
> > > >> occurs in the action 

Re: Adding Json to existing action

2009-10-27 Thread Struts Two
You can either use Json plugin or write your own customized result type that 
return JSON.

--- On Tue, 10/27/09, Michael Varlik  wrote:

> From: Michael Varlik 
> Subject: Adding Json to existing action
> To: user@struts.apache.org
> Received: Tuesday, October 27, 2009, 1:07 PM
> Hi,
> 
> I need to call an existing struts action within my
> application from a
> JavaScript function. I thought it might be possible to
> create an additional entry in the struts mapping file like
> this:
> 
>  class="com.mypackage.MyAction" method="getData">
> 
> 
> 
> and then call the action with "getDataJson.action".
> Unfortunately, when I try this a NullPointerException
> occurs in the action code. It seems, some parameters are not
> properly initialized.
> 
> What I'd like to know is: what is the recommendet way of
> calling an existing action to get JSON results? Is it a good
> idea to do this at all?
> 
> Cheers,
> Markus 
> -- 
> Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro
> Startguthaben!
> http://portal.gmx.net/de/go/dsl02
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

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



Testing Struts Restful Web Services

2009-10-22 Thread struts-restful

Does anyone know of any tool that can be used to test the restful web
services? In my application the controllers are called from a third party
application so there are no Jsp's. If i had jsp's i would use maybe JwebUnit
to test the app. Are there any alternatives?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Testing-Struts-Restful-Web-Services-tp26008963p26008963.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts2 on Websphere 6.1 : 404 errors

2009-10-16 Thread Struts Two
Yes, it is. If you plan to turn on container security, you need another flag as 
well.



--- On Fri, 10/16/09, Raghuveer.V  wrote:

> From: Raghuveer.V 
> Subject: Struts2 on Websphere 6.1 : 404 errors
> To: user@struts.apache.org
> Received: Friday, October 16, 2009, 1:03 PM
> Hi Struts2 Users,
> I have problem when deploying application struts2.1.6
> application on
> Websphere6.1 which was succefully working on
> apache-tomcat-5.5.23.
> We have used configuration option to make it work as per
> information
> available in Websphere forums and Struts2 forums on my
> local websphere.
>  
> Could you suggest is this the ONLY possible solution to
> make struts2 work on
> Websphere?.
>  
>  
> Initially we have received 404 errors.
> Servlet filter is not called for URL resources on WAS 6.1 ,
> configuration
> option has been set in server 
>  
> 
> The webcontainer custom property
> com.ibm.ws.webcontainer.invokefilterscompatibility
> was  set to true as per
> below links.
> 
> com.ibm.ws.webcontainer.invokefilterscompatibility=true
> 
> Application Servers ->  -> Web
> Container Settings -> Web Container
> -> Custom Properties
> 
>  
> 
>  
> 
> Goggle Refrence: 
> 
>  
> 
> struts2 +websphere +There is no Action mapped for namespace
> / and action
> name
> 
> com.ibm.ws.webcontainer.invokefilterscompatibility+struts2+websphere
> 
>  
> 
> http://www.ibm.com/developerworks/forums/thread.jspa?threadID=264848
> 
> http://www-01.ibm.com/support/docview.wss?rs=180
> 
> &uid=swg1PK27620
> 
> http://www.mail-archive.com/user@struts.apache.org/msg88798.html
> 
> http://www.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-td18761735.html
> 
>  
> 
>  
> 
>  
> 
> Regards,
> Raghu
> 
>  
> 
> 


  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php

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



Parameters Interceptor

2009-10-16 Thread struts-restful

I am using the struts-restful default interceptor stack which uses the static
params interceptor and the paramters interceptor. The result of using both
interceptors is that it is calling setId twice. However if I remove the
static params interceptor it does not call setId at all and if I remove the
params Interceptor then no variables on the action are being set

Is there a way to do both things and call the set id method twice?
-- 
View this message in context: 
http://www.nabble.com/Parameters-Interceptor-tp25921673p25921673.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: warning from user@struts.apache.org

2009-10-11 Thread Struts Two
Can anyone says why am I getting this warning? What do you exactly mean 
"messages from you have been bouncing"?



--- On Sun, 10/11/09, user-h...@struts.apache.org  
wrote:

> From: user-h...@struts.apache.org 
> Subject: warning from user@struts.apache.org
> To: struts...@yahoo.ca
> Received: Sunday, October 11, 2009, 6:07 PM
> Hi! This is the ezmlm program. I'm
> managing the
> user@struts.apache.org
> mailing list.
> 
> I'm working for my owner, who can be reached
> at user-ow...@struts.apache.org.
> 
> 
> Messages to you from the user mailing list seem to
> have been bouncing. I've attached a copy of the first
> bounce
> message I received.
> 
> If this message bounces too, I will send you a probe. If
> the probe bounces,
> I will remove your address from the user mailing list,
> without further notice.
> 
> 
> I've kept a list of which messages from the user mailing
> list have 
> bounced from your address.
> 
> Copies of these messages may be in the archive.
> To retrieve a set of messages 123-145 (a maximum of 100 per
> request),
> send a short message to:
>    
> 
> To receive a subject and author list for the last 100 or so
> messages,
> send a short message to:
>    
> 
> Here are the message numbers:
> 
>    202661
> 
> --- Enclosed is a copy of the bounce message I received.
> 
> Return-Path: <>
> Received: (qmail 58614 invoked for bounce); 29 Sep 2009
> 22:03:36 -
> Date: 29 Sep 2009 22:03:36 -
> From: mailer-dae...@apache.org
> To: user-return-2026...@struts.apache.org
> Subject: failure notice
> 
> Hi. This is the qmail-send program at apache.org.
> I'm afraid I wasn't able to deliver your message to the
> following addresses.
> This is a permanent error; I've given up. Sorry it didn't
> work out.
> 
> :
> 67.195.168.31 failed after I sent the message.
> Remote host said: 554 delivery error: dd This account has
> been temporarily suspended. Please try again later. -
> mta193.mail.ac4.yahoo.com
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

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



Re: Struts2 2.1.8 MD5 not found

2009-10-10 Thread mailtolouis2020-struts
Thanks Wes, is working fine to me now




From: Wes Wannemacher 
To: Struts Users Mailing List 
Sent: Sat, October 10, 2009 2:47:19 AM
Subject: Re: Struts2 2.1.8 MD5 not found

On Monday 05 October 2009 07:37:25 am mailtolouis2020-str...@yahoo.com wrote:
> Hi Wes,
>
> I just notice that I can select mirror from the download page, I tried many
> different mirrors site, but still the MD5 and PGP link still not work.
> Could you give me the mirror you use which is working for your?
>
> Thanks
> Louis
>

This thread is a few days old, but I just checked today and it looks like the 
files are propagated... Is anyone else noticing missing files?

-Wes


-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat... 
Ask me for a quote!

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

Re: Servlet filter as front controller

2009-10-08 Thread Struts Two
Dummy servlet should do it (as mentioned by WES), I know this in case of WAS 
where you are going to create plugin-xml file for your HTTP server. Without a 
dummy servlet mapped to *.action or *.do, Http server would fail to route any 
request that is mapped to *.action or *.do in the filter.

--- On Thu, 10/8/09, Wes Wannemacher  wrote:

> From: Wes Wannemacher 
> Subject: Re: Servlet filter as front controller
> To: "Struts Users Mailing List" 
> Received: Thursday, October 8, 2009, 1:15 PM
> I was thinking about this issue
> recently and wondered if simply
> mapping a do-nothing servlet to * would workaround this...
> I thought
> about trying it, but I only have tomcat and jetty handy for
> testing,
> and this doesn't seem to be an issue on either one.
> Although, a
> do-nothing servlet would probably solve the other problem
> of mapping
> welcome-files to index.action.
> 
> -Wes
> 
> On Thu, Oct 8, 2009 at 8:36 AM, Struts Two 
> wrote:
> > I have mentioned this before in another thread that
> Struts2 is breaking Servlet specification 2.4 in this
> regard, but have heard no comment on it which means two
> things either I have a point or I am way off.
> >
> > In Servlet specification 2.4 filters are not supposed
> to be accessed directly as a resource. And anything other
> than a jsp page need to have a Servlet mapping in order to
> make it accessible (as per specification).
> >
> > Struts 1 had ActionServlet to which *.action or *.do
> mapping was done. This sort of deviation from sped is
> causing some folks issues when it comes to using some
> appservers that follow the spec and you have to resort to
> all sort of hacks to get around it.
> >
> > --- On Wed, 10/7/09, Arthur Neves 
> wrote:
> >
> >> From: Arthur Neves 
> >> Subject: Re: Servlet filter as front controller
> >> To: "Struts Users Mailing List" 
> >> Received: Wednesday, October 7, 2009, 11:57 PM
> >> With the filter struts2 can intercept
> >> all request.
> >>
> >> I think it's more difficult to do thinks like,
> the
> >> namespace struct with a
> >> servlet,i dont have sure though.
> >>
> >>
> >>
> >> On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi
> wrote:
> >>
> >> >
> >> > Hi,Struts2 uses servlet filter
> >> >
> >>
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> >> as front
> >> > controller, rather than having a servlet act
> as front
> >> controller. Is there
> >> > any specific advantage of using servlet
> filter over
> >> servlet (as in struts
> >> > 1.1)?
> >> > Thanks,Unmesh
> >> >
> >> >
> >>
> _
> >> > Great events make grand headlines – read
> them all on
> >> MSN India
> >> > http://in.msn.com
> >> >
> >>
> >
> >
> >    
>  __
> > Ask a question on any topic and get answers from real
> people. Go to Yahoo! Answers and share what you know at 
> http://ca.answers.yahoo.com
> >
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

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



Re: Servlet filter as front controller

2009-10-08 Thread Struts Two
I have mentioned this before in another thread that Struts2 is breaking Servlet 
specification 2.4 in this regard, but have heard no comment on it which means 
two things either I have a point or I am way off.

In Servlet specification 2.4 filters are not supposed to be accessed directly 
as a resource. And anything other than a jsp page need to have a Servlet 
mapping in order to make it accessible (as per specification).

Struts 1 had ActionServlet to which *.action or *.do mapping was done. This 
sort of deviation from sped is causing some folks issues when it comes to using 
some appservers that follow the spec and you have to resort to all sort of 
hacks to get around it.  

--- On Wed, 10/7/09, Arthur Neves  wrote:

> From: Arthur Neves 
> Subject: Re: Servlet filter as front controller
> To: "Struts Users Mailing List" 
> Received: Wednesday, October 7, 2009, 11:57 PM
> With the filter struts2 can intercept
> all request.
> 
> I think it's more difficult to do thinks like, the
> namespace struct with a
> servlet,i dont have sure though.
> 
> 
> 
> On Wed, Oct 7, 2009 at 2:58 PM, Unmesh joshi wrote:
> 
> >
> > Hi,Struts2 uses servlet filter
> >
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> as front
> > controller, rather than having a servlet act as front
> controller. Is there
> > any specific advantage of using servlet filter over
> servlet (as in struts
> > 1.1)?
> > Thanks,Unmesh
> >
> >
> _
> > Great events make grand headlines – read them all on
> MSN India
> > http://in.msn.com
> >
> 


  __
Ask a question on any topic and get answers from real people. Go to Yahoo! 
Answers and share what you know at http://ca.answers.yahoo.com

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



Re: Struts2 2.1.8 MD5 not found

2009-10-05 Thread mailtolouis2020-struts
Hi Wes,

I just notice that I can select mirror from the download page, I tried many 
different mirrors site, but still the MD5 and PGP link still not work.
Could you give me the mirror you use which is working for your?

Thanks
Louis





From: "mailtolouis2020-str...@yahoo.com" 
To: Struts Users Mailing List 
Sent: Fri, October 2, 2009 4:24:16 PM
Subject: Re: Struts2 2.1.8 MD5 not found

http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.md5
http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.asc






From: Wes Wannemacher 
To: Struts Users Mailing List 
Sent: Friday, October 2, 2009 4:05:39 PM
Subject: Re: Struts2 2.1.8 MD5 not found

Can you tell which server? I'm guessing that it is a mirror that
hasn't sync'd properly yet.

-Wes

On Fri, Oct 2, 2009 at 11:00 AM,   wrote:
> Hello,
>
> Click on the MD5 link for Struts 2.1.8 in
> http://struts.apache.org/download.cgi#struts218
>
> get this :
> Not Found
> The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not 
> found on this server.
>
> Regards
> Louis



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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

Re: Struts2 2.1.8 MD5 not found

2009-10-02 Thread mailtolouis2020-struts
http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.md5
http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.asc






From: Wes Wannemacher 
To: Struts Users Mailing List 
Sent: Friday, October 2, 2009 4:05:39 PM
Subject: Re: Struts2 2.1.8 MD5 not found

Can you tell which server? I'm guessing that it is a mirror that
hasn't sync'd properly yet.

-Wes

On Fri, Oct 2, 2009 at 11:00 AM,   wrote:
> Hello,
>
> Click on the MD5 link for Struts 2.1.8 in
> http://struts.apache.org/download.cgi#struts218
>
> get this :
> Not Found
> The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not 
> found on this server.
>
> Regards
> Louis



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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

Struts2 2.1.8 MD5 not found

2009-10-02 Thread mailtolouis2020-struts
Hello,

Click on the MD5 link for Struts 2.1.8 in 
http://struts.apache.org/download.cgi#struts218

get this :
Not Found
The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not found 
on this server.

Regards
Louis

Re: restful URL issue

2009-09-30 Thread struts-restful

Is a possible reason that it may not be working that I am also using the
convention plugin??


struts-restful wrote:
> 
> I also tried this with a / in the namespace so 
> 
> @Namespace("test/{id}"} and 
> @Namespace("/test/{id}"} give a namespace with "".
> 
> 
> 
> struts-restful wrote:
>> 
>> One more additional piece of information is that the namespaceMatcher
>> does contain the compiled pattern for my namespace. 
>> 
>> Another thing I noticed when messing around trying to figure this out is
>> that I created a different controller class ain a different package for
>> example test.MyTestController. 
>> 
>> when I tried the URL /test/-1/my-test.xml my namespace was set to "" and
>> my actionname was = "test" and methodname was populated with "my-test".
>> This is if I had a namespace annotation as follows 
>> 
>> @Namespace("test/{id}"}
>> public class MyTestController
>> 
>> Thanks in advance
>> 
>> 
>> 
>> struts-restful wrote:
>>> 
>>> Yes I am putting it in the namespace annotation 
>>> 
>>> @Namespace("/person/name/test-example/{id}") 
>>> 
>>> Stepping through the namespace pattern matcher code it does replace the
>>> {id} with ([^/]+) but that is as far as i have got and still dont
>>> understand why it does not work
>>> 
>>> Thanks in advance
>>> 
>>> 
>>> 
>>> Musachy Barroso wrote:
>>>> 
>>>> are you putting that in the @Namespace annotation? It will not work on
>>>> the @Action annotation.
>>>> 
>>>> musachy
>>>> 
>>>> On Tue, Sep 29, 2009 at 8:49 AM, struts-restful 
>>>> wrote:
>>>>>
>>>>> Also I know that the default parameter is id but ideally i am trying
>>>>> to
>>>>> create a url as follows
>>>>>
>>>>> /person/name/{id}/{anotherId}/test-example
>>>>>
>>>>>
>>>>> struts-restful wrote:
>>>>>>
>>>>>> I amended my URL to be as follows then using the namespace pattern
>>>>>> matcher
>>>>>>
>>>>>> /person/name/{id}/test-example
>>>>>>
>>>>>> but this now maps the config as /person/name/{id}. How would I get
>>>>>> rid of
>>>>>> the {id} bit but still pass the parameter through?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> Musachy Barroso wrote:
>>>>>>>
>>>>>>> the namespace matcher, ad the name implies matches parameters only
>>>>>>> in
>>>>>>> the namespace (the part before the action). To map params after the
>>>>>>> action name, you have to use wildcards. Because this is confusing,
>>>>>>> we
>>>>>>> introduced the advanced regex patters which will sove all the cases,
>>>>>>> see this:
>>>>>>>
>>>>>>> http://cwiki.apache.org/confluence/pages/editpage.action?pageId=44247
>>>>>>>
>>>>>>> all 3 approaches are there with examples.
>>>>>>> musachy
>>>>>>>
>>>>>>> On Tue, Sep 29, 2009 at 8:20 AM, struts-restful 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Ok after some further investigating the problem appears to be when
>>>>>>>> the
>>>>>>>> server
>>>>>>>> is starting up and it is building the namespaceActionConfig map.
>>>>>>>>
>>>>>>>> because my namespace on the action is set to
>>>>>>>> /person/name/test-example/{id}
>>>>>>>> when the action config is created the key is set to
>>>>>>>> /person/name/test-example/{id}. So when I call the url the rest
>>>>>>>> action
>>>>>>>> mapper parses the mapping and creates a namespace of /person/name,
>>>>>>>> and
>>>>>>>> subsequently when it tries to determine the corresponding action
>>>>>>>> config
>>>>>>>> associated with this key nothing is found because on start up it
>>>>>>>> ha

Re: restful URL issue

2009-09-30 Thread struts-restful

I also tried this with a / in the namespace so 

@Namespace("test/{id}"} and 
@Namespace("/test/{id}"} give a namespace with "".



struts-restful wrote:
> 
> One more additional piece of information is that the namespaceMatcher does
> contain the compiled pattern for my namespace. 
> 
> Another thing I noticed when messing around trying to figure this out is
> that I created a different controller class ain a different package for
> example test.MyTestController. 
> 
> when I tried the URL /test/-1/my-test.xml my namespace was set to "" and
> my actionname was = "test" and methodname was populated with "my-test".
> This is if I had a namespace annotation as follows 
> 
> @Namespace("test/{id}"}
> public class MyTestController
> 
> Thanks in advance
> 
> 
> 
> struts-restful wrote:
>> 
>> Yes I am putting it in the namespace annotation 
>> 
>> @Namespace("/person/name/test-example/{id}") 
>> 
>> Stepping through the namespace pattern matcher code it does replace the
>> {id} with ([^/]+) but that is as far as i have got and still dont
>> understand why it does not work
>> 
>> Thanks in advance
>> 
>> 
>> 
>> Musachy Barroso wrote:
>>> 
>>> are you putting that in the @Namespace annotation? It will not work on
>>> the @Action annotation.
>>> 
>>> musachy
>>> 
>>> On Tue, Sep 29, 2009 at 8:49 AM, struts-restful 
>>> wrote:
>>>>
>>>> Also I know that the default parameter is id but ideally i am trying to
>>>> create a url as follows
>>>>
>>>> /person/name/{id}/{anotherId}/test-example
>>>>
>>>>
>>>> struts-restful wrote:
>>>>>
>>>>> I amended my URL to be as follows then using the namespace pattern
>>>>> matcher
>>>>>
>>>>> /person/name/{id}/test-example
>>>>>
>>>>> but this now maps the config as /person/name/{id}. How would I get rid
>>>>> of
>>>>> the {id} bit but still pass the parameter through?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>> Musachy Barroso wrote:
>>>>>>
>>>>>> the namespace matcher, ad the name implies matches parameters only in
>>>>>> the namespace (the part before the action). To map params after the
>>>>>> action name, you have to use wildcards. Because this is confusing, we
>>>>>> introduced the advanced regex patters which will sove all the cases,
>>>>>> see this:
>>>>>>
>>>>>> http://cwiki.apache.org/confluence/pages/editpage.action?pageId=44247
>>>>>>
>>>>>> all 3 approaches are there with examples.
>>>>>> musachy
>>>>>>
>>>>>> On Tue, Sep 29, 2009 at 8:20 AM, struts-restful 
>>>>>> wrote:
>>>>>>>
>>>>>>> Ok after some further investigating the problem appears to be when
>>>>>>> the
>>>>>>> server
>>>>>>> is starting up and it is building the namespaceActionConfig map.
>>>>>>>
>>>>>>> because my namespace on the action is set to
>>>>>>> /person/name/test-example/{id}
>>>>>>> when the action config is created the key is set to
>>>>>>> /person/name/test-example/{id}. So when I call the url the rest
>>>>>>> action
>>>>>>> mapper parses the mapping and creates a namespace of /person/name,
>>>>>>> and
>>>>>>> subsequently when it tries to determine the corresponding action
>>>>>>> config
>>>>>>> associated with this key nothing is found because on start up it had
>>>>>>> been
>>>>>>> mapped to  /person/name/test-example/{id}.
>>>>>>>
>>>>>>> When i remove the namespace annotation and type in the url my action
>>>>>>> is
>>>>>>> then
>>>>>>> correctly mapped with  /person/name.
>>>>>>>
>>>>>>> So is this a bug or have i missed something in my configuration?
>>>>>>>
>>>>>>> thanks in advance
>>>>>>>
>>>>>>>
>>>>>>>
>

  1   2   3   4   5   >