How to assign value to a jsp variable

前端 未结 4 712
一个人的身影
一个人的身影 2020-12-19 22:34

Can anybody tell how to assign a value coming from \"\" into jsp variable ?

4条回答
  •  星月不相逢
    2020-12-19 23:08

    you can use the following to get the value in to variable,

    For example there is a string avalue,

    String avalue="";

    Now you can assign a property value to it by using,

    
    avalue=request.getAttribute("a");
    

    above will gives the property value to a string variable. otherwise u can set the value and then assign it through getAttribute.

提交回复
热议问题