com.ctlok.springframework.web.servlet.view.rythm.Helper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-webmvc-rythm Show documentation
Show all versions of spring-webmvc-rythm Show documentation
This is a plugin for Spring to adapt Rythm template engine
package com.ctlok.springframework.web.servlet.view.rythm;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* @author Lawrence Cheung
*
*/
public class Helper {
public static HttpServletRequest getCurrentRequest(){
try{
final ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
return attr.getRequest();
} catch (IllegalStateException e){
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy