Forums Register Login

problem with making an instance of java file in jsp

+Pie Number of slices to send: Send
I have made one jsp. Now I have one more public java file with me.....the problem is that how do I make an instance of the java file in jsp. for example
java file
now I have to access that function from my jsp.
Any help would be appreciated
thanks
+Pie Number of slices to send: Send
try it
<%
Myclass my=new Myclass();
my.func1();
%>
do import u r class in starting jsp file
<% @ page import="ur class location" >

second way is u can use by usebean tag ..
hope it help
regds
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 744 times.
Similar Threads
How does JavaScript maintain same values for all jsps?
not able to import oracle.sql.BLOB
Calling Which Method?
EL functions in Eclipse, Can not find a tag library descriptor for ..., help needed
A JavaBean inside a JSP function
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:11:35.