Link to home
Start Free TrialLog in
Avatar of mrmathew
mrmathew

asked on

Serving an HTML page WITH images using GETRESOURSEASSTREAM()

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.

Thanks.

Avatar of Acton Wang
Acton Wang
Flag of United States of America image

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

ASKER

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..

thanks,.
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial