The moose likes BEA/Weblogic and the fly likes certificate problem between two jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "certificate problem between two jsps" Watch "certificate problem between two jsps" New topic

certificate problem between two jsps

lolo lolailo

Joined: Jan 14, 2003
Posts: 3
Hi, I'm improving an app that runs on a wlserver6.1. I'm trying to add an SSL implementation so the jsp accessed are transfer through a secure connection. I've implemented the web.xml like this:
And it works fine when I execute a stupid jsp like HelloWorld (inside a HelloWorld.jsp) with a call to https://localhost:7002/myapp/HelloWorld.jsp
Great! 2nd level complexity is when I try to make a connection (inside a jsp that has a dispatcher role)to another jsp
URL url = new URL(response.encodeURL("https://localhost:7002/myapp/" + op.getJsp()));
URLConnection uc = url.openConnection();
PrintStream outStream = new PrintStream(uc.getOutputStream());
it crashes with this stacktrace:
java.io.IOException: Certificate SubjectDN CommonName received does not match server hostname at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:454)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:265)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:212)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:85)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:143)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:67)
at weblogic.net.http.HttpClient.New(HttpClient.java:151)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:39)
at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection
at jsp_servlet.__operacion._jspService(__operacion.java:170)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
lolo lolailo

Joined: Jan 14, 2003
Posts: 3
Great, found myself an answer!!!
I've got to disable the checkbox Ignore Hostname Verification.
I'll now try the SSL with a new certificate (not the demo one).
wood burning stoves
subject: certificate problem between two jsps
Similar Threads
Redirecting to HTTPS
Security Problem; 403 Forbidden Error
http https switch
HttpServletRequest - RequestDispatcher - Forward - is not using Constraint