• 0

[JSP] Calling a user defined function in a jsp


Question

4 answers to this question

Recommended Posts

  • 0

You can do a couple of things really, you can have a servlet which you make calls to, you could have a bean which you instantiate declaratively, or you could use scripting blocks.

Scripting blocks work like follows:

<%
	 public String sayHello(String myName)
	 {
		  return "Hello " + myName;
	 }
%>

  • 0

I don't mean to be rude, but have you actually spent some time looking into what JSP does? Or have you come straight on here for answers without spending some time doing research yourself?

Generally, a Servlet (which can be a .jsp page, or a compiled class) receives a request and returns a response. You should research Java beans, and J2EE...

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.