2 Replies Latest reply on May 22, 2009 8:56 PM by benziman kirism

    Can't import other pages to main page

    benziman kirism Newbie

      i am writing the main page of my project to set layout for import the other pages into the main page .

      but i have the problem when importing two pages into main page , when i run the program i just see only one page of two pages to
      import to be display on web browser

      when i run the main page , i only receive the content on the MenuLeft.jsp page display on the main page, so the content of Menu.jsp is disappear even through i set up the path to each files are correctly.

      I did know why it occurs like that.

      i need someone to help me to give advice for my problem.

      if i have trouble with insert other pages into main pages, if you have a good solution , please help me , and share me.

      thank regards.

      default.jsp

      <%@page contentType="text/html" pageEncoding="UTF-8"%>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
       <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
      <html>
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>JSP Page</title>
       </head>
       <body>
       <form>
       <table border="0" cellpadding="0" cellspacing="0" style="left: 102px; width: 820px;
       position: absolute; top: 0px">
       <tr>
       <td colspan="3" style="width: 820px; height: 128px" valign="top">
       <jsp:include page="/pages/header.html" flush="true"/>
       </td>
       </tr>
       <tr>
       <td colspan="3" style="border-top: #ffffff 1px outset; width: 820px; height: 22px" valign="top">
       <jsp:include page="/pages/Menu.jsp" flush="true"/>
       </td>
       </tr>
       <tr>
       <td style="width: 180px; height: 19px">
       <c:import url="/pages/hien.jsp" />
      
       </td>
       <td colspan="2" style="width: 640px; height: 19px">
       </td>
       </tr>
       <tr>
       <td colspan="3" style="height: 25px" valign="top">
      
       </td>
       </tr>
       </table>
       </form>
      
       </body>
      </html>


      Menu.jsp page:
       <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
      <html>
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <style>
       .pic {
       margin-bottom: -4px;
       margin-right: 2px;
       }
       .barsearch {
       height:14px;
       width:160px;
      
       }
       .barsearchbutton {
       border-width:1px;
       background-color:transparent;
      
       }
      
       </style>
       <title>Menu frame</title>
       </head>
       <body>
      
       <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
       <tr>
       <td style="width: 100%; height: 130px" valign="top">
       <f:view>
       <h:form>
      
       <rich:toolBar>
      
       <rich:dropDownMenu submitMode="none">
       <f:facet name="label">
       <h:panelGroup>
       <h:outputLink value="http://goldtrading123.com/?homepage">
       <h:outputText value="Home Page"/>
       </h:outputLink>
      
       </h:panelGroup>
       </f:facet>
      
      
       </rich:dropDownMenu>
      
       <rich:dropDownMenu>
      
       <f:facet name="label">
       <h:panelGroup>
       <h:outputText value="About Us" />
       </h:panelGroup>
      
       </f:facet>
      
       <rich:menuItem submitMode="none"
       onclick="document.location.href='http://goldtrading123.com/'">
       <h:outputLink value="http://goldtrading123.com/">
       <h:outputText value="RichFaces Home Page"></h:outputText>
       </h:outputLink>
       </rich:menuItem>
      
       <rich:menuItem submitMode="none"
       onclick="document.location.href='http://jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=261'">
       <h:outputLink
       value="http://jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=261">
       <h:outputText value="GoldTrade Forum"></h:outputText>
       </h:outputLink>
       </rich:menuItem>
      
      
       </rich:dropDownMenu>
      
       <rich:toolBarGroup location="right">
       <h:inputText styleClass="barsearch" />
       <h:commandButton styleClass="barsearchbutton" onclick="return false;" value="Search" />
       </rich:toolBarGroup>
       </rich:toolBar>
       </h:form>
       </f:view>
       </td>
       </tr>
       </table>
      
       </body>
      </html>


      MenuLeft.jsp page :

      --%>
      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
      
      <html>
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <style>
       .cols{
       vertical-align:top;
       width:50%;
       }
       </style>
       <title>JSP Page</title>
       </head>
       <body>
       <f:view>
      
      
       <h:form id="form">
       <h:panelGrid columns="2" columnClasses="cols" width="100%">
       <rich:panelMenu style="width:200px" mode="ajax"
       iconExpandedGroup="disc" iconCollapsedGroup="disc"
       iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
       iconCollapsedTopGroup="chevronDown">
       <rich:panelMenuGroup label="Tradebase Home page">
       <rich:panelMenuItem label="Item 1.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="All Positions" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 1.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuGroup label="Positions by Account">
       <rich:panelMenuItem label="Item 2.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.1"/>
       </rich:panelMenuItem>
      
       <rich:panelMenuItem label="Item 2.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.3"/>
       </rich:panelMenuItem>
       <rich:panelMenuGroup label="Group 2.4">
       <rich:panelMenuItem label="Item 2.4.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.4.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.4.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuItem label="Item 2.5" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.5"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuGroup label="Show Trade">
       <rich:panelMenuItem label="Item 3.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 3.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 3.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       </rich:panelMenu>
      
       </h:panelGrid>
      
       </h:form>
       </f:view>
       </body>
      </html>