You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Rauser <ri...@procinity.com> on 2009/03/06 11:21:21 UTC

Struts 2.1.6 - No Action Extension, Cannot Access Dojo JS Files

Hi,

If a Struts 2.1.6 webapp's action extension is set to nothing in
struts.properties via
struts.action.extension=

Then all the javascript files normally accessible within the Dojo plugin
become inaccessible, i.e. the Struts filter believes requests for these
files are requests for actions. 

Can anyone suggest a way around this?

Thanks,
Rich

P.S. a more detailed explanation is provided below.

-----Original Message-----
From: Richard Rauser [mailto:richard.rauser@procinity.com] 
Sent: 05 March 2009 12:20
To: user@struts.apache.org
Subject: Struts 2.1.6 - No Action Extension, Cannot Access Dojo Javascript
Files


Hi all,

I recently began migrating a working Struts 2.0.11 app to Struts 2.1.6. This
has been a bit of a painful process, particularly moving from the SmartURLs
plugin to the Convention plugin and from ajax tags to the Dojo plugin.

Here is my problem: I am not using an action extension within my app, so
within struts.properties I have set:
struts.action.extension=

This works fine in 2.0.11, and ajax works OK. 

In 2.1.6, I have found that if the action extension is set to nothing as
above, then Struts does not expose any of the javascript files required for
Dojo ajax, but instead thinks I am requesting an action instead of a JS
file.

E.G. If I navigate within my browser to 
http://<my domain>/struts/dojo/struts_dojo.js

Then I get the following exception: 
There is no Action mapped for action name struts_dojo.js. - [unknown
location]

Naturally this means that any pages that use ajax via the Dojo plugin do not
work properly as these JS files cannot be loaded from script tags.

Now If I set the action extension within my 2.1.6 app to something, say
struts.action.extension=action

And then navigate to 
http://<my domain>/struts/dojo/struts_dojo.js

I can access the javascript file.

What I'm wondering is if this is expected behavior, or if this is a defect
(as I could access JS files fine with no action extension in 2.0.11)? I
can't see how I can reconcile these two behaviors that I desire in 2.1.6,
i.e. no action extension + availability of Dojo JS files. Any thoughts on
how I might do this?

Cheers,
Rich




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


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