Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes Call Helper class in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Call Helper class in JSP" Watch "Call Helper class in JSP" New topic
Author

Call Helper class in JSP

Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
I am trying to call a helper class in my JSP (in Tomcat container) where I am checking to see if a record exists. Please advise how I can get this to work because it wont call the class method and gives me blank output.

JSP


Helper class

[ June 26, 2007: Message edited by: Dan Parsons ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Dan Parsons:
...it wont call the class method and gives me blank output.


Can you elaborate on this?

It seems to me that your JSP shouldn't even compile.
Your Java class's method throws SQLException but the JSP doesn't catch it.

Did you check your server logs to see if you're getting compile errors?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257

<%@ page import="package.classA %>



Even the import syntax is not proper. Please double check your code


Amit Tank
Linked In
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Dan Parsons, please read this carefully. If you want people in a forum to help you, you've got to take the time to compose your post without silly transcription errors.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: Call Helper class in JSP