简体   繁体   中英

HTTP 500 java.lang.RunTimeException Can't find FacesContext

I am getting this error HTTP 500 java.lang.RunTimeException Can't find FacesContext.

I read about this problem and most people adviced: to change from

http://localhost:8080/GeneratingEmployeeReport/index.jsp

to

http://localhost:8080/GeneratingEmployeeReport/faces/index.jsp

I tried it but get the same error. Also, I have added all the recommended .jar files.

Error message:

在此处输入图片说明

When I chang the url at the end I get this error

在此处输入图片说明

Project setup:

在此处输入图片说明

web.xml file

在此处输入图片说明

faces-config.xml file

在此处输入图片说明

index.jsp file

在此处输入图片说明

employee.jsp file

在此处输入图片说明

The thing is if I remove everything that is in the index.jsp file between , including these tags, I am able to see the page. Otherwise I get the same error. One of the solutions was to use this url: localhost:8080/GeneratingEmployeeReport/faces/index.jsp I am not able to run the page directly. I am not sure why? I wish there is other solution

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM