如何使用<;portlet:actionURL/>;在customtags jsp中
我在使用customtag和时遇到问题 这是我的日历如何使用<;portlet:actionURL/>;在customtags jsp中,jsp,jboss,portlet,Jsp,Jboss,Portlet,我在使用customtag和时遇到问题 这是我的日历 <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> <taglib> <tli
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>tagCalendar</shortname>
<info>Custom Tag Visualizzazione Lista Calendari</info>
<tag>
<name>tagCalendar</name>
<tagclass>it.postecom.postesalute.tag.TagCalendar</tagclass>
<bodycontent>empty</bodycontent>
<info>Custom Tag Visualizzazione Lista Calendari</info>
<attribute>
<name>pageRedirect</name>
<required>true</required>
</attribute>
<attribute>
<name>collectionCalendar</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute><attribute>
<name>actionUrl</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
1
1.1
日历
自定义标记Visualizazione Lista Calendari
日历
it.postecom.postesalute.tag.tag日历
空的
自定义标记Visualizazione Lista Calendari
");
out.println(“”);
}
}捕获(IOE异常){
//TODO自动生成的捕捉块
e、 printStackTrace();
}
返回TagSupport.SKIP_BODY;
标记不会转换为操作,而是像字符串一样使用。我在jsp页面中以这种方式解析
<portlet:defineObjects />
<ct:tagCalendar actionUrl="<%= renderResponse.createActionURL().toString() %>" pageRedirect="indexTo" collectionCalendar="<%=QueryCalendar.getUserCalendars(JodUtil.getToken(request))%>" />
try {
JspWriter out = pageContext.getOut();
Iterator iter = collectionCalendar.iterator();
ArrayList <JodBaseCalendar>userCalendarList = new ArrayList<JodBaseCalendar>();
int cnt = 0;
while (cnt <= 3) {
userCalendarList.add((JodBaseCalendar) iter.next());
cnt++;
}
out.println("<table>");
for(JodBaseCalendar calendar:userCalendarList){
out.println("<tr>");
out.println("<a href='"+actionUrl +"?forwardTo="+pageRedirect+"&calendarId="+ calendar.getCalendarId()+"'>");
out.println("["+calendar.getCalendarId()+" - "+calendar.getCalendarSubject()+"]");
out.println("</a>");
out.println("</tr>");
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return TagSupport.SKIP_BODY;
<portlet:defineObjects />
<ct:tagCalendar actionUrl="<%= renderResponse.createActionURL().toString() %>" pageRedirect="indexTo" collectionCalendar="<%=QueryCalendar.getUserCalendars(JodUtil.getToken(request))%>" />