• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Return from Action to a non-jsp Page

 
Dajin Sulman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dajin Sulman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!!
Those misconceptions could cost one's head....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic