File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Return from Action to a non-jsp Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Return from Action to a non-jsp Page" Watch "Return from Action to a non-jsp Page" New topic
Author

Return from Action to a non-jsp Page

Dajin Sulman
Greenhorn

Joined: Apr 28, 2003
Posts: 11
Hey there,
I got a small problem to figure out:
I want my struts action to send dynamic-generated xml content to an application that just understands HTTP. My problem: Action-classes need a "return forward" to a jsp-Page, but I need to return the generated xml-file to that application.
What do you suggest? Extend Struts? How? Dump Struts and write a controller myself?
Any hints, links etc are really appreciated right now I am clueless about the best approach
Thanks!
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

You are under the wrong impression about the Struts forward. Yes, the framework needs to return an ActionForward from the execute() method but the ActionForward is a logical mapping so it can be mapped to any resource you need it to be mapped to; it is not limited to JSPs. In the mapping, set the path attribute to whatever resource you need to forward to generate the XML.


Junilu - [How to Ask Questions] [How to Answer Questions]
Dajin Sulman
Greenhorn

Joined: Apr 28, 2003
Posts: 11
Thanks a lot!!
Those misconceptions could cost one's head....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Return from Action to a non-jsp Page