You can define a method like this

<%! public String getYourName(){
    return "Hitesh Panchal";
}
%>
and you can use that function like this
<%String aName =getYourName();%>

Your name =
<%=aName%>

regards
Y

----- Original Message -----
From: Hitesh panchal <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 18, 2000 5:53 PM
Subject: How To define Methods in jsp pages


> To
>  hello
>   all Jsp community hi
> currently i have switch over from servelet programming to jsp i am going
> thourh java sever pages by Larne pekowsky by Pearson Education Asia where
i
> have found that in back end jsp writes servlet and for each request it
> executes servlets  now in case of servlet we can specefiy doPost method or
> doGet or doPut or doDelete extra Now If i want to specefiy dopost methos
in
> case of my jsp pages how can i in case of oreilly they have said that in
> directives we can specify this by
> <%@mehtod ="doPost"%>
>  put it gives me invalid directives Error and i have not find any jsp page
> which specify this type of directives even i search on jGuru too but i
won`t
> find it..
>
>   if any one can help me up
>
>   Thanks in advance plese reply me on [EMAIL PROTECTED]
>
>
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to