Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Lee Barney

Ranch Hand
+ Follow
since May 07, 2003
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 Lee Barney

While you can do this using the runtime exec as described it is highly non-optimal in performance. It is also very bad OO design. You should have an API that allows you to access the functionallity of the application directly from yours if you want to increase performance, reduce used resources, and have the OO design principles that allow for easier upkeep of the code.
16 years ago
It looks to me like you are over using the <html><body></body></html> tags. You really should only have one of each of these in your generated html code. You appear to be adding muliple copies of these in your resulting page. Check the source of your generated page in your browser to see what is actually on the page. Don't rely on what you see within the browser. It can be misleading.
16 years ago
I have several classes that inherit from other super classes. I have objects in a list and need to be able to determine which superclass they inherit from so I can make the appropriate calls. How can I examine the inheritance tree at run time to find this out?

I know .getClass() only returns the final subclass.
16 years ago
How about this. Something I just thought of.

Create a fair semaphore that has Integer.MAX_VALUE permits.

When each iteration begins, aquire a single permit and release it when iteration is complete.

When each removal begins, aquire Integer.MAX_VALUE permits and release them after the removal is complete.

The removal will happen in fifo order since the semaphore is initialized as fair and will not begin until all iteration requests prior to the request for the removal are complete. In addition to this, all new iteration or removal requests will wait until the removal is complete.

I know that a fair semaphore is not as fast as a non-fair one.

Any other ideas?
I would like to be able to allow iteration over a collection by multiple concurrent threads, but if a removal method is called then all new iterations must wait until the removal happens. Also, the removal must wait until all of the threads iterating over the collection have completed.

Ideas?
It sounds like what you are asking about is refered to as an obfuscator. If you use google with the query java java obfuscation you should get a list of for cost and free/open source solutions
17 years ago
I also tried:



again, this works in Firefox but not IE 6.0
17 years ago
JSP
I changed the servlet code to be:



still not working.
17 years ago
JSP
I have been trying to get IE 6.0 to show and embedded excel spreadsheet when a table is requested. Below is the code for the table. I have also set the following in the servelt:



Neither IE 6.0 nor Firefox display this as an excel spreadsheet. I have Office installed.

I can get Firefox to respond correctly if I use the page directive in the JSP, but this is not optimal.

Ideas?


17 years ago
JSP
Generally the process is to:
1. create your servlet or obtain an existing one.
2. place the servlet code in the webapps directory.
3. call the servlet from your browser.

Do you have an existing servlet either as the appropriate directory structure or a .war file?
17 years ago
Connection pools in J2EE applications are available from the container. You can write you own pooling code without much difficulty if you know your JDBC. Each container has its' own way of turning on the pooling, so if your application might run on more than one container type or if you know you will be changing container types you should consider writing your own. This will reduce work during the installation phase with a customer (if you have one).
17 years ago
Here is an example that returns an ArrayList of ArrayLists. Using arrays is not much different. fieldCount is retained information from the creation of queryString.


Are you saying that you have this working inside of JBuilder and you are wondering how to make this available via a browser?
17 years ago
The biggest issue I see with using the containers connection pooling is with portablility.

The code to create a good connection pool is fairly trivial and small. This being the case, why would I want to reduce my flexabiltiy when I could readily handle such things as the threading you mentioned as a requirement in my own code?

I know that if there were many lines of code required to create a timed self leveling pool that it would be adventageouse to use the container to do this. It is not the case that a large amount of code is required to do this so I have chosen to create my own.
17 years ago
I have seen this happen. What I saw happening was that the WEB-INF directory would be empty after a hot redeploy, but if I shut down the server and restarted it after removing the empty directory, everything was fine.

The cause appeared to be that there were multiple projects that were being deployed to the same application name. Each of these projects had its' own web.xml, etc. As Tomcat attempted to create the application directory it would choke and not place everything as required.

The solution was to either include the material from each project into one application deploy, or to have different application names for each project.

Hope this helps.
17 years ago