web xml file is missing in my eclipse IDE

0 votes
I am writing a simple addition program using servlets. I wrote .html file and java class file for the code. But as I learnt that we should add mappings to web.xml file which will be present in web content -> WEB-INF->lib. But in this location, i can't find my web.xml file.

Can anyone help me with how to locate web.xml file?
Nov 27, 2018 in Java by Jins
• 140 points
3,954 views

1 answer to this question.

0 votes

Very simple. You will find Deployment Descriptor Stub in your Project folder. Click on that and click on Generate Deployment Descriptor Stub. Your web.xml file will be generated automatically.

You can refer below image.

answered Nov 27, 2018 by Omkar
• 69,220 points

Related Questions In Java

+5 votes
11 answers

How to import a jar file in Eclipse?

Click on File > Import. The Import ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,140 points
359,768 views
0 votes
1 answer

Which is the standard concise way to copy a file in Java?

As toolkit mentions above, Apache Commons IO ...READ MORE

answered Nov 15, 2018 in Java by Frankie
• 9,830 points
633 views
0 votes
1 answer

How to read an XML file using XPath in Java?

Import the packages required to work with ...READ MORE

answered Jun 14, 2018 in Java by Akrati
• 3,190 points
4,262 views
0 votes
1 answer

Difference between JSF, Servlet and JSP?

Servlet - it's java server side layer. JSP ...READ MORE

answered Jul 3, 2018 in Java by samarth295
• 2,220 points
1,537 views
0 votes
1 answer

How to pretty print XML from Java?

Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); //initialize StreamResult ...READ MORE

answered Jul 4, 2018 in Java by Akrati
• 3,190 points
1,936 views
0 votes
1 answer

org.xml.sax.SAXParseException: How to handle this exception?

This is often caused by a white ...READ MORE

answered Jul 9, 2018 in Java by sharth
• 3,370 points
6,045 views
+29 votes
3 answers

How can we set java.library.path in Eclipse?

Go into the library settings for your ...READ MORE

answered Jul 3, 2018 in Java by sharth
• 3,370 points
22,336 views
0 votes
2 answers

What is the meaning of purpose of this command: java -jar <some jar file>.jar ?

JAR (Java Archive) file is a package file ...READ MORE

answered Mar 22, 2019 in Java by Omkar
• 69,220 points
2,619 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP