You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave <no...@yahoo.com> on 2005/10/25 17:20:58 UTC

Custom ActionMapping subclass causing servlet not available

In my struts-config I have the following action:

  <action className="com.eri.web.struts.actions.dispatchByURLAction"
    path="/MyAccount"
    type="com.eri.web.struts.actions.SecurePageAction"
    scope="request">
    <forward name="access-granted" 
      path=".member.account.page"/>
    <forward name="access-denied" 
      path=".member.access.denied.page"/>
  </action>

My class looks like:

class dispatchByURLAction extends ActionMapping
{
  protected String secured = "";
  public String getSecured() {
    return secured;
  }
  public void setSecured (String Secured) {
    secured = Secured;
  }
}

Adding the custom ActionMapping is the new addition. Prior to adding this I had 
expected results. Compile succeeds. However deployment seems to be cut short, 
with no reason specified in the console. (I say gets cut short because the 
series of messages seems shorter then before). When I try to access the website 
I get a 404 with a servlet action is not available message.

the first part of the log is:

2005-10-25 10:11:53 StandardContext[/eri]Marking servlet action as unavailable
2005-10-25 10:11:53 StandardContext[/eri]Servlet /eri threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path 
	at org.apache.struts.action.ActionServlet.handleConfigException
(ActionServlet.java:1035)
	at org.apache.struts.action.ActionServlet.parseModuleConfigFile
(ActionServlet.java:1014)
	at org.apache.struts.action.ActionServlet.initModuleConfig
(ActionServlet.java:955)
	at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)

Any ideas?


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


Re: Custom ActionMapping subclass causing servlet not available

Posted by Dave <no...@yahoo.com>.
BTW, SecurePageAction extends Action. (Don't know if that makes a difference).


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


Re: Custom ActionMapping subclass causing servlet not available

Posted by Dave <no...@yahoo.com>.
Niall Pemberton <niall.pemberton <at> blueyonder.co.uk> writes:

> 
> How about making your custom ActionMapping a public class?
> 
> Niall
>

BTW, the initial cap of the class name was changed to match the file name, and 
the struts-config line was changed to correspond:

  <action className="com.eri.web.struts.actions.DispatchByURLAction"

Just in case you were wondering if I missed that one.



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


Solution

Posted by Dave <no...@yahoo.com>.
Turns out that my ActionMapping needed to inherit from SecureActionConfig. I 
think it has something to do with the way someone on the team implemented SSL.


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


Re: Custom ActionMapping subclass causing servlet not available

Posted by Dave <no...@yahoo.com>.
Niall Pemberton <niall.pemberton <at> blueyonder.co.uk> writes:

> 
> How about making your custom ActionMapping a public class?
> 

OK, can you tell that I'm an old C++ programmer :)

Unfortunatly, while I had high hopes for that change even after I changed the 
declaration to:

public class DispatchByURLAction extends ActionMapping

I'm still getting the same problem, the top of the log now looks like:

2005-10-25 12:23:51 StandardWrapperValve[action]: Servlet action is currently 
unavailable
2005-10-25 12:26:11 StandardContext[/eri]Marking servlet action as unavailable
2005-10-25 12:26:11 StandardContext[/eri]Servlet /eri threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path 
	at org.apache.struts.action.ActionServlet.handleConfigException
(ActionServlet.java:1035)
	at org.apache.struts.action.ActionServlet.parseModuleConfigFile
(ActionServlet.java:1014)
	at org.apache.struts.action.ActionServlet.initModuleConfig
(ActionServlet.java:955)
	at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)

Also, the deployment messages in the console are going on a bit longer then 
before :)

Thanks for trying, any other ideas?


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


Re: Custom ActionMapping subclass causing servlet not available

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
How about making your custom ActionMapping a public class?

Niall

----- Original Message ----- 
From: "Dave" <no...@yahoo.com>
Sent: Tuesday, October 25, 2005 4:20 PM


> In my struts-config I have the following action:
>
>   <action className="com.eri.web.struts.actions.dispatchByURLAction"
>     path="/MyAccount"
>     type="com.eri.web.struts.actions.SecurePageAction"
>     scope="request">
>     <forward name="access-granted"
>       path=".member.account.page"/>
>     <forward name="access-denied"
>       path=".member.access.denied.page"/>
>   </action>
>
> My class looks like:
>
> class dispatchByURLAction extends ActionMapping
> {
>   protected String secured = "";
>   public String getSecured() {
>     return secured;
>   }
>   public void setSecured (String Secured) {
>     secured = Secured;
>   }
> }
>
> Adding the custom ActionMapping is the new addition. Prior to adding this
I had
> expected results. Compile succeeds. However deployment seems to be cut
short,
> with no reason specified in the console. (I say gets cut short because the
> series of messages seems shorter then before). When I try to access the
website
> I get a 404 with a servlet action is not available message.
>
> the first part of the log is:
>
> 2005-10-25 10:11:53 StandardContext[/eri]Marking servlet action as
unavailable
> 2005-10-25 10:11:53 StandardContext[/eri]Servlet /eri threw load()
exception
> javax.servlet.UnavailableException: Parsing error processing resource path
> at org.apache.struts.action.ActionServlet.handleConfigException
> (ActionServlet.java:1035)
> at org.apache.struts.action.ActionServlet.parseModuleConfigFile
> (ActionServlet.java:1014)
> at org.apache.struts.action.ActionServlet.initModuleConfig
> (ActionServlet.java:955)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
>
> Any ideas?



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