• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

certificate problem between two jsps

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
**************************************************
<security-constraint>
<web-resource-collection>
<web-resource-name>MyApp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
**************************************************
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();
uc.setDoOutput(true);
uc.setUseCaches(false);
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
.java:156)
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)
Thanks
 
lolo lolailo
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
Thanks!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic