O.K., Sachin, I've included the jsp page below. Look for formButtons. If
you or someone else thinks that it's necessary to see the bean,
controller or event handler classes, let me know. The problem is with
the include, though; if I make only one include to the jsp file,
everything works fine.
Quinn
<%@ page import="com.adventuretime.manager.beans.*" %>
<%@ page import="com.stoneconsultants.utils.ServletUtilities" %>
<%@ page import="java.util.*" %>
<html>
<jsp:useBean id="userSession"
class="com.adventuretime.manager.beans.UserSession" scope="session"/>
<jsp:useBean id="notes" class="com.adventuretime.manager.beans.Notes"
scope="request"/>
<jsp:useBean id="currentNote"
class="com.adventuretime.manager.beans.Note" scope="request"/>
<jsp:useBean id="userRequest"
class="com.adventuretime.manager.beans.RequestBean" scope="request"/>
<%@ include file="includes/testInsert.jsp" %>
<head>
<title>Notes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" href="styles/global.css" type="text/css">
</head>
<body bgcolor="#E4E4E4" text="#000000">
<form action="controller" method="post">
<input type="hidden" name="event" value="NOTE_VIEW">
<input type="hidden" name="noteId" value="<%= currentNote.getId() %>">
<!-- Start Top Nav Table -->
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#0066CC">
<table width="100%" border="0"
cellspacing="0" cellpadding="4">
<tr>
<td width="33%"
bgcolor="#FFFFFF"><a
href="organization.jsp">Admin</a> Accounts <a
href="#">Billing</a></td>
<td width="34%"
bgcolor="#FFFFFF" align="center">Current Program:
School Year<br>
2001/2002</td>
<td width="33%"
bgcolor="#FFFFFF" align="right">Current Page: Notes</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- End Top Nav Table -->
<!-- Start Spacer table -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pixelClear.gif" height="5"
width="1" border="0" vspace="0" hspace="0"></td>
</tr>
</table>
<!-- End Spacer table -->
<!-- Start Body Table I -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="84%" valign="top">
<%@ include
file="includes/pageMessages.jsp" %>
<table bgcolor="#0066CC" cellpadding="2"
border="0" cellspacing="0" width="100%">
<tr>
<td>
<table
width="100%" border="0" cellspacing="0" cellpadding="4"
bgcolor="#FFFFFF">
<tr>
<td><a
href="controller?event=ACCOUNT_SEARCH">Current Account:</a> <%=
userSession.getCurrentAccount() %></td>
<td align="right">
<%@ include file="includes/formButtons.jsp" %>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Start Spacer table -->
<table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><img
src="images/pixelClear.gif" height="5" width="1" border="0" vspace="0"
hspace="0"></td>
</tr>
</table>
<!-- End Spacer table -->
<table cellpadding="0" border="0"
cellspacing="0" width="100%">
<tr>
<td class="headerText">
<table
width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td class="headerText" valign="top" colspan="3" nowrap>Select Note</td>
</tr>
<tr>
<td valign="top" align="left" class="headerTextRows"> </td>
<td valign="top" align="left" class="headerTextRows">Date</td>
<td valign="top" align="left" class="headerTextRows">User</td>
<td valign="top" align="left" class="headerTextRows">Note</td>
</tr>
<%
notes.resetEnumerator();
while ( notes.hasMoreNotes() ) {
Note note = notes.nextNote();
%>
<tr>
<td valign="middle" align="left" class="row">
<%
if ( (currentNote.getId() == note.getId()) ) {
currentNote = note;
%>
<img src="images/blueArrow.gif" width="10" height="12">
<% } else { %>
<% } %>
</td>
<td valign="top" align="left" class="row"><a
href="controller?event=NOTE_VIEW¬eId=<%=note.getId()%>"><%=
note.getDate() %></a></td>
<td valign="top" align="left" class="row"><%=
ServletUtilities.filter(note.getUserId()) %></td>
<td valign="top" align="left" class="row"><%=
ServletUtilities.filter(note.getNote(50)) %></td>
</tr>
<%
} // End while ( notes.hasMoreNotes() )
%>
</table>
</td>
</tr>
</table>
<!-- Start Spacer table -->
<table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><img
src="images/pixelClear.gif" height="5" width="1" border="0" vspace="0"
hspace="0"></td>
</tr>
</table>
<!-- End Spacer table -->
<table cellpadding="1" border="0"
cellspacing="0" width="100%">
<tr>
<td bgcolor="#999999">
<!-- Start
Editable -->
<table
width="100%" border="0" cellspacing="0" cellpadding="2"
bgcolor="#FFFFFF">
<tr>
<td class="headerText" valign="top" colspan="3">
<% if (inserting) { %>Add<% } else { %>Edit<% } %>Note
</td>
</tr>
<tr>
<td valign="baseline" align="right" width="1%" nowrap>Date:</td>
<td valign="top">
<input type="text" name="date" size="8" maxlength="8" class="formField"
value="<%= currentNote.getDate() %>">
</td>
<td valign="baseline" nowrap align="left">User:
<input type="text" name="userId" size="8" maxlength="8"
class="formField" value="<%= currentNote.getUserId() %>">
</td>
</tr>
<tr>
<td align="right" valign="top" width="1%" nowrap>Note:</td>
<td align="left" valign="top" class="formField" colspan="2">
<font face="Courier New, Courier, mono">
<textarea name="note" cols="50" rows="10" class="formField"
wrap="VIRTUAL"><%= currentNote.getNote() %></textarea>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Start Spacer table -->
<table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><img
src="images/pixelClear.gif" height="5" width="1" border="0" vspace="0"
hspace="0"></td>
</tr>
</table>
<!-- End Spacer table -->
<table bgcolor="#0066CC" cellpadding="2"
border="0" cellspacing="0" width="100%">
<tr>
<td>
<table
width="100%" border="0" cellspacing="0" cellpadding="4"
bgcolor="#FFFFFF">
<tr>
<td align="right">
<%@ include file="includes/formButtons.jsp" %>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1%" valign="top"><img
src="images/pixelClear.gif"></td>
<td width="15%" valign="top">
<%@ include file="includes/commands.jsp"
%>
</td>
</tr>
</table>
</form>
<!-- End Form Body -->
</body>
</html>
------------------------------------------
Quinn Stone
Stone Consultants
2214 1/2 Santa Clara Ave.
Alameda, CA 94501
510.865.7342
www.stoneconsultants.com
> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference [mailto:[EMAIL PROTECTED]] On Behalf Of
> Sachin S. Khanna
> Sent: Friday, July 27, 2001 8:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: <%@ including a file twice
>
>
> Posting your entire code would assist you in getting a
> possible solution from the people on this list much faster.
> Have a nice day. With regards, Sachin S. Khanna
> http://www.emailanorder.com
> ----- Original Message -----
> From: Quinn Stone <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 27, 2001 9:44 PM
> Subject: <%@ including a file twice
>
>
> > Hello:
> >
> > I am running on Jrun 3.1. I want to include standard form button at
> > the top AND bottom of my forms. What I tried was this:
> >
> > <%@ include file="includes/formButtons.jsp" %>
> >
> > at the top and bottom of the form in my jsp page. However, Jrun
> > displays the following error:
> >
> > Parse Error in JSP page: The include directive on line 155 of page
> > /note.jsp The page '/includes/formButtons.jsp' cannot be included,
> > including it here will cause infinite recursion.
> >
> > To me, it seems the compiler might be trying to create internal
> > methods of the same name whenever it encounters the <%
> include %> for
> > the same file. I can create two include files with different names
> > that contain the same code to get around it, but that's not very
> > modular.
> >
> > formButtons.jsp looks like this:
> > <%
> > if ( inserting )
> > {
> > %>
> > <input type="submit" name="cancelButton" value="Cancel">
> > <input type="submit" name="saveButton" value="Save"> <%
> > } else {
> > %>
> > <input type="submit" name="insertButton" value="Add">
> > <input type="submit" name="deleteButton" value="Delete">
> > <input type="submit" name="updateButton" value="Update">
> > <%
> > }
> > %>
> >
> > Any suggestions?
> > ------------------------------------------
> > Quinn Stone
> > Stone Consultants
> > 2214 1/2 Santa Clara Ave.
> > Alameda, CA 94501
> > 510.865.7342
> > www.stoneconsultants.com
> >
> >
> ==============================================================
> =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST". For digest: mailto
> [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets