Here goes the details

The files are

struts.xml
<action name="DisplaySandbox_*"
class="com.jci.glims.web.action.main.FileAction" method="{1}">
    <interceptor-ref name="loginStack"/>
        <result name="display">/main/test/display.jsp</result>
        <result name="create">/main/test/input.jsp</result>
        <result name="conf">/main/test/confirmation.jsp</result>                
        
        <result name="fixtureMsg" type="chain">message</result> 
</action>

<action name="getFile"  method="getRequiredFile"
class="com.jci.glims.web.action.main.FileAction">
        <interceptor-ref name="loginStack"/>
        <result name="display">/main/test/display.jsp</result>
        <result name="fixtureMsg" type="chain">message</result>         
</action>               

<action name="DisplaySandbox_*"
class="com.jci.glims.web.action.main.FileAction" method="{1}">
<interceptor-ref name="loginStack"/> <result
name="display">/main/test/display.jsp</result> <result
name="create">/main/test/input.jsp</result> <result
name="conf">/main/test/confirmation.jsp</result> <result name="fixtureMsg"
type="chain">message</result> </action> <action name="getFile"
method="getRequiredFile" class="com.jci.glims.web.action.main.FileAction">
<interceptor-ref name="loginStack"/> <result
name="display">/main/test/display.jsp</result> <result name="fixtureMsg"
type="chain">message</result> </action>

input.jsp
Just another jsp file

display.jsp
<%...@page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Display JSP</title>
<link type="text/css" rel="stylesheet" href="../style/Master.css"
media="screen"> 
<script type="text/javascript">
function getFileForDisplay(fileName, path){
        //document.forms[0].method = "get" // Need to test if this would solve 
the
problem
        document.displaySandbox.action = "getFile.action?fileName="+fileName +
"&path=" + path;
        alert('action::'+document.displaySandbox.action);   
        document.displaySandbox.submit();
} 
</script>       
</head>
<body class="includeBody">
<s:form name="displaySandbox"  action="DisplaySandbox" method="post"
enctype="multipart/form-data">
<table>
<tr>
                <td>Primary Key</td>
                <td>&nbsp;&nbsp;<s:property value="fixtures.fixtureIdPrefix" 
/></td>                            
</tr>
<tr>
        <td>The URL</td>
        <td>
                 JavaScript:getFileForDisplay('<s:property value= 
','APPROVALFORM');">
                <s:property     value="approvalFormUploadFileName"/>
                 
        </td>
</tr>
</table>
</s:form>
</body>
</html>

FileAction.java
        @SkipValidation
        public String getRequiredFile() {
                String fileName = "";
                String path = "";
                String actualFileName = "";
                Fixtures selectedFixture = null;
                String fixtureID = "";

                if (this.request.getParameter(FILE_NAME) != null) {
                        fileName = this.request.getParameter(FILE_NAME);
                }
                if (this.request.getParameter(PATH) != null) {
                        path = this.request.getParameter(PATH);
                }

                try {
                        if 
(this.session.containsKey(Fixtures.SELECTEDFIXTUREID)) {
                                fixtureID = (String) this.session
                                                
.get(Fixtures.SELECTEDFIXTUREID);
                        }

                        if (this.fixtures.getFixtureId() != 0) {
                                actualFileName = fixtureID + UNDERSCORE + path 
+ UNDERSCORE
                                                + fileName;
                        } else {
                                        selectedFixture = (Fixtures) 
this.session
                                                        
.get(Fixtures.SELECTERD_FIXTURE);
                                        if (selectedFixture != null) {
                                                actualFileName = 
selectedFixture.getFixtureId()
                                                                + UNDERSCORE + 
path + UNDERSCORE + fileName;
                                        }
                        }

                        // For downloading attached document for fixture
                        FileDownloadUtil.getdocument(this.response, 
actualFileName);

                } catch (Exception e) {
                        addActionMessage("File processing failed due to an 
internal error.");
                        return FIXTURE_MSG;
                }
                return this.DISPLAY;
        }

Please let me know if I need to post any additional information



newton.dave wrote:
> 
> As I said on JavaRanch you'll need to post at least the configs.
> 
> Dave
> 
> J D wrote:
>> I need some help figuring out where I need to search for the problem
>> below.
>> 
>> I have a jsp input.jsp which calls display.jsp on click of submit.
>> display.jsp can also be called directly using search.
>> 
>> A URL in display.jsp does not work when it is being redirected from
>> input.jsp but works when directly being called.
>> 
>> display.jsp has the following javascript which is called when the link is
>> clicked.
>> 
>> function getFile(fileName, path){  
>>      document.forms[0].action="getFile.action?fileName="+fileName;  
>>      alert('action::'+document.displayFile.action);  
>>      document.forms[0].submit();  
>> }  
>> 
>> 
>> Any idea on where I need to be looking. Let me know if I need to post any
>> additional information
>> 
>> Here is the whole exception stack trace
>> 
>> [1/30/09 15:31:54:953 IST] 0000002b SystemOut O [ERROR] 31:54
>> (Dispatcher.java:serviceAction:512)
>> Could not find action or result
>> 
>> No result defined for action com.action.FileAction and result
>> invalid_user -
>> action - at
>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
>> at
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
>> at
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>> at
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>> at
>> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>> at
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>> at
>> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>> at
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>> at
>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
>> at
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
>> at
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
>> at
>> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
>> at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
>> at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>> at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
>> at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
>> at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:688)
>> at
>> com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:101)
>> at
>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:758)
>> at
>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:718)
>> at
>> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
>> at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
>> at
>> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
>> at
>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
>> at
>> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
>> at
>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
>> at
>> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>> at
>> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>> at
>> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>> at
>> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>> at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
>> at
>> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:784)
>> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DefaultActionInvocation-exception-tp21744631p21786497.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to