I have a servlet that does forward using requestdispatcher () to one of my jsp pages
request.getRequestDispatcher("/WEB-INF/view/mypage.jsp").forward(
request, response);
The target mypage.jsp has some jquery goodwill that is required to create some show / hide files, but for some reason jquery does not start when jsp is displayed after redirecting from the servlet, but it works when I directly access the page through the address bar (I immediately moved the page outside of web-inf for access).
Even simple <body onload="alert('Testing')">also does not work. I also use HTML5 and jquerymobile in my jsp.
Any answers to filling the gaps in my knowledge would be wonderful. Thanks
The following is the jsp page:
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
</head>
<body onload="alert('Even this is not popping up')">
-- Stuff--
</body>
</html>
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
</head>
<body onload="alert('Even this is not popping up')">
-- Stuff--
</body>
</html>