aspose file tools*
The moose likes Struts and the fly likes Server URL call issues in jsp/struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Server URL call issues in jsp/struts" Watch "Server URL call issues in jsp/struts" New topic
Author

Server URL call issues in jsp/struts

Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183
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.

Any idea on where I need to be looking. Let me know if I need to post any additional information
Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183
Got some more info. It goes into the prepare method but fails to go to the action method. The error thrown is -

(Dispatcher.java:serviceAction:512) Could not find action or result

No result defined for action com.application.action.main.FileAction and result

But as I had mentioned earlier direct call to display.jsp calls the Action method correctly.


Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183
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)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please see the JavaRanch user name policy.

You need to post the JSP(s). And the actions. And the configuration.

Please put the source code with the "code" tags for legibility.
Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183
The files are

struts.xml


input.jsp
Just another jsp file

display.jsp


FileAction.java


Please let me know if I need to post any additional information
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Your action (or an interceptor, maybe) is returning "invalid_user", for which there is no result.

I don't see that in your code anywhere, so I'm not sure how to help.
Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183

Hi David,

Sorry for the delayed response. I had found out something and wanted to be sure before I posted again.

While cleaning up the code to put it up in the forum it started working. The 404 error on click of the link in display.jsp while redirecting from input.jsp was because of the following code(unwanted copy/paste from input.jsp) which I have now removed.



Actually, I have updated display.jsp in the code above. Didn't have this the first time.

But, why does it throw a 404 error rather that a null pointer or something else ??

Thanks !!
 
wood burning stoves
 
subject: Server URL call issues in jsp/struts