Servlet calling struts application


Web tier: servlets, JSP, Web frameworks: Servlet calling struts application

  1. Servlet calling struts application (1 messages)

    Hi, I have a JSP which calls a struts application, it also post data to struts. This data is read from the request data by struts. This works fine. But i require to call struts from Servlet and not from JSP. What is the equivalent servlet code of the above JSP I tried using below code req.setAttribute("custid", "200"); getServletContext().getRequestDispatcher.forward(req,resp) But struts is not able to read the data from the request , how it was doing when JSP is calling struts. Thanks in advance.
  2. May be you should set contentType to your request to "application/x-www-form-urlencoded"