This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp

 
Vishnu Murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to write a function in jsp? and how to call that function?
ex: i want to write
sayHello(){
out.println("hello world");
}
and how to call this function
 
Somas kanthan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
<%! String s = ""; %>
<%!
public String sayHello(){
s = "hello world";
return s;
}
%>

<%= sayHello() %>

Thanks..
 
Vishnu Murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even i have tried with code which you have given but still i am not able to call the function helloWorld(); here it is given internal server error
[This message has been edited by vishnu murthy (edited January 08, 2001).]
 
Preethi Suryam
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishnu!
I have tried the same code and is working fine.why r u not getting it.try it again.
Best Of Luck!
Preethi
 
Vishnu Murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks friends,
i got it now


[This message has been edited by vishnu murthy (edited January 11, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic