Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 17 Aug 2010 19:45:51 -0000 Issue 9146

user-digest-help

2010-08-17


Author LoginPost Reply

user Digest 17 Aug 2010 19:45:51 -0000 Issue 9146

Topics (messages 207202 through 207220):

Struts Tutorials Updated For Version 2.2.1
 207202 by: phillips1021

Re: Struts2 and Maven Archetypes
 207203 by: Lukasz Lenart

Re: [ANN] Struts 2.2.1 GA release available
 207204 by: mailtolouis2020-struts.yahoo.com
 207205 by: Lukasz Lenart

Struts 2.2.1 static params being included in redirects
 207206 by: jordi
 207215 by: jordi

[S2] 2.2.1 Appended .xhml to back of the url
 207207 by: mailtolouis2020-struts.yahoo.com
 207208 by: Lukasz Lenart
 207209 by: mailtolouis2020-struts.yahoo.com
 207210 by: Lukasz Lenart
 207211 by: mailtolouis2020-struts.yahoo.com
 207212 by: Dave Newton
 207213 by: jordi
 207214 by: mailtolouis2020-struts.yahoo.com

REST without JSON
 207216 by: Frans Thamura
 207217 by: Frans Thamura

[S2] 2.2.1 possible freemarker template bug
 207218 by: Sean Ford

Calling Struts Action file through command line.
 207219 by: E2241
 207220 by: Cimballi

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_207202.ezm (zipped)

I've updated the tutorials at:

 http://struts.apache.org/2.2.1/docs/getting-started.html

so that the Ant and Maven example projects use Struts 2.2.1 version.

Bruce
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_207203.ezm (zipped)
Hi,

I added archetype catalog, could you test it?

mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/


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


Attachment: user_207204.ezm (zipped)
The struts-2.2.1-src.zip source link is wrong






________________________________
From: Lukasz Lenart <lukasz.lenart@(protected)>
To: Struts Users Mailing List <user@(protected)
Sent: Mon, August 16, 2010 8:12:01 PM
Subject: Re: [ANN] Struts 2.2.1 GA release available

2010/8/16 Emi Lu <emilu@(protected)>:
> 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-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment: user_207205.ezm (zipped)
2010/8/17 <mailtolouis2020-struts@(protected)>:
> The struts-2.2.1-src.zip source link is wrong

Thanks, solved, but please wait few minutes before cache will expire


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


Attachment: user_207206.ezm (zipped)
Hey there,

since 2.2.1, all my static params are being includes as parameters after any
redirect (redirect-action or redirect).

for example, i've got mapped /foo/{id}/bar and after executing /foo/1/bar
and redirecting to another location i get /foo/1/barbaz?id=1

is there any workaround for this? is it intended? I've checked 'merge'
parameter from staticparams interceptor but i'm getting the same result. I'm
using regex pattern matcher

cheers
jordi

Attachment: user_207215.ezm (zipped)
btw, there's also an exception now:

