aspose file tools*
The moose likes JSP and the fly likes Displaying Items in an object in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Displaying Items in an object in JSP" Watch "Displaying Items in an object in JSP" New topic
Author

Displaying Items in an object in JSP

tejaswini vasist
Greenhorn

Joined: Apr 10, 2004
Posts: 17
Hi,
Im using Tomcat 4.1 and Mysql.
We have a servlet which collects the information from the database, stores 3 set of individual arrays in one object & returns the same. We need to capture this & display the contents of the individual arrays in the jsp. How do we do it ?
Any links that give examples as to how to get info from database into JSP?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
What's your datastructure that's exposed to the JSP look like?
Using JSTL you can access just about anything inside any Object that you put in your session or request (for example).


42
tejaswini vasist
Greenhorn

Joined: Apr 10, 2004
Posts: 17
My java classes are in ..\Tomcat 4.1\webapps\onjava\WEB-INF\classes\com\onjava
My jsp's are in ..\Tomcat 4.1\webapps\onjava
I actually need to call a java class from jsp which inturn returns an object. I am just unable to retrieve that object. I guess the problem is with the import statement which I have given inside the jsp.
I tried giving
<%@ page import = "WEB-INF.classes.com.onjava.*"
%>
& also
<%@ page import = "com.onjava.*"
%>
The error is HTTP Status 500.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Displaying Items in an object in JSP