To be able to share variables among files you shoud use instead the include
directive:
<%@ include file="DBQuery.jsp" %>  or <jsp:directive.include
file="DBQuery.jsp" />

I hope this will help

Regards

St�phane Manciot

----- Original Message -----
From: "Stephen Oakes" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 6:11 AM
Subject: How to modularise?


>
> Does anybody know a neat way to separate commonly used modules from the
rest
> of a JSP?
>
> For example, suppose I have a page which performs the following steps:
>
> <display something>
> <database query>
> <display results>
>
> Now I want to have the second step (the database query) in a separate
file,
> because it is called from various places.  In ColdFusion this is easy, but
> in JSPs, page variables are not available to other pages.
>
> I have tried the <jsp:include> tag, but sharing information between the
> pages becomes messy.  Any ideas?
> --
> Stephen Oakes, Senior Developer.  [EMAIL PROTECTED]
> Atomic Media, Level 1/216 City Road, Southbank, 3006.  +613 9695 5777
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to