Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

HTTP Status 404 - /testJSP1/BasicCounter.jsp

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I got this error when I run my JSP file:

HTTP Status 404 - /testJSP1/BasicCounter.jsp

type Status report

message /testJSP1/BasicCounter.jsp

description The requested resource (/testJSP1/BasicCounter.jsp) is not available.


I use Tomcat5.
JSP file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title></title>
</head>
<body>

The page count is:
<%
out.println(foo.Counter.getCount());
%>

</body>
</html>

And Java file is:
package foo;

public class Counter {

private static int count;
public static synchronized int getCount(){
count++;
return count;
}

}
web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<display-name>JSP Test</display-name>
<description>
JSP Test
</description>

<servlet>
<servlet-name>MyBasicCounter</servlet-name>
<jsp-file>/BasicCounter.jsp</jsp-file>
</servlet>

</web-app>

Could you please help to solve this problem.

Thank you in advance.

Tom
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tom Nishan wrote:Hello I got this error when I run my JSP file



How do you run it?
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic