View Single Post
  #1 (permalink)  
Old September 12th, 2005, 07:31 PM
crystal123 crystal123 is offline
Registered User
Join Date: Sep 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Struts Plugin


I am working on an example from chapter 4 of the "Professional Jakarta Struts" book ISBN 0-7645-4437-3, pages 84-86. The problem I have is getting the WroxPlugin (implementing Plugin) to read a property file called props.txt.

I revised the code:
File file = new File("PATH TO PROPERTIES FILE");


File file = new File("props.txt");
where props.txt has the content name=crystal

When I deployed and ran this web app, I have the following exception:

javax.servlet.ServletException: ch04\props.txt (The system cannot find the path specified)
    org.apache.struts.action.ActionServlet.initModuleP lugIns(
    javax.servlet.GenericServlet.init(GenericServlet.j ava:261)
    org.apache.catalina.valves.ErrorReportValve.invoke (
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    org.apache.tomcat.util.threads.ThreadPool$ControlR Source)

...I assume it had to do with the placement of the props.txt which I was not sure where to put it, so I put it in every sub directory in this web app. Yet, I still have the same error. I really stuck now, please help me. Any suggestion is appreciated.

Thank you,