ActionErrors: how to keep messages in the database

Discussion in 'Java' started by nkunkov@escholar.com, Mar 5, 2007.

  1. Guest

    Hello!
    I'm creating action errors for my web page in the following way:

    ActionErrors errors = new ActionErrors();
    errors.add("message123", new
    ActionMessage("error.required.thisfield"));

    A constructor of ActionMessage recieves a key to a message resource
    "error.required.thisfield".
    The message resource is usually a file.

    I would like to store my error messages in the database. How would I
    instantiate the ActionMessage in that case? Or I will have to create
    ActionErrors in a different way?
    Any help on how to use database instead of a resource file for error
    messages text would be appreciated.


    Thank you
    NK
    , Mar 5, 2007
    #1
    1. Advertising

  2. Guest

    On Mar 5, 2:32 pm, "" <>
    wrote:
    > Hello!
    > I'm creating action errors for my web page in the following way:
    >
    > ActionErrors errors = new ActionErrors();
    > errors.add("message123", new
    > ActionMessage("error.required.thisfield"));
    >
    > A constructor of ActionMessage recieves a key to a message resource
    > "error.required.thisfield".
    > The message resource is usually a file.
    >
    > I would like to store my error messages in the database. How would I
    > instantiate the ActionMessage in that case? Or I will have to create
    > ActionErrors in a different way?
    > Any help on how to use database instead of a resource file for error
    > messages text would be appreciated.
    >
    > Thank you
    > NK


    See if this helps.
    http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=49385
    , Mar 6, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. msa
    Replies:
    0
    Views:
    2,445
  2. Replies:
    0
    Views:
    591
  3. Pallav Jain
    Replies:
    0
    Views:
    376
    Pallav Jain
    Apr 10, 2007
  4. Andrew Poulos

    LAN with database giving error messages

    Andrew Poulos, Dec 12, 2007, in forum: Javascript
    Replies:
    3
    Views:
    133
    Thomas 'PointedEars' Lahn
    Dec 13, 2007
  5. hisan
    Replies:
    1
    Views:
    1,303
    Dan Stromberg
    Jun 25, 2012
Loading...

Share This Page