Hello,
I am attempting to construct a simple Model-2 implementation using both a
Servlet and a JSP page. What I am trying to do is by clicking a button on
my index.html, I invoke the servlet. A couple of server side checks are
done, essentially validating the user, and then I want to forward the
request to a menu type of page.
The code for the dispatching looks like this in the servlet:
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
UnavailableException,IOException,ServletException
{
processRequest(req, resp);
}
private void processRequest(HttpServletRequest req, HttpServletResponse
resp)
{
String page = null;
UserBean ub = null;
PrintWriter outp = null;
try
{
page = "/userSuperUser.jsp";
RequestDispatcher disp = getServletContext().getRequestDispatcher(page);
disp.forward(req, resp);
}
}
As you can tell, its nothing fancy with everything being hardcoded just to
start to get it working. The servlet is also packaged in
com.mycompany.mygroup.Servlet. Our directory structure is expanded under
the web application mapping on our Unix server underneath the
/project/webapps/WEB-INF/classes directory with the jsp pages under
/project/webapps.
But when I run it, the forward never occurs. Is there something that I am
doing wrong such that the jsp page isn't being found? Any assistance would
be greatly appreciated.
Thanks,
John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists