Java: How to invoke code running on a server from a browser?

前端 未结 6 605
花落未央
花落未央 2021-01-23 17:04

Is there somehow that I can invoke Java running on a server from a web browser? I would like:

  1. User navigates to URL in a browser
  2. User fills in input box
6条回答
  •  猫巷女王i
    2021-01-23 17:07

    Yes, this is possible (and is extremely common). Two of the most common ways are Java Servlets (where responses are generated purely via Java code) and Java Server Pages (where server logic is intermingled within HTML, similar to ASP or PHP).

提交回复
热议问题