• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / sitemesh2 / 59

22 Mar 2026 02:30AM UTC coverage: 40.347%. Remained the same
59

push

github

hazendaz
[mvn] Update maven wrapper

698 of 1891 branches covered (36.91%)

Branch coverage included in aggregate %.

1555 of 3693 relevant lines covered (42.11%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/opensymphony/sitemesh/webapp/decorator/BaseWebAppDecorator.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
package com.opensymphony.sitemesh.webapp.decorator;
6

7
import com.opensymphony.sitemesh.Content;
8
import com.opensymphony.sitemesh.Decorator;
9
import com.opensymphony.sitemesh.SiteMeshContext;
10
import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext;
11

12
import jakarta.servlet.ServletContext;
13
import jakarta.servlet.ServletException;
14
import jakarta.servlet.http.HttpServletRequest;
15
import jakarta.servlet.http.HttpServletResponse;
16

17
import java.io.IOException;
18

19
/**
20
 * Convenient base class for all Java web-app based decorators that make use of the Servlet API.
21
 *
22
 * @author Joe Walnes
23
 *
24
 * @since SiteMesh 3.0
25
 */
26
public abstract class BaseWebAppDecorator implements Decorator {
×
27

28
    /**
29
     * More convenient version of
30
     * {@link #render(com.opensymphony.sitemesh.Content, com.opensymphony.sitemesh.SiteMeshContext)} suited for Servlet
31
     * API calls.
32
     *
33
     * @param content
34
     *            the content
35
     * @param request
36
     *            the request
37
     * @param response
38
     *            the response
39
     * @param servletContext
40
     *            the servlet context
41
     * @param webAppContext
42
     *            the web app context
43
     *
44
     * @throws IOException
45
     *             Signals that an I/O exception has occurred.
46
     * @throws ServletException
47
     *             the servlet exception
48
     */
49
    protected abstract void render(Content content, HttpServletRequest request, HttpServletResponse response,
50
            ServletContext servletContext, SiteMeshWebAppContext webAppContext) throws IOException, ServletException;
51

52
    /**
53
     * Render.
54
     *
55
     * @param content
56
     *            the content
57
     * @param context
58
     *            the context
59
     */
60
    @Override
61
    public void render(Content content, SiteMeshContext context) {
62
        SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context;
×
63
        try {
64
            render(content, webAppContext.getRequest(), webAppContext.getResponse(), webAppContext.getServletContext(),
×
65
                    webAppContext);
66
        } catch (IOException | ServletException e) {
×
67
            throw new RuntimeException("Unexpected exception during rendering", e);
×
68
        }
×
69
    }
×
70

71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc