Elizabeth Chen

Greenhorn
+ Follow
since Aug 09, 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 Elizabeth Chen

Hi,
My problem looks like a javascript problem, but
it is more seen when using Tomcat as the web server.
I have a file (test.jsp) listing a list of items. When I click any of them, a popup window
will display the corresponding data. The data are stored in two arrays (array1 and array2).
But when I switch between the links, sometimes, the popup window does display the
corresponding data, but sometimes displays nothing, Any clues?
If I change the code to remove blank.htm page (example: window.open('','TheRemote'....) ),
the output is appended to the end of the string.
Thanks for help!
-------------------
test.jsp:
<html>
<head><title>JSP Page</title>
<script language="JavaScript" type="text/JavaScript">
var array1 = new Array( );
array1[0] = "Item1a";
array1[1] = "Item1b";
var array2 = new Array ();
array2[0] = "Item2a";
array2[1] = "Item2b";
function displayArray (x) {
var remote = window.open('blank.htm','TheRemote',"height=250,width=250,status=yes,toolbar=no,menubar=yes,location=no,resizable=yes,scrollbars=yes");
remote.focus();
var output = "";
for (var i=0; i<x.length; i++) {
output += x[i] + ';';
}
output = "<html><head><title>test</title></head><body>" + output + "</body></html>";
remote.document.write(output);
}
</script>
</head>
<body>

<A HREF="javascript isplayArray(array1);" >Item One</a><BR>
<A HREF="javascript isplayArray(array2);">Item Two</a><BR>
</body>
</html>
--------------
blank.htm (located in the same directory as test.htm)
<html><head></head>
<body>
</body>
</html>
22 years ago
JSP
Hi,
I have a file (test.htm) listing a list of items. When I click any of them, a popup window
will display the corresponding data. The data are stored in two arrays (array1 and array2).
But when I switch between the links, sometimes, the popup window does display the
corresponding data, but sometimes displays nothing, Any clues?
If I change the code to remove blank.htm page (example: window.open('','TheRemote'....) ),
the output is appended to the end of the string.
Thanks for help!
-------------------
test.htm:
<html>
<head><title>JSP Page</title>
<script language="JavaScript" type="text/JavaScript">
var array1 = new Array( );
array1[0] = "Item1a";
array1[1] = "Item1b";
var array2 = new Array ();
array2[0] = "Item2a";
array2[1] = "Item2b";
function displayArray (x) {
var remote = window.open('blank.htm','TheRemote',"height=250,width=250,status=yes,toolbar=no,menubar=yes,location=no,resizable=yes,scrollbars=yes");
remote.focus();
var output = "";
for (var i=0; i<x.length; i++) {
output += x[i] + ';';
}
output = "<html><head><title>test</title></head><body>" + output + "</body></html>";
remote.document.write(output);
}
</script>
</head>
<body>

<A HREF="javascript isplayArray(array1);" >Item One</a><BR>
<A HREF="javascript isplayArray(array2);">Item Two</a><BR>
</body>
</html>
--------------
blank.htm (located in the same directory as test.htm)
<html><head></head>
<body>
</body>
</html>
Hi,
I have a servlet which does all calculation and forward the results to a frame set (out.jsp) to display. The upper frame (top.jsp) will display the results as a list of hyperlinks, when a link is clicked, the output will then be displayed in the bottom frame (bottom.jsp). But when I tried to render the results in top.jsp, I cannot access the results passed from the servlet.
out.jsp:
<frameset rows="174,*">
<frame name="top" target="main" src="top.jsp">
<frame name="main" src="bottom.jsp">
</frameset>

For example, the servlet passes an object (for example A) by setAttribute, how can I get the object A from top.jsp? or other better way to handle this kind of problem?
Thanks for help!!!
22 years ago
I have two questions about Forte CE 3.0,
First, I want to install forte on a machine, so that multiple users can use the tool on the same machine, how do I configure forte so that its tomcat server can start on different ports for different users.
Second, I installed Forte with J2SE 1.3.x, now I want to upgrade to J2SE 1.4, do I need to reinstall Forte, or just point to the new J2SE, how do I do that?
Thanks.
Elizabeth
22 years ago
Thank a lot! it fixes the problem.
Elizabeth
22 years ago
I always get the NumberFormatException error from the following simple program called TestSort.java. The error came from where I tried to convert a string into a Long object. Can anyone know what the problem is? Thanks.
TestSort.java:

import java.util.*;
public class TestSort implements Comparator {
public int compare (Object obj1, Object obj2) {
int i, j, k;
String str1 = (String) obj1;
String str2 = (String) obj2;
i = str1.lastIndexOf(' ');
j = str2.lastIndexOf (' ');
Long li = Long.valueOf(str1.substring (i));
Long lj = Long.valueOf(str2.substring (j));
k = li.compareTo(lj);
return k;
}

public static void main (String args[]) {
TreeSet ts = new TreeSet (new TestSort());
ts.add ("aaa 9000000000");
ts.add ("bbb 7000000000");
ts.add ("ccc 8000000000");
System.out.println ("ts contains " + ts);
}
}
22 years ago
Hi,
I need to query a huge database table in order to caculate data into a Vector, everytime, I execuate the sql:
select * from JobInfo startTime > t1 and endTime <= t2
The database could return more than a lot of entries if (endTime - startTime) is greater than 1 month and generate outOfMemory exception.
I used mm.mysql JDBC which doesn't support setFetchSize.
Anyone has suggestion?