The Stimulsoft React viewer runs as a front-end component that talks to a Java backend (a Jakarta EE servlet) through a request URL.

Render the React viewer component.
import { StimulsoftViewer } from 'stimulsoft-viewer-react';

export const App = () => (
    <StimulsoftViewer
        requestUrl="http://localhost:8080/viewer/react_viewer?a={action}"
        action="InitViewer"
        properties={{ reportName: 'Dashboards.mrt' }}
        height="100vh"
    />
);
Handle requests in the Java servlet.
public class StiReactViewerActionServlet extends HttpServlet implements StiReactViewerHandler {
    protected void processing(HttpServletRequest request, HttpServletResponse response) {
        StiWebViewerActionServletHelper.processing(
            new StiHttpServletRequest(request, this), new StiHttpServletResponse(response));
    }
}

How it works. The React front end renders in the browser and calls the a Jakarta EE servlet backend for data and actions, splitting UI from server logic.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.