String Action=request.getParameter("action");
if(Action.equals("add")){
  out.print("add");
}
else
{
 out.print("aaa");
}
就这样都报错我真的不知道怎么办了晕了!

解决方案 »

  1.   

    description The server encountered an internal error () that prevented it from fulfilling this request.
      

  2.   

    String Action=request.getParameter("action");
    去掉里面的双引号试试。String Action=request.getParameter(action);
      

  3.   

    发出来了啊
    description The server encountered an internal error () that prevented it from fulfilling this request.
      

  4.   

    if(Action.equals("add")    )改成{{
      out.print("add");
    }
    else
    {
     out.print("aaa");
    }
      

  5.   

    你的这个页面代码没有问题!
    看看你的提交页面或者Tomcat 有没有问题,
    有可能是别的错误!!
      

  6.   

    反过来用equals
    String Action=request.getParameter("action");
    if("add".equals(Action)){
      out.print("add");
    }
    else
    {
     out.print("aaa");
    }
      

  7.   

    晕,不会就这么点错误提示吧,把所有的提示给贴出来....
    页面上没有,到logs目录下找到给贴出来,信息太少了....
      

  8.   

    我想你可以能是前一个提交页面没有名字为"action"的文本字段顺便说一下最好不要用 action 作为你的字段名称