-
1. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
vinod.pandey Oct 3, 2010 10:30 AM (in response to fmcaleer)Hi all,
I have same requirements for JBoss 5.1.0. As explained point 2 by Frank..... ..\deploy\jbossweb-tomcat55.sar\conf\web.xml does not exists for JBoss 5.1.0 hence I can not update file. So how should I redirect the http to https?
Thanks in advance
Vinod Pandey
NHST, India
-
2. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
peterj Oct 3, 2010 7:03 PM (in response to vinod.pandey)Did you do a search for the global web.xml in the JBoss AS directories? If so, you would have found it at server/xxx/deployers/jbossweb.deployer/web.xml.
-
3. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
vinod.pandey Oct 4, 2010 7:52 AM (in response to peterj)Yeah Peter is right. I found the file.....But now after updating this file I got following exception
ERROR [CommonClient] Exception caught while (preparing for) performing the invocation:
java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:265)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:340)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy298.add(Unknown Source)
at demo.DemoServlet.add(DemoServlet.java:88)
at demo.DemoServlet.processRequest(DemoServlet.java:42)
at demo.DemoServlet.doGet(DemoServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:249)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:161)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:243)
... 32 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [302] - Moved Temporarily
at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:570)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:369)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:231)
... 37 more
16:56:31,902 ERROR [[DemoServlet]] Servlet.service() for servlet DemoServlet threw exception
javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:396)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy298.add(Unknown Source)
at demo.DemoServlet.add(DemoServlet.java:88)
at demo.DemoServlet.processRequest(DemoServlet.java:42)
at demo.DemoServlet.doGet(DemoServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:265)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:340)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
... 29 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:249)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:161)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:243)
... 32 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [302] - Moved Temporarily
at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:570)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:369)
at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:231)
... 37 morePeter can you help me to get out of this?
Thanks in advance
Vinod Pandey
NHST India
-
4. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
peterj Oct 4, 2010 10:47 AM (in response to vinod.pandey)I have never seen this error. Maybe someone else who has can help.
I found this discussion, but there was no conclusion: http://community.jboss.org/message/558482
-
5. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
vinod.pandey Oct 4, 2010 2:17 PM (in response to peterj)oh.......But can you suggest me a step by step way to redirect from http to https?
Thanks
Vinod Pandey
-
6. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
vinod.pandey Oct 4, 2010 11:55 PM (in response to vinod.pandey)Hi Peter....
I found a link https://jira.jboss.org/browse/JBWS-2216 that may described my problem. But as a newbie I am not able to understand wheater is it right or not.I just tried to download jbossws-native-3.0.3, but I did not find this version. Could you please tell what to do now. I am really grateful for your quick response.
Thanks
Vinod Pandey
NHST, India
-
7. Re: How can I redirect HTTP to HTTPS in JBoss 5.0.1?
grifitz Sep 27, 2012 2:22 AM (in response to fmcaleer)Hi Frank,
I also stumbled on this problem. Thanks for the hint for JBoss 4, i managed to solve this.
In JBoss 5.1.0, the web.xml location is located at deployers\jbossweb.deployer\web.xml.
My next problem is the redirection will always go to port 8443, although i already configured in deploy\jbossweb.sar\server.xml, i'm using 443.
Edit:
I found how to do it (not elegantly, but works):
1. edit conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
2. Find <xsl:variable name="portHttps" select="$port + 363"/>
3. Edit "$port + 363" to "443"
The reason is because the live URL used was 8080, if it's 80, there will be no need to edit this file.