Serving static content

0
0

We have a document imaging application that we re re-writing with WiseJ. This application was previously written in Java and using Tomcat Clusters.  It will be serving a lot of static content – JPG files for example. Scanned pages of documents. Must use HTTPS in the browser. Whats the best approach for serving a lot of content with WiseJ as the front end – possibly using the image component to display the images ?

  • You must to post comments
1
0

Hi Edmond,

I wouldn’t store the static/dynamic content in a PictureBox.Image property, it uses memory in the session since it’s a System.Drawing.Image object.

Wisej supports the IWisejHandler interface that can be added to any class to provide any custom content directly to the browser as a simple link. You can extend a PictureBox class and set the ImageSource property to the postback URL generated bu the GetPostbackURL() method that is added to all classes implementing IWisejHandler. Or you can use the Widget class to build custom HTML and use the WebRequest event to return any content.

You can return any content type: html, text, images, video, audio, …

You can also create a custom control. I have attached a small sample showing two approaches: extended PictureBox and Widget in place. This allows our code to load the content on the fly and serve it to the browser and let the browser cache it.

HTH

/Luca

  • Luca (ITG)
    Forgot to add that in the sample you have to look at the InitScript property of the Widget control to see how to create custom html.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.