You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "krishnan.1000" <kr...@gmail.com> on 2008/09/04 20:30:18 UTC

Help: Getting Error Message "Not able to load configuration for specified action"

I am a Struts 2 newbie and I am trying to develop a simple web application.
The application consists of a simple login page containing a text field and
password field and submit button.

When I try to load the web page, this is the error tht I get. I am deploying
the application using Tomcat v6.

The requested resource (/turorial/login) is not available.

web.xml

    <webapp><filter>
        <filter-name>struts2</filter-name>
       
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        <init-param>
            <param-name>actionPackages</param-name>
            <param-value>com.jbe.tutorial.web.action</param-value>
      </init-param>
      </filter>
     
      <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping></webapp>



My struts.xml file

      <struts>
        <package name="tutorial" extends="struts-default" namespace="/">
    	   <action name="home">
    	     <result>/jsp/login.jsp</result>
    	   </action>
            <action name="login"
class="com.jbe.tutorial.web.action.LoginAction" method="login" >
               <result name="input">/jsp/login.jsp</result>
                <result name="success" type="redirect">loginSuccess</result>
            </action>
            
            <action name = "loginSuccess"
class="com.jbe.tutorial.web.action.LoginAction" method = "loginSuccess">
              <result name="success">/jsp/success.jsp</result>
            </action>
        </package>
    </struts>  



My login.jsp file

    <s:form action="login">
    <s:textfield name="username" label="Name"/>
    <s  assword name ="password" label="Password" />
    <input type="submit" name="Login" value="Login" />
    <input type="reset" value="Reset" name="reset" />
    </s:form>    



I am getting the error message No configuration found for the specified
action": 'login' in namespace ''. Form action defaulting to 'action'
attribute's literal value.

Is there anything I am doing wrong?  I have read similar posts in the forum
and have done all that has been suggested but I still am not getting the
error. Any help would be appreciated

Thanks,

Karthik Krishnan
-- 
View this message in context: http://www.nabble.com/Help%3A-Getting-Error-Message-%22Not-able-to-load-configuration-for-specified-action%22-tp19317093p19317093.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Help: Getting Error Message "Not able to load configuration for specified action"

Posted by Dave Newton <ne...@yahoo.com>.
Could you not put ">" characters in front of your response? It makes it very difficult to read and reply to.

