You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2007/06/07 17:46:26 UTC

[jira] Commented: (WW-1977) Struts throws stack trace instead of 404 when an action doesn't exist

    [ https://issues.apache.org/struts/browse/WW-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41188 ] 

Musachy Barroso commented on WW-1977:
-------------------------------------

If devMode is set to true, an error report is written to the response, otherwise the error is sent(404), take a look at the sendError method here:

http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=markup

I tried it on showcase and I got the 404, 

Content-Type: text/html; charset=ISO-8859-1
Content-Length: 3592
Connection: keep-alive
Server: Jetty(6.0.1)

404 There+is+no+Action+mapped+for+namespace+%2F+and+action+name+showcaseaaa%2E

do you have devMode set to true on the appfuse demo?

> Struts throws stack trace instead of 404 when an action doesn't exist
> ---------------------------------------------------------------------
>
>                 Key: WW-1977
>                 URL: https://issues.apache.org/struts/browse/WW-1977
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions
>    Affects Versions: 2.0.6
>            Reporter: Matt Raible
>
> If I request an action that doesn't exist, Struts displays a "Struts Problem Report" page with a stack trace like the following:
> here is no Action mapped for namespace / and action name blabla. - [unknown location]
> 	at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
> 	at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActio
> In my struts.xml:
>     <constant name="struts.devMode" value="false"/>
>     <constant name="struts.i18n.encoding" value="UTF-8"/>
>     <constant name="struts.action.extension" value="html"/>
>     <constant name="struts.objectFactory" value="spring"/>
>     <constant name="struts.custom.i18n.resources" value="ApplicationResources,errors"/>
>     <constant name="struts.multipart.maxSize" value="2097152"/>
>     <constant name="struts.ui.theme" value="css_xhtml"/>
>     <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/pages/"/>
> Strangely enough, in another application I was able to change struts.devMode from true to false to fix this problem. However, since it's already false in this application, I'm not sure how to fix it.
> To reproduce, go to: http://demo.appfuse.org/appfuse-struts/blabla.html and login with user/user.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.