Lilian Chase

Greenhorn
+ Follow
since Jun 14, 2010
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 Lilian Chase


Hi everyone,

I have a web application running on Tomcat that accesses data from a MySQL database.

However the time taken to establish a connection is very long.

The function that I'm using to connection to the database is



It takes an average of 9 seconds to establish the connection. Query time is <1s depending on record size.

However, running the same function from Netbeans takes less than <1s from the same machine.

Hence, I would like to know if there's additional delay or firewall accessing the MySQL from Tomcat web application as compared to a direct connection.

Hi everyone,

I have a web application running on Tomcat that accesses data from a MySQL database.

However the time taken to establish a connection is very long.

The function that I'm using to connection to the database is



It takes an average of 9 seconds to establish the connection. Query time is <1s depending on record size.

However, running the same function from Netbeans takes less than <1s from the same machine.

Hence, I would like to know if there's additional delay or firewall accessing the MySQL from Tomcat web application as compared to a direct connection.
Hi All,

I wish to add a total row at the end of my data in a JTable. However I want the total row to always remain visible throughout scrolling and when data is sorted.

I came across suggestions about using two tables but wouldn't the second table aka the total row be below the JScrollPane?

Another suggestion was interesting > link

Jeff Albertson suggested adding the row to the south region of the JScrollPane. How would that be implemented?

Any other suggestions on methods to implement the total row at the foot of the JScrollPane?

11 years ago
Thanks Chris for your explanation. You've been a tremendous help
11 years ago
So for the following:



That code line just reassigns the BufferedReader to point to another memory location where the file is at?
So if I do not close the stream, the file descriptor from the previous loop is still there awaiting to be garbage collected?
Is that how it is?
11 years ago

Hello...

In my application, I get a list of files that I need to open for reading.
I iterate the list using a for loop and BufferedReader to open the files for reading.

My question is: Do I need to close the stream at the end of each loop or it's okay since at the start of the loop,
the BufferedReader is reinitialized with the new file as long as I close the stream in the finally block?

I've tried both ways, doesn't throw any Exception or error that I can see. So what would be the best practice?

11 years ago
[Edit: split from another topic. please start a new topic for your own questions.]

I have a related questions regarding the overhead and "components" of a Java class.

I ran my application through a profiler and I noticed a lot of byte arrays were created but I don't use byte arrays explicitly in my program.
So I was wondering if those arrays are created from other class that I maybe using.

I know String is made up of char array and integer fields to keep the value of offset, count and hash value.

My question is, Is there any class that is made up of byte array?

Thank you

( TS, I hope you don't mind that I'm using your thread for this. )


11 years ago
If the values or content of the button is not involved in the form submission and its sole purpose is just to display a dialog box, it should work even if it is outside the form tags.

Make sure your JQuery event handler is declared correctly.
I haven't had time to sit down and look over the documentation for Ext JS, but the components such as Container, Panel, CardLayout etc is pretty similar to Java.

Anyone with experience with Ext JS that can clarify this? Thank you.
So the exam is more theory-based? So it will cover on all the APIs available? Winning the book will definitely help me prepare for the exam

I have also heard about pattern design from my colleagues. Is that an important concept or just a general classification of functions and APIs?
I had a look through the sample chapters through the book "Ext JS in Action" by Jesus Garcia and the content looks rather exciting. I'm currently working with Java for servlets and application as well as JSP and Javascript for web applications. From what I have seen in the sample chapters, it seems that Ext JS is a combination of Java and Javascript which would be a good news for a programmer like me.

Apart from that, the cross-browser functionality would be great so that no customization is required for different target users and browsers.

I would like to know, is Ext JS considered as client-side or server-side? Does the user need to install any program/software to run Ext JS application?
Apart from that, is the syntax similar to Javascript or Java?

I haven't had much time to go through Ext JS but from I've read, it seems to be very interesting

Thank you.
I'm in similar condition as the Amarnath. I started delving into Java after graduating and going into the workforce. My first assignment and project was to work on an application by using Java. Since then, I have learned and adapted Java in my daily work and I'm happy to say so far that I'm able to complete my tasks, thanks to Google and helps from colleague. But I have no real background and have not attended any formal classes on Java.

Would it be difficult to sit for the the certification test and if anyone have any tips regarding the exam? Thank you so much
I'm currently working on a file upload servlet whereby I use the Apache Commons API and extends the ProgressListener class to monitor the uploading progress.
I've got the basic uploading and progressing monitoring working well.

What I'm trying to accomplish now is to add in validation and parsing functions before writing the files in the server.
Currently, the progress bar shows 100% done but in fact the function is still parsing the file content.

Is there a way for me to include these functions in the progress listener, that is the actual the writing and saving of the file at the server side? Or perhaps a way to set a progress listener to the BufferedWriter?

13 years ago
Hi Christian,

Thank you for the fast reply.

Basically the test page will execute 15 Ajax calls to the Java servlet with different parameters. The first part of the testing is the elapsed time from the servlet and this value is written into a log file. The second part of the test is logging the total time i.e. all the Ajax calls return a response and the loading of the output to the webpage is completed.

The timer page basically launches a new test page and closes it after the test is completed.
One of the tasks that I'm currently in charged of is to automate web page testing. My company is basically using jsp webpages with underlying servlets for function execution.

The main objectives of the testing are to log Process elapsed time and to monitor and alert the technical team if erroneous response is obtained.

The approach I'm currently using is by setting a timer to automate the testing. Basically, the timer will launch the web page and record the elapsed time and send an email to the technical team is error is encountered. However, this approach are sometimes prone to browser problem and the timer is stopped when the timer page is closed.

I'm wondering if the book "Test-Driven JavaScript Development" can provide me with a better and more effective method for testing.

Thank you.