Iβm learning how to make a compatible servlet 3.1 compatible webapp that will run on JBoss wildfly 10. I use maven for dependencies, and I'm not sure what the following dependencies do, and if they are enabled / disabled in the servlet container:
<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>javax.servlet.jsp-api</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency>
I have already done several searches and would like to check or supplement the following information:
- The api servlet is provided by the servlet container, so I can add
<scope>provided</scope> to Maven. However, why should I include this jar? What classes or files will have errors when deleting? - I'm not sure what javax.servlet.jsp-api does. My peaceful example seems to work fine if I don't turn it on. What does it do? And do I need to add
<scope>provided</scope> or not? - JSTL is not provided by any servlet container, so it must be explicitly added. This jar guarantees the correct processing of
<c:xxx> and other major tags in my jsp.
source share