When using JSTL in JSP, getting an exception

后端 未结 3 1718
青春惊慌失措
青春惊慌失措 2021-01-16 07:56

Getting following exception when I have included:

<%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\" %>

Exception:

相关标签:
3条回答
  • 2021-01-16 07:59

    You need to include both jstl.jar and standard.jar in your WEB-INF/lib folder.

    0 讨论(0)
  • 2021-01-16 08:13

    1: Included JSTL jar file WEB-INF/lib folder

    Fine. That ought to be sufficient.

    2: Included Classpath in Run Configuration (using Eclipse)
    3: Included in Build path too.

    Don't do. Eclipse does that automatically on 1. You need to undo all manual changes, they might make things worse.

    I have included JSTL.jar(Version 1.2) and JSTL Standard.jar

    Get rid of standard.jar. JSTL 1.2 consists of only one JAR file. The standard.jar might want to locate classes which doesn't exist in JSTL 1.2 anymore, resulting in this kind of abstract/dependency errors.

    See also:

    • Our JSTL wiki page
    0 讨论(0)
  • 2021-01-16 08:24

    Solution in eclipse:

    Right click on

    nameYourProject->java build path -> libraries -> add external jars 
    

    Go

     C:\Apachetomcat7\webapps\examples\WEB-INF\lib
    

    Select all( jstl and standart jar ), click open

    after import jstl and standart jar in project.

    0 讨论(0)
提交回复
热议问题