Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Peter Guillebaud

Ranch Hand
+ Follow
since Jul 11, 2001
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 Peter Guillebaud

thanks Mike, yes the database has accepted 2 DSNs, no more broken pipes.
18 years ago
thanks Bosun!
18 years ago
I have 2 versions of a web app - whenever I start using the second web app, the first one breaks with the error message
[Microsoft][ODBC SQL Server Driver][Named Pipes]Connection broken.
The first web app connects to the database from within its' jsp pages, which is being corrected in the 2nd version by having the database connection started in the init() method of a servlet. While the second one is being developed it would be nice if the first one was working... does anyone know how to fix this problem of the broken connection please?
Many thanks
18 years ago
Hi Gerry,
Thanks a lot!
At the moment I'm going to use one servlet that keeps the db connection open ( and one statement object). It will deal with all the db queries that come from the jsp pages and hand back the data as an attribute of the request object... unless there is a good reason for using beans instead?
18 years ago
Thanks Gerry, this helps a lot... I feel a bit foolish for trying to write to an InputStream!
What I really want to do is to get the jsp to call the servlet and pass a piece of text to this servlet. Is the jsp:forward tag the only way to do this? The servlet does a database query, depending on the String it has received, and returns the ResultSet in the form of another String back to the same jsp page that made the original request. The servlet will contain many methods for querying the database, each will be called depending on the String sent by the jsp page(s).
Thanks
18 years ago
is there a way for a jsp to write to an InputStream that has been created on a servlet? I need the servlet to read the InputStream, call various methods depending on what the input is, and then send an OutputStream back again to the jsp page. Many thanks
18 years ago
..for anyone else with the same problem, the solution is to edit server.xml references to AJP connectors setting tomcatAuthentication to false
18 years ago
JSP
Hi, I need to get the browser to pop up a www authenticate box for a new web app I've just created in webapps and then use apache for authentication. Information on the web about how to do this is very confusing, can anyone help please? I am running tomcat 3.2.1 on linux with an apache webserver. - perhaps it is easier with tomcat 4? but don't want to use this unless I have to...
Hopeful thanks in advance!
18 years ago
JSP
thanks Tim, could I see some of the relevant code that you worked on for this? I haven't had much experience in this area...
18 years ago
JSP
Bosun, thanks - I've not used requestDispatcher - how does that work?
18 years ago
JSP
Hi,
I need to process the data sent by a form using the "POST" method to a JSP page directly, ie. not using request.getParameter ( "paramName" ).
In other words I need to do a request.getInputStream (), but the JSP engine seems to have already read it, and doesn't let me, giving me an error.
How do I get to stop the JSP engine from reading the input stream ?
Thanks.
18 years ago
JSP
Hi,
Is it better to create and close a new statement object for each ResultSet? Or is it more efficient to use the same statement object for many queries and then close it when they're all done. (Using ms sql and odbc driver).
Many thanks.
try
SELECT CONVERT ( CHAR (17), DateOpened )from tblAccounts
hope this helps. You can change the (17) to restrict or to increase the 'size' of the format returned
Hi,
I have written some jsp pages that have odbc logic contained within them, not separate in a servlet or bean... am now getting problems to do with ODBC Connection Broken[Pipes] error messages. For example:
javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver][Named Pipes]Connection broken.
Is this likely to be fixed by separating out the odbc code, or perhaps the error message is due to something else?
Many thanks
[This message has been edited by Peter Guillebaud (edited November 13, 2001).]
18 years ago
JSP
thanks Junilu. Why is it better to keep the db code out of the jsp? Is it smth to do with keeping the business logic separate from the presentation layer? Anyway, I will do as you suggest, many thanks.
18 years ago
JSP