Unable to find web.xml in netbeans 7.0.1
Solution 1
I know it's so late but I had the same problem, so here's the solution below:
To create web.xml:
- Right click on your project
- Choose New
- Choose Other
- Box New file is opened, in Filter search web.xml
- You will get the file you want web.xml, then click next...then finish
(Tested on Netbean 7.4 JDK 7)
Solution 2
web.xml
is optional in Java EE 6
. So, by default it is not loaded in Netbeans
. You need to manually load web.xml
from Netbeans.
Solution 3
You need to firstly create a servlet page then web.xml will be generated in WEB.INF/
Solution 4
Try to right click the project and select New
-> Other
-> Web
-> Standard Deployment Descriptor (web.xml)
-> Next
-> Finish
. Follow that and it will be created in Configuration Files.
Video tutorial: https://www.youtube.com/watch?v=UAMOeHtPwrc
Saumyaraj
Updated on December 29, 2020Comments
-
Saumyaraj over 3 years
I want to upload a file to a server, for which I am writing a servlet program.The location of the directory where the document would be uploaded should be fetched from a parameter in web.xml. I have not use web.xml before and only know that it makes entries for each servlet. I am not able to see this file in my web application project that i am making in netbeans. Please help me with this. Thank you.
-
Saumyaraj over 10 yearsthen how to add a context if i don't have web.xml
-
Saumyaraj over 10 yearsThe problem is there is no web.xml in my WEB-INF
-
duffymo over 10 yearsYou have to open a text editor, create a new file named "web.xml", and add what's necessary.
-
Thufir over 9 yearshmm, if it's optional, what's the alternative approach?