DEBUG com.opensymphony.xwork2.DefaultActionInvocation - Executing action
method = execute
DEBUG org.apache.struts2.dispatcher.ServletRedirectResult - Caught
OgnlException while setting property 'publicId' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
Caught OgnlException while setting property 'publicId' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class:
ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: setProperty
Line: 166 - ognl/ObjectPropertyAccessor.java:166:-1
at
com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty (OgnlUtil.java:412)
at com.opensymphony.xwork2.ognl.OgnlUtil.setProperty (OgnlUtil.java:160)
at
com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty (OgnlReflectionProvider.java:91)
at com.opensymphony.xwork2.ObjectFactory.buildResult (ObjectFactory.java:232)
at
com.opensymphony.xwork2.DefaultActionInvocation.createResult (DefaultActionInvocation.java:220)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:367)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:277)
at
org.apache.struts2.interceptor.MessageStoreInterceptor.intercept (MessageStoreInterceptor.java:204)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at com.eventuo.intercept.RoleInterceptor.intercept(RoleInterceptor.java:25)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (DefaultWorkflowInterceptor.java:176)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:98)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (ValidationInterceptor.java:263)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (AnnotationValidationInterceptor.java:68)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:98)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java:133)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (ProfilingActivationInterceptor.java:104)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (DebuggingInterceptor.java:267)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (ChainingInterceptor.java:142)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (I18nInterceptor.java:176)
at
com.eventuo.intercept.CustomI18nInterceptor.intercept(CustomI18nInterceptor.java:38)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (PrepareInterceptor.java:166)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:98)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.eventuo.intercept.EventInterceptor.intercept(EventInterceptor.java:63)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java:190)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:207)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:98)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:207)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:98)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.interceptor.MultiselectInterceptor.intercept (MultiselectInterceptor.java:75)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java:94)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.eventuo.intercept.CookiesProviderInterceptor.intercept(CookiesProviderInterceptor.java:53)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (ServletConfigInterceptor.java:164)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (AliasInterceptor.java:190)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.eventuo.intercept.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:66)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.eventuo.intercept.HibernateInterceptor.intercept(HibernateInterceptor.java:32)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (ExceptionMappingInterceptor.java:187)
at
com.google.inject.servlet.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:235)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:248)
at
org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:52)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:485)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:395)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run (Thread.java:619)
Caused by: ognl.NoSuchPropertyException:
org.apache.struts2.dispatcher.ServletActionRedirectResult.publicId
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:166)
at
com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty (ObjectAccessor.java:27)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2245)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue (OgnlUtil.java:209)
at
com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty (OgnlUtil.java:405)
... 94 more

On Tue, Aug 17, 2010 at 10:49 AM, jordi <jordi@(protected):

> Hey there,
>
> since 2.2.1, all my static params are being includes as parameters after
> any redirect (redirect-action or redirect).
>
> for example, i've got mapped /foo/{id}/bar and after executing /foo/1/bar
> and redirecting to another location i get /foo/1/barbaz?id=1
>
> is there any workaround for this? is it intended? I've checked 'merge'
> parameter from staticparams interceptor but i'm getting the same result. I'm
> using regex pattern matcher
>
> cheers
> jordi
>
>

Attachment: user_207207.ezm (zipped)
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

Attachment: user_207208.ezm (zipped)
2010/8/17 <mailtolouis2020-struts@(protected)>:
> 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


Attachment: user_207209.ezm (zipped)
Hi,

Here is the constant I define in struts.xml
  <constant name="struts.objectFactory" value="spring" />
  <constant name="struts.devMode" value="true" />
  <constant name="struts.ui.theme" value="custom" />
  <constant name="struts.enable.DynamicMethodInvocation" value="false"/>
  <constant name="struts.convention.default.parent.package" value="default"/>
  <constant name="struts.serve.static" value="true" />
  <constant name="struts.i18n.encoding" value="utf-8" />
  <constant name="struts.custom.i18n.resources"
    value="resources.global-messages"/>


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

Regards
Louis




________________________________
From: Lukasz Lenart <lukasz.lenart@(protected)>
To: Struts Users Mailing List <user@(protected)>
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 <mailtolouis2020-struts@(protected)>:
> 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-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment: user_207210.ezm (zipped)
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


Attachment: user_207211.ezm (zipped)
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 <lukasz.lenart@(protected)>
To: Struts Users Mailing List <user@(protected)>
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-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment: user_207212.ezm (zipped)
Okay, so extrapolate, and try setting it to an empty string.

On Tue, Aug 17, 2010 at 6:20 AM, <mailtolouis2020-struts@(protected):

> 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 <lukasz.lenart@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> 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-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment: user_207213.ezm (zipped)
i'm using struts.action.extension=,

On Tue, Aug 17, 2010 at 12:23 PM, Dave Newton <davelnewton@(protected):

> Okay, so extrapolate, and try setting it to an empty string.
>
> On Tue, Aug 17, 2010 at 6:20 AM, <mailtolouis2020-struts@(protected):
>
> > 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 <lukasz.lenart@(protected)>
> > To: Struts Users Mailing List <user@(protected)>
> > 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-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>

Attachment: user_207214.ezm (zipped)
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 <davelnewton@(protected)>
To: Struts Users Mailing List <user@(protected)>
Cc: lukasz.lenart@(protected)
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, <mailtolouis2020-struts@(protected):

