Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

vikas byn

Ranch Hand
+ Follow
since Mar 18, 2011
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 vikas byn

which exception is generated corresponding to "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0" using jdbc

above code showing time 00:00:00 and 12:00:00

HH:mm:ss in place of hh:mm:ss
6 years ago
JavaScript provide a function - setInterval(callBackFunction, sleepDuration). should i use this?
6 years ago
JSP

Ulf Dittmer wrote:Not really, unless you want to (and can) use WebSockets. But I don't agree with Bear's statement that sockets are needed - FB and Gmail manage to do it using nothing but HTTP and JavaScript, too.


Yes, WebSocket is new Protocol, GMAIL providing chat service long before the websocket as I recall.
I think javascript check server-cache in loop and updates chat content. Am I right?
6 years ago
JSP

Bear Bibeault wrote:Then it won't be interactive chat like gmail or Facebook.



So you are saying that browser can open TCP socket connection.

its true then please suggest me. this will helpful to me.
6 years ago
JSP
Most of those solutions are based on socket programming. I just want to use http protocol and javascript and jsp/java.
6 years ago
JSP
How can i make interactive chat like GMAIL, FACEBOOK.

Can it possible .. using ajax that frequently updating a portion/part/ chat box.

If we do in this way, I am sure our server will be overloaded.

Please provide your suggestions.
6 years ago
JSP
When and where the methods of class are loaded in jvm.
If I have a class Test with method doStuff().

1) doStuff() is instance method.
If I make 1000 objects of this class then it will load and store this method for every objects?

2) doStuff() is class method.
If I make 1000 objects of this class then it will load and store this method only once?

3) to reduce memory usage, Is it good to make method static?
6 years ago

Lakshman Subramanya wrote:Hello,

I use Eclipse (kepler version, with JDK 7) on MacBook Pro (Lion)

I want to overwrite a line printed on my console. I used "\r" for that. I was expecting the cursor to go to the beginning of the line. Instead, it is going to the next line.
Could some one tell me how to rectify this problem ?

Code:
------

System.out.print("Superman\rSober");


Expected Output:
----------------
Soberman


Actual Output:
----------------
Superman
Sober

Any help appreciated.




Its a bug in eclipse. Run your program on terminal/command promt
6 years ago
I am looking into code to check when session created. Actually class used SessionAware interface when User logged in.

I am just thinking If user logged in and keep it to expire then we unfortunately store it also.

Is there is any Listener that will listen event of expire session?
6 years ago

E Armitage wrote:Then you can create an HTTPSessionListener and add all started sessions to a collection. You can then iterate all of them to invalidate them when you want to.



it may cause memory leaks. it can store that session in which user just hit page not logged in and keeps its reference for always.
6 years ago
I want to invalidate some sessions if certain situation occurred.
6 years ago
I need handle all user sessions in struts2 like tomcat manager application
6 years ago
I deployed a third party web application that has servlet-name 'default' in web.xml, in Tomcat 6.
Tomcat already use that servlet name, you can see $CATALINA_HOME/conf/web.xml. How Can i use that web application at minimal changes.
7 years ago