struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <>
Subject Re: Dojo javascript errors with ajax theme. please help
Date Tue, 22 Jul 2008 12:38:55 GMT
Pranav wrote:
> Hi, 
> I am using <s:head theme="ajax"/> in my jsp files. I have included everything as
per struts2 docs. But when I launch the page in FireFox, they show me 404 errors for several
javascript files. 
> Example are:
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
> ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js
> ../struts/dojo/src/widget/nls/en/TimePicker.js
> ../struts/dojo/src/widget/nls/en-us/TimePicker.js
> ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js
> ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js
> When I opened the struts2-core-2.0.11.jar file that my project is using, I did not find
these files at all. I am not using any of these components like date-time picker or calendar
objects but for some reason dojo plugin tries to GET these files. This gives a lot of problem
in our pre-prod system where firewalls and proxies are installed. Can someone please help
me get rid of these errors? What will I have to do? I will really appreciate help from experts.
> Thanks
> Pranav

In Struts 2.0.x, the files are bundled in the jar under 
org/apache/struts/static or somewhere nearby.

The are served by the struts filter only if the filter path enables it 
(eg. /*) and if the property struts.serve.static=true (default true).

In a production system, it's a very good idea to extract the files and 
serve them directly from Apache or your container as there'll be a 
significant performance improvement (very significant if apache serves 

I'm not sure why it would be loading the timepicker and date picker if 
you're not using them - check the html to see why there's a Requires 

In a production system, a good idea to create a custom dojo profile (in 
this case, for example, to remove locale files).  It makes a massive 
performance improvement by reducing the large number of GETs.

Hope that helps.
Jeromy Evans

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message