You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ryan <rc...@ucdavis.edu> on 2001/06/08 02:14:55 UTC

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



Re: Tomcat 4 b5 doesn't reload JSP

Posted by Remy Maucherat <rm...@home.com>.
> I'm using Tomcat4 since m5 version, and everything was more or less fine,
> but when I downloaded b5 build, I noticed that it is not reloading
modified
> JSP. <context ... reloadable="true"> and I'm not using mounted network
> drive. Older versions still work fine for me. Is there something I haven't
> noticed in the changes list?..

Yes, a combination of multiple hacks caused that feature to break in b5 when
Jasper is run on Windows (it's related to File.separator being \ instead of
/). It has been fixed right after b5.

Remy


Tomcat 4 b5 doesn't reload JSP

Posted by pi...@centras.lt.
I'm using Tomcat4 since m5 version, and everything was more or less fine,
but when I downloaded b5 build, I noticed that it is not reloading modified
JSP. <context ... reloadable="true"> and I'm not using mounted network
drive. Older versions still work fine for me. Is there something I haven't
noticed in the changes list?..

--
Arunas Miliunas


RE: Importing Java code from mySQL

Posted by Ross Dyson <rd...@reef.com>.
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:rcdetert@ucdavis.edu]
Sent: Friday, 8 June 2001 10:15 AM
To: tomcat-user@jakarta.apache.org
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