本文整理汇总了Java中javax.servlet.jsp.JspContext.getOut方法的典型用法代码示例。如果您正苦于以下问题:Java JspContext.getOut方法的具体用法?Java JspContext.getOut怎么用?Java JspContext.getOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.servlet.jsp.JspContext
的用法示例。
在下文中一共展示了JspContext.getOut方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doTag
import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
/**
* Ecriture HTML du Tag
* @throws JspException
* @throws IOException
*/
@Override
public void doTag() throws JspException, IOException {
JspContext jsp = this.getJspContext();
JspWriter out =jsp.getOut();
// Create a top menu or reuse the existing one
if (menuCache == null) {
leftMenu(out);
} else {
out.println("<div id='" + cssDivMenu + "'>");
out.println(menuCache);
out.println("</div>");
}
}
示例2: doTag
import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
/**
* Ecriture HTML du Tag
* @throws JspException
* @throws IOException
*/
@Override
public void doTag() throws JspException, IOException {
JspContext jsp = this.getJspContext();
JspWriter out =jsp.getOut();
try {
Action actionform = (Action)jsp.findAttribute(C.ACTION_FORM_BEAN);
String embedded = actionform.getSessionAttr("mode");
if (embedded.equalsIgnoreCase("embedded"))
leftMenu(out);
else
topMenu(out);
} catch (IOException ex) {
Joy.log().debug ( ex.toString());
out.println("No menu defined.");
}
}
示例3: doTag
import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
@Override
public void doTag() throws JspException, IOException {
JspContext jsp = this.getJspContext();
//Get the writer object for output.
JspWriter out =jsp.getOut();
// get the action object
String infoMsg = "";
String errorMsg = "";
Action actionform = (Action)jsp.findAttribute(C.ACTION_FORM_BEAN);
if (actionform != null) {
List<ActionLogReport> errors = actionform.getAllDisplayMessages();
if (errors != null) {
for (ActionLogReport error : errors) {
if (error.getCriticity() == ActionLogReport.enum_CRITICITY.ERROR) {
errorMsg += error.getDescription() + "<BR>";
} else {
infoMsg += error.getDescription() + "<BR>";
}
}
}
if (!errorMsg.isEmpty()) {
out.println("<div class='alert alert-danger'>");
out.println(errorMsg);
out.println("</div>");
}
if (!infoMsg.isEmpty()) {
out.println("<div class='alert alert-success'>");
out.println(infoMsg);
out.println("</div>");
}
}
//out.println("TEST");
}
示例4: doTag
import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
public void doTag() throws JspException, IOException {
JspContext jspContext = super.getJspContext();
JspWriter out = jspContext.getOut();
String roleName = WizardWebUtils.getRoleName(jspContext);
MenuService menuService = SpringContextUtils.getBean("menuServiceImpl",
MenuService.class);
List<WizardMenu> parentNodes = menuService.getParentNodes(roleName);
for (WizardMenu parentNode : parentNodes) {
out.print("<a href=\"#menu");
out.print(parentNode.getPkId());
if (!WizardUtils.isBlank(parentNode.getMenuPath())) {
out.print("\" onClick=\"addTabItem('");
out.print(parentNode.getMenuName());
out.print("', '");
out.print(parentNode.getMenuPath());
out.print("');");
}
out.print("\" class=\"nav-header menu-first collapsed\" data-toggle=\"collapse\">");
out.print(parentNode.getMenuName());
out.println("</a>");
out.println("<ul id=\"menu" + parentNode.getPkId()
+ "\" class=\"nav nav-list collapse menu-second\">");
List<WizardMenu> childNodes = menuService.getChildNodes(
parentNode.getPkId(), roleName);
for (WizardMenu childNode : childNodes) {
out.print("<li><a href=\"#\" onClick=\"addTabItem('");
out.print(childNode.getMenuName());
out.print("', '");
out.print(childNode.getMenuPath());
out.print("');\">");
out.print(childNode.getMenuName());
out.println("</a></li>");
}
out.println("</ul>");
}
}
示例5: doTag
import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
public void doTag() throws JspException, IOException {
JspContext jspContext = super.getJspContext();
JspWriter out = jspContext.getOut();
String roleName = WizardWebUtils.getRoleName(jspContext);
MenuService menuService = SpringContextUtils.getBean("menuServiceImpl",
MenuService.class);
List<WizardMenu> parentNodes = menuService.getParentNodes(roleName);
for (WizardMenu parentNode : parentNodes) {
out.print("<a href=\"#menu");
out.print(parentNode.getPkId());
if (!WizardUtils.isBlank(parentNode.getMenuPath())) {
out.print("\" onClick=\"addTabItem('");
out.print(parentNode.getMenuName());
out.print("', '");
out.print(parentNode.getMenuPath());
out.print("');");
}
out.print("\" class=\"nav navbar-link menu-first collapsed\" data-toggle=\"collapse\">");
out.print(parentNode.getMenuName());
out.println("</a>");
out.println("<ul id=\"menu" + parentNode.getPkId()
+ "\" class=\"nav nav-stacked collapse\">");
List<WizardMenu> childNodes = menuService.getChildNodes(
parentNode.getPkId(), roleName);
for (WizardMenu childNode : childNodes) {
out.print("<li><a href=\"#\" onClick=\"addTabItem('");
out.print(childNode.getMenuName());
out.print("', '");
out.print(childNode.getMenuPath());
out.print("');\">");
out.print(childNode.getMenuName());
out.println("</a></li>");
}
out.println("</ul>");
}
}