Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
When executing
javax.jcr.Session session = repository.login(new SimpleCredentials( "admin", "admin".toCharArray()));
BufferedImage image = ImageIO.read(new URL(imageurl));
Where imageurl is the localhost path to my dam jpg file
I get error 401. How, do I use my Session obbject to allow ImageIO.read(new URL(imageurl)) to access the session?
regards
Solved! Go to Solution.
For the URL object you need to attach Authorization http://stackoverflow.com/questions/496651/connecting-to-remote-url-which-requires-authentication-usi...
Authorization
OR from session get the node & then inputstream and pass to ImageIO
View solution in original post
Views
Likes
Replies