本文整理汇总了Java中javax.portlet.RenderRequest.getParameter方法的典型用法代码示例。如果您正苦于以下问题:Java RenderRequest.getParameter方法的具体用法?Java RenderRequest.getParameter怎么用?Java RenderRequest.getParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.portlet.RenderRequest
的用法示例。
在下文中一共展示了RenderRequest.getParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doView
import javax.portlet.RenderRequest; //导入方法依赖的package包/类
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
String user = request.getParameter("user");
writer.println("<h1>Hello "+user+"!</h1>");
}
示例2: doView
import javax.portlet.RenderRequest; //导入方法依赖的package包/类
@Override
protected void doView(RenderRequest request, RenderResponse response)
throws IOException, PortletException {
PrintWriter printWriter = response.getWriter();
String fileName = request.getParameter("fileName");
String mimeType = request.getParameter("mimeType");
String version = request.getParameter("version");
String statusLabel = request.getParameter("statusLabel");
String createdDate = request.getParameter("createdDate");
String createdUserName = request.getParameter("createdUserName");
printWriter.print(
"<span style=\"color:green\">File Name</span>:" + fileName +
"<br/>");
printWriter.print(
"<span style=\"color:green\">Type</span>:" + mimeType + "<br/>");
printWriter.print(
"<span style=\"color:green\">Version</span>:" + version + "<br/>");
printWriter.print(
"<span style=\"color:green\">Status</span>:" + statusLabel +
"<br/>");
printWriter.print(
"<span style=\"color:green\">Created Date</span>:" + createdDate +
"<br/>");
printWriter.print(
"<span style=\"color:green\">Created User Name</span>:" +
createdUserName + "<br/>");
}
示例3: handleRenderRequest
import javax.portlet.RenderRequest; //导入方法依赖的package包/类
@Override
public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws Exception {
return new ModelAndView(request.getParameter("param"));
}