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 detected starting with the dependency element. One of the expected '{"http://java.sun.com/xml/ns/javaee":Description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":distributable, "http://java.sun.com/xml/ns/javaee":context-param, "http://java.sun.com/xml/ns/javaee":filter, "http://java.sun.com/xml/ns/javaee":filter-Mapping, "http://java.sun.com/xml/ns/javaee":Listener, "http://java.sun.com/xml/ns/javaee":Servlet, "http://java.sun.com/xml/ns/javaee":Servlet-Mapping, "http://java.sun.com/xml/ns/javaee":Session-config, "http://java.sun.com/xml/ns/javaee":mime-Mapping, "http://java.sun.com/xml/ns/javaee":Welcome-file-list, "http://java.sun.com/xml/ns/javaee":error-page, "http://java.sun.com/xml/ns/javaee":jsp-config, "http://java.sun.com/xml/ns/javaee":security-Constraint, "http://java.sun.com/xml/ns/javaee":login-config, "http://java.sun.com/xml/ns/javaee":security role, "http://java.sun.com/xml/ns/javaee":env-entry, "http://java.sun.com/xml/ns/javaee":ejb-ref, "http://java.sun.com/xml/ns/javaee":ejb-local-ref, "http://java.sun.com/xml/ns/javaee":service-ref, "http://java.sun.com/xml/ns/javaee":Resource-ref, "http://java.sun.com/xml/ns/javaee":Resource-env-ref, "http://java.sun.com/xml/ns/javaee":message-Destination-ref, "http://java.sun.com/xml/ns/javaee":persistence-context-ref, "http://java.sun.com/xml/ns/javaee":persistence-Unit-ref, "http://java.sun.com/xml/ns/javaee":post-construct, "http://java.sun.com/xml/ns/javaee":pre-destroy, "http://java.sun.com/xml/ns/javaee":message-Destination, "http://java.sun.com/xml/ns/javaee":locale-encoding-Mapping-list}'. [40]
Saying the file is invalid
Your dependencies should go on
pom.xml
, not in theweb.xml
.– Felipe Marinho
I have to create a file called pom.xml?
– adventistaam
I don’t use Netbeans, so I don’t know what the file structure of a project looks like in it, but if you created a Maven-project there must be a
pom.xml
somewhere. Take a look in that guide and see if he helps you.– Felipe Marinho
I have not created a Maven, I am not yet at this level
– adventistaam