Re: struts2-ssl-plugin problem

2015-02-24 Thread Christoph Nenning
> I am using google code provided struts2-ssl-plugin-1.2.1 jar file for 
ssl
> configuration i.e switching from http to https.
> 
> But when I submit the page with method="post" form field values are not
> getting submitted, I see null values are submitted to the properties of
> action. 
> 
> In one of the thread it is mentioned that it is taken care in the latest
> jar. What is the latest jar file?
> 
> How to fix the issue?
> 
> Thanks in advance
> Rag
> 
> 
> 
> 
> 


I don't know that plugin and cannot say what their latest version is. But 
it is quite simple to implement your own HttpsInterceptor, it could look 
like this:




public class HttpsInterceptor extends AbstractInterceptor
{
private final static String SCHEME_HTTPS = "https";
private final static int HTTPS_PORT;

private final Logger log = LoggerFactory.getLogger(getClass());

static {
// note: you could load another port from config here
HTTPS_PORT = 443;
}

@Override
public String intercept(ActionInvocation invocation) throws 
Exception
{
HttpServletRequest request = ServletActionContext.
getRequest();
HttpServletResponse response = ServletActionContext.
getResponse();

String scheme = request.getScheme().toLowerCase();

if (!SCHEME_HTTPS.equals(scheme)) {
URI uri = new URI(
SCHEME_HTTPS,
null,
request.getServerName(),
HTTPS_PORT,
response.encodeRedirectURL(request
.getRequestURI()),
request.getQueryString(),
null);

log.info("redirecting to https url: '{}'", uri);

response.sendRedirect(uri.toString());
return null;
}

return invocation.invoke();
}
}


This Email was scanned by Sophos Anti Virus


struts2-ssl-plugin problem

2015-02-24 Thread Raghu
I am using google code provided struts2-ssl-plugin-1.2.1 jar file for ssl
configuration i.e switching from http to https.

But when I submit the page with method="post" form field values are not
getting submitted, I see null values are submitted to the properties of
action. 

In one of the thread it is mentioned that it is taken care in the latest
jar. What is the latest jar file?

How to fix the issue?

Thanks in advance
Rag
 





--
View this message in context: 
http://struts.1045723.n5.nabble.com/struts2-ssl-plugin-problem-tp5717467.html
Sent from the Struts - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2-ssl-plugin problem

2009-08-14 Thread Nuwan Chandrasoma

Louis Voo wrote:

Hi,

I download this plug-in and put into my /lib, and in my struts.xml has this




  
when I start the tomcat, it throw error :


Caused by: Unable to find interceptor class referenced by ref-name secureStack 


What else I need to configure to use this plug-in?

Thanks
Louis
  

extends from package ssl-default

Thanks,

Nuwan C.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



struts2-ssl-plugin problem

2009-08-14 Thread Louis Voo
Hi,

I download this plug-in and put into my /lib, and in my struts.xml has this




  
when I start the tomcat, it throw error :

Caused by: Unable to find interceptor class referenced by ref-name secureStack 

What else I need to configure to use this plug-in?

Thanks
Louis