package com.cidat.proclets;

import javax.servlet.http.HttpSession;

public class GetValFromSessionProclet implements Proclet {
	String valNameExpr;

	public GetValFromSessionProclet(String valNameExpr) {
		this.valNameExpr = valNameExpr;
	}

	public void process(ProcletServiceData sd) throws ProcletException {
		HttpSession session = sd.req.getSession(false);
		if (session == null) {
			throw new ProcletException(sd,
					"No hay sesión. Imposible recoger el valor: "
							+ this.valNameExpr);
		}
		sd.setVal(sd.evalExpr(this.valNameExpr),
				session.getValue(sd.evalExpr(this.valNameExpr)));
	}
}

/*
 * Location:
 * D:\svn\ejie\q53.trunk\codigo\q53\q53ItourbaskWar\WebContent\WEB-INF\
 * lib\proclets_wl81.jar Qualified Name:
 * com.cidat.proclets.GetValFromSessionProclet JD-Core Version: 0.6.0
 */