title: conflict between "action" attribute in Struts 2
body: <p>I have try to pass the action information like ( Save or Edit ) from my struts2 action class ( CommonAction.java ) to jsp file ( test.jsp ).</p>
  
  <p>In action class, I used the below code to set action value.</p>
  
  <pre><code>request.setAttribute("action","Save");
  </code></pre>
  
  <p>When I try to get the action attribute in jsp file.</p>
  
  <pre><code>String actionValue = (String)request.getAttribute("action");
  </code></pre>
  
  <p>I am getting the action class instead of action value in my jsp file.</p>
  
  <p>Below is the exception trace.</p>
  
  <pre><code>java.lang.ClassCastException: com.actions.CommonAction cannot be cast to java.lang.String
  at org.apache.jsp.jsp.common.test_jsp._jspService(test_jsp.java:119)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
  at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
  at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
  at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
  at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
  at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
  at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
  at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
  at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
  at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
  </code></pre>
  
  <p>Is there any way to get action value without changing the attribute name ?</p>