p27
p27

Reputation: 2222

JQuery issue while deploying on tomcat and weblogic

i am trying to run a jQuery on tomcat server and weblogic server but its not working

  <html>
<head>
    <script src="/WEB-INF/js/jquery-1.7.1.js" language="javascript" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
          $(document).ready(function(){
              $("button").click(function(){
                $("p").hide();
              });
            });
    </script>
        <link href="/WEB-INF/css/styles.css" type="text/css" rel="Stylesheet" />
        <title>Dual List Box</title>
</head>
<body>
        <h2>This is a heading</h2>
        <p>This is a paragraph.</p>
        <p>This is another paragraph.</p>
        <button>Click me</button>
</body>
</html>

can any one help me ..!!

Upvotes: 0

Views: 1854

Answers (1)

Chris
Chris

Reputation: 23181

If you're deploying a war file, the contents of the WEB-INF directory won't be accessible to the public via http. Ensure your js and css directories are in the root of the war (on the same level as WEB-INF) then change your path in the html to /css/styles.css and /js/jquery-1.7.1.js in your style and script tags.

Upvotes: 1

Related Questions