This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

Butch C

+ Follow
since Oct 18, 2000
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Butch C

In a servlet I am setting the content type to be a
specific content type for a custom application.
What I can't seem to find is a method to change the
filename that gets created. For example, if I have a servlet
called IOServlet then the servlet engine defaults the
filename to ioservlet.html. Is there a method to change
this name?
Thanks in advance,
18 years ago
I am looking for a free JDBC connection pooling class.
If you have used one that you liked please post any
comments and where to find it.
Thanks in advance,
You should use the separate stmt solution as mentioned above.
The problem the second time around is the ResultSet is hosed
because the stmt used to generate it was re-executed.
Per the JavaDoc...
A ResultSet is automatically closed by the Statement that
generated it when that Statement is closed, re-executed,
or used to retrieve the next result from a sequence of multiple
After executing a Statement which returns a ResultSet, is
there any method to call or a way to determine how many
rows are contained in the ResultSet without looping through
the ResultSet?

I would like to know how many rows are returned prior to processing
the ResultSet.
> can I create <href=�value�> portion dynamically
We accomplish this by dynamically building the link parameters
in the JSP necessary to get at the detail record and tack the
parms onto the URL. For example the necesary parms could be
the key value(s) to access a column in a database.
e.g. <href="/SomeServlet?id=<%=object.getId()%>" would produce
The URL would point to a servlet. The servlet will get the
parms from the HttpServletRequest object, make the database
call and finally retrieve the object representing the detail
record which you want to display. The servlet puts the display object back in the Request object via the setAttribute("detail", object )
and forwards to the JSP which will display the detail record.
The detail JSP gets object from the request scope via
<jsp:useBean name="detail" ... scope="request"/> and displays the
data to the user.
Hope this helps...
18 years ago
a) getServletConfig().getInitParameter(str);
A servlet configuration object is used to pass information
to a servlet during initialization. So this method allows
the servlet to pull in parameters from the config file which
contains name/value pairs. The str portion is the name of
the parameter, you will get back the value which is stored
in the file. This method is used to configure the servlet.

b) getServletContext().getAttribute(str);

This method returns the attribute named in str from the servlet
context. These attributes are global for the context. The
main use for this is to allow access to an object across all
servlets or if you are using JSPs and you want the object to
be of scope="application" then call setAttribute(str) on the
servlet context.
Hope this helps...
18 years ago
You can download an e-book format of Web Development with JavaServer Pages at
18 years ago