• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
JiaPei Jen
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:
 
Anselm Paulinus
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic