struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Wannemacher" <w...@wantii.com>
Subject Re: More package weirdness
Date Mon, 03 Mar 2008 17:53:29 GMT
The questionChart action exists in a different namespace than the JSP.

Try -
namespace="/charts"

The leading / is significant.

-Wes

On 3/3/08, stanlick@gmail.com <stanlick@gmail.com> wrote:
> How can this JSP code
>
>   <s:url id="chartUrl" action="questionChart" namespace="*charts*"/>
>   <img src="<s:property value="%{chartUrl}" />"/>
>
>  which resolves to be:
>
>   <img src="charts/questionChart.action"/>
>
>
>  be generating this exception?
>  11:28:45,271 ERROR org.apache.struts2.dispatcher.Dispatcher.serviceAction():512
>  - Could not find action or result
>  There is no Action mapped for namespace */quiz* and action name
>  questionChart. - [unknown location]
>
>  Here is my def for the chart:
>
>
>  <package name="charts" namespace="/charts" extends=
>  "starter,jfreechart-default">
>
>  <result-types>
>
>  <result-type name="chart" class="org.apache.struts2.dispatcher.ChartResult"
>  default="true"/>
>
>  </result-types>
>
>  <action name="questionChart" class="acme.action.QuizGrader">
>
>  <result>
>
>  <param name="width">400</param>
>
>  <param name="height">300</param>
>
>  </result>
>
>  </action>
>
>  </package>
>
>
>
>  --
>  Scott
>  stanlick@gmail.com
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


Mime
View raw message