Brett Delia

Greenhorn
+ Follow
since Feb 22, 2001
Merit badge: grant badges
For More
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 Brett Delia

Sorry about not posting the JSP's. Here they are.
First half of the page that get sent first...

Second half of the sent page after processing is done:

And finally the results page:
20 years ago
A little history. I would like make a request for a servlet and have an interstitial page that displays some kind of "loading" message then redirects the user to the appropriate page when the "loading" is done. The code below is how I thought it would work but it does not seem to.
Why does the following not work? Anyone have any suggestions? In particuliar it appears that the first call to response.flushBuffer(); does not seem to work.
package brett.test.servlet;
/**
* <p>Title: InterStitchalPageLoading</p>
* <p>Description: A test Servlet to get an interstitchal page to work</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/
import java.io.PrintWriter;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
public class InterStitchalPageLoading extends HttpServlet
{
public InterStitchalPageLoading()
{
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
processRequest(request,response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
processRequest(request,response);
}
void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
// get the request dispatcher for the first half of the interstitial page
request.getRequestDispatcher("/pageLoad/interstitial_first.jsp").include(request,response);
// flush the output so that the browser will see the HTML
response.flushBuffer();
// Suck up some time...
for(int i = 0; i < Integer.MAX_VALUE; ++i)
{
for(int j = 0; j < 10; ++j){}
}
// get the request dispatcher for the second half of the interstitial page
request.getRequestDispatcher("/pageLoad/interstitial_second.jsp").include(request,response);
// flush the output so that the browser will see the HTML
response.flushBuffer();
}
}
[ March 24, 2004: Message edited by: Brett Delia ]
20 years ago
After hours and hours of research, I finally run across an article on Sun's site:
http://developer.java.sun.com/developer/bugParade/bugs/4984794.html

There is a bug in the latest JRE from Sun when using Applets. There doesn't appear to be a workaround for this issue.
20 years ago
No, we have tried that one already.
It seems to work fine when using the Microsoft VM, however when we use the most recent Sun Plugin the Applet will always steal the focus from the actual document(the page). You actually have to click somewhere on the web page to even get it to respond.

Originally posted by Maulin Vasavada:
Hi Brett,
If we write onLoad method in javascript that does,
"document.forms[0].elements[0].focus();" then does it work for you?
Also, we have to make sure this 0th element is the first one in the HTML display you know. Because if the first element is some hidden element then it would not work for you...
I guess this becomes java script issue at this point if we are not able to do anything from the applet...
Regards
Maulin

20 years ago
Hmmmm, no takers yet?
I am still working on this one and will try to remember to post what I find, if anything to help with this.
20 years ago
Why not just syncronize on the variable in question? Would this not garuntee atomic behavior?

Originally posted by Peter Chase:
...
If you can be sure that your files are not too big, you can read the whole source file into a byte array with one operation on a ...


What is meant by too big of a file?
22 years ago
Yes the answer a is legal.
You're not throwing an abstract exception. You are throwing an exception of type BadTasteException, which you can not instantiate an object of, but you can instantiated objects of types BitterException and SourException which are subclasses of BadTasteException. It is perfectly legal to declare a method throws a parent class (abstract or not), but the only practical types thrown from it are actually subclasses of the parent class.
Hope this helps.
Is this not just a case of overriding a method of the parent class? At least that is how I read it.
Some colleages and I were debating why the wrapper class that correspond with the primitive datatypes are immutable. I was hoping to get some feedback from this group as to why they are.

Thank in advance.
22 years ago
If I have a static class do I have to declare the methods static within it? Below you will find some sample code that is a private inner class that acts as a helper for a DataBase Conection Pooling class. Our confusion comes from whether or not this will behave properly. It compiles and runs but we have issues with to many processess getting open and then crashing the server. Any help would be appreaciated...
This example is an inner class...
private static class MyClass extends Thread
{
private MyClass()
{
}
public void run
{
//do something...
{
}
22 years ago
When I get it to a point that I can easily explain...
23 years ago
Is there a way of assigning an image to a Cursor object?
I do not see any straight forward way to do this. Basically I would like to be able to make a cursor have any image I create, is this possible?
Thanks for any help...
23 years ago
Figured out what I wanted...
23 years ago
Is there a way, using GridBagLayout, to gaurantee that an added component be a certain size? Preferably measured in Pixels?
I am working on a GUI for a game and I would like to have the five components to be specific sizes, is this posible? So far I do not see a way of accomplishing this.
Thanks for any help.
23 years ago