aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes problem in sendRedirect ... need help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "problem in sendRedirect ... need help." Watch "problem in sendRedirect ... need help." New topic
Author

problem in sendRedirect ... need help.

vasu devan
Ranch Hand

Joined: Apr 18, 2002
Posts: 37
Hi All,
I am facing problem while using response.sendRedirect(url).
From normal java prog I could post the info to a servlet through https using URL connection, but I am not able to redirect the response to another servlet.
The same is the case with servelt to servlet also.
can any one help me on this.
Thanks,
Vasu
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Vasu, I'm afraid I do not really understand your question. I have successfully redirected clients from a HTTP to a HTTPS connection and vice versa using JSPs -- what exactly is the problem you encounter there?
- Peter
vasu devan
Ranch Hand

Joined: Apr 18, 2002
Posts: 37
Hi Peter den Haan,
Thanks a lot for your reply.
I was very happy to hear from you that u could redirect the request even in https.
Let me explain my problem, do help me to overcome this.
Method 1
--------
From Servlet 1 I am trying to post the value to Servlet 2 using URL connection through https,
when I tried to do that I am getting the following error.

Exception : java.io.IOException: Certificate SubjectDN CommonName received does not match server hostname

For your info I am using weblogic democert as the certificate in the server.
Method 2
--------
I have another scenario where I am posting the values from a normal java program to Servlet 2.
In this case I could post the value to Servlet 2,but from Servlet 2 I am not able to redirect the response to another servlet from Servlet 2.
In the first scenario (Method 1-from servlet to servlet posting) after posting I need to redirect the response to another servlet.
Could you help me in solving this. If u need I will post my code also for you to verify.
Thanks in advance,
Vasu.
vasu devan
Ranch Hand

Joined: Apr 18, 2002
Posts: 37
Hi All,
Can any one help me for my previous post. As I need to get it solved immediately.
Looking forward for the help,
Thanks,
Vasu.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Are we going around in circles or is it just me? Re Method 1, can you refresh me on the result of rolling your own HostnameVerifier as discussed a week or so ago?
In Method 2, you mention that you are "not able" to redirect the response -- my immediate question would be, what happens? An exception? No response? An empty response? (the two are not the same) Have you attacked the problem with a debugger or log messages: is the servlet redirected to ever executed?
- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in sendRedirect ... need help.