Problem in web.xml

1

Hello

I have my web.xml, I want to put the jstl dependency, for this I am using the following code:

<dependency>
    <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
    <type>jar</type>
</dependency>

But Netbeans is showing the following message:

  

cvc-complex-type.2.4.a: Invalid content was detected starting   with the element 'dependency'. One of the   '{" link ": description,   " link ": display-name,   " link ": icon,   " link ": distributable,   " link ": context-param,   " link ": filter,   " link ": filter-mapping,   " link ": listener,   " link ": servlet,   " link ": servlet-mapping,   " link ": session-config,   " link ": mime-mapping,   " link ": welcome-file-list,   " link ": error-page,   " link ": jsp-config,   " link ": security-constraint,   " link ": login-config,   " link ": security-role,   " link ": env-entry,   " link ": ejb-ref,   " link ": ejb-local-ref,   " link ": service-ref,   " link ": resource-ref,   " link ": resource-env-ref,   " link ": message-destination-ref,   " link ": persistence-context-ref,   " link ": persistence-unit-ref,   " link ": post-construct,   " link ": pre-destroy,   " link ": message-destination,   " link ": locale-encoding-mapping-list} '.   [40]

Saying that the file is invalid

    
asked by anonymous 17.01.2017 / 18:57

1 answer

1

If you did not create a maven project, you must include JSTL manually. To do this, simply access the JSTL la repository in maven, choose the version and click on Download JAR .

Repository JSTL MAVEN.

Then choose the version, the most used at the moment is 1.2 .

ThenextstepistodownloadtheJSTLJAR.

Finally,justaddthedownloadedJARinthelibfolderofyourprojectandlinkitthroughtheprojectproperties.

Rightclickontheproject>Properties>Libraries>AddJAR/Paste>FindJSTLJAR.

Done,youwillhaveJSTLaddedtoyourproject.

NowjustuseitinJSPwiththefollowingline.

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

In order to use the tag <dependency> you must start a MAVEN project.

23.01.2017 / 22:43