i am real newbie to
struts... why do we use the namespace attribute in the package tag?\
if i remove the namespace attribute i get the following error.
Aug 26, 2012 7:54:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache
Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: Y:\Program Files\Java\jre7\bin;Y:\Windows\Sun\Java\bin;Y:\Windows\system32;Y:\Windows;Y:/Program Files/Java/jre7/bin/client;Y:/Program Files/Java/jre7/bin;Y:/Program Files/Java/jre7/lib/i386;Y:\oraclexe\app\oracle\product\11.2.0\server\bin;;Y:\Windows\system32;Y:\Windows;Y:\Windows\System32\Wbem;Y:\Windows\System32\WindowsPowerShell\v1.0\;Y:\eclipse-jee-indigo-SR2-win32\eclipse;;.
Aug 26, 2012 7:54:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DemoStruts' did not find a matching property.
Aug 26, 2012 7:54:56 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-5000
Aug 26, 2012 7:54:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 442 ms
Aug 26, 2012 7:54:56 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 26, 2012 7:54:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting
Servlet Engine: Apache Tomcat/6.0.35
Aug 26, 2012 7:54:56 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-default.xml]
Aug 26, 2012 7:54:56 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-plugin.xml]
Aug 26, 2012 7:54:56 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts.xml]
Aug 26, 2012 7:54:56 PM org.apache.struts2.config.Settings getLocale
WARNING: Settings: Could not parse struts.locale setting, substituting default VM locale
Aug 26, 2012 7:54:56 PM com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit>
INFO: Setting DefaultObjectTypeDeterminer as default ...
Aug 26, 2012 7:54:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-5000
Aug 26, 2012 7:54:56 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 26, 2012 7:54:56 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Aug 26, 2012 7:54:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 766 ms
Aug 26, 2012 7:54:58 PM org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'hello' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Aug 26, 2012 7:54:58 PM org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'hello' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
my struts.xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts SYSTEM "struts-2.0.dtd" >
<struts>
<package name="mypack" namespace="/DemoStruts" extends="struts-default">
<action name="hello" class="com.actionclass.LoginAction">
<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>