The correct syntax for declaring a method in a jsp-page is:

<%! public boolean test() {..} %>

the jsp-code below calls  method test()

<% if (test()) {
    do whatever
   }
   else {
   ...
   }
....

%>

If the method is declared in another jsp-file, the file must have extension
.jsp
and be included by declaring:

<%@ include file="relativeURL" %>

Please refer to:

http://java.sun.com/products/jsp/syntax.pdf


Then there's always the discussion of having
a lot of scriptlet code in your jsp-pages!
Consider putting all logic in either beans or
servlets.

Please refer to:

http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html


Regards,

/ Janne

-----Original Message-----
From: meera nayak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 22, 1999 8:30 AM
To: [EMAIL PROTECTED]
Subject: Re: function split doesn`t work


I think the problem is with including the file like using the syntax
<jsp:include page="pathtoFile"/> and then call functions in this
file.The other part that i dodn't understand is The jsp page not being
able to call a function inside it.as far as i know you can call a
function if you declare it in the beginning like this <! function
declarartion and the definition >and then calling it inside the jsp page
will work.

Meera

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to