Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Jakarta Struts
This is the forum to discuss the Wrox book Professional Jakarta Struts by James Goodwill, Richard Hightower; ISBN: 9780764544378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Jakarta Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2005, 07:31 PM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Struts Plugin

Hi,

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");

to

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)
    ch04.WroxPlugin.init(WroxPlugin.java:49)
    org.apache.struts.action.ActionServlet.initModuleP lugIns(ActionServlet.java:1158)
    org.apache.struts.action.ActionServlet.init(Action Servlet.java:473)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:261)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    java.lang.Thread.run(Unknown 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,
Crystal
 
Old November 21st, 2005, 05:58 PM
Registered User
 
Join Date: Nov 2005
Location: Knoxville, Tennessee, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Crystal,

Try setting the path from the root of C:\\(path of file) also could be C:/. You might want to check that the properties to the file is not set to archive preventing you from reading it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
struts actions package: "struts", other packages? ojasrege Struts 1 July 21st, 2007 06:02 AM
need struts plugin for eclipse desukishore BOOK: Professional Jakarta Struts 1 June 9th, 2006 04:03 PM
Plugin problem of Eclipse with Struts inderjeet_79 BOOK: Professional Jakarta Struts 0 September 22nd, 2005 05:03 AM
Exception creating bean of class org.apache.struts chandseetare Apache Tomcat 0 May 14th, 2005 07:22 AM
Audio Plugin itHighway Classic ASP Components 1 January 31st, 2005 01:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.