struts2 and hibernate, struts action is not working when i use more than one action in struts confg

58 Views Asked by At

I'm using struts and hibernate, when i add multiple action in struts.xml file, it reads only one action not others and also there no error. Here is my struts config file....form action name of jsp page is same, please help me anyone if you know the way......

<struts>
<package name="addController" extends="struts-default">

<action name="see" method="user" class="addController.Addaction">
<result name="input">/read.jsp</result>
<result name="success">/successview.jsp</result>
</action>

<action name="adduser" method="addEmployee" class="addController.Addaction">

 <interceptor-ref name="fileUpload">  
  <param name="maximumSize">97097152</param>  
  <param name="allowedTypes">  
   image/png,image/gif,image/jpeg,image/jpg</param>  
  </interceptor-ref>  
  <interceptor-ref name="defaultStack"></interceptor-ref>  

<result name="input">/addemp.jsp</result>
<result name="success">/success.jsp</result>
</action>

</package>
</struts>

Action class

private HttpServletRequest request;
private long mobile;
private int id;
private String imageContentType, imageFileName, documentContentType, documentFileName; 
private String  name;
private String  comname, department, designation, email, address, city, empid, maritalstatus;
private Date dob,anniversary;
private File image,document;

//getters && setters

public String addEmployee() throws Exception {
   System.out.println("addEmployee");
   return "success";
}

public String user() {
   System.out.println("user");
   return "success";
}
0

There are 0 best solutions below