How to add the servlet api to my pom.xml?

How to add the servlet api to my pom.xml?

Hi,

I have learned Maven Web Application: Creating web application in Maven 3 from your website.

Now I have to add the servlet api in pom.xml file.

Let's know how to add the servlet api to my pom.xml?

Thanks

View Answers

April 18, 2014 at 2:38 PM

Hi,

Use the following code in your pom.xml file:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
</dependency>

Thanks









Related Tutorials/Questions & Answers:
How to add the servlet api to my pom.xml?
how i can add an horizontal scrollbar at my PdfAnnotation ? - JSP-Servlet
Advertisements
how to point my jsp form action to servlet? - JSP-Servlet
How to add Click to copy function to my wordpres blog?
How to add a column with checkboxes for each record in my table in JSP
How to add google page in my webpage using jquery ajax.
What is wrong with my servlet?
Clarify my doubt - JSP-Servlet
Add music to my web page
ModuleNotFoundError: No module named 'my-add'
how to add Arraylist filter for a jsp page showing results from a servlet
to add on to my queries - Java Beginners
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
in my project, i have to add scrollbars to a panel,. i need some example on it,how to doit.
Add as a friend - JSP-Servlet
How to add "View more results" kind of functionality in my PHP based website?
how to add the calendar to the dynamic rows in html or jsp page - JSP-Servlet
How to add download option for openwith and saveAs on exporting file to excel in servlet
How to add download option for openwith and saveAs on exporting file to excel in servlet
Capturing JSP Content Within My Strut Action Servlet - JSP-Servlet
ModuleNotFoundError: No module named 'my-api'
My Servlet code not working - Development process
sir, how to read empty cell in excel file using poi and how to add this empty cell to arraay list and the following is my code
ADD ROW - JSP-Servlet
in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar. i need some example on it,how to doit.
I need add my java program with a picture.
How can I to my database to my application
org.apache.tomcat - tomcat-servlet-api version 11.0.0-M5 Maven dependency. How to use tomcat-servlet-api version 11.0.0-M5 in pom.xml?
org.opendaylight.odlparent - odl-servlet-api version 13.0.10 Maven dependency. How to use odl-servlet-api version 13.0.10 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 7.0.57 Maven dependency. How to use tomcat-servlet-api version 7.0.57 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 9.0.1 Maven dependency. How to use tomcat-servlet-api version 9.0.1 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 7.0.107 Maven dependency. How to use tomcat-servlet-api version 7.0.107 in pom.xml?
org.opendaylight.odlparent - odl-servlet-api version 11.0.4 Maven dependency. How to use odl-servlet-api version 11.0.4 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 9.0.11 Maven dependency. How to use tomcat-servlet-api version 9.0.11 in pom.xml?
jetty - servlet-api version 2.5-6.0.0beta12 Maven dependency. How to use servlet-api version 2.5-6.0.0beta12 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 7.0.5 Maven dependency. How to use tomcat-servlet-api version 7.0.5 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 8.0.8 Maven dependency. How to use tomcat-servlet-api version 8.0.8 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 11.0.0-M5 Maven dependency. How to use tomcat-servlet-api version 11.0.0-M5 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 7.0.6 Maven dependency. How to use tomcat-servlet-api version 7.0.6 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 9.0.20 Maven dependency. How to use tomcat-servlet-api version 9.0.20 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 9.0.17 Maven dependency. How to use tomcat-servlet-api version 9.0.17 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 8.0.33 Maven dependency. How to use tomcat-servlet-api version 8.0.33 in pom.xml?
org.apache.tomcat - tomcat-servlet-api version 8.5.9 Maven dependency. How to use tomcat-servlet-api version 8.5.9 in pom.xml?
how to run servlet - JSP-Servlet
ModuleNotFoundError: No module named 'my-user-info-api'
ModuleNotFoundError: No module named 'my-user-info-api'
How to embed an executable plugin in my website?
how to add the scrollbar to the pdf page when generating the pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to refresh my GUI page

Ads