Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-23-2007, 03:12 AM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
iterate HashMap with logic
I have a class that extends of DispatchAction...
there I call DAO, I do a query to bring the information from the data base

request.setAttribute("categories",MyHMP);


HTML:
Code:
<logic:iterate id="cat" name="categories" type="java.util.Map.Entry" > <bean:write name="cat" property="value" /><br /> </logic:iterate>
When I do that, it shows me only the value of the hashmap, but i need the id too

do you know how can I do that? or what is the problem?

the exception is this


Cannot find message resources under key org.apache.struts.action.MESSAGE
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-03-2007, 10:40 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Peter is on a distinguished road
Look for repetitions / type (in the class name / init params?) in your struts-config.xml file
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-03-2007, 10:47 PM
Ed Ed is offline
Senior Member
 
Join Date: Jun 2007
Posts: 110
Ed is on a distinguished road
Hi,

Just insert following line to your Struts-config.xml
<message-resources parameter="resources.application"/>

As you can guess, it says that the properties are defined inside /WEB-INF/resources/application.properties file.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant get the logic right jermaindefoe New To Java 4 03-11-2008 01:22 AM
Using Enumeration to iterate through Hashtable Java Tip Java Tips 0 02-15-2008 09:44 AM
how to iterate a child element in XSD dynamically navya XML 0 12-13-2007 10:56 AM
Hashmap dirtycash New To Java 5 12-03-2007 03:58 AM
what is hashmap gabriel New To Java 5 08-03-2007 02:23 PM


All times are GMT +3. The time now is 04:15 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org