Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Creating the View JSP

Create a JSP to embed the output text property of the data island, as shown in Listing 3.

Listing 3 showtree.jsp—Displaying the Hierarchy of Messages

<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts"%>
<jsp:useBean id="dataIsland" type="MessagesIsland" scope="request"/>
<title><struts:message key="showtree.title"/></title>
<base target="message"/>
<center><struts:message key="showtree.title"/></center>
<jsp:getProperty name="dataIsland" property="text"/>

Add an entry in action.xml for the new action class:

<action path="/showtree" 
        <forward name="help" path="/help.jsp"/>
        <forward name="success" path="/showtree.jsp"/>
  • + Share This
  • 🔖 Save To Your Account