I am using tomcat 5,windows xp
When i am displaying the result using jsp(by using request dispatcher), i am getting 404 error
My result.jsp is under root directory
But when i display result using "BeerSelect" servlet its working fine.
I have set classpath to point tomcat\common\lib\jsp-api.jar
could anyone help me to trouble shoot this problem.
This is my code
My jsp code is
[ARG: added code tags]
- I can't quite understand what's the significance of the difference in using BeerSelect or BeerExpert? To me BeerExpert seems to be a class capable of retrieving data from somewhere [database, memory objects, etc]. As long as the data's being retrieved correctly, there shouldn't be any trouble. If you're getting an exception at the line where you invoke a method on the Beer... instance, it might just be the source of your trouble.
- Have you checked to see if you're getting any exceptions during the course of the stated execution flow?
And by root directory, I assume that its the web app root directory.
I tried to invoke jsp directly from the url.But still i get the 404 resource not found error.
The beer expert class just returns a arraylist.I have checked its functionality its working fine..
In the above post if i remove the comments(green color) and remove the jsp part in the BeerSelect class, im getting the result.where the beerservlet formats the html and send to the browser.
But the problem is with the jsp file.The jsp file is under the root directory.Do we need to configure jsp sepearately.Please advice
Also, if you can't access the JSP file through a direct URL, then there's something definitely wrong with your deployment, assuming the answer to [a] is yes. Probably you should try re-deploying your web application.
vinoth kumartc wrote:I am able to see the result.jsp under my webapplication folder.But i could not invoke directly from url.But still i could access other html files and jsp files from url
vinoth kumartc is reading Oreily Head first to JSP and thats Mini MVC web App just lets try it
thanks for your reply.
vinoth kumartc wrote:Ya its true, i tried in a notepad that's why it did'nt recognize..I will try in a word pad and keep yout posted.
thanks for your reply.
You can program in a notepad, in a notepad++, in a vi or whatever simple text editor, that has completly nothing to do with your problem.
Can you show your folder hierarchy and your configuration files?
might help you as is a similar problem.