File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes [Tiles] XML validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "[Tiles] XML validation" Watch "[Tiles] XML validation" New topic
Author

[Tiles] XML validation

Ritchie Warsi
Greenhorn

Joined: Nov 02, 2004
Posts: 29
Hi, I'm implementing Tiles in a struts application of mine, but it won't work. Seems like some problem with the definition xml, but I've copieed it right from other examples.

Here's my tiles-defs.xml:


I get no DTD or DOCTYPE validation error or such. Struts Console is showing a valid xml.

Then my web.xml:


Design view in Eclipse also showing a valid XML file.
In my Struts-config.xml i got the following Tiles plugin:


When I try to look up the page that uses Tiles
(indexhuis.jsp:
)

I get the following error:


The only log that's full is stdout.log:


I don't understand what is wrong or which xml is wrong! Done everything like in tutorials and stuff. Can someone help me?
Sorry for the long post, but it's all the necessary info!
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I guess you might need to specify the names of the XML elements from your real XML file into the XMl Parser that you are using... It seems like upir XML validation parser is trying to parse the element with the default element and the elements in your real XML file are different from those default elements... That's why you are getting such exceptions thrown from the application...

I used to face such problem with XML parsing stuff, when I tried to download the tutorial from OnJava.com, compiled as it was and I got a bunch of exceptions like that... When I adapted the elemments of my XML file with the downloaded tutorial, it worked well... So I just would like you to have a look at how the XML validation utility works for your application and figure the way out...

Just my 2 cents...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Ritchie Warsi
Greenhorn

Joined: Nov 02, 2004
Posts: 29
Tnx for the answer, but...
I'm rather new at all this, so I have no idea how to check out your suggestions...
I guess my XML parser is dat Xerces thing? or I18n?

Edit, ok is Xerces I'll look into it now, yet I have no idea what exactly to look for

Any more help is appreciated!
[ December 14, 2004: Message edited by: Ritchie Warsi ]
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Ritchie Warsi:
Tnx for the answer, but...
I'm rather new at all this, so I have no idea how to check out your suggestions...
I guess my XML parser is dat Xerces thing? or I18n?


Yeah, I guess the XML Parser could be in org.apache.xerces.util package... You might need to consult with the manual or documentation available coming along with the package... Since I've never used that package before, I have no idea how to tell you exactly where the error could be located...

Sorry for that... I hope you'll find the solution, if you consult the documentation of that package. As far as I have experience with other Apache projects, they got really good documentation... You'll find them easy to read and understand...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Tiles] XML validation
 
Similar Threads
web.xml doesn't parse correctly ?
Problems with Tiles Def
Tomcat Error after moving from struts 1.1 to struts 1.3.10
Struts-Config-xml Parsing error?
JasperException: Module 'null' not found.