Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP tags in DB

 
Emerald D'souza
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Emerald D'souza
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic