When to use requestScope in jstl?

后端 未结 2 868
忘掉有多难
忘掉有多难 2021-02-04 11:06

A jstl variable is set in request scope in a jsp


This variable is accessed from

2条回答
  •  后悔当初
    2021-02-04 11:33

    Within my research (I am also new one for jstl), request scope can set values to request page from response page for example assume that we have a page called index.jsp and its action page is index_action.jsp

    if we, set values to the action page

    
    <%  request.getRequestDispatcher("index.jsp").forward(request, response); %>
    

    (// I created nme variable and set its value as Janaka aravinda. and back to reload request page(index.jsp) )

    Now we can call nme in index.jsp nme variable as follow Request value

    
    

提交回复
热议问题