求高手解答 关于jsp方面的问题,有关servlet一些方法未定义显示出错,但能运行。。 5
<h2>系统信息</h2><%Stringpath="/sysinfo.jsp";%><p>context数据的类型:<%=application.getContext(...
<h2>系统信息</h2>
<%String path="/sysinfo.jsp"; %>
<p>context数据的类型:<%=application.getContext(path) %>
<p>文件的格式:<%=application.getMimeType(path) %>
<p>本页面文件的实际路径:<%=application.getRealPath(path) %>
<p>jsp引擎:<%=getServletInfo() %>
<p>application对象ID:
<p><%=getServletContext() %>
显示The method getServletInfo() is undefined for the type __2F_Chapter4_2F_WebContent_2F_application_2F_sysinfo_2E_jsp sysinfo.jsp /Chapter4/WebContent/application line 14 JSP Problem
Description Resource Path Location Type
The method getServletContext() is undefined for the type __2F_Chapter4_2F_WebContent_2F_application_2F_sysinfo_2E_jsp sysinfo.jsp /Chapter4/WebContent/application line 16 JSP Problem
点run,网页还是可以显示出来的!
系统信息
context数据的类型:null
文件的格式:null
本页面文件的实际路径:D:\jsp\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Chapter4\sysinfo.jsp
jsp引擎:Jasper JSP 2.2 Engine
application对象ID:
org.apache.catalina.core.ApplicationContextFacade@de6cfc
求解答~~ 展开
<%String path="/sysinfo.jsp"; %>
<p>context数据的类型:<%=application.getContext(path) %>
<p>文件的格式:<%=application.getMimeType(path) %>
<p>本页面文件的实际路径:<%=application.getRealPath(path) %>
<p>jsp引擎:<%=getServletInfo() %>
<p>application对象ID:
<p><%=getServletContext() %>
显示The method getServletInfo() is undefined for the type __2F_Chapter4_2F_WebContent_2F_application_2F_sysinfo_2E_jsp sysinfo.jsp /Chapter4/WebContent/application line 14 JSP Problem
Description Resource Path Location Type
The method getServletContext() is undefined for the type __2F_Chapter4_2F_WebContent_2F_application_2F_sysinfo_2E_jsp sysinfo.jsp /Chapter4/WebContent/application line 16 JSP Problem
点run,网页还是可以显示出来的!
系统信息
context数据的类型:null
文件的格式:null
本页面文件的实际路径:D:\jsp\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Chapter4\sysinfo.jsp
jsp引擎:Jasper JSP 2.2 Engine
application对象ID:
org.apache.catalina.core.ApplicationContextFacade@de6cfc
求解答~~ 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询