WelcomePortlet.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:cacheonix-core 作者:
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<h1>Welcome to the Pet Portal!</h1>");
    if(request.getWindowState().equals(WindowState.MAXIMIZED)) {
        out.println("<p>This portlet delegates to an existing JSR-168 portlet via a HandlerAdapter</p>");
        out.println("<p>(see WEB-INF/context/welcome-context.xml for the details).</p>");
        out.println("<p>Portlet Name: " + this.getPortletName() + "</p>");
        out.println("<p>Init Parameters:</p><ul>");
        for (Enumeration e = this.getInitParameterNames(); e.hasMoreElements();) {
                String name = (String)e.nextElement();
                out.println("<li>" + name + " = " + this.getInitParameter(name) + "</li>");
        }
        out.println("</ul>");
        out.println("<p>Your Locale: " + request.getLocale().toString() + "</p>");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号