Yongping Wang

Ranch Hand
+ Follow
since May 15, 2001
Merit badge: grant badges
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 Yongping Wang

Hi,All
I run into a strange problem.
My thread (continuous running) keeps scanning files over folders. It will call another program to process the file if there is any new coming file. It works very well except one situation: the thread doesn't recognize a file when the file is in the process of transfering (or copying). That's understandable because this new file is in use by another source. However the thread still is not able to sense thie file even in next runs. But it can find other files as long as that situation (described as above) doesn't happen to these files.
Any comments? Thanks a lot for your help.
Y.P
[ April 24, 2008: Message edited by: Yongping Wang ]
14 years ago
Maybe you need to check
1. existence of the right JDBC driver package
2. the package shows in the classpath
3. privilege
4. (optional) write a test program

Yongping
You better use Timestamp instead of Date.
Yongping
Finally solved.
Actually it is caused by privacy settings in Web browser. In this case, it is about cookie setting. Letting current web browser accepts cookie makes the problem gone.
17 years ago
Hi, everyone
I am playing with Tomcat 5.5.9 and Hibernate. I ran into a strange problem and couldn't figure it out.
Say Tomcat is running on machine (Pine). I can access protected page by http://localhost:8080/hi/protected/listMsg.do. I can get messge list after I login. But when I tried to access the protected page from other machine (like Maple) by http://pine:8080/hi/protected/listMsg.do and submit login form, then I got error message (reponse page) like
HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser

type Status report

message The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser

description The client did not produce a request within the time that the server was prepared to wait (The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser).


---------------------------------------------------------------------------

Apache Tomcat/5.5.9

Did anyone have any clue on this issue?
Thanks

Y.ping
[ July 13, 2005: Message edited by: Yongping Wang ]
17 years ago
Question for you guys,
Our team is going to try Agile methodology to develop a proejct. Since it is new to us (well I admit the methodology is not new) I am not sure what the design document should contain. Please direct me.
Thanks.
Y.Ping
Thanks for your quick reply.
Yes, the reg exp you provided works fine when the parenthesis removed from 1([0-9]) and 2...
I find another one to work for this case
\d{10,16}(MAT([0-9]|1[0-9]|2[0-3]))?
Thanks again
Hello,
I want to use XSD to perform data validation. But now I just couldn't figure out a pattern for a string. The string format is like: XYZ. X consists of digits, its length must be 10-16, and is required. YZ (must be together) is optional, Y is fixed string like MAT, but Z is various. Z must be number between 0 and 23.
Thanks very much for your help.
Y.Ping
Obviously getDate() doesn't work for me. Instead getTimestamp() is a quick and reliable method to resort. It doesn't need any format conversion.
Thanks for your posts again.
It seems not true.
OK. now I use a SimpleDateFormat (using a pattern like "MM-dd-yyyy HH:mm:ss") to format the Date object (getDate(col)). Unfortunately I am still unable to get the hours, minutes, and seconds (all these values are 00 while its real value is non-zero).
Thanks for your reply.
Y.P
[You shouldn't be accessing a date as a String.]
That's what I was thinking but wrong. I am not sure if you noticed the hours, minutes and seconds are chopped off if I use getDate(). It seems like Oracle thin JDBC driver treats Date quite differently (compared to MS SQL Server).

Y.P
Hello,
A data type is defined as DATE. I use Oracle Enterprise Manager Console to do query and get a correct date like "12-Jan-2005 05:46:46 PM". But the date is displayed as "2005-1-12" from resultset.getDate(col) (thin driver) and "2005-1-12 17:46:46.0" from x.getString(col).
I don't get it. What happened to the date data?
Thanks in advance.

Y.P
Hello,
I run into a problem when I attempt to write a form bean. Here is the situation. An html page contains a form which holds 10-22 fields. The number of fields are determined by data (pair value) stored in database. These data are updated weekly by admin users.
Now my question is: is there a way to dynamically generate a form bean on the fly?
Thanks in advance.

Y.P.
17 years ago
Hello, everyone
I know how to display validation message on alert window (by using javascript) but don't know how to display it on top of form (jsp page).
I am using Struts 1.1
Thanks a lot for your help.

Y.Wang
[ September 02, 2004: Message edited by: Yongping Wang ]
18 years ago
Say, I have two different loggers in a class, A and B. Now I like to see any log message generated from A is written into a.log and any message from B goes to b.log.
It seems the log4j doesn't support it (via configuration file-log4j.properties)
Any comments?
Thanks
Y.W