本帖最后由 aunt132467 于 2013-10-04 17:14:24 编辑

解决方案 »

  1.   

    我的意思是,struts.xml该怎么配置action,因为我发现action中他的方法返回是void,所以不知道该怎么配置,才能让其有检验用户名是否存在的功能
      

  2.   

    strutsz中execute()方法中一般都是返回
    SUCCESS和ERROR吧?
    如果你让其返回值
    return null;
    然后你写入到返回流中的信息就可以返回给页面了。。
      

  3.   

    <action name="checkJ" class="action.UsersAction" method="Checkjihuoma">
    </action>
      

  4.   


    不是很懂。但是本来方法是这个public void CheckUsername() throws Exception{  
            HttpServletResponse response = ServletActionContext.getResponse();  
              
            if(ms.checkUsername(getUsername())>0){  
      
                response.getWriter().write("1");  
      
            }else {  
      
                response.getWriter().write("0");  
                 
            }  
             response.getWriter().close();  
        }  貌似不需要返回值的。。
      

  5.   


    不是很行、、、没反应。。开了tomacat 点击没反应。
      

  6.   


    不是很行、、、没反应。。开了tomacat 点击没反应。要有啥反应?
    这样写之后看一下有没有执行这个action
    如果执行了action,再看一下页面取没取到值,页面取到值就ok了,
    这样写页面又不会跳转.
      

  7.   


    不是很行、、、没反应。。开了tomacat 点击没反应。要有啥反应?
    这样写之后看一下有没有执行这个action
    如果执行了action,再看一下页面取没取到值,页面取到值就ok了,
    这样写页面又不会跳转.

    你好。。信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time这个是错误吗。。点了没反应
      

  8.   


    return null;应该就可以。