You can use JavaServerPage (JSP) or Applets, here's an example for JSP for your situation:
JSP
JSP
- Curent time: <%= new java.util.Date() %>
- Host name: <%= request.getRemoteHost() %>
- ID sesion: <%= session.getId() %>
<% deleteconfig deletecfg = new deleteconfig(); %>
<%= delectecfg.initiate(); =%>
JSP scripting elements are:
- Expressions:
<% = expression%>
The expression is evaluated and printed out the document.
- Scriptlet
<% code%>
The code is inserted into the servlet service method.
- Statements:
<%! code%>
The code is inserted into the servlet class, outside of any method.
For JSP scripting elements is possible and another syntactic form, based on XML markup:
Java expression jsp: expression>
Java code jsp: scriptlet>
Statement Java jsp: declaration>