I have created a login page in html which submits form to a servlet(LoginServlet).
On successful authentication, I have forwarded the request to a gwtPage.jsp which loads the nocache.js script
Approach 1: Below is my LoginServlet code
request.setAttribute("loginId",loginId);
dispatcher = request.getRequestDispatcher("gwtPage.jsp");
dispatcher.forward(request, response);
On my gwtPage I have included below script
<script type="text/javascript" language="javascript" src="pc/pc.nocache.js?<%= new Date()%>"></script>
However, after successful authentication from LoginServlet, the app points to gwtPage.jsp but doesnot load GWT module. It may be because after authentication the url shows: http://127.0.0.1:8888/LoginServlet
Approach 2: I tried an alternative, using response.sendRedirect method.
LoginServlet code
response.sendRedirect("gwtPage.jsp?gwt.codesvr=127.0.0.1:9997");
It points properly to http://127.0.0.1:8888/gwtPage.jsp?gwt.codesvr=127.0.0.1:9997 However, I am unable to send an hidden attribute(I do not want to pass it via URL parameter)
Please provide some suggestions for either of my approach. Any ideas are welcomed.