简体   繁体   中英

Reading a javascript from DB and adding it to xhtml dynamically

I need to read a javaScript which would reside in a DB table as blob. I neeed read it as bytes from DB and attach that script to a Xhtml dynamically. Is there any way to achieve this in java?

Answer based on the comment additions (you should update your question instead of commenting):

What you want happens mostly client-side, the only server side component would be for example a servlet which can pull the data from the database which you can then reference using for example JQuery.

http://api.jquery.com/jquery.getscript/

I don't get your blob restriction, it makes more sense to use a clob.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM