This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Error in web.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error in web.xml file" Watch "Error in web.xml file" New topic

Error in web.xml file

Justin Fluff

Joined: Apr 03, 2005
Posts: 2
I have following code in my web.xml file:

but when I validate it i get the following error:

The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".

Any suggestion? How can I correct it.
Heonkoo Lee
Ranch Hand

Joined: Feb 10, 2005
Posts: 85
You have two login-config elements. You can include 0 or 1 login-config element in web-app element. Double-check the DTD for it. login-config? means optional (0 or 1).
I agree. Here's the link:
subject: Error in web.xml file
Similar Threads
weblogic 9- authentication
run the structs program
Problem with FORM authentication method
security web application
What Is Wrong With My web.xml File (Struts)