Khalil Salman

Greenhorn
+ Follow
since Sep 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Khalil Salman

Change action=”org.HelloWorld” to action=”poi”. Because poi is the name of your HelloWorld servlet.
12 years ago
When using basic authentication, is there any way to change the user's password and make the new password available without restarting the server?
13 years ago
Alright. Now I see what you mean by saying "don't println to socket."
Don't use PrintWriter!..

Ulf, the link you gave for "don't println to socket" redirects me to somewhere else not to an article.
So please check it for future references.

Thank you guys anyway, the issue is resolved.

Here is the code, (maybe someone needs it in the future)

The server code:


server's response sender:


And the client:

Thank you guys.

Yeah I commented out println() parts and change the Runnable to Thread. And I replaced handler.run() with handler.start().
But nothing changed.

Something else should be missing. Something that I don't know but very critical.
Gosh 15-20 lines of code but I cannot get it working.
Hi,
the story:
Clients sends a request, server reads that request, and sends a response, lastly client reads the response.

There will be multiple clients so I tried to implement it using threads in the server code to be able to continue listening for new requests.
But in the last step the client freezes when I say read the response from the server. I mean the client sends a request successfully, and the server reads it and responses successfully but the client then cannot get the response; freezes.

Here is the code:

This is for the client:


And here is the server:


And the server's response sender run() function:


Thank you for any help..
I solve that issue by using <html:hidden> tag:

if it is:
<bean:write name="XXX" property='YYY">

then I put:
<html:hidden name="XXX" property="YYY"/>
next to it...
13 years ago
Hi Shai,
I got the same issue..

Did you solve that problem finally?
13 years ago
Thank you SAthish..
It also solved my problem...
14 years ago
What do you guys think about this solution?

Locale cLoc=request.getLocale();
Calendar cCal=Calendar.getInstance(cLoc);
TimeZone tz=cCal.getTimeZone();
14 years ago
JSP
I'm sorry guys but I've been fighting with this problem for last 3 days. No success.
But I just solved the problem.

In the beginning I had added jdbcsql4.jar as a jar file only..
But now I added a library to the project and I named that library as 'ms-jdbc'
Then I added jdbcsql4.jar to that new library which named ms-jdbc by me.

Strangely it worked out.

I just started with Java,
I'm using Netbeans 6.9.1 as IDE, MS-SqlServer 2008 R2 as database server, and Struts 1.3.1 as framework...
The problem is that I just keep getting this error:

java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

I downloaded the jdbc 3.0 from microsoft's web page. And I only added sqljdbc4.jar to my project. But strangely error message says that the driver you use is not supported by JDBC 4.0, so use sqljdbc4.jar.

Any idea?..
Any help would be really appreciated...