| Author |
Unable to load configuration-struts2
|
Romeo Ranjan
Ranch Hand
Joined: Feb 23, 2009
Posts: 90
|
|
Hi
I am trying to work out struts tutorial.I use struts2.This is the tutorial link that I followed http://devtalks.blogspot.com/2009/07/eclipse-galileo-and-struts2.html
Below is the exception I get.My struts.xml file is in Web-inf/classes folder.I have included the jar file in the web-inf/lib folder.The list of jar files are
1.commons-fileupload-1.2.1.jar
2.commons-io-1.3.2.jar
3.commons-logging-1.0.4.jar
4.freemarker-2.3.15.jar
5.ognl-2.7.3.jar
6.struts2-core-2.1.8.1.jar
7.xwork-core-2.1.6.jar
|
SCJP 6.0
|
 |
Mark E Hansen
Ranch Hand
Joined: Apr 01, 2009
Posts: 639
|
|
|
What does your struts.xml file look like?
|
 |
Romeo Ranjan
Ranch Hand
Joined: Feb 23, 2009
Posts: 90
|
|
This is how my struts.xml look like.
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
The error message says clearly that your doctype is messed up:
Caused by: Document root element "struts", must match DOCTYPE root "unspecified".
The correct doctype:
Your root element is "struts", not "unnamed"...
|
OCJP 6 (93%)
|
 |
Romeo Ranjan
Ranch Hand
Joined: Feb 23, 2009
Posts: 90
|
|
|
Thanks a lot,now it works.I want to know how did you learn to solve these errors in struts,is it by experience?
|
 |
Mark E Hansen
Ranch Hand
Joined: Apr 01, 2009
Posts: 639
|
|
Romeo Ranjan wrote:Thanks a lot,now it works.I want to know how did you learn to solve these errors in struts,is it by experience?
Well, how did you know to create your doctype with the word "unspecified"?
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
Romeo Ranjan wrote:I want to know how did you learn to solve these errors in struts,is it by experience?
The logs are a good starting point when debugging, in many cases (like this one) they pinpoint the cause. It's not rocket science, really...
|
 |
 |
|
|
subject: Unable to load configuration-struts2
|
|
|