1: 出现此问题的原因是访问路径不正确:
http://localhost:8080/demojsf/index.jsp
javax.servlet.ServletException: Cannot find FacesContext
2:解决的方法是输入web.xml配置文件当中正确的Servlet映射关系
如:<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
访问路径则为:http://localhost:8080/demojsf/index.faces
相关文章
- 【Java异常】Exception in thread“main” java util ConcurrentModificationException的解决方案
- 引入旧的Java项目的时候出现"Description Resource Path Location Type Date cannot be resolved to "解决方案
- 关于“Cannot find any provider supporting AES/ECB/PKCS7Padding”问题的解决方案
- configure: error: Cannot find php-config. Please use --with-php-config=PATH 错误的解决方案
- AndroidStudio xml 中编写代码 ,没有自动提示,或者提示“cannot find declaration to go to”的一种解决方案
- Java中使用POI读取大的Excel文件或者输入流时发生out of memory异常参考解决方案
- 安装Android Studio报failed to find java version for 'C:\windows\system32\java.exe':[2] The system cannot find the specified file.错误的解决方案
- nodejs 喜欢报cannot find module .....的简单解决方案
- Java中使用POI读取大的Excel文件或者输入流时发生out of memory异常参考解决方案
- Electron 发生错误 "Cannot find module app"的解决方案