|
Sample: Portlet Template, or Editable Portlet (DisplayURL)
Viewer.jspThe code for
<!-- Copyright (c) 2003 by SAS Institute Inc., Cary, NC 27513 -->
<%@ page language="java" contentType= "text/html; charset=UTF-8" %>
<%@ page import="com.sas.portal.portlet.PortletContext" %>
<%@ page import="com.sas.portal.portlet.PortletConstants" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt_rt" %>
<%
PortletContext context = (PortletContext) request.getAttribute(
PortletConstants.CURRENT_PORTLET_CONTEXT );
String url = (String) context.getAttribute("sas_DisplayURL_DisplayURL");
if ((url == null) || (url.length() == 0))
{
%>
<p style="text-align: center;"><fmt:message key="viewer.nourl.txt"/></p>
<%
} else {
try {
%>
<c_rt:import charEncoding="UTF-8" url="<%= url %>" />
<%
} catch (Exception ex) {
%>
<p style="text-align: center;">
<fmt_rt:message key="viewer.badurl.fmt">
<fmt_rt:param value="<%= url %>"/>
<fmt_rt:param value="<%= ex.getMessage() %>"/>
</fmt_rt:message>
</p>
<%
}
}
%>
|