Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Struts
Issue configuring global results
Palak Shah
Greenhorn
Posts: 18
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to configure global results in
struts
but getting exception in logs when starting
tomcat
:
Caused by: org.xml.sax.SAXParseException: The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".
My struts.xml is as follows:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="false" /> <constant name="struts.action.extension" value="share" /> <constant name="struts.custom.i18n.resources" value="com.messages.messages"/> <constant name="struts.ui.theme" value="simple"/> <package name="default" namespace="/" extends="struts-default"> <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" /> </result-types> <global-results> <result name="login" type="tiles">login.page</result> </global-results> <default-action-ref name="index" /> <action name="index"> <result type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/</param> </result> </action> <action name="login" class="com.login.action.LoginAction"> <result type="tiles">login.page</result> </action>
Can some one please guide whats wrong with this code? Even <result name="login">login.jsp</result> does not work. I see the same exception.
Palak Shah,<br />SCJP (85%), SCWCD (84%), SCBCD (95%).
David Newton
Author
Posts: 12617
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The error message is pretty clear, isn't it? The order of the elements in the XML file must match the order as defined in the DTD--yours don't.
Darshan Shroff
Greenhorn
Posts: 12
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Was just wondering if you could provide global results as actions
<global-results> <result name="home">/index.jsp</result> <result name="xyz">/xyz.action</result> </global-results>
Regards,
Darshan Shroff
shroffdarshan@gmail.com
http://www.linkedin.com/in/darshanshroff
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
struts2 + interceptor
http 404 error in uploading the file
validation problem.
Struts 2 validation.xml not working
Spring 3 + Spring Security 3 + Struts2 + Hibernate 3
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
More...