tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Mülhaus <...@nwu.net>
Subject RE: Problem with Tomcat or Servlet?
Date Fri, 01 Mar 2002 14:51:58 GMT
okay, here is the part that builds the list:

//My Query to get all records from my table
r = s.executeQuery("SELECT * FROM fahrzeuge ORDER BY kaufdatum");

//a loop to parse the content of my records in my htmlpage
//chtml is my htmlpage as a String
//helpers.StrTran is a method to replace my placeholder in the htmlpage 
with the String of my table
while(r.next()){
                 chtml = helpers.StrTran(chtml,"-CAR-",r.getString("car"));
                 chtml = 
helpers.StrTran(chtml,"-PRODUCER-",r.getString("producer"));
                 chtml = helpers.StrTran(chtml,"-COLOR-",r.getString("color"));
                 chtml = 
helpers.StrTran(chtml,"-CODEPLATE-",r.getString("codeplate"));
                 chtml = 
helpers.StrTranList(chtml,"<!---marker--->",cHtmlList+"<!---marker--->");
}
out.println(chtml);

r.close();
I hope this helps you to solve my prob

At 08:38 01.03.2002 -0600, you wrote:
>Sounds like a servlet problem.  To determine the cause of your problem we
>will need to see the servlet source code (at least the part that builds the
>list).
>
>Jim
>
> > -----Original Message-----
> > From: Stephan Mülhaus [mailto:smu@nwu.net]
> > Sent: Friday, March 01, 2002 8:28 AM
> > To: Tomcat Users List
> > Subject: Problem with Tomcat or Servlet?
> >
> >
> > Hi everybody,
> >
> > i have a strange Problem, i have developed a servlet in which i
> > can create
> > new records in a mysql database and where i can list these records in a
> > htmlpage.
> > Now the strange behaviour:
> > If i try to get the list of records Tomcat throws an NullPointerException
> > although the source is okay but if i create a new record and let
> > my servlet
> > list all my records it shows me all my records!
> > I couldn't find any strange entries in my logfiles, everything is
> > normal...
> > Now, perhaps you can help me, is this a problem of my servlet or
> > a problem
> > of my tomcat?
> >
> > Thanx in Advance
> > Stephan
> >
> >
> > --
> > To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> >
> >
>
>
>--
>To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
>Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
----------------------------------------------------------------------------------------------


Stephan Mülhaus  smu@nwu.net
NWU Gesellschaft fuer Netzwerk und Kommunikation mbH
Phone: +49-231-986510 - 0
FAX: +49-231-986522 - 2
----------------------------------------------------------------------------------------------




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message