Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlet request dispatcher

Status
Not open for further replies.

komyg

Programmer
Dec 13, 2005
68
BR
I have a HttpServlet that needs to send a html page when the browser calls it's doGet method, but this html page is not on the WebContent directory nor any of it's folders.

My doGet method looks like this:

ServletContext cont=super.getServletContext();

response.setContentType("text/html");

RequestDispatcher req=null;

req=cont.getRequestDispatcher("/build/gwtOutput/com.opus.Demo/Demo.html");

req.forward(request, response);

Where request is a HttpServletResquest interface, response is a HttpServletResponse interface and the path in the getRequestDispatcher method leads to the html file itself.

When I deploy the servlet using tomcat I get this error message:

The requested resource (/Demo/build/gwtOutput/com.opus.Demo/Demo.html) is not available.

What am I doing wrong?

Thanks,
Komyg
 
Please post this in the Servlets/JSP forum695

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top