• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

jsp accessing a bean using websphere studio


i am having a problem.... i have written a bean which will access a db2 table and retrieve some data from it. I have a html page where the user can enter a number which equates to the primary key for the search.... it then calls a jsp which should access the bean and publish the results.

That at least is the objective. However we are doing this in conjunction with Websphere studio and this is where the confusion starts. My class files are in the installedApps/WEB-inf directory of the AppServer as is my jsp file. My html file calls the jsp fine but i dont get any results.....

Am i missing something - should i add my bean to some xml file to make sure it gets loaded by the appserver?

I have added a line that will tell me the server time (this is in my jsp page) -- i will attach it --> but this just outputs : The server time is new java.util.Date()
IS there something missing on my jsp page that is needed to pick up these tags?

Heres hoping someone can help!!
1 Solution
nmastersonAuthor Commented:
oops - forgot to attach the jsp page :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>Product Details</TITLE>

<%@ page language="java" buffer="none" isThreadSafe="true" session="true" %>
<%@ page import="java.io.*" %>
<%@ page import="javax.servlet.jsp.*" %>
<%@ page import="com.du.*" %>

<jsp:useBean id="SelectProduct" class="com.du.bean.SelectProduct" scope="request">
<jsp:setProperty name = "SelectProduct" param ="productId" property="id"/>

The server time is <jsp:expression> new java.util.Date() </jsp:expression>
The Product ID is:
     // Get product
     SelectProduct.setRow(1); // set a row - would need to put this in a loop to loop through the record set
     <!-- set the coulmn you want to retrieve -->
     <!-- get the data value for the column (and in this case out.print to screen) -->

The jsp files should be located in installedApps/ not installedApps/WEB-INF/.

installedApps/WEB-INF/classes/   - for java classes
installedApps/WEB-INF/lib/    - for jar files
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thank you everyone.
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now