04-24-2012 09:24 AM
04-25-2012 01:22 PM
12-17-2013 11:14 AM
12-18-2013 04:29 AM
HttpServletRequest httpRequest = ((WebScriptServletRequest)req).getHttpServletRequest();
HttpSession httpSession = httpRequest.getSession();HttpSession httpSession = ServletUtil.getSession(false);
04-26-2012 02:17 AM
package pl.test;
import javax.servlet.http.HttpSession;
import org.springframework.extensions.surf.ServletUtil;
import org.springframework.extensions.webscripts.processor.BaseProcessorExtension;
public class HttpSessionHelper extends BaseProcessorExtension {
public void setInSession(String paramName, String paramValue) {
HttpSession session = ServletUtil.getSession();
session.setAttribute(paramName, paramValue);
}
public String getFromSession(String paramName) {
HttpSession session = ServletUtil.getSession();
Object paramValue = session.getAttribute(paramName);
if (paramValue != null) {
return paramValue.toString();
} else {
return null;
}
}
}
<bean id="exampleExtension" parent="baseScriptExtension" class="pl.test.HttpSessionHelper">
<property name="extensionName">
<value>httpSessionHelper</value>
</property>
</bean>
var paramName = httpSessionHelper.getFromSession('paramName');
….
httpSessionHelper.setInSession('paramName','paramValue');
06-28-2013 10:09 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.