JavaScript & JSP

后端 未结 1 1821
天涯浪人
天涯浪人 2020-12-22 08:06

Firstly, I have done my research and already know that JavaScript = client JSPs = server side. I don\'t want to waste your time.

My situation is that I want to execut

相关标签:
1条回答
  • 2020-12-22 08:24

    You can't run JSP code like this.

    JSP code, as you said is run on the server side, so you can't really trigger it from the web browser.

    If you are just trying to pass a parameter between JSP pages, you can add the parameter to the queryString of the URL when you call the second JSP, and within it use request.getAttribute().

    Remember, JSP code is executed before the page is sent to the browser.

    I hope this helps.

    0 讨论(0)
提交回复
热议问题