> 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 <lukasz.lenart@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> 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-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment: user_207216.ezm (zipped)
hi all

i got that every time we create a REST Controller, it is automatically
become JSON

can anyone help me to turn that feature off

and turn that feature on in another URL or package

F

Attachment: user_207217.ezm (zipped)
hi all

i got that every time we create a REST Controller, it is automatically
become JSON

can anyone help me to turn that feature off

and turn that feature on in another URL or package

F

Attachment: user_207218.ezm (zipped)
Hello,

We are experiencing some Freemarker theme issues after upgrading to
Struts2 2.2.1. Our "simple" theme in our webroot is not correctly
overloading the "simple" theme in the struts2 jar when referenced from
within our custom FTL templates.

For example: myCustomUIComponent.ftl
=SNIP=
<@(protected)" ... />
=SNIP=

The above textfield uses the jar's simple theme, not ours...

I havn't had too much time to debug this yet, but I wanted to throw
this out to see if anyone else is having similar problems. We are
currently using Struts2 2.1.8.1.

Thanks!
Sean


Attachment: user_207219.ezm (zipped)

Hi,

1.) I would like to know if it is possible to call the struts framework
through a command line or a console application. Can one call an action
class? Is there any possibility to do so? I think its not possible as
everything would depend on the struts-config file and the Http Request
object. From the config file the request would probably know which action
class to invoke and the respective bean (if needed for any business logic)
would be called.

2.) I have a web application which is based on the struts framework. I know
for a fact that only once the request is submitted the struts-config would
map the action and the bean. But what happens in a case where there would be
no Http Servlet Request object, instead it would be a call from a console
application trying to invoke an action class to perform the business logic;
is that possible?

3.) What if i create a HttpServletRequest object in the console app and then
call the action class? Can we call the action class in this manner by
instantiating it and calling execute(). Then I would probably have to call
the bean in the action class itself beating the MVC pattern framework and
the use of the config file. Not sure if we can invoke the config file from
command line.

Please give your thoughts on this. I am not sure if I have been clear enough
in explaining this. My main requirement is to try and see if i can call and
execute the business logic implemented on the struts framework (in action
and bean) through a console application

--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment: user_207220.ezm (zipped)
Struts allows its actions to be tested using unit testing with mock
requests and responses, so yes, you can call the actions from a
command line tool.

You can follow the guide here about unit testing Struts actions :
http://cimballisblog.blogspot.com/2009/09/unit-testing-struts2-actions-with.html

Cimballi


On Tue, Aug 17, 2010 at 2:40 PM, E2241 <amuh41@(protected):
>
> Hi,
>
> 1.) I would like to know if it is possible to call the struts framework
> through a command line or a console application. Can one call an action
> class? Is there any possibility to do so? I think its not possible as
> everything would depend on the struts-config file and the Http Request
> object. From the config file the request would probably know which action
> class to invoke and the respective bean (if needed for any business logic)
> would be called.
>
> 2.) I have a web application which is based on the struts framework. I know
> for a fact that only once the request is submitted the struts-config would
> map the action and the bean. But what happens in a case where there would be
> no Http Servlet Request object, instead it would be a call from a console
> application trying to invoke an action class to perform the business logic;
> is that possible?
>
> 3.) What if i create a HttpServletRequest object in the console app and then
> call the action class? Can we call the action class in this manner by
> instantiating it and calling execute(). Then I would probably have to call
> the bean in the action class itself beating the MVC pattern framework and
> the use of the config file. Not sure if we can invoke the config file from
> command line.
>
> Please give your thoughts on this. I am not sure if I have been clear enough
> in explaining this. My main requirement is to try and see if i can call and
> execute the business logic implemented on the struts framework (in action
> and bean) through a console application
>
> --
> View this message in context: http://old.nabble.com/Calling-Struts-Action-file-through-command-line.-tp29449292p29449292.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>



--
Cimballi
Freelance - JAVA J2EE project leader
http://cimballi.elance.com/

©2008 gg3721.com - Jax Systems, LLC, U.S.A.