• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

use Bean tag

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to access my database using the use bean tag
in the jsp. I have created the EJB, I have the database (db2 v7.1) but I am getting the error below. Does anyone have any ideas?
I get this error after I enter the value in
the HTML page and submit!!

Error 500
An error has occured while processing request:http://localhost:8080/CDUseBean.jsp
Message: "getProperty(Cddistdelmbr): cant find method to read {1}"
Target Servlet: jsp
StackTrace:
--------------------------------------------------------------------------------
Root Error-1: "getProperty(Cddistdelmbr): cant find method to read {1}"
com.ibm.servlet.engine.webapp.WebAppErrorReport: "getProperty(Cddistdelmbr): cant find method to read {1}"
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.String)
com.ibm.websphere.servlet.error.ServletErrorReport(java.lang.String)
com.ibm.servlet.engine.webapp.WebAppErrorReport(java.lang.String)
void com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(int, java.lang.String)
void com.sun.jsp.runtime.JspServlet.unknownException(javax.servlet.http.HttpServletResponse, java.lang.Throwable)
void com.sun.jsp.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean)
void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean)
void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Object)
void com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lang.Object)
void com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.String, com.ibm.servlet.engine.srp.ISRPConnection)
void com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.servlet.engine.oselistener.api.IOSEConnection)
void com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(java.net.Socket)
void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()

Thanks.
[This message has been edited by meddie katongole (edited September 06, 2001).]
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, your JSP is using an Java Bean. Does this bean have that getXXX() method?
By the way, how does this Jave Bean access EJB? In the constructor?
Jun Hong
 
meddie katongole
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I use the setter and getter methods in my EJB. Here is the code below for my jsp (I took out the opening "<" in order for it not to run like an html file.<br /> jsp:useBean id="CddistBean" scope="page" class="cdconventiondelegates.CddistBean">
jsp:setProperty name="CddistBean" property="*"/>
/jsp:useBean>
html>
head>
META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.2 for Windows">
META http-equiv="Content-Style-Type" content="text/css">
title>useBean action test result</title>
/head>
BODY background="file:///C:/Program Files/WebSphere/Studio35/projects/CDConvention Delegates 1.2/blue_p1b.gif">
h1>useBean action test result/h1>

The District name is:jsp:getProperty name ="CddistBean" property="CDDist_DistName"/>/P>

The delegate count is:jsp:getProperty name ="CddistBean" property="CDDist_DelCnt"/>/P>

The alternate count is:jsp:getProperty name ="CddistBean" property="CDDist_AltCnt"/>/P>

The delegate number is:jsp:getProperty name ="CddistBean" property="CDDist_DelMbrNo"/>/P>

The alternate number is:<jsp:getProperty name ="CddistBean" property="CDDist_AltMbrNo"/>

Originally posted by Jun Hong:
So, your JSP is using an Java Bean. Does this bean have that getXXX() method?
By the way, how does this Jave Bean access EJB? In the constructor?
Jun Hong


[This message has been edited by meddie katongole (edited September 07, 2001).]
[This message has been edited by meddie katongole (edited September 07, 2001).]
[This message has been edited by meddie katongole (edited September 07, 2001).]
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP seems to be fine.
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I got a new idea. Did you pass request parameters when you call the jsp? The wild card uses these parameters to initialize those properties you want to get. If you want to get a property like myProperty. Try to call the jsp like this: http://myJsp.jsp?myProperty=dummyValue1&anotherProperty=dummyValue2
Jun Hong
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic