• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileNotFound error Jrun 4

 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have been following the book HFS & jsp with the exception of using Jrun instead of Tomcat in the first example when i press the submit button in the form.html with the "action" SelectBeer.do if get the following error:
/Beer-v1/SelectBeer.do


java.io.FileNotFoundException: /Beer-v1/SelectBeer.do
at jrun.servlet.file.FileServlet.service(FileServlet.java:349)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


I have all the files needed in threre correct locations and here is my web.xml configuration.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
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">

<servlet>
<servlet-name>Ch3 Beer</servlet-name>
<servlet-class>com.example.web.BeerSelect</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Ch3 Beer</servlet-name>
<url-pattern>/SelectBeer.do</url-pattern>
</servlet-mapping>

</web-app>

could any one please help me out on this many thanks.
 
Amarender Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

and whats your complete URL

amar
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Martyn Clark:

I have all the files needed in threre correct locations....


Where are they?
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thank you for your reply,
the complete url is Server/Beer-v1/Select.do

and the directory structure is:
Beer-v1 form.html file
WEB-INF containing web.xml
classes > com > example > web > BeerSelect.class

Thanks again.
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
complete url is Server/Beer-v1/Select.do


Actually, that is partial. where is the http:// part before the Server/.... stuff.

And for the directory structure can you start it from root. like c:\

Mark
[ November 28, 2005: Message edited by: Mark Spritzler ]
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark sorry about that
full url http://localhost:8100/Beer-v1/form.html
the web page has form with action="SelectBeer.do"

Directory is E:\JRun4\servers\default\Beer-v1\WEB-INF\classes\com\example\web\BeerSelect.class

cheers.
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have found the problem is that jrun uses a different DTD you have to include <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
instead of the of the one that i am familier with at this early stage of learning about servlets.
Thanks all the same...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!