1

I have placed Commonsfileuploadservlet folder inside webapps. And inside that folder i have written upload.jsp

After switching on the tomcat server, while attempting to run the jsp file, the below error comes in the browser.

What might be the cause?

The requested resource (/Commonsfileuploadservlet/upload.jsp) is not available.

LGAP
  • 2,365
  • 17
  • 50
  • 71
  • I have restarted the server too. – LGAP Sep 13 '10 at 18:43
  • where did you put that folder exactly? Give full path – Bozho Sep 13 '10 at 18:49
  • Anything in server logs? Check for most recent log updates in `Tomcat/logs` folder. Do you write raw Java code in JSP using old fashioned scriptlets? The JSP might simply have failed to compile. As quick test of webapp being properly deployed, place a dummy `test.html` file with something like `

    Test

    ` inside.
    – BalusC Sep 13 '10 at 18:50
  • C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Commonsfileuploadservlet\upload.jsp – LGAP Sep 13 '10 at 18:59
  • @BalusC am not using any IDEs. Yes, I am writing raw jsp code. What should be done to make JSP file compiled? – LGAP Sep 13 '10 at 19:01
  • @BalusC even the test.html is not working... same error for that too – LGAP Sep 13 '10 at 19:04
  • How about the logs? Raw Java code should not go in JSP, but in Servlet. Not directly a technical problem, but it's a semantic and maintenance problem. See also [how to avoid Java code in JSP](http://stackoverflow.com/questions/3177733/howto-avoid-java-code-in-jsp-files). – BalusC Sep 13 '10 at 19:08
  • Yeah BalusC. You're absolutely correct. I checked the logs. I could find a error stating invalid xml format, for the xml file which was placed inside that folder. I corrected that and now its working fine. Thanks a lot. If u dont mind, can you post the same as answer so that I can accept your answer. – LGAP Sep 13 '10 at 19:14

1 Answers1

1

As requested by OP, I am reposting the comment which solved the problem as an answer:


Anything in server logs? Check for most recent log updates in Tomcat/logs folder. It might contain detail about startup errors.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555