|
|
Can I use JQuery or ExtJs in a JSP with Spring MVC?
I am trying to use JQuesrry into a JSP called index.jsp. That index.jsp is a welcome page, it is configured into web.xml. My project have Spring MVC support and I have problem to show index.jsp.
Any ideas ???
Including javascript into your jsp page is normal behaviour of hypertext document. Maybe your path to the jquery lib is wrong.
Are you sure? I I believe that it serves a library like jackson-mapper-asl
It sounds like you most likely configured your dispatcher servlet in web.xml to map to the ucl pattern of /*
If this is the case, and you have a viewResolver mapping to WEB-INF/jsp/, and an index.jsp in the root of you WAR, it will never work. The view won't resolve and you should get a 404.
Not enough details...
Actually, if you *do* have the DispatcherServlet mapped to /*, just add
lt;mvc:default-servlet-handler/gt;
to your config and you should be fine. There are a few edge cases where it's better off to map the servlet to a prefix and use uclrewritefilter to remove said prefix, but as a rule the default tag does the trick.
Hope this helps
- Don
Sure you can.
Integrating JQuery is seamless with Spring MVC. See the following guide: 2011/01...tegration.html
There's a Maven project that you can download at the end of the guide. |
|