Dave,

OK did as you suggested, cranked up the logging level and I do now get some
logging. I created a little sandbox app to test out some things with and
simplifying has really helped. Heres what I have now

<div>
  <s:action name="test" namespace="secondary" executeResult="true"/>
</div>
<div>
  <s:action name="secondary/test.action" executeResult="true"/>
</div>
<div>
  <s:url id="testUrlId" namespace="secondary" action="test"/>
  <s:a href="%{testUrlId}">execute test action</s:a>
</div>


Now the first div works exactly as expected. 

The second one also works how would expect it to. It Always generates a
stack trace with the error message "There is no Action mapped for action
name secondary/test.ation" regardless of how I try to specify the 'path' to
the action. Now I know that the namespace does not represent a path and that
I need to use the namespace attribute. I think thats fine and that doesn't
give me any kind of problem. I can always specify the namespace attribute
and all is well.

But the third div is my problem. There seems to be no way a can form a URL
for s:a tag that lets me build a link to the namespaced action. The link
directs the browser to...

http://localhost:8080/sandbox/secondary/test.action

That seems ok to me. but when I click this link I get this...

[example] DEBUG [http-8080-1] DefaultActionProxy.<init>(65) | Creating an
DefaultActionProxy for namespace  and action name test
[example] ERROR [http-8080-1] Dispatcher.serviceAction(512) | Could not find
action or result
There is no Action mapped for action name test. - [unknown location]
        at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
        at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
        at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
        at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
        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:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        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:263)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)


(Hope its OK to dump stacktraces here, apologies if its bad form).

it seems from the debug line "[example] DEBUG [http-8080-1]
DefaultActionProxy.<init>(65) | Creating an DefaultActionProxy for namespace 
and action name test" That there is no namespace defined. I will try to step
throught the DefaultActionProxy next to find out why that might be.

If thats correct (the link represents a path after all), am I going to have
to have all my links in the root namespace? I can do this of course, but it
seems a ilttle restrictive.

Just have to say thanks for all the feedback. I am always impressed with the
help given on these lists.

Paul B.



newton.dave wrote:
> 
> --- paulbrickell <[EMAIL PROTECTED]> wrote:
>> I don't think I was clear about what I am seeing. If I have an action tag
>> in my page like this...
>> 
>> <div>
>> <s:action name="/some-namespace/myAction" executeResult="true"/>
>> </div>
>> 
>> And a struts.xml file that defines a package with the namespace
>> 'some-namespace' that contains an action called myAction I see no call to
>> the target action (I am debugging and have a breakpoint in my action). I
>> simply get a blank space in my output. However if I past a full url in my
>> browser e.g. http://x.y.org/myApp/some-namespace/myAction.action all is
>> well.
> 
> Yeah, that's a little weird. If you turn up the logging is there anything
> on
> the console? I mean, clearly it'll work w/ the proper use of the
> "namespace"
> attribute etc. but something on the console might be handy if it isn't
> already there.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/actions-defined-in-a-package-are-visible-in-other-packages---tp11277458p15242369.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to