You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anandraj <an...@cevalsoft.com> on 2012/06/30 09:34:08 UTC

How does struts 2 and struts2 jquery includes javascript files in a jsp from their jar files

Hi,

         we are using struts2 with struts2 jquery in our application and 
i have noticed Struts2 and Struts2-jquery includes the javascripts files 
from the jar by including the tag of the framework. how it included the 
javascript file by including the tag ,is there any way to manually 
include the javascript files if we wants to ....


thanks in advanced

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


Re: How does struts 2 and struts2 jquery includes javascript files in a jsp from their jar files

Posted by Łukasz Lenart <lu...@gmail.com>.
2012/6/30 Anandraj <an...@cevalsoft.com>:
> Hi,
>
>         we are using struts2 with struts2 jquery in our application and i
> have noticed Struts2 and Struts2-jquery includes the javascripts files from
> the jar by including the tag of the framework. how it included the
> javascript file by including the tag ,is there any way to manually include
> the javascript files if we wants to ....

You mist implement your own version of StaticContentLoader interface
and add it to struts.xml as below:

<bean type="org.apache.struts2.dispatcher.StaticContentLoader"
class="com.demo.MyStaticContentLoader" name="myContentLoader" />
<constant name="struts.staticContentLoader" value="myContentLoader" />

Take a look on DefaultStaticContentLoader implementation.

Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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