File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSP tags in DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP tags in DB" Watch "JSP tags in DB" New topic

JSP tags in DB

Emerald D'souza

Joined: Jan 31, 2008
Posts: 5

Is there any way to process tags stored as part of content in Database when the data is retrieved and passed to a jsp. I know this might be a bad design but here is my problem in detail.

I have a CMS(content management system) which can deploy to a staging and production environment. Once the CMS user has added images and content he publishes the content to staging and then to production. As a rule all images on production have to come from a CDN(content distribution network) server. However the staging environment does not use CDN (because of hosting implementation, only once the images are pushed to production, do they get propagated to CDN). This causes problems as content which is just pushed to staging only, will have broken images, if i prefix the CDN url to all images. What i thought of is to use a tag which will dynamically add the cdn prefix if necessary. though this could be done with javascript also, I am trying for a server side implementation.

Thanks for your time specially those who read the big explanation.

Any help or suggestions even alternate implementations is welcome. Please also comment if possible the effect on tomcat performance for processing.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63841

No. Page translation, the point at which such tags would be evaluated, is long passed by the time any execution takes place.

I'd recommend trying a different approach.

[Asking smart questions] [About Bear] [Books by Bear]
Emerald D'souza

Joined: Jan 31, 2008
Posts: 5
Thank you.
I agree. Here's the link:
subject: JSP tags in DB
It's not a secret anymore!