--- On Thu, 9/4/08, krishnan.1000 wrote:
> [It still doesn't work, and there are no errors on startup.]

You'll have to provide further information then. After adding the appropriate DOCTYPE elements to your files (please post complete configurations), creating a dummy LoginAction class, and making a complete login.jsp page and success.jsp pages I am unable to reproduce your problem.

On a side not, unless you're using the "simple" theme your login.jsp page will not display as you expect it to.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Help: Getting Error Message "Not able to load configuration for specified action"

Posted by "krishnan.1000" <kr...@gmail.com>.

newton.dave wrote:
> 
> --- On Thu, 9/4/08, krishnan.1000 wrote:
>> newton.dave wrote:
>>> --- On Thu, 9/4/08, krishnan.1000 wrote:
>>>> When I try to load the web page, this is the error that I get.
>>>> The requested resource (/turorial/login) is not available.
>>> Is that a typo?
>> No this is not a typo. 
> 
> You're telling me you type in "tutorial" and it says you tried to access
> "turorial"?
> 
> I am sorry. It should be tutorial with an T and not turorial with an R. My
> mistake. 
> 
>>>> <init-param>
>>>>   <param-name>actionPackages</param-name>
>>>>   [...]
>>> If you're not using the Codebehind/etc. capabilities
>>> then you probably don't want this in your web.xml--I 
>>> don't know off the top of my head if that would cause 
>>> the error or not.
>> I found this on some blog posting. Removing this did
>> not make a difference.
> 
> In general I don't recommend adding random configuration if they're not
> being added for a reason. If you're not using Codebehind/etc. you should
> also remove the plugin; IIRC it's an error to use it without an
> "actionPackages" init-param, although the parameter may be blank.
> 
> I have remove this and it is still not working.
>>>> I am getting the error message No configuration
>>>> found for the specified action": 'login' in namespace ''. 
>>>> Form action defaulting to 'action' attribute's literal value.
>> When I start my Tomcat server, this is the error that
>> I get. The other error is seen in the browser window.
> 
> When you start the server you see a message regarding a form tag in one of
> your JSP files?!
> 
> Are there any errors logged during startup? I'm skeptical that the message
> about the form tag value is encountered during startup, before hitting an
> action or JSP.
> 
> No errors logged during startup.
> 
> Are you sure that your struts.xml is being deployed properly?
> 
> Yes. This is the tomcat log that I see on the console is as follows:
> ....
> 
> Sep 4, 2008 1:42:18 PM
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
> INFO: Parsing configuration file [struts-default.xml]
> Sep 4, 2008 1:42:18 PM
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
> INFO: Parsing configuration file [struts-plugin.xml]
> Sep 4, 2008 1:42:18 PM
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
> INFO: Parsing configuration file [struts.xml]
> ....
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help%3A-Getting-Error-Message-%22Not-able-to-load-configuration-for-specified-action%22-tp19317093p19319918.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Help: Getting Error Message "Not able to load configuration for specified action"

Posted by Dave Newton <ne...@yahoo.com>.
--- On Thu, 9/4/08, krishnan.1000 wrote:
> newton.dave wrote:
>> --- On Thu, 9/4/08, krishnan.1000 wrote:
>>> When I try to load the web page, this is the error that I get.
>>> The requested resource (/turorial/login) is not available.
>> Is that a typo?
> No this is not a typo. 

You're telling me you type in "tutorial" and it says you tried to access "turorial"?

>>> <init-param>
>>>   <param-name>actionPackages</param-name>
>>>   [...]
>> If you're not using the Codebehind/etc. capabilities
>> then you probably don't want this in your web.xml--I 
>> don't know off the top of my head if that would cause 
>> the error or not.
> I found this on some blog posting. Removing this did
> not make a difference.

In general I don't recommend adding random configuration if they're not being added for a reason. If you're not using Codebehind/etc. you should also remove the plugin; IIRC it's an error to use it without an "actionPackages" init-param, although the parameter may be blank.

>>> I am getting the error message No configuration
>>> found for the specified action": 'login' in namespace ''. 
>>> Form action defaulting to 'action' attribute's literal value.
> When I start my Tomcat server, this is the error that
> I get. The other error is seen in the browser window.

When you start the server you see a message regarding a form tag in one of your JSP files?!

Are there any errors logged during startup? I'm skeptical that the message about the form tag value is encountered during startup, before hitting an action or JSP.

Are you sure that your struts.xml is being deployed properly?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Help: Getting Error Message "Not able to load configuration for specified action"

Posted by "krishnan.1000" <kr...@gmail.com>.
Hi Dave,

Thanks for your reply: I have inlined my replies.

newton.dave wrote:
> 
> --- On Thu, 9/4/08, krishnan.1000 wrote:
>> When I try to load the web page, this is the error tht I
>> get. I am deploying the application using Tomcat v6.
>> 
>> The requested resource (/turorial/login) is not available.
> 
> Is that a typo?
> 
> No this is not a typo. This is the error that I see when I try to load the
> url from the browser using Tomcat 6. When I enter
> http://localhost:8080/tutorial/login, this is the error that I get.
> 
> 
> 
>> <init-param>
>>   <param-name>actionPackages</param-name>
>>   <param-value>com.jbe.tutorial.web.action</param-value>
>> </init-param>
> 
> If you're not using the Codebehind/etc. capabilities then you probably
> don't want this in your web.xml--I don't know off the top of my head if
> that would cause the error or not.
> 
> I found this on some blog posting. Removing this did not make a
> difference.
> 
>> <result name="success" type="redirect">loginSuccess</result>
> 
> This should be type="redirectAction" if you're redirecting to an action.
> 
> I changed this. Thanks for noticing my typo. Since the page was not
> loaded, I didn't realize that this might cause an error.
> 
>> I am getting the error message No configuration found for
>> the specified action": 'login' in namespace ''. Form action 
>> defaulting to 'action' attribute's literal value.
> 
> 
> When I start my Tomcat server, this is the error that I get. The other
> error is seen in the browser window.
> 
> That's a different error than you provided at the beginning of the email.
> Are you getting two different errors? Under what circumstances are you
> getting each one? Is there anything in your log files on server startup?
> Do you have devMode turned on?
> 
> I have dev mode turned on. I have used the struts property file as given
> in this link http://struts.apache.org/2.0.11.2/docs/strutsproperties.html 
> 
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help%3A-Getting-Error-Message-%22Not-able-to-load-configuration-for-specified-action%22-tp19317093p19317773.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Help: Getting Error Message "Not able to load configuration for specified action"

Posted by Dave Newton <ne...@yahoo.com>.
--- On Thu, 9/4/08, krishnan.1000 wrote:
> When I try to load the web page, this is the error tht I
> get. I am deploying the application using Tomcat v6.
> 
> The requested resource (/turorial/login) is not available.

Is that a typo?

> <init-param>
>   <param-name>actionPackages</param-name>
>   <param-value>com.jbe.tutorial.web.action</param-value>
> </init-param>

If you're not using the Codebehind/etc. capabilities then you probably don't want this in your web.xml--I don't know off the top of my head if that would cause the error or not.

> <result name="success" type="redirect">loginSuccess</result>

This should be type="redirectAction" if you're redirecting to an action.

> I am getting the error message No configuration found for
> the specified action": 'login' in namespace ''. Form action 
> defaulting to 'action' attribute's literal value.

That's a different error than you provided at the beginning of the email. Are you getting two different errors? Under what circumstances are you getting each one? Is there anything in your log files on server startup? Do you have devMode turned on?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org