Jose,
Why don't you just create a class with a addTwoIntegers(int a, int b)
static method? It probably can be done your way, but is much better to have
the Java code in a Java class rather than mixed in with your JSP markup.

-Richard

At 08:23 PM 6/4/2003 -0500, you wrote:
Hello,

Does anybody knows how to call a method defined in another *.jsp file? Is
it possible?

I have a math.jsp that has a method called addTwoIntegers(int a, int b). I
want sum.jsp to call this method.

I am trying something like this:

---math.jsp--

<%!

// adds two integers

public int addTwoIntegers(int a, int b){

return a+b;

}

%>

---sum.jsp---

<%= out.println(math.jsp.addTwoIntegers(5,7))%>

Thanks a lot,

JLL.-


Jose Luis Leviaguirre Queral Programador Zentrum ZiztemaZ Of. 5223-8476


"La libertad es una capa de merengue entre dos galletas de hojaldre." (Carlos Valls)



To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com

Reply via email to