on 05-30-2006 6:50 PM
Hello:
I have an application running on the client side. When the app startup it must open a file which is at the server side, to be more specific, the file is at KM content of the portal.
I try to read it with URLConnection to copy the file from the server to the client, the app will do it, but "Server returned HTTP response code: 401 for URL:"
If you copy&paste the url's file directly on the browser (http://host:port/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/ImagenesIM/file.txt) a login popup (look and feel windows) is display. After entering the user and psw the file is open without problem.
Any idea what can I use or how do it ?.
I think that probably I have to move the app to a was directory instead of portal directory.
The app is execute via *.jnlp with a link at a portal page.
Thanks a lot for your time.
Javier,
401 means authentication error, i.e. your application is not authenticated to KM.
What you can do? Actually, it depends. Check current cookies in your application, probably there are SSO coockie or J2EE authentication cookie. You may try to set this cookies in URLConnection (via addHeader). Otherwise you have to supply authentication creadentials to URLConnection (also via addHeader, most probably, via Basic HTTP authentication scheme).
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.