• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Return from Action to a non-jsp Page

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot!!
Those misconceptions could cost one's head....
 
reply
    Bookmark Topic Watch Topic
  • New Topic