Author Login
Post Reply
user Digest 3 Aug 2010 20:00:49 -0000 Issue 9139
Topics (messages 207127 through 207140):
No result defined for action ........ and result input
207127 by: Chris Miles
207128 by: Cimballi
207129 by: Chris Miles
207130 by: Cimballi
Re: Can I access URL parameters within struts.xml using ognl ?
207131 by: colaru
207133 by: Dale Newfield
207135 by: Wes Wannemacher
Re: getting label from property
207132 by: Dale Newfield
Struts2 session problem (after migrating behind reverse proxy)
207134 by: Tim Dellas
207137 by: nuwan chandrasoma
207139 by: Tim Dellas
Re: File Upload
207136 by: Alex Rodriguez Lopez
Struts2 and Maven Archetypes
207138 by: Roland T. Craddolph
Re: Unit Testing in Struts 2.1.6
207140 by: akash uppal
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_207127.ezm (zipped)Hi folks.
I am getting the following exception on my action method.
No result defined for action ........ and result input
But my action method is annotated with @SkipValidation so I do not know why it is firing this error.
Chris

Attachment:
user_207128.ezm (zipped)It's highly probable that at some moment in the action process you (or
the framework) return "input" as the result.
Cimballi
On Sun, Aug 1, 2010 at 2:54 PM, Chris Miles <chris@(protected):
> Hi folks.
>
> I am getting the following exception on my action method.
>
> No result defined for action ........ and result input
>
> But my action method is annotated with @SkipValidation so I do not know why it is firing this error.
>
> Chris
--
Cimballi
JAVA J2EE Freelance
http://javajeeleader.elance.com/

Attachment:
user_207129.ezm (zipped)Hi, It is not being returned by me so without having to debug the source is
anything which might be triggering it?
thanks
Chris
----- Original Message -----
From: "Cimballi" <cimballi@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Sunday, August 01, 2010 9:36 PM
Subject: Re: No result defined for action ........ and result input
> It's highly probable that at some moment in the action process you (or
> the framework) return "input" as the result.
>
> Cimballi
>
>
> On Sun, Aug 1, 2010 at 2:54 PM, Chris Miles <chris@(protected):
>> Hi folks.
>>
>> I am getting the following exception on my action method.
>>
>> No result defined for action ........ and result input
>>
>> But my action method is annotated with @SkipValidation so I do not know
>> why it is firing this error.
>>
>> Chris
>
>
>
> --
> Cimballi
> JAVA J2EE Freelance
> http://javajeeleader.elance.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_207130.ezm (zipped)As a first step you can try to activate the logs for Struts and Xwork
and look if they say anything when returning from the action.
Cimballi
On Sun, Aug 1, 2010 at 4:04 PM, Chris Miles <chris@(protected):
> Hi, It is not being returned by me so without having to debug the source is
> anything which might be triggering it?
>
> thanks
>
> Chris
>
> ----- Original Message ----- From: "Cimballi" <cimballi@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Sunday, August 01, 2010 9:36 PM
> Subject: Re: No result defined for action ........ and result input
>
>
>> It's highly probable that at some moment in the action process you (or
>> the framework) return "input" as the result.
>>
>> Cimballi
>>
>>
>> On Sun, Aug 1, 2010 at 2:54 PM, Chris Miles <chris@(protected):
>>>
>>> Hi folks.
>>>
>>> I am getting the following exception on my action method.
>>>
>>> No result defined for action ........ and result input
>>>
>>> But my action method is annotated with @SkipValidation so I do not know
>>> why it is firing this error.
>>>
>>> Chris
>>
>>
>>
>> --
>> Cimballi
>> JAVA J2EE Freelance
>> http://javajeeleader.elance.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Cimballi
JAVA J2EE Freelance
http://javajeeleader.elance.com/

