Skip to content

Serving static content #1002

Closed
Closed

Description

@itg-assistant

edmond girardi asked 2017-08-13 01:38:09 UTC

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 ?

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2017-08-13 19:13:50 UTC

    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

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2017-08-13 19:18:43 UTC

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions