本文整理匯總了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"));
}