invoking java scriptlet in JSP using HTML

前端 未结 5 1300
[愿得一人]
[愿得一人] 2021-01-16 10:50

I am trying to find a way to invoke a piece of java code within the JSP using HTML form

  
5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-16 11:08

    You can't do this since JSP rendering happens on server-side and client would never receive the Java code (ie. the invokeMe() function) in the returned HTML. It wouldn't know what to do with Java code at runtime, anyway!

    What's more, tag doesn't invoke functions, it sends an HTTP form to the URL specified in action attribute.

提交回复
热议问题