This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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!
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.