This example hosts both the Stimulsoft web viewer and the web designer in a single Spring Boot application using server-rendered views.

The viewer action. The controller loads and renders a report, builds a StiWebViewerOptions, and adds both to the model:
@Controller
public class StimulsoftController {
    @Autowired
    ServletContext context;

    @GetMapping("/viewer")
    public String viewerAction(Model model) throws Exception {
        String reportPath = context.getRealPath("/reports/Dashboards.mrt");
        StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));
        report.render();

        StiWebViewerOptions options = new StiWebViewerOptions();
        options.getToolbar().setViewMode(StiWebViewMode.Continuous);

        model.addAttribute("report", report);
        model.addAttribute("options", options);
        return "viewer";
    }
}

The designer action. A second mapping opens the same report in the designer, with a handler that processes designer requests such as saving:
@GetMapping("/designer")
public String designerAction(Model model) throws Exception {
    String reportPath = context.getRealPath("/reports/Dashboards.mrt");
    StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));

    StiWebDesignerOptions options = new StiWebDesignerOptions();
    model.addAttribute("report", report);
    model.addAttribute("options", options);
    return "designer";
}

How it works. Each Spring route (/viewer, /designer) prepares a report on the server, attaches it and its options to the model, and returns the name of a view template that emits the Stimulsoft component. This gives you a complete edit-and-preview workflow — view a report, jump into the designer, and back — entirely within a Spring Boot application.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.