Attachment:
user_207131.ezm (zipped)For me is not working. I want something like this:
<action name="mainContent"
class="com.integrationpath.mengine.webapp.action.ArticleAction"
method="list">
<result
name="success">/themes/%{application_theme}/pages/production/mainContent.jsp</result>
</action>
where "application_theme" is an attribute on Application Context. I want to
redirect to a dynamic URL created in runtime based on this variable - and
still keep the struts.xml structure.
The error that I get now is this:
"2010-08-02 10:29:41.718:
org.apache.jasper.servlet.JspServlet:WARN:
PWC6117: File
"D:\projects\mengine\src\main\webapp\themes\\pages\production\mainContent.jsp"
not found"
Is like this string is not parsed and variables not replaced with their
values.
Any suggestion?
DNewfield wrote:
>
> On 7/30/10 3:42 AM, colaru wrote:
>> Good question. Did you get a response, somehow?
>> Is possible to use attributes from request, session or application in
>> dynamic URL's?
>> I'm interested in this.
>
> http://struts.apache.org/2.1.8.1/struts2-core/apidocs/org/apache/struts2/dispatcher/StrutsResultSupport.html
>
> Although now %{} works, too (and makes more sense as ${} usually means
> EL, not OGNL).
>
> -Dale
>
>> mikeh96 wrote:
>>>
>>> I would like to do something like this:
>>>
>>> (e.g. http://foo/view.action?page=help.vm)
>>>
>>> <action name="view"
>>> class="
com.opensymphony.xwork2.ActionSupport">
>>> <interceptor-ref name="defaultStack" />
>>> <result
>>> type="velocity">/templates/screens/#request['page']</result>
>>> </action>
>>>
>>> I know I can do it if I write my own action with setters/getters for the
>>> parameter .. but I was wondering
>>> if I can use some ognl syntax or other (e.g.
>>> $request.getParameter("page"))
>>>
>>> thanks
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_207133.ezm (zipped)On 8/2/10 3:31 AM, colaru wrote:
> For me is not working. I want something like this:
>
> <action name="mainContent"
> class="com.integrationpath.mengine.webapp.action.ArticleAction"
> method="list">
> <result
> name="success">/themes/%{application_theme}/pages/production/mainContent.jsp</result>
> </action>
That should work if <s:property value="%{application_theme}"/> would
print the value you want in the resulting .jsp.
> where "application_theme" is an attribute on Application Context. I want to
> redirect to a dynamic URL created in runtime based on this variable - and
> still keep the struts.xml structure.
I'm not sure what you mean by attribute. Is it a bean? Is it a
message? Something else? Whatever it is, you should be able to get it
by doing the following and filling in the appropriate FOO below based
the answer to this question.
This tells me that you don't have a getApplication_theme() on your action.
If you make your action implement ApplicationContextAware
And add not only
public void setApplicationContext(ApplicationContext
newApplicationContext) throws BeansException;
but also
public ApplicationContext getApplicationContext();
Then you should be able to say
%{applicationContext.bean('application_theme')}
or
%{applicationContext.message('application_theme')}
or
%{applicationContext.FOO}
> "D:\projects\mengine\src\main\webapp\themes\\pages\production\mainContent.jsp"
> not found"
>
> Is like this string is not parsed and variables not replaced with their
> values.
This must be being parsed, since the %{application_theme} portion is no
longer present. It evaluated to an empty string.
-Dale

Attachment:
user_207135.ezm (zipped)I think, depending on which version of struts you're using, in
struts.xml files, you use $, not % for OGNL expressions... So, try
this -
<action name="mainContent"
class="com.integrationpath.mengine.webapp.action.ArticleAction"
method="list">
<result name="success">/themes/${application_theme}/pages/production/mainContent.jsp</result>
</action>
-Wes
On Mon, Aug 2, 2010 at 10:10 AM, Dale Newfield <dale@(protected):
> On 8/2/10 3:31 AM, colaru wrote:
>>
>> For me is not working. I want something like this:
>>
>> <action name="mainContent"
>> class="com.integrationpath.mengine.webapp.action.ArticleAction"
>> method="list">
>> <result
>>
>> name="success">/themes/%{application_theme}/pages/production/mainContent.jsp</result>
>> </action>
>
> That should work if <s:property value="%{application_theme}"/> would print
> the value you want in the resulting .jsp.
>
>> where "application_theme" is an attribute on Application Context. I want
>> to
>> redirect to a dynamic URL created in runtime based on this variable - and
>> still keep the struts.xml structure.
>
> I'm not sure what you mean by attribute. Is it a bean? Is it a message?
> Something else? Whatever it is, you should be able to get it by doing the
> following and filling in the appropriate FOO below based the answer to this
> question.
>
> This tells me that you don't have a getApplication_theme() on your action.
>
> If you make your action implement ApplicationContextAware
>
> And add not only
> public void setApplicationContext(ApplicationContext newApplicationContext)
> throws BeansException;
>
> but also
>
> public ApplicationContext getApplicationContext();
>
> Then you should be able to say
> %{applicationContext.bean('application_theme')}
> or
> %{applicationContext.message('application_theme')}
> or
> %{applicationContext.FOO}
>
>
>>
>> "D:\projects\mengine\src\main\webapp\themes\\pages\production\mainContent.jsp"
>> not found"
>>
>> Is like this string is not parsed and variables not replaced with their
>> values.
>
> This must be being parsed, since the %{application_theme} portion is no
> longer present. It evaluated to an empty string.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

Attachment:
user_207132.ezm (zipped)On 7/28/10 2:16 PM, Ryan Beckes wrote:
> I'm working my way through properties and I'm kind of stuck. I have a
> properties file (package.properties) with a "message" entry...
>
> Index.message= Color
>
> ... I am able to pull this message via the s:text tag, so I know it's
> available in the value stack
That inference is mistaken. The value isn't on the value stack, it's
available from the i18n code.
> but when I try to pull the same message for
> the select label below, it does not work. I've also tried %{message} and
> %{getText('message')}.
%{message} evaluates to a getMessage() call on your action (if that
exists, otherwise it'll look for that call on other values lower down in
the valuestack).
%{getText('message')} will call getText('message') on your action.
Assuming you've extended ActionSupport, then this will look up 'message'
in package.properties, but you haven't indicated there is such a value
there.
Try: "%{getText('Index.message')}"
-Dale

Attachment:
user_207134.ezm (zipped)Hi there!
I store session parameters in a Struts2 session map that I get in my actions
using the SessionAware interface. My Application is in the /MyApp path.
After setting up the struts2 application on an Apache server with an inverse
proxy redirect that makes the URL http://www.appdomain.com/ point to my
local tomcat on localhost:8080/MyApp, Struts2 session handling doesn't work
anymore. I expect that the session cookies are stored for the Struts2
context of http://localhost:8080/MyApp instead of http://www.appdomain.com/
.
Is there a solution in Struts2 configuration? Or in programmatically
changing the session cookie somehow? Couldn't find any info about this on
the interwebs or in the official documentation. Please help, I'm already in
production and my logins don't work ;-)
Best regards, Tim
(hope I don't do wrong by posting here, not using mailing lists often but
will try to help others too)

Attachment:
user_207137.ezm (zipped)Hi Tim,
what is your apache webserver version? i have you tried with a
ProxyPassReverse declaration?
Thanks,
Nuwan C.
On Mon, Aug 2, 2010 at 9:05 PM, Tim Dellas <dellas@(protected):
> Hi there!
>
>
>
> I store session parameters in a Struts2 session map that I get in my
> actions
> using the SessionAware interface. My Application is in the /MyApp path.
>
>
>
> After setting up the struts2 application on an Apache server with an
> inverse
> proxy redirect that makes the URL http://www.appdomain.com/ point to my
> local tomcat on localhost:8080/MyApp, Struts2 session handling doesn't work
> anymore. I expect that the session cookies are stored for the Struts2
> context of http://localhost:8080/MyApp instead of
> http://www.appdomain.com/
> .
>
>
>
> Is there a solution in Struts2 configuration? Or in programmatically
> changing the session cookie somehow? Couldn't find any info about this on
> the interwebs or in the official documentation. Please help, I'm already in
> production and my logins don't work ;-)
>
>
>
> Best regards, Tim
>
> (hope I don't do wrong by posting here, not using mailing lists often but
> will try to help others too)
>
>

Attachment:
user_207139.ezm (zipped)Hi Nuwan!
To be frank: I don't know - I don't have access to the production server and
just push up my .WARs. But just to let everyone know:
I just solved the problem with a dirty hack: I passed the Session Id to the
JSP and use a javascript to set the needed JSESSIONID cookie clientside.
<s:if test='sessionid && !sessionid.equals("")'>
<script type="text/javascript">
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
$(document).ready(function() {
createCookie("JSESSIONID","<s:property value='sessionid'
/>",3);
});
</script>
</s:if>
Got the JS code from this page: http://www.quirksmode.org/js/cookies.html
Thank you, problem solved!
Best Regards,
Tim
-----Ursprüngliche Nachricht-----
Von: nuwan chandrasoma [mailto:mymailnot@(protected)]
Gesendet: Dienstag, 3. August 2010 12:31
An: Struts Users Mailing List
Betreff: Re: Struts2 session problem (after migrating behind reverse proxy)
Hi Tim,
what is your apache webserver version? i have you tried with a
ProxyPassReverse declaration?
Thanks,
Nuwan C.
On Mon, Aug 2, 2010 at 9:05 PM, Tim Dellas <dellas@(protected):
> Hi there!
>
>
>
> I store session parameters in a Struts2 session map that I get in my
> actions using the SessionAware interface. My Application is in the
> /MyApp path.
>
>
>
> After setting up the struts2 application on an Apache server with an
> inverse proxy redirect that makes the URL http://www.appdomain.com/
> point to my local tomcat on localhost:8080/MyApp, Struts2 session
> handling doesn't work anymore. I expect that the session cookies are
> stored for the Struts2 context of http://localhost:8080/MyApp instead
> of http://www.appdomain.com/ .
>
>
>
> Is there a solution in Struts2 configuration? Or in programmatically
> changing the session cookie somehow? Couldn't find any info about this
> on the interwebs or in the official documentation. Please help, I'm
> already in production and my logins don't work ;-)
>
>
>
> Best regards, Tim
>
> (hope I don't do wrong by posting here, not using mailing lists often
> but will try to help others too)
>
>

Attachment:
user_207136.ezm (zipped)I think this is a browser/OS specific behaviour, not related to Struts
or even to HTML at all.
Em 26-07-2010 13:20, RogerV escreveu:
>
> Is there a way of specifying the start directory to be used when the user
> hits the "browse" button? As far as I can see, the system "remembers" where
> it was looking last time, but this seems to be when the "file selector" was
> last used, regardless of which particular instance was used. (i.e if I have
> 5 file uploads, all needing to start in a different location, each of them
> shares the "last directory used" - or appears to)
>
> Regards

Attachment:
user_207138.ezm (zipped)I've asked this question on the Maven listserv, but didn't not get a
response back so I will ask on this one also.
What other commands are there available to make Struts2 archetypes?
For now I've been using this:
mvn archetype:create -DgroupId=tutorial -DartifactId=tutorial
-DarchetypeGroupId=org.apache.struts
-DarchetypeArtifactId=struts2-archetype-starter
-DarchetypeVersion=2.0.11.2-SNAPSHOT
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
It's too complicated of a project after I do eclipse:eclipse, so are there a
simpler version of the above command?
Roland T. Craddolph
Amagatto Solutions LLC
Principal Member and Lead Architect
Email: rcraddolph@(protected)
Website: http://www.amagatto.com

Attachment:
user_207140.ezm (zipped)
I am using struts with spring, and getting same exception.
I used StrutsSpringTestCase class.
Anyone have come clue????? I wud appreciate
Dan - Is your Struts 2 application using Spring? If it isn't you shouldn't
need to use the StrutsSprintTestCase (but then I don't know why you would
get the error you did).
If you are using Spring then I don't have any good advice for you as I've
not used the JUnit plugin much with a Struts 2 - Spring application.
Bruce
dolsen wrote:
>
> When I follow the web site
> http://www.brucephillips.name/blog/index.cfm/2009/9/5/Unit-Testing-A-Struts-2-Action-Class--Struts-2-JUnit-Plugin
> I get the following error when trying to run my test case. I then try to
> extend StrutsSpringTestCase and I get a different error. Below is my code
> the two different errors I get.
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.