Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the 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 November 26th, 2006, 04:38 PM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default struts book -- ch03

Hi,

I'm following chapter 3 of Struts book to the letter.. using struts 1.3.5, Tomcat 5.5... get error on index.jsp... pls see screen-shot here.. www.mayacove.com/java/error.gif

did index.jsp, and the classes, all following instructions in the book, the classes (LookupForm and LookupAction) compile fine.. put the packages from Jakarta Struts download where they belong..

error says "org.apache.jasper.JasperException: /index.jsp(34,0) Unable to find setter method for attribute: name..."

which refers to this line in jsp:

  <html:form action="Lookup" name="lookupForm" type="ch03.LookupForm">

what is wrong with "name" attribute....

JSP servlet is not non-existent (when look in tomcat/work/.... etc.. don't see either index_jsp.java or index_jsp.class..) i.e. JSP for some reason is not even being read by container..)

I have in struts-config.xml:

  <form-beans>
    <form-bean name="lookupForm" type="ch03.LookupForm" />
  </form-beans>

  <action path="/Lookup" type="ch03.LookupAction" name="lookupForm">....</action>

in LookupAction.java:

  LookupForm lookupForm = (LookupForm)form;

(this is confusing: so lookupForm is name of form but also an instantiation of the other class in the package...(??)

would appreciate any leads.. thank you..





 
Old December 28th, 2006, 09:19 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The attribute name isnt allowed. So you have to deleted it.

Code:
<html:form action="Lookup">
  <table width="45%" border="0">
    <tr>
      <td>Symbol:</td>
      <td><html:text property="symbol" /></td>
    </tr>
...
 
Old January 5th, 2007, 09:29 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello to all. I have a question: about which book on Struts 1.3.5 are you speaking?

Giò

 
Old January 8th, 2007, 04:54 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Professional Jakarta Struts (James Goodwill, Richard Hightower)

ad maya:

    the problem isnt in index.jsp.
    it might be in LookupForm.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch03 Listing3_18 smiller BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 September 25th, 2006 02:02 PM
struts book aytacakin J2EE 1 January 10th, 2006 05:57 PM
Ch03 default.aspx under App_Code error kai BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 January 5th, 2006 12:28 AM
Beginning JSP Web Development Book - Struts questi gstoyanoff JSP Basics 2 February 25th, 2004 02:21 PM
ch03, holidaypage ernstG BOOK: Beginning ASP.NET 1.0 4 November 8th, 2003 03:39 AM





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