p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Java > Java Open Source > BOOK: Professional Jakarta Struts
I forgot my password Register Now
Register | FAQ | Members List | Calendar | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 7th, 2009, 11:30 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default <html:errors /> tag doubt

I have two confusions in the <html:errors> tag-
In chapter 10 of the book professional Jakarta Struts 1.1, Listing 10.2 index.jsp, I think <html:errors> tag is incomplete.
I tried to run like this in my own application but it did'nt work.
Code:
<@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<html>
<head>
   <title> struts application </title>
</head>
<body>
<table width="500" border="0" >
<tr>
  <td>%nbsp;</td>
</tr>
<tr bgcolor="#36566E">
   <td height="68" width="48%">
    <div align="center">
      <img src="images/hp_logo_worx.gif">
   </div>
  </td>
</tr>
<tr>
<td>%nbsp;</td>
</tr>
</table>

<html:errors/>-------------------------------(1, property not specified)

<html:form action="Lookup">
  <table width=45%" border="0" >
  <tr>
  <td><bean:message key="app.symbol" /></td>
   <td><html:text property="symbol"/></td>-------------(2)
  </tr>
 <tr>
 <td><html:submit/></td>
 </tr>
 </table>
</html:form>
</body>
</html>
what i know is when we write the <html:error> tag we mention the property name also:
<html:error property="symbol1"/>.-------------------------(3)

The reason this is required is when we make the ActionErrors object, we code like this:
ActionErrors err=new ActionErrors();
err.add("symbol1,new ActionError("keyname"));-----------(4)

So the "symbol1" in the add method is the value specified in the property at (3). So if we won't specify the property attribute then how will the <html:errors> will know about the error it refers to.

Secondly,In the book at page 169 below listing 10.3 its written that the "symbol1" at 4 is the value of the property of the <html:text> tag at (2).
But I have read that this "symbol1" at (4) corresponds to the value of the property at (3). I dont know what is correct. Plz help me in understanding the true concept.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 13th, 2009, 07:51 AM
Friend of Wrox
Points: 1,108, Level: 13
Points: 1,108, Level: 13 Points: 1,108, Level: 13 Points: 1,108, Level: 13
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

You dont need to mentioned the property for <html:errors/> tag, it just lists all form errors, its not for single error!
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
doubt in using <xsl:template> rajatake XSLT 5 December 15th, 2006 08:09 AM
How to dynamically insert <META> tag in .HTML? Abdul Hameed Javascript 1 August 11th, 2004 11:03 AM
how to dynamically insert <META> tag in .html Abdul Hameed XSLT 1 August 10th, 2004 04:58 AM
Can't get errors to display with <html:errors> michaeldill JSP Basics 0 August 2nd, 2004 02:47 PM
Dynamic HTML <<Events>> babloo81 Javascript 2 December 29th, 2003 12:40 PM



All times are GMT -4. The time now is 05:51 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc