Hi all,

My name is Chris and I'm new around here :)

I'm trying to go through some code that is "inspired" by the
"FinancialPortfolio" example from "Struts Kick Start" book.
I've encountered some problems with the <template:insert> tab. The
details are right here.

One of the windows is supposed to look kind of like this:
-----------------------------------------------
|              header.jsp                     |
|                                             |
----------------------------------------------|
|  b    |                            |   b    |
|  a    |                            |   a    |
|  r    |                            |   r    |
|  l    |                            |   r    |
|  e    |                            |   i    |
|  f    |      center.jsp            |   g    |
|  t    |                            |   h    |
|  .    |                            |   t    |
|  j    |                            |   .    |
|  s    |                            |   j    |
|  p    |                            |   s    |
|       |                            |        |
----------------------------------------------|
|            bottom.jsp                       |
-----------------------------------------------

the "newUser.jsp" code is as follows (only header.jsp and
barleft.jsp included)...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="tmp" %>
<%@ page 
language="java"
contentType="text/html; charset=CP1250"
pageEncoding="CP1250"
%>
<META http-equiv="Content-Type" content="text/html; charset=CP1250">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<TITLE><bean:message key="hello.new.user.title" /></TITLE>
</HEAD>
<BODY>
<TABLE width="100%" height="100%">
    <TR>
        <TD colspan="5" height="61"><tmp:insert
template="header.jsp" /></TD>
    </TR>

    <TR>
        <TD width="150" height="382">Last thing seen before the code
is cut...
        <tmp:insert template="barleft.jsp" /></TD>
        <TD height="382" width="663"></TD>
    </TR>

    <TR>
        <TD colspan="5" height="40"></TD>
    </TR>
</TABLE>
</BODY>
</HTML>

the header.jsp code is:


<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<H1><bean:message key="header.message"/></H1>


the barleft.jsp code is:


<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<TABLE>
 <TR>
  <TD><bean:message key="hello.type.username" /></TD>
  <TD><html:text property="login" maxlength="20" size="20" /></TD>
 </TR>

 <TR>
  <TD colspan="2"><html:errors property="login" /></TD>
 </TR>

 <TR>
  <TD><bean:message key="hello.type.password" /></TD>
  <TD><html:password property="password" maxlength="20" size="20"/>
  </TD>
 </TR>

 <TR>
  <TD colspan="2"><html:errors property="password" /></TD>
 </TR>
</TABLE>


After the project is published on a Tomcat 4.1.29
the source of the newUser.jsp opened in the browser looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>


<META http-equiv="Content-Type" content="text/html; charset=CP1250">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<TITLE>Register new user</TITLE>
</HEAD>
<BODY>
<TABLE width="100%" height="100%">
    <TR>
        <TD colspan="5" height="61">
<H1>Register new user</H1>
</TD>
    </TR>

    <TR>
        <TD width="150" height="382">Last thing seen before the code
is cut...

So the header.jsp is inserted, but the barleft.jsp is not!!

Can anybody explain what I do wrong with this example??

Regards
Chris

PS. To make things funny... preview of the page in WSAD looks fine 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to