Results 1 to 3 of 3
  1. #1
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default actionErrors inside of Action

    I have this problem(I'm using struts)
    When I want to show an error that returns from hibernate, it starts to complicate
    I access to hibernate through facade -> Service -> Dao -> Hibernate

    When I send the exception of ViolationConstraint, it arrives to the action but when I want to returns to the original page, it returns me a blank page.
    In the catch block I have this

    Java Code:
        ActionErrors errors =new ActionErrors();
                        errors.add("everybody", new ActionError("errors.duplicate"));
                        saveErrors(request,errors);
    
                        System.out.println("here is the Constraint Exception!!!!!!!!!!!!!!!!!!!!");
                        return mapping.findForward(mapping.getInput());
    What is happening?
    Where is the error?

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

    Default

    try with
    return mapping.getInputForward();
    then tell me if it worked

  3. #3
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

Similar Threads

  1. Launch native app inside a JFrame???
    By benedums in forum Advanced Java
    Replies: 6
    Last Post: 02-25-2011, 03:23 PM
  2. string inside of a xml
    By Heather in forum XML
    Replies: 2
    Last Post: 03-28-2008, 05:21 PM
  3. Class inside an Interface
    By $hr!k@nt in forum New To Java
    Replies: 1
    Last Post: 12-21-2007, 10:56 AM
  4. How to call JSP inside Servlet
    By Swamipsn in forum Advanced Java
    Replies: 0
    Last Post: 07-31-2007, 12:50 PM
  5. To happen of ActionErrors to ActionMessage
    By Eric in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 07:09 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
  •