real quick dumb suggestion, can i pesudo code.. i know its a bit quick, but
i'm gonna get fired if i dont finnish the next shopping cart =(

servlet service method.
dbconnection get resultset
use request.getSomePath "/tmp" that i can lock with web.xml
mk new file called sessionId.datetime.tmp.jsp
get blob or slob input stream
while ( i'm not gay ) {
read from slob input stream
write to file output stream
}

getrequestdispatcher(increadibly long file name).forward

bang.. done
might work let us know??

wozza.


-----Original Message-----
From: Ross Dyson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 8 June 2001 10:19 AM
To: [EMAIL PROTECTED]
Subject: RE: Importing Java code from mySQL


So you want to embed java code in a string which you save in a database and
then when you display the string you want the bit of java code embedded in
the string to be executed and the results embedded in the string?

Basically, I think you'll have to write it yourself.  Where I have done
this, I embedded some XML in the text, which you find yourself and can then
parse with any XML handler, and that way you can decide what to do with it,
if its a method call or a URL or whatever.

eg big string in db:
News for the day: a big wierd thing landed in the park.
<embedPic>http://url_of_pic</embedPic> It was big and shiny.  By: <beanCall
beanClass="authorBean"><method>getByLine</method><param>"Bill
Smith"</param></beanCall>

There's probably some standards running around (soap?) you could base it on.
This is similar to a thousand proprietry languages for making dynamic web
pages.  I had to use the one from Informix, for eg.  I almost quit over
that...

Ross.

-----Original Message-----
From: Ryan [mailto:[EMAIL PROTECTED]]
Sent: Friday, 8 June 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: Importing Java code from mySQL


Right now, I have a form that I use to type in my news updates, when the
form is submitted, its contents are stored in a mySQL database. Then in my
news page I have a method like 'pasteNews(date)' to query the entry from my
database.

If I put something like <% out.println("bleh"); %> in the news entry, it
won't show up on the actual JSP page. Is there a way to make things so that
I can enter JSP/java code into my news entries that are stored in the
database?



-ryan
----------------------------------------------------------------------------
------------------------
www.the45.dhs.org


Reply via email to