Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is web.xml in Eclipse Dynamic Web Project

Tags:

eclipse

In Eclipse I clicked File->New->Dynamic Web Project and I am following a tutorial for Jersey that now wants me to go and change something in web.xml file...but I can't even find this file. What is it I am doing wrong?

enter image description here

like image 239
Bohn Avatar asked Jul 25 '12 20:07

Bohn


People also ask

How do I get web xml in Eclipse?

To get access to web. xml in Eclipse, even though it's in the webapps\ch11\WEB-INF directory, you can make it a linked file . To do that, right-click the ServletInPlace project, select New→ File, click the Advanced button, check the “Link to file in the file system” checkbox, and click the Browse button.

Where is the web XML file?

The deployment descriptor is a file named web. xml . It resides in the app's WAR under the WEB-INF/ directory.

Why xml option is not showing in Eclipse?

To open XML files in the default editor: In the DITA CMS Eclipse Client, click Window > Preferences. In the left pane, click DITA CMS > General Behavior. Clear the Open unlocked document in Read-only Editor checkbox.


1 Answers

When you create a Dynamic Web Project you have the option to automatically create the web.xml file. If you don't mark that, the eclipse doesn't create it...

So, you have to add a new web.xml file in the WEB-INF folder.

To add a web.xml click on Next -> Next instead of Finish. You will find it on the final screen of the wizard.

like image 107
Vitor Braga Avatar answered Sep 29 '22 11:09

Vitor Braga