• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to call java method into jsp file?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Eric Tan
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

just look at the <%@page import....

i think your missing = there
it should be

<%@page import="com.db4o.ObjectContainer"%>


hope this works
 
permaculture is largely about replacing oil with people. And one tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic