Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to find web.xml in netbeans 7.0.1

 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 paramater 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.
 
J. Kevin Robbins
Bartender
Posts: 1744
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's located in the WEB-INF folder under the "Web Pages" level. If you don't have that folder, then you picked the wrong project type when you created the project. Make sure you choose New Project - Java Web - Web Application.
 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the right project but i think my project directly makes an entry for each new servlet in deloyment descripter so i havnt opened web.xml manually but now i need it but cannot ind it in WEB-INF.
 
Pallavi Joshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which server you are using?

Regards,
Pallavi
 
Saumyaraj Zala
Ranch Hand
Posts: 56
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache Tomcat 7.0.14.0
 
Pallavi Joshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it because web.xml is optional in Servlet 3.0? Maybe you haven't added anything to your project that would require one yet.
 
Pallavi Joshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can refer to Netbeans forum "Web.XML not generated" - http://forums.netbeans.org/topic37738.html.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic