Rituraj Jain

Ranch Hand
+ Follow
since Nov 28, 2008
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 Rituraj Jain

Thanks guys for your replies. Ya i already know all these things but was just making sure that I am correct and the book isn't.

I have a question and needs an expert advice on this.

I have a main Method and i creates two child threads from there. Now my child threads are running and main thread has finished execution, is there is any possibility for my program to hang because of this reason.
I always had very clear concept that the child thread can run even after the main thread has finished running. but today i read in complete reference that


"in a multi-threaded program, the main thread must be the last
thread to finish running. If the main thread finishes before a child thread has completed,
then the Java run-time system may "hang"
Hi,

I have developed an Applet which uses swt (win32 Api that OS class and TCHAR class) and use the windows users32.dll file for blinking a window's taskbar tab. My applet is signed and working good. On most of the machines it is running fine. but on some machines it is throwing errors, the point is that Applet console doesn't shows any error but Internet explorer (IE8) shows a javascript error on the line where i have called the applet.

The same code is running fine on every machine if i use Firefox/Opera/Chrome. IN IE every machine is fine except a few.
Point of main concern is that today morning i tried to run the application on one machine (say A) its was throwing error but in afternoon on same machine it was running quite fine
13 years ago
sorry friend here code can not be provided....however i can give you a suggestion

why don't you search google with this phrase submit form using javascript
hi rammie,

Can you specify what is the need of doing so.

by calling methods request.getSession() or request.getSession(true);

in both cases it will return a existing session Object but if there is no existing session it will create new one for you.

if you calls request.getSession(false), it will return session object if there is already created session but it will return null if no existing session is there

in any case ony one session will be maintained not two.....
14 years ago
No doubt, if you want to submit page on the selection in javascript you should be using Java Script.

if every body will think that the user will disable JavaScript then this is also equally true that if he disables javascript he will not be able to open most the websites.
so its perfectly fine if you use javascript in your code...
i think it will be a compile time exception...compiler will flag it...........why don't you subclass RuntimeException class if you want an run time exception

read this article Read It
14 years ago
Ya exactly Ritchie,

You are correct...
i have gone through that code...its good...and will require a day to fit in to my requirments.
why didnt i use IDE??? i tried net beans in starting for this job..but i was no able to do this customized coding with it as IDE generated code is not editable sort of...... may be i am not that much comfortable with it. Googling is also a good practice and i may be using it in future.


Thnks for reply mAn
14 years ago
thanks to all of you for reply

ya i should have googled it
my code is 60% same as that articles code......but i generally don't copy paste as i always likes to develop on my own....but now i think that i should start copy pasting


thanks again for all of yours reply....but still there is a war behind in my head..........where the beauty of java lays. is .Net is better if no then where Java is better
14 years ago
I don't Whether i should ask this question here or not. but still i am asking

I am in java development from my collage time since 2005. since last i am working with a software company. i have also also worked as Corporate Java Trainer for TCS, HCL
and a week ago i was given a task to develop a gui. task was like this

1. i have to a JTable having Jtree in one column and all other columns should have a check box. Tree is generated dynamically from Database and can go upto any levels
2. tree expansion and collapse should be there.
3. each row of checkbox should be bounded with each node of JTree(participates in expand and collapse events ) as i have to do some work based on which are the columns that are checked against each node of Tree. Screen shot is attached here. it took me 5 days to build that GUI as its a custom control that i have to build (JTree and Jtable together with CheckBoxes).

the same GUI is build by .NET developers in one day only.

now i want an expert opinion on why every body use to say java is best(as i was also a strong believer). Where the beauty of Java lays. Why should i stick to Java only.


as i felt a high degree of frustration i front of my seniors as i don't have any point in my favor (java's favor).
14 years ago
hi Led,

what exactly is your problem in this code.........i am not getting it...
14 years ago
As you can clearly see your log file its written that java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.

if i would be you facing this very problem

i would uninstall tomcat and install it on another port say 7788. or if i know about server.xml file then i would have changed the current port no 7788

look buddy this the best possible guess i can make by reading catelina log file..

if it still doesn't solves your problem then either wait for someone with great knowledge of tomcat
or go to Apache Tomcat site.
still better is to google this expression "java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address Protocol/network address/port) is normally permitted"

by last two means you will surely learn a lot about tomcat......
14 years ago
one more thing
if you install tomcat by any .exe file then there will bo no .bat files and there is nothing to worry about for now
14 years ago
hey vijay,
i am asuming that you ae using tomcat 6 now

you have installed tomcat from .exe file. nothing to worry about (don't go for zip file for now)

just go to the most recent log file under log folder "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.18\logs" there you will find many log files but find the files with most recent data(todays date if you have tried start it today) you will find around 5 files there
open file with name similar to catalina.2009-10-19.log and see the Error Log and if there is any line like
"java.net.BindException: Address already in use: JVM_Bind<null>:8080" then you have to change you port.

if you cann't at all understand the log then please post (copy paste file this forum) it here



14 years ago