Announcement Announcement Module
Collapse
No announcement yet.
Spring MVC project template (Maven). Where is classic WebContent location ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring MVC project template (Maven). Where is classic WebContent location ?

    I have a template Spring MVC project (Maven).I'm trying to use JQuery datepicker in a JSP. I just can not find the correct location of where to put the jquery.js files! Wherever try to put applications do not see them.I thought to put them in /src/main/webapp but it does not work. Also I tried other locations ,but it does not work. I'm already a little bit crazy because of this. Perhaps the problem is that project from this template does not contain standard location "WebContent" as ordinary dynamic web project ?

    Can somebody help me ?
    Thanks

  • #2
    src/main/webapp is the correct location... WebContent is a eclipse thing src/main/webapp is a maven thing and also works in other IDEs WebContent only works in eclipse.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      src/main/webapp is the correct location... WebContent is a eclipse thing src/main/webapp is a maven thing and also works in other IDEs WebContent only works in eclipse.
      Thanks for answer. So if I put my js files in src/main/webapp this should work?
      This my code:
      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
      <script type="text/javascript" src="jquery-1.9.1.js"></script>
      <script type="text/javascript" src="jquery-ui.js"></script>

      <script>
      $(function() {
      $( "#datepicker" ).datepicker({changeYear: true});
      });
      </script>


      <tr>

      <td>Date of birth :</td>
      <td><form:input path="dob" id="datepicker" /></td>
      <td><form:errors path="dob" cssClass="error" /></td>
      </tr>
      But this does not work. Works only if i set src like web location src="http://code.jquery.com/jquery-1.9.1.js

      Thanks

      Comment

      Working...
      X