Results 1 to 3 of 3
  1. #1
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    Default 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:
    Java 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

  2. #2
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default

    Look for repetitions / type (in the class name / init params?) in your struts-config.xml file

  3. #3
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    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.

Similar Threads

  1. Replies: 1
    Last Post: 10-17-2008, 11:18 AM
  2. Cant get the logic right
    By jermaindefoe in forum New To Java
    Replies: 4
    Last Post: 03-11-2008, 01:22 AM
  3. Using Enumeration to iterate through Hashtable
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-15-2008, 09:44 AM
  4. Hashmap
    By dirtycash in forum New To Java
    Replies: 5
    Last Post: 12-03-2007, 03:58 AM
  5. what is hashmap
    By gabriel in forum New To Java
    Replies: 5
    Last Post: 08-03-2007, 02:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •