I have had a couple of problems in dispatching data from a servlet to a JSP
using JRUN3.0.

The data I am dispatching from a servlet, PKIMonitorServlet, to a JSP page,
PKIMonitor.jsp, is a JavaBean, PKIStatus, with data as shown below:

public class PKIStatus implements java.io.Serializable
{
        // data
        private String date;
        private String time;
        private String administrator;
        private String aceStatus;
        private String kssStatus;
        private String armStatus;

etc.

The error message that I get is ( The error page, ErrorPage.jsp,  is
attempted because /PKIWebAdmin/jsp/PKIMonitor.jsp cannot be found ):

404 Not Found
/servlet/com.rsa.ps.PKIWebAdmin.PKIMonitorServlet:

allaire.jrun.JRunServletException: The page /PKIWebAdmin/jsp/ErrorPage.jsp
could not be found.
        at allaire.jrun.jsp.JSPParser.generateXML(JSPParser.java:57)
        at allaire.jrun.jsp.JSPServlet.parsePage(JSPServlet.java:403)
        at allaire.jrun.jsp.JSPServlet.createServlet(JSPServlet.java:375)
        at allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:201)
        at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at
com.rsa.ps.PKIWebAdmin.PKIMonitorServlet.service(PKIMonitorServlet.java:101)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
        at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
        at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
        at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
        at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)

If I change the data in the bean as follows, the JSP is displayed correctly:

public class PKIStatus implements java.io.Serializable
{
        // data
        private String date;
        private String time;
        private String administrator;
        private int aceStatus;
        private int kssStatus;
        private int armStatus;
etc.


The JSP is as follows:

<HTML>
<HEAD>
<TITLE>
        PKI Monitor Servlet
</TITLE>
</HEAD>
<BODY>
<%@ page language="java" import="com.rsa.ps.PKIAdmin.beans.*" %>
<TABLE BORDER="1">
<TR>
        <TH>Date</TH>
        <TH>Time</TH>
        <TH>Administrator</TH>
        <TH>ACE Status</TH>
        <TH>KSS Status</TH>
        <TH>ARM Status</TH>
</TR>
<%
        PKIStatus pkiStatus[] = (PKIStatus
[])request.getAttribute("StatusArray");
        int noItems = pkiStatus.length;
        for( int i = 0; i < noItems; i++ )
        {
%>
        <TR>
                <TD><%= pkiStatus[i].getDate() %></TD>
                <TD><%= pkiStatus[i].getTime() %></TD>
                <TD><%= pkiStatus[i].getAdministrator() %></TD>
                <TD><%= pkiStatus[i].getAceStatus() %></TD>
                <TD><%= pkiStatus[i].getKssStatus() %></TD>
                <TD><%= pkiStatus[i].getArmStatus() %></TD>
        </TR>
<%
        }
%>
</TABLE>
</BODY>
<HTML>


The second problem that I have relates to the JSP itself.  If I use
'useBean' and display the properties using <jsp: getProperty> instead of the
pure java code that I use above then all Strings appear as 'null' and all
integers appear as 0 irrespective of their true value.  ( Case where I use 3
strings and 3 integers in PKIStatus).  This problem appears on both JRUN2.3
and 3.0.  I have checked the code out on Java WebServer and the data is
displayed correctly.

Regards,
Peter Isaacs.
RSA Security, BRACKNELL, Berkshire.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to