This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

What Is Wrong With My web.xml File (Struts)

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Struts application worked well until I added security in the web.xml file. I got the error message shown below and I cannot spot any mistake with my eyes:


2003-10-08 23:33:25 Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 137, col 19): The content of element type "security-role" must match "(description?,role-name)".


and my web.xml file is:
 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JiaPei Jen:
The error was pinpointed for you it states that
The content of element type "security-role" must match "(description?,role-name)".
What you have here does not match that; does it?
<security-role>
<description>Registered Members</description>
<role-name>administrator</role-name>
<role-name>advisor</role-name>
<role-name>editor</role-name>
<role-name>contributor</role-name>
</security-role> // line 137 is here
Try this and let me know if it works
<security-role>
<description>Registered Members</description>
<role-name>administrator</role-name>
</security-role>
<security-role>
<description>Registered Members</description>
<role-name>adviser</role-name>
</security-role>
<security-role>
<description>Registered Members</description>
<role-name>editor</role-name>
</security-role>
<security-role>
<description>Registered Members</description>
<role-name>contributor</role-name>
</security-role>
Anselm Paulinus.
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic