|
This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I have a servlet loading a bean at WAS startup-level. This bean has a
codetable which is filled correctly and I can retrieve values from this
bean in a jsp launched from same web-app1 (Conti7) without any problems.
Now I have created another web-app2 (scheduleconti) with a jsp which needs
same info. When I do a 'snoop' from this web-app, I can see the bean is
loaded. (Servlet Context Attributes). But when I try to access the
codetable, it seems to be empty...
I created an 'enterprise application' which includes both web-app1 and
web-app2
We use WAS 355 Standard Edition.
This is the 'Snoop' result:
ServletContext attributes:
1) com.ibm.websphere.servlet.application.host default_host
value = com.ibm.websphere.servlet.application.classpath C:\Program
Files\SQLLIB\java\db2java.zip;...
2) TABLES
value = com.clipper.beans.CodeTablesBean@e1a81c9c
3) com.ibm.websphere.servlet.application.name scheduleconti
value = com.ibm.servlet.engine.webapp.WebAppServletRegistry
4) com.ibm.servlet.engine.webapp.WebAppServletRegistry@b01f1c83
value = com.ibm.websphere.servlet.event.ServletContextEventSource
5) com.ibm.servlet.engine.webapp.WebAppEventSource@cfe69c83
value = javax.servlet.context.tempdir
C:\WebSphere\AppServer\temp\default_host\scheduleconti
this is the JSP which shows "vLinesSize=0" and "Total Lines processed =
0":
<jsp:useBean id="TABLES" class="com.clipper.beans.CodeTablesBean"
scope="application"></jsp:useBean>
<%
java.lang.String dataLine = new java.lang.String();
java.lang.String dataLineText = new java.lang.String();
int i = 0;
%>
<html>
<head>
<title>Conti-Lines nv: Test Beans</title>
<base target="_self">
</head>
<body>
<% try
{
int vLinesSize = TABLES.vLines.size();
%>vLinesSize = <%=vLinesSize%>
<% com.clipper.model.Line jspLine = TABLES.getLine(0);
for (i = 0; ; )
{
dataLine = new Integer(jspLine.getLineCode()).toString();
dataLineText = jspLine.getLineName();
%><br>Code= <%=dataLine%> Name=<%=dataLineText%></br>
<% i++;
try
{
jspLine = TABLES.getLine(i);
}
catch (java.lang.ArrayIndexOutOfBoundsException _e0)
{
break;
}
}
}
catch (java.lang.ArrayIndexOutOfBoundsException _e0)
{
}
%>
<br>Total Lines processed = <%=i%></br>
</body>
</html>
Patrick Goovaerts
WebMaster
Clipper Support nv
TEL : 0032 (0)3 5453991
GSM: 0498 610 325
WEB: www.conti7.be
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.