This week's book giveaway is in the Android forum.
We're giving away four copies of Learning Java by Building Android Games and have Jean-Marcel Belmont on-line!
See this thread for details.
Win a copy of Learning Java by Building Android Games this week in the Android forum!

Butch C

Greenhorn
+ Follow
since Oct 18, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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.
res.setContentType("text/apf");
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,
Butch
17 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,
BC
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
results.
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.
TIA
> 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
<href="/SomeServlet?id=23%>"
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...
BC
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 http://www.manning.com/Fields/index.html
18 years ago