Can I access an authenticated web service using JSTL? (Form-based authentication)
If I can’t do it using JSTL, is there any other way I do it from a JSP?
Maybe I need to give a little more information. I’m using the core library:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
and the import tag, as in:
<c:import var="xml" url="http://my.service.com/api/xml"/>
Where http://my.service.com/api/xml is a web service requiring form-based authentication – if I try to access it in a browser, I’m prompted for a username and password in a web form, not a popup window.
sorry, I’m no web services expert as you can tell – fingers crossed for an easy solution 🙂
@Brabster as @duffymo said, jstl has nothing to do with web services authentication.
If you need to avoid display the authentication page inside some JSP, maybe you can get around with a custom tag which will deal with authentication. How would you authenticate to your web service in a simple console program with a main method? If you know how to do it, integrating that code in a custom tag is easy.