This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi all, I have written a JSP, which works in pretty standard way. I am using JDBC to pull rows from database and display it on page, users can update those rows and then hit submit which will update those rows in database. ALl this works fine if number of rows are less than 100 or so. But if it brings back huge amount of data like more than 150 rows or somehting, I am getting "Service Unavailable, zero size object" error pn browser. I checked iPlanet logs, there is a nullpointer exception. This is very wierd, its not consistent. I had thought I might be using GET method of form which restricts the amount of data but I am using POST method, are there any restrictions for POST method? Can someone please help, I am trying to solve this for days now. Thanks Hetal.
Customer surveys are for companies who didn't pay proper attention to begin with.
Jay Ashar
Ranch Hand
Joined: Oct 13, 2002
Posts: 208
posted
0
Yes, its an oracle database. Does it have to do anything with that??
Jay Ashar
Ranch Hand
Joined: Oct 13, 2002
Posts: 208
posted
0
All, I think I now know why this is happening but I dont know the solution for this. Maybe some of you'll could help. It breaks on response.sendRedirect("test.jsp?x=1&y=2"); and I think its breaking on this because this redirects the form as GET request and so if it has more data then GET can take it breaks. So is it true that whenever you do sendredirect it always submit as GET method of the form. How can I change it to go in as POST?? will it work if I did something like request.setAttribute("x" 1); request.setAttribute("y" 2); response.sendRedirect("test.jsp"); Will this submit it as POST? Any idea on this will be appreciated, its becoming painful now. Thanks Hetal.
if it's IE 4.0 you know that GET is limited to 256 characters , so if you have more it breaks .... try to test with some other browser , if this is the case... obviuos, the solution is to post it in POST , as you said.... and post some source code here , from your jsp...
My advice to you is to refactor your application so that you access the database from a Servlet rather than from the JSP(not the best design but better than what you currently have); then you can have control of where the sendRedirect is called from; that is you can call it from you doPost method; atleast you are sure that it will be a post and not a get. bye, anselm