Home » Java » java – XSL-based HTML View in Spring-Exceptionshub

java – XSL-based HTML View in Spring-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment


While I’ve been able to get JSPs working in Spring I haven’t had the same luck with getting XSLT to produce an HTML View. This stems from some legacy code I’ve been trying migrate from an old Struts 1.x to a Spring framework.

public class ClassSearchAction {

  public ModelAndView execute(HttpServletRequest request, HttpServletResponse response, Object cmd, BindingResult bindingResult)
      throws IOException, ServletException {

    DTO_Employee HRemp = new DTO_Employee();

    try {
      DAO_Factory FactoryDAO = new DatabaseFactoryImpl();...

...    request.setAttribute("Validated", "true");
    return (new ModelAndView("xsl-034"));

In my application.properties I don’t see that there’s a way to replicate what I have working for JSPs to use with XSLs. e.g.:

spring.mvc.view.prefix: /WEB-INF/jsp/

I was hoping to avoid rewriting all of the project’s older code, but as I’m not finding a solution in Spring I thought I’d ask around in case I’m just missing something.

Thanks for any insight.

How to&Answers: