| Author |
How to call java method into jsp file?
|
Eric Tan
Ranch Hand
Joined: Oct 11, 2006
Posts: 72
|
|
can anyone guide me or teach me how can i call the java method into the jsp file? do i need a main method to call it in? or just call the method that i need 2 use only?? below is the coding that i did. one is java and another one is jsp. hope that someone can help me on it. Thanks!!! Really appreciate it. Country Method.java [COLOR=SeaGreen] [/COLOR] and the jsp. WebApplication.jsp [COLOR=SeaGreen][/COLOR]
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
|
|
Since you don't say what happened when you tried the code, I have to guess that a problem exists because you failed to import the "Test" package in the page import statement. Bill [ October 16, 2006: Message edited by: William Brogden ]
|
Java Resources at www.wbrogden.com
|
 |
Eric Tan
Ranch Hand
Joined: Oct 11, 2006
Posts: 72
|
|
Sorry about that. Here is the error after i tried to run it. i will look into the info that you suggested. Thanks a lot
|
 |
Arun Kathare
Greenhorn
Joined: Oct 02, 2006
Posts: 19
|
|
Hi, U can even use EL it is as follows ${ClassName/Context sharing rsource.MethodName()) this is a cool one but donot forget to activate EL in Deployment Descriptor or Page header.
|
 |
Anjaneyulu Aerrolla
Greenhorn
Joined: Sep 28, 2005
Posts: 2
|
|
hi just look at the <%@page import.... i think your missing = there it should be <%@page import="com.db4o.ObjectContainer"%> hope this works
|
 |
 |
|
|
subject: How to call java method into jsp file?
|
|
|