Serving an HTML page WITH images using GETRESOURSEASSTREAM()

Posted on 2006-06-01
Last Modified: 2010-04-01
Hello I am having problems displaying a webpage using getresourseasstream.

I know how to serve images, and other types of files, but what I really want to do is serve an entire webpage, complete with images when a user is logged on.

The images are under my WEB-INF folder so only authenticated users may access the images within the webpage, ONLY if it is served to them (my guess is using getresourceasstream as well).  So is there any way to do this?

Or is there some other approach, where I create a context and somehow attribute the image and html to each other?

Simply restated, I want to serve my protected webpage (complete with images), which are both stored under WEB-INF.

I have only seen solutions where single files are streamed, none with webpages with images.


Question by:mrmathew
    LVL 19

    Expert Comment

    put file or images you require login inside <security-constraint>.

    Author Comment

    I am using LDAP for authentication so cannot use constraints (too many users)..

    I actually solved my problem, by simply serving the images via another JSP page..


    Accepted Solution

    PAQed with points refunded (50)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now