Note that there are some explanatory texts on larger screens.

plurals
  1. POjavascript not working on jsp pages redirected from servlet
    primarykey
    data
    text
    <p>I have servlet which does a forward using requestdispatcher() to one of my jsp pages</p> <pre><code>request.getRequestDispatcher("/WEB-INF/view/mypage.jsp").forward( request, response); </code></pre> <p>The target <strong><em>mypage.jsp</em></strong> has some jquery goodness which required to do some show/hide stuff but for some reason the jquery is not being triggered when the jsp is displayed after being forwarded from the servlet, but it works when I directly access the page via the address bar(I placed the page outside the web-inf to access is directly).</p> <p>Even a simple <code>&lt;body onload="alert('Testing')"&gt;</code> is also not working. I'm also using <strong><em>HTML5 and jquerymobile</em></strong> in my jsp.</p> <p>Any replies to fill-up the gaps in my knowledge would be great. Thanks</p> <p>Following is my jsp page :</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;My App&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body onload="alert('Even this is not popping up')"&gt; -- Stuff-- &lt;/body&gt; &lt;/html&gt; &lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body onload="alert('Even this is not popping up')"&gt; -- Stuff-- &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload