This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Struts + Jquery (struts2-jquery-plugin-2.4.0.jar) and sj:head tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts + Jquery (struts2-jquery-plugin-2.4.0.jar) and sj:head tag" Watch "Struts + Jquery (struts2-jquery-plugin-2.4.0.jar) and sj:head tag" New topic
Author

Struts + Jquery (struts2-jquery-plugin-2.4.0.jar) and sj:head tag

Greg Werner
Ranch Hand

Joined: May 07, 2009
Posts: 54
All,

I am missing something obvious here, can someone please alleviate my suffering I have seen a few tutorials and no one runs into the problem I am having.

When trying to use the above library, the sj:head tag gets expanded to a bunch of paths that I don't think are being recognized and so I get javascript errors on the portion of the jsp page which is rendered from the sj:head tag. Here is what I am trying to do:



The above listed jar file is in my Tomcat 6 deployed WEB-INF/lib directory. I have tried loadFromGoogle which only loads the jquery and jquery ui portions and I have tried various values fro scriptPath to no avail. I have also tried jqueryui="true" which does nothing to change the situation.
Greg Werner
Ranch Hand

Joined: May 07, 2009
Posts: 54
I added



to my web.xml file and that fixed things. Apparently too many people use /* as their filter mapping without knowing what in the world is going on. I guess that is the assumption is made as well in the documentation for struts2-jquery.
Kyle Berkopes
Greenhorn

Joined: Jan 18, 2011
Posts: 1
Unfortunately this solution is not an option for my application. I have to believe that another method for configuring where to find the scripts exists. I, too, cannot find any answers in the struts jquery documentation. Does anyone have any ideas?

Greg Werner wrote:I added



to my web.xml file and that fixed things. Apparently too many people use /* as their filter mapping without knowing what in the world is going on. I guess that is the assumption is made as well in the documentation for struts2-jquery.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts + Jquery (struts2-jquery-plugin-2.4.0.jar) and sj:head tag