• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HELP need on DTD for struts-config.xml

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ,,
thxs
b bye
 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
There are excellent examples that come with the struts library - look in the webapps directory.
I would recommend using the latest version 1.1.
1.http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd
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" />
</plug-in>
Check out http://www.manning.com/husted - 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 http://jakarta.apache.org. 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' http://www.manning.com/husted. It's concise and gives excellent examples.
-Yoo-Jin
 
Why is the word "abbreviation" so long? And this ad is so short?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic