Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Https url redirection

 
Sourab su
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

We are using proxy-1.0.2.jar in our application and need to POST xml payload to the redirected URL.
When we do a redirect to https url it's not working. But other http or static ip address is working fine. Do we need to do any extra configuration for https url in proxy filter?

Sample urls,

https url - https://abc.com/request/listing (not working)
http url - http://xx.xx.xx.xx:8080/request/listing (working)
http url - http://127.0.0.3:8080/request/listing (working)

in web.xml we have the below entries

<servlet-mapping>
<servlet-name>listingProxyServlet</servlet-name>
<url-pattern>/proxy/listing</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>listingProxyServlet</servlet-name>
<servlet-class>com.woonoz.proxy.servlet.ProxyServlet</servlet-class>
<init-param>
<param-name>target-url</param-name>
<param-value>https://abc.com/request/listing</param-value>
</init-param>
</servlet>

Please help us to resolve this issue.

Regards,
Sourabh,
 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if you took this into consideration but https uses port 443
 
Sourab su
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, i tried with port 443 as well. still it's not working

Regards,
Sourabh
 
Sourab su
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found one solution and posting here. it may helpful for others

I have used HTTP proxy servlet ver. 2.6 and it's working fine

http://www.servletsuite.com/servlets/httpproxy.htm

<servlet>
<servlet-name>accertifyListingProxyServlet</servlet-name>
<servlet-class>com.jsos.httpproxy.HttpProxyServlet</servlet-class>
<init-param>
<param-name>host</param-name>
<param-value>https://abc.com/order</param-value>
</init-param>
<init-param>
<param-name>headers</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</servlet>


Regards,
Sourabh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic