variable from .jsp to the html page

后端 未结 5 2057
猫巷女王i
猫巷女王i 2020-12-11 15:01

I have a .jsp page that passes the variable from the servlet. Lets assume that I have a .jsp page like

...

${Variable         


        
5条回答
  •  有刺的猬
    2020-12-11 15:22

    Although this question is old, I think, it's still actual, so I'll try to contribute from my side.
    Question is quite simple and I think most of the answers are just answering different question - hence - providing a bit of confusion.
    As far as I understand, that question is:

    Can I have a dynamic variable of JSP (which is btw, an element of Expression Lnaguage) in html, in the same way as I have it in jsp?

    And the answer is No.

    JSP translates for Java Server Pages, and that's the point here, that the dynamic value is generated and being provided to jsp on server side. You can't make your html dynamic.

提交回复
热议问题