且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在JSP中使用request.getParameter会导致NullPointerException

更新时间:2023-01-03 19:08:23

可能是您正在使用PortletRequest而不是HttpServletRequest.

Chances are you're working with the PortletRequest and not the HttpServletRequest.

HttpServletRequest realRequest = PortalUtil.getHttpServletRequest(request);

String organization = realRequest.getParameter("org");