0 Replies Latest reply on Aug 22, 2003 3:38 AM by a_mulye2003

    calling one jsp from other

    a_mulye2003

      Hello Everybody,
      I have written a simple JSP.I have used struts validation and config file in my project.
      I want to call one another JSP which contents the tree structure.
      My JSP is calling that tree structure perfectly.This tree structure is defined in one simple bean.
      But I am not able to pass the selected String from tree to main jsp.
      I am giving my JSP's here:
      1:Main.jsp

      <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
      <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
      <%@ page import = "java.util.*" %>




      <!--
      var form_name
      var which_field

      function openTree(){
      callmyjsp("myForm","tree");
      }

      function callmyjsp(formname,whichfield)
      {
      form_name = formname
      which_field = whichfield
      new_window=window.open("<bean:message key="page.tree"/>?formname=" + form_name + "&fieldname="+ which_field ,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=230,height=300");
      }

      //-->

      <html:form action="/Main.do" >
      <html:hidden property="page" value="1"/>




      <td nowrap>mymenu: 




      <img src=/button/buttonSelect.gif" value="<%=request.getSession().getAttribute("tree")%>" border="0"/>








      <html:image srcKey="button.forward" property="forward" border="0"/>



      </html:form>

      <logic:messagesPresent>
      <bean:message key="errors.header"/>

      <html:messages id="error">
      <bean:write name="error"/>
      </html:messages>

      </logic:messagesPresent>

      2:Tree.jsp

      <%@ page language="java" import="data1.MyBean" %>

      <jsp:useBean id='tree' scope='session' class='data1.ObjektBean' />

      <%
      tree.setString(request.getParameter("formname")+ "." + request.getParameter("fieldname") ) ;
      %>


      <%= tree.init() %>

      There is no problem in my bean class.
      But Something is missing in Main.jsp, to acquire the String send by Tree.jsp and pass that String to next menu in wizard.
      Can anybody help me to solve this problem?As it is very urgent for me.
      Thanks in advance,
      a_mulye2003