Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Calvin Kong

Ranch Hand
+ Follow
since Jul 02, 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 Calvin Kong

Hi,

Can jsp or servlet access cookie created by .NET? Say the main page of an web application is written in .NET, and a cookie is created at the main page. By clicking a link in the main page will launch a java jsp page (or servlet). Can jsp or servlet in the launch application access the cookie that is created by .NET?

Thanks

Cal
15 years ago
JSP
Hi,

I have a question regarding session behavior in distributed environment. Say I have 2 servers in clusters. If inside the servlet, the application call session.invalidate() method right after the session is move from server A to server B, what will happen? Also, any session attribute that's not implementing java.io.Serializable will not be migrated. Does it mean I'll get null value if I call session.getAttribute("XXX") when the session is moved to server B where the attribute is set when the session is in server A? Does the behavior depend on server? (we are using JRun)

Thanks

Calvin

[ January 21, 2005: Message edited by: Calvin Kong ]
[ January 21, 2005: Message edited by: Calvin Kong ]
15 years ago
Thank you so much for your help!!

Cal
15 years ago
Hi All,

I have a problem using Filter and Struts. I have a Filter filtering all the *.jsp and *.do. In the filter, I get user's security info (if it's not load before) and stick it in the request object. I have no problem with this at the first time. In the jsp, I can call request.getAttribute() to get the security info. However, when I submit some forms or click some link, the userSecurity in the request object is lost, and next time the filter got hit, the request.getAttribute("userSecurity") is null and creating a new object by loading user info from database again.

Am I missing something? Why can't the usersecurity info be load once ONLY and sticked in the request object and keep passing?

NOTE: I can't use the session object. I know this can solve the problem but we are NOT ALLOWED to use session.

Thanks

Calvin
15 years ago
This works, but is there any way other than that? Since reset() will clear everything in the form. Is there any way that I can reset only the file upload field?

Thanks a lot.

Calvin
Hi all,

How can I pass a parameter to a function that containing apos character ' ?
e.g.

function display(str){
someField.value=str;
}

when I call it:

<a href="javascript isplay('Calvin's Message')">.....

How can I pass the whole string "Calvin's Message" to the function? It has error now because of the ' character in the "Calvin's Message" string.

Thanks a lot!!

Calvin
Hi, I have a question about setting the value (to empty string, or anything) of the file input path. I was thinking it worked as the same way as a text field, but it's not. The value is not changed. So is there any trick to do that with the <input type="file" >?

Thanks a lot!

Calvin
it's kinda late response but thank you all!
Calvin
16 years ago
Hi, I'm new to WebServices and I'm using axis and the WSDL2Java tool to generate java client for testing. I got this error when I try to pass an bean object that has a field using java.util.Date.

- Could not convert java.util.Date to bean field 'dobDate', type java.util.Calendar
- Exception:
java.lang.IllegalArgumentException: argument type mismatch

The WSDL works fot C# client, but not for the Java client. I tried using GregorianCalendar instead, and the problem in Java client went away, but it become a problem for the C# client because it couldn't get the date.
Can anybody help me on this? Thanks you so much!!
Calvin
16 years ago
Hi all, I wonder if I can schedule the test on Sat so that I don't have to take a half day off. I got the voucher number but didn't register yet
Thanks
It helps!! Thank you so much!!
16 years ago