× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Chad:  Here is the example:

I have a servlet pak.I00035s (pak is the package name) which is invoked from
browser by using



http://domain/mrcjava/servlet/pak.I00035s .



You can rename the default servlet name. This may serve two purposes:



  1.. Give your servlet a meaningful name.
  2.. Pre-load this servlet to avoid first time hit slowdown.


To do this, add the following tags to web.xml file residing in
/mrcjava/WEB-INF directory.





<servlet>

      <servlet-name>  cust               </servlet-name>

      <servlet-class> pak.I00035s </servlet-class>

      <load-on-startup>1</load-on-startup>

</servlet>



<servlet-mapping>

      <servlet-name> cust               </servlet-name>

      <url-pattern>  /servlet/xyz.html  </url-pattern>

</servlet-mapping>





Note that

  1.. we have named our servlet as xyz.thml (!) and you can access it using
http://domain/mrcjava/servlet/xyz.html  (you can name it anything you want.
I used xyz.html because I think we shipped web.xml file with this example).


  2.. the tag  <load-on-startup> tells the servlet engine to load this
servlet when the engine starts up. The number in this tag tells the servlet
engine in which order the servlets should be loaded if more than one
servlets are registered and they have different number specified in this
tag. This tag is optional.







> Bruce,
>
> Would happen to have an example of how this is done with a jsp in the
> web.xml file?
>
> Thanks,
> Chad
>
>
> -----Original Message-----
> From: Bruce Jin [mailto:brucej@xxxxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, December 16, 2003 8:24 AM
> To: Java Programming on and around the iSeries / AS400
> Subject: Re: Initial JDBC Hits to AS/400 DB using Tomcat is Very Slow?
>
> To avoid servlet/jsp lazy loading (first hit slowdown) you could specify
> <load-on-startup> in web.xml when registering your servlet/jsp to the
> container.
>
>
>
>
>
> > Patrick,
> >
> > It is a jsp page.  I don't know much about the 400 commands.  What does
> > QJVAEXEC tell you?
> >
> > Thanks,
> > Chad
> >
> >
> > -----Original Message-----
> > From: Patrick L Archibald [mailto:Patrick.Archibald@xxxxxxxxxxxxx]
> > Sent: Tuesday, December 16, 2003 7:45 AM
> > To: Java Programming on and around the iSeries / AS400
> > Subject: Re: Initial JDBC Hits to AS/400 DB using Tomcat is Very Slow?
> >
> > Is it a servlet or a jsp page? If it is a jsp page the delay may be the
> > compilation of the jsp page into the servlet.  Look for a jobs called
> > QJVAEXEC with WRKSYSACT in automatic refresh mode when you first access
> > the page. (You may not have WRKSYSACT. I think it is part of Performance
> > tools. If so, use WRKACTJOB instead.)  JSP page compilation is my
> > biggest performance hit.
> >
> > Thanx, PLA
> >
> > cornelius, chad wrote:
> >
> > >Does anyone know what would cause initial JDBC hits on an AS/400 DB to
> > >perform slowly using Tomcat?  I have setup Tomcat to use connection
> pooling
> > >just as David suggests in his article, "Tomcat on iSeries", which is
very
> > >good by the way.  I have compiled all the .jar files, but Tomcat still
> > >performs slowly on the first hits.  Our AS/400's shutdown nightly to
> > perform
> > >backups, so I am not sure if this is the cause.  After one hit is made
to
> a
> > >table, all other hits are very fast.  It's just the first hit in the
> > >morning.  My other thought is that we do not have the SQL package on
our
> > >AS/400, which allows you to perform the STRSQL command.  Would this be
> > >another reason?  It seems JDBC would be independent of that.  Does
anyone
> > >have any suggestions?  Any help would be greatly appreciated.
> > >
> > >




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.