Use a regular java bean to do your query. If it is one row make it a class,
or you can use CachedRowSet (available at sun) to get several rows and use
it as a java bean in your jsp pages. I never put java code in any of the jsp
pages. I use either java beans, custom tags, etc ...and front controllers,
servlets.

Claudio

> -----Original Message-----
> From: Stephen Oakes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 9:11 PM
> To: JRun-Talk
> 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