jsp useBean is NULL by getAttribute by servlet

后端 未结 3 1048
我寻月下人不归
我寻月下人不归 2020-12-03 16:14

user is null in servlet. Pls let me if doing mistake.

i m trying to get all html element in bean rateCode.jsp

<%@page import=\"com.hermes.data.Rat         


        
3条回答
  •  囚心锁ツ
    2020-12-03 16:34

    You are using a request-scoped bean in a JSP. This JSP is submitted and a Servlet responds.

    When the Servlet is executed, a new "life cycle" starts and the request-scope does not contain any request-scoped bean used/created in the JSP.

    You have to submit the bean's properties as request parameters, and read them one-by-one in the servlet.

提交回复
热议问题