14 package cz.vutbr.fit.knot.annotations.web;
16 import javax.el.ExpressionFactory;
17 import javax.el.ValueExpression;
18 import javax.faces.context.FacesContext;
19 import javax.servlet.http.HttpSession;
41 FacesContext facesContext = FacesContext.getCurrentInstance();
42 HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(
false);
44 if (webSession == null) {
46 session.setAttribute(
"WebSession", webSession);
58 FacesContext context = FacesContext.getCurrentInstance();
59 ExpressionFactory ef = context.getApplication().getExpressionFactory();
60 ValueExpression ve = ef.createValueExpression(context.getELContext(),
"#{" + name +
"}", Object.class);
61 return ve.getValue(context.getELContext());
static WebSession getSession()
Class for manipulating with session.
Class for handling session variables in the web.
static Object getBeanByName(String name)