struts-config.xml配置文件里定义你的ACTION指向的路径<input="/sss.jsp" path="/login" type="com.xxx.xxAction" scope="request">

解决方案 »

  1.   

    tag extends BaseHandlerTag
    在doStartTag()方法里:              
                       JspWriter out = pageContext.getOut();
    ActionMessages messages= (ActionMessages)     RequestUtils.getActionMessages(pageContext,Globals.MESSAGE_KEY);
    if(actionMessages == null)
    {
    return SKIP_BODY;
    }
    Iterator iterator = messages.get();
    while(iterator.hasNext())
    {
    ActionMessage message = (ActionMessage)iterator.next();
    String msg = this.message(null, message.getKey());
                               out.write(msg );
    }
      

  2.   

    定义一个处理错误页面,然后在 Action 中定义一个错误转向,使用 ActionErrors 来传递错误信息
      

  3.   

    我来谈一下我的一点看法,首先,你要传输errorMessage,你要用ActionErrors,你可以在你的form里面建立一个validate方法,注意,这个validate方法是ActionErrors类型的,然后ActionErrors error=new ActionErrors(),接着error.add("Key",new ActionError());这个Key就是你在页面要用的,在要显示错误信息的地方可以写<netui:error value="Key">,netui是weblogic的标签,至于那个structs的,应该是<html:errors property="" >,我记不太清楚了,你可以去查一下,然后在ApplicationResources.properties文件里面写入你的错误信息,当然了,你也可以自己写properties文件,这是structs-config.xml默认的文件。以上是我的一点看法,有不当之处,请改正,谢谢。
      

  4.   

    J2EE_ME(舍甫琴科)
     真客气啊
    呵呵