`
Hermosa_Young
  • 浏览: 250064 次
  • 来自: 上海
社区版块
存档分类
最新评论

The method getContextPath() from the type HttpServletRequest refers to the miss

    博客分类:
  • Java
阅读更多

运行程序报错

 

提示如下:The method getContextPath() from the type HttpServletRequest refers to the missing type

 


 解决方法:

 

1 右击该项目 - Build Path - Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。


 

2 然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择Workspace defaulr JRE(jdk1.6)(此前JDK已成功安装并配置好), 然后 Finish 。



参考文章:http://blog.csdn.net/home_zhang/article/details/8548560

  • 大小: 36.1 KB
  • 大小: 28.3 KB
  • 大小: 73.9 KB
  • 大小: 44.5 KB
分享到:
评论

相关推荐

    servlet2.4doc

    The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. doGet...

    request.getcontextPath()_详解

    request.getcontextPath()详解

    java中request.getcontextPath()的意思.doc

    java中request.getcontextPath()的意思.doc

    网站登录页面实例

    <p><form action="<%=request.getContextPath ()%>/CheckServlet" method="post"> <td height="20" colspan="2"><span class="style1">登陆</span></td> 用户名 <td width="161" align="left"><input name=...

    Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别.doc

    Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别

    数据库测试test.sql

    // String methodName = request.getParameter("method"); // // //根据method属性的值调用相应的方法 // if("login".equals(methodName)){ // this.login(request,response); // }else if("register".equals(method...

    Request中getContextPath、getServletPath的区别

    NULL 博文链接:https://javachikuang.iteye.com/blog/262264

    基于Struts+Hibenater

    String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <form action="userManage.do?method=...

    一套完整简单的图片上传到数据库保存路径

    <form action="registeServlet" enctype="multipart/form-data" method="post" name="myfrom"> 用户图片:<input type="file" size="30" name="test" /> <input name="up" type="submit" value=...

    spring_MVC源码

    弃用了struts,用spring mvc框架做了几个项目,感觉都不错,而且使用了注解方式,可以省掉一大堆配置文件。本文主要介绍使用注解方式配置的spring mvc,之前写的spring3.0 mvc和rest小例子没有介绍到数据层的内容,...

    网站登录页面代码实例(JSP+Servlet+JavaBean)

    <p><form action="<%=request.getContextPath ()%>/CheckServlet" method="post"> <td height="20" colspan="2"><span class="style1">登陆</span></td> 用户名 <td width="161" align="left"><input name=...

    囧囧代码jsp代码jsp

    String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE ...

    登录过滤器

    HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; HttpSession session = request.getSession(); //是否登录 //开放注册页面 if...

    网页浮动窗口

    <script type="text/javascript" src="<%=request.getContextPath()%>//res/js/float.js"> <script type="text/javascript"> var div1= new floatFrame( "id", "style", "title", "content", speed, ...

    DWR开发包常规客户端服务器端面向对象编程

    <script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/TestService.js'> <script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'> <script type='text/...

    用户管理系统(ums)

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 设置编码格式 response.setContentType("text/html;charset=GB18030"); ...

    ajax提交整个from表单示例代码

    代码如下: $.ajax( { type : “POST”, url : “<%=request.getContextPath()%>/control/daControlAction_updateEmotecontrol.action”, data : $(“#form1”).serialize(), dataType : “text”, success : ...

    网页视频播放插件

    <script type="text/javascript" src="<%=request.getContextPath()%>/js/player/images/swfobject.js"> <script type="text/javascript"> var so = new SWFObject("<%=request.getContextPath()%>/js/player/...

    ShopCarts实现

    String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE ...

    jsp动态网页设计指导书

    form method "post" action "ActionForm jsp" name "form"> <p>  半径: <input type "text" value "0" name "Radius&...

Global site tag (gtag.js) - Google Analytics