sir I created a servlet and at the end forwarding to some JSP using request dispatcher object... Every time iam getting HTTP status 404 error why...iam using tomcat...please tell me where iam going wrong... [ September 21, 2007: Message edited by: Bear Bibeault ]
Where are you getting the RequestDispatcher reference from ? Are you getting it from the request object or from the ServletContext ? Are you using a relative or an absolute path ?
Please take the above assumptions into consideration and please post your source code.
And what does your servlet map to? Because the RequestDispatcher from the HttpServletRequest object accepts a relative URL and you've passed it 'texttotable.jsp' which would make it relative to the current request.
Originally posted by Tarun Yadav: And what does your servlet map to? Because the RequestDispatcher from the HttpServletRequest object accepts a relative URL and you've passed it 'texttotable.jsp' which would make it relative to the current request.
servlet path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\AccountingApplication\WEB-INF\classes\bintotext1.class now tell me what i should do now iam not gettong with the above words...
Ok...first, try to access each resource individually.
Comment out the forward in the servlet and try to access it by typing in the path. Next, try to access the JSP.
Then, check your logs ( $CATALINA_HOME/logs ) for any clue to exceptions being thrown. And instead of simply printing the exception message, use printStackTrace() to get more information.
Also, I'd suggest you put all your classes in a package, it's not recommended to put them in the default package. This includes your servlets.
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
a bit of art, as a gift, that will fit in a stocking