Example usage for javax.servlet.http HttpServletRequest setAttribute

List of usage examples for javax.servlet.http HttpServletRequest setAttribute

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest setAttribute.

Prototype

public void setAttribute(String name, Object o);

Source Link

Document

Stores an attribute in this request.

Usage

From source file:io.github.benas.todolist.web.servlet.user.LoginServlet.java

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    request.setAttribute("loginTabStyle", "active");
    request.getRequestDispatcher(LOGIN_PAGE).forward(request, response);
}

From source file:com.mockey.ui.ProxyInfoServlet.java

/**
 * /* ww  w  .j a  v a  2 s. c  om*/
 * 
 * @param req
 *            basic request
 * @param resp
 *            basic resp
 * @throws ServletException
 *             basic
 * @throws IOException
 *             basic
 */
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    ProxyServerModel proxyInfo = store.getProxy();
    req.setAttribute("proxyInfo", proxyInfo);

    RequestDispatcher dispatch = req.getRequestDispatcher("/proxy_setup.jsp");
    dispatch.forward(req, resp);
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.credits.departmentMember.DepartmentMemberManageCreditsReductionsDA.java

public ActionForward selectTeacher(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws NumberFormatException, FenixServiceException {
    request.setAttribute("reductionServiceBean", new ReductionServiceBean());
    return mapping.findForward("showReductionService");
}

From source file:edu.duke.cabig.c3pr.web.study.EditStudyController.java

@Override
protected Map referenceData(HttpServletRequest request, Object command, Errors e, int page) throws Exception {

    String softDelete = "false";
    request.setAttribute(FLOW_TYPE, EDIT_STUDY);
    request.setAttribute("editFlow", "true");

    if (((StudyWrapper) command).getStudy()
            .getCoordinatingCenterStudyStatus() != CoordinatingCenterStudyStatus.PENDING) {
        softDelete = "true";
    }//from www.  j  a  v a 2s  .co  m

    request.setAttribute("softDelete", softDelete);
    return super.referenceData(request, command, e, page);
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.coordinator.ChooseCurricularCourseDispatchActionForCoordinator.java

public ActionForward chooseCurricularCourse(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    request.setAttribute("courseID", getFromRequest("courseID", request));

    // parameters necessary to write in jsp
    request.setAttribute("curricularCourse", getFromRequest("curricularCourse", request));
    request.setAttribute("executionYear", getFromRequest("executionYear", request));
    request.setAttribute("degree", getFromRequest("degree", request));
    request.setAttribute("jspTitle", getFromRequest("jspTitle", request));

    return mapping.findForward("ChooseSuccess");
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.manager.LoginsManagementDA.java

public ActionForward deleteLoginTimeInterval(ActionMapping mapping, ActionForm actionForm,
        HttpServletRequest request, HttpServletResponse response) throws Exception {
    UserLoginPeriod period = getDomainObject(request, "periodID");
    request.setAttribute("person", period.getUser().getPerson());
    deletePeriod(period);/*from  w w  w.  ja va 2 s.c om*/
    return mapping.findForward("prepareManageLoginTimeIntervals");
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.student.candidacy.EditMissingCandidacyInformationDA.java

public ActionForward prepareEditInvalid(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {//from  ww  w.j  a  v a2s  .  co  m

    request.setAttribute("personalInformationsWithMissingInformation",
            getPersonalInformationsWithMissingInfo());
    request.setAttribute("personalInformationBean", getRenderedObject("personalInformationBean"));

    return mapping.findForward("editMissingPersonalInformation");
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.coordinator.SearchDegreeLogAction.java

public ActionForward search(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) {//ww  w.ja v  a 2s  . c o m

    request.setAttribute("degreeCurricularPlanID", request.getAttribute("degreeCurricularPlanID"));

    SearchDegreeLogBean bean = getRenderedObject();
    RenderUtils.invalidateViewState();
    searchLogs(bean);

    request.setAttribute("searchBean", bean);
    request.setAttribute("degree", bean.getDegree());

    prepareAttendsCollectionPages(request, bean, bean.getDegree());

    return mapping.findForward("search");
}

From source file:dijalmasilva.controllers.LugarController.java

@RequestMapping("/filtrar/tipo")
public String filtrarPorTipo(TipoDaOcorrencia tipoFiltro, HttpServletRequest req) {
    List<Lugar> todasOcorrencias = service.buscarPorTipo(tipoFiltro);
    req.getServletContext().setAttribute("todasOcorrencias", todasOcorrencias);
    req.setAttribute("result", "Ocorrncias do tipo " + tipoFiltro.toString().toLowerCase());
    req.getServletContext().setAttribute("existeFiltro", true);
    return "home";
}

From source file:com.wechat.client.business.controller.CarController.java

@RequestMapping("/selItem")
public String itemSel(HttpServletRequest request) {
    String carId = request.getParameter("carId");
    request.setAttribute("carId", carId);
    return "serviceitem/itemsel";
}