2010-11-26 114 views
15

我在struts中实现了一个项目,在该项目中,我在JSP页面中收到错误。错误“HttpServletRequest引用缺少的类型字符串”

我已经在Eclipce IDE中配置了Tomcat 6,JRE和JDK 6。

的代码是:

%request.getContextPath()% 

的错误是:

The method getContextPath() from the type HttpServletRequest refers to the missing type String 

我怎样才能解决这个问题?

回答

31

您还没有将JRE库添加到IDE中。添加它。

8

点击你的项目,并去建立路径配置更新的jre路径,并选择要添加的库类型