日期:2014-05-18  浏览次数:20773 次

request.getParamter("username")无法获得数据
本人刚接触java,问题很菜,不好意思
jsp中 <%   out.println(request.getParamter( "username "));   %>
居然无法获得数据,我晕死了(环境是tomcat5.5+java6)

显示这个错误
================================
HTTP   Status   500   -

type   Exception   report

message

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

exception

org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP:  

An   error   occurred   at   line:   37   in   the   jsp   file:   /user_reg/user_reg_ok.jsp
The   method   getParamter(String)   is   undefined   for   the   type   HttpServletRequest
34:   <div   class= "main ">
35:       <div   class= "main_top "> </div>
36:       <div   class= "main_left "> </div>
37:       <div   class= "main_middle "> <%   out.println(request.getParamter( "username "));   %> </div>
38:       <div   class= "main_right "> </div>
39:       <div   class= "main_bottom "> </div>
40:   </div>
……………………
……………………
……………………


------解决方案--------------------
你的这个参数是在哪个jsp页面或者servlet中保存进去的?或者是地址栏里面直接传参?
------解决方案--------------------
你的getParamter方法应该是getParameter,
请结贴给分吧,谢谢。
------解决方案--------------------
哈哈还是用辅助的比较好 不的出低级错误
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html