Results 1 to 3 of 3

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

  1. #1
    Join Date
    Jan 2013
    Posts
    3

    Question 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jan 2013
    Posts
    3

    Unhappy

    Quote 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •