cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle 404 resource not found message

Former Member
0 Kudos

Dear Experts,

In my WDJ application I am using iframe UI to show a document in KM, when the document link I pass to the Iframe do not exist,

I get the message

404 The requested resource is not available.

Please suggest that how can I track it navigate to different page so that the user does not get the following message.

Warm Regards

Upendra Agrawal

Edited by: Upendra Agrawal on May 8, 2009 2:23 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You could first create an URL and use openConnection() to check whether you can access the resource. If yes, open the URL in the IFrame, otherwise show some error message.

http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html

http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLConnection.html

http://java.sun.com/j2se/1.5.0/docs/api/java/net/HttpURLConnection.html

Armin

Former Member
0 Kudos

Dear Armin,

Thanks a lot for your reply.

It was indeed a very heplful answer.

I was able to get the response code, but the problem is that the URL path I used to open connection requires user authentication,

So when I used open connection, I got the response code as 401.

Now it would be very kind of you, if you may also suggest that how can I pass the user info to access the document.

Warm Regards

Upendra Agrawal

Former Member
0 Kudos

Dear Armin,

Thanks for your reply, but it would be more helpful if you kindly tell me how to use the authenticator class to pass the userid and password of the current user who is logged in to access the link by url class and return the response code.

Warm Regards

Upendra Agrawal

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Experts,

Please Suggest wether it is possible or not

Warm regards

Upendra