on 07-22-2011 4:31 PM
Hi,
I have made a JSP web module. I have also made a java file. The code is below.
import java.util.*;
public class DateDemo{
public Date returnDate() {
Date d=new Date();
return d;
}
}
How do I call that external java method from my JSP page? Where do I put the java code? On the same folder as my JSP pages. Do I put a .class file or the .java file?
Thanks
Create a object of that class so that you can import all those methods of that particular class including it's objects....
Eg:- Testclass01 obj1 = new Testclass01 ();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.