Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

controller tags in RequestProcessor's class

 
Ranch Hand
Posts: 1490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i add two controller tags for two RequestProcessor's class in struts-config.xml, i am getting the error.
 
kri shan
Ranch Hand
Posts: 1490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ie: How can i add two RequestProcessor classes within the controller tag.
<controller
processorClass="a.b.c.d.RequestProcessor1"/>
<controller
processorClass="a.b.c.d.RequestProcessor2"/>
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kri shan,

you can't. You can have only one controller. Just look into struts-config_1_2.dtd file.


'?' means that You can have zero or one occurence of controller tag.

Why do You want to have two controllers ?

Best Regards,
KArol Muszynski
 
kri shan
Ranch Hand
Posts: 1490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i change dtd like this <!ELEMENT struts-config (display-name?, description?, data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, controller?, message-resources*, plug-in*)> Will struts-config.xml accepts 2 controller tags.
 
KArol Muszynski
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kri shan,

Struts are designed to use one controller and changing dtd will not help. You can rewrite or extend struts but also I don't think it's a good idea.
Tell us why do You want to use more then one controller. Maybe we can help You with Your architectural problem.

Best Regards,
KArol Muszynski
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!