This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

methods  RSS feed

 
lakshmi pokala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to write our own (user defined) methods in JSP?

Thanks in advance.
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%! your method(){
}
%>
thats it! write this method like you would write one for a java class.
Conditions Apply
[ March 05, 2006: Message edited by: Shraddha Jain ]
 
NandaM Kishore
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it would be better if we use scriptlet than a declaration tag.
what do you say shraddha???
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
puttinng anything between <% %> goes into your service method, right? here we want to write a method and probably call it from within the service method. so calling the method should happen within <% %>

<%! yourmethod(){
}
%>

<% yourmethod();%>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!