Adding jstl as a Maven Dependency

11,906

Solution 1

Add this to your pom and change the versions if you want :

<groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>

Solution 2

You're seeing it because of

Try to add this

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

Instead of this

<dependency>
    <groupId>javax.servlet.jsp.jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

It'll solve your problem.

Share:
11,906

Related videos on Youtube

mc805
Author by

mc805

Java(semi-proficient) Javascript(still learning)

Updated on June 09, 2022

Comments

  • mc805
    mc805 almost 2 years

    I'm using Eclipse to add Maven Dependencies to my project.

    While going to the create pom.xml then clicking the dependencies tab, I'm able to select spring jar dependencies but I cannot find or load jstl from here. Does anyone know how to automatically do it from this screen, or does this always have to be manually typed in to the pom.xml

    javax.servlet.jsp.jstl <-- I believe is the current

    enter image description here