I am playing with Struts 2.1.2. (I have seen several other related topics on this mailing list but nothing quite explicitely about what follows.)
I add the following tag inside the <head>: <sx:head baseRelativePath="../scripts/dojo" debug="true" cache="false" compressed="false" /> Unsurprisingly, this yields the following in the html: <script language="JavaScript" type="text/javascript"> // Dojo configuration djConfig = { isDebug: true, bindEncoding: "UTF-8", baseRelativePath: "../scripts/dojo", baseScriptUri: "../scripts/dojo", parseWidgets : false }; </script> <script language="JavaScript" type="text/javascript" src="../scripts/dojo/dojo.js.uncompressed.js"></script> So far so good. The problem is what follows: <script language="JavaScript" type="text/javascript" src="/myapp/struts/ajax/dojoRequire.js"></script> <link rel="stylesheet" href="/myapp/struts/xhtml/styles.css" type="text/css"/> <script language="JavaScript" src="/myapp/struts/utils.js" type="text/javascript"></script> <script language="JavaScript" src="/myapp/struts/xhtml/validation.js" type="text/javascript"></script> <script language="JavaScript" src="/myapp/struts/css_xhtml/validation.js" type="text/javascript"></script> Where do these paths come from? I certainly don't have a struts/ folder inside my WebRoot... Wasn't the "baseRelativePath" parameter of the <sx:head> tag supposed to deal with that kind of issues? Is there a way of customizing this?