[Logo]
Forums Register Login
struts-2.1.6 -- 'dojo' is undefined
I am trying to run this small example with struts-2.1.6 and I get this error on the simple jsp page that I paste below.

I am not sure what is missing there I am not able to get rid of this problem.


Sorry i missed that

commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
freemarker-2.3.13.jar
json-lib-2.1.jar
ognl-2.6.11.jar
struts2-core-2.1.6.jar
struts2-dojo-plugin-2.1.6.jar
xwork-2.1.2.jar

Above jars are in the classpath.
What are you mapping the S2 filter to?
This is the relevant portion of the filter mapping.

Well, that won't work well unless you've extracted the static files out of the Struts jar.

As the S2 documentation states, the expected filter mapping is "/*". This is because Struts contains static files (the Dojo libraries, in this case), and expects to see *every* request, so it can serve those files.

By mapping to something other than the recommended mapping you're bypassing the default S2 behavior, and must adjust your deployment accordingly.
You are life saver Dave.

This was the quicket solution I found on javaranch.

"/*" worked.

Thank you very much! This problem make me crazy.
I changed to "/*" and it works well.
One full day i stucked with the same problem..
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 4206 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 18, 2017 00:19:44.