File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes HELP need on DTD for  struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HELP need on DTD for  struts-config.xml " Watch "HELP need on DTD for  struts-config.xml " New topic

HELP need on DTD for struts-config.xml

perry arora
Ranch Hand

Joined: Sep 18, 2003
Posts: 35
hi friends ,..
i need u r help..
can any one tell me the right DTD used in the struts-config.xml file ,, and what other files we need to place in the tomcat and at what location
i guess we need the validation file .. and any digester file also so that we can run the application even whenwe are not on line..
so plzz i will again place my query in better manner
(1) Which dtd to use( plz write it)
(2) What other files(validator etc etc) needed and where to place them
(3) how can we run the application even if we are not online..

any suggestion, will really be appreciated ,,
b bye
Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
There are excellent examples that come with the struts library - look in the webapps directory.
I would recommend using the latest version 1.1.
2.If you want to use the validator you need to specify it in your struts-config.xml file as a plug-in.
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml" property="pathnames" />
Check out - there's 2 online chapters on the tiles and validator plug-in.
3. The doctype in your tld and xml config files (web.xml, struts-config.xml, etc..) usually point to an online url such as From what I understand Tomcat and many other servers cache the dtd files. In any case, you can point the doctype to a file in your classpath.
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "/WEB-INF/struts-config_1_1.dtd">

Hope that helps. It's a little confusing at first. I'd recommend buying 'Struts in Action' It's concise and gives excellent examples.
I agree. Here's the link:
subject: HELP need on DTD for struts-config.xml
It's not a secret anymore!