Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Items in an object in JSP

 
tejaswini vasist
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
tejaswini vasist
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic