binayakumar patel

+ Follow
since Jun 26, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by binayakumar patel

I have doubt in function overloading
Here is an example:

public class A{
public int calculate(int I, int j){}
public String calculate(String s, String s1){}

Class B extends A{
public float calculate(float a, float b){}

It is clear that in class A the method calculate() is overloaded. In same way when B is inheriting class A the calculate() methods also get inherited to class B . Can we say that calculate() of class A is overloaded in class B ??
14 years ago
//55 because the upper case alphabet letters start from 65 in ASCI table

char alpha= (char)(55+Integer.parseInt(num));
14 years ago
Join will not help because; it will wait all other thread which is lock by object finished and then start.
But My issue is thread are not get active as the order it is waiting.
Ex-> Thread-1 lock first, then Thread-2 is waiting, after the Thread2 reached and waiting the Thread-3 comes and is waiting, similarly Thread-4 is waiting.

So I need Thread-2 will get active not Thread-3 or not Thread-4 when Thread-1 is released the lock, but it is not happening, any one of the Waiting thread is getting active and executing.
I have a function which will call by more then one thread, Which is synchronized by an referance of class ClientSession. So idea behind is that the two client reqiest will process parallaly. The problem is that the wating thread are getting active randomly not the oder it called the function.

Ex: Suppose for Client 1 there are 5 threads suppose T1,T2,T3,T4,T5
When the thread T1 is executing the T2,T3,T4,T5 is wating.... When T1 is finised it task and release the lock.... then next Thread is execution randlomly.... I cant accept T2 will call.. But as per the requirement T2 will call then T3 then T4 then T5.

Please suggest me the solution.

Thanks in advance
Hi Sean,

Can you please give the screen shot , as well as the special character with which you have the problem.
Because when ever we try to display character like '>' we use "& gt"
So I think you need to convert your special code in this form to read this.

14 years ago
Hi Mani,

In JFrame you can disable the Resize button as well as the Close button but can not override the minimize button.
We can not hide these 3 buttons also.

To disable the Resize Button and Close button , you have to write below code.

If you want to Hide the Minimize Button and Resize Button then in place of JFrame use JDialog, It will show only the close button.
and to Disable the Close Button use the above code...

If you want to hide all these 3 button present in Title bar then use Window Class

14 years ago

No need to rewrite doGet() method,
Just replace the line


or add this line in your code and check it is working fine or not.

Keep the other thing same. This will resolve the issue. because "inline" will try to open the attached document in the same browser... where many places IE is not support the "inline"

14 years ago
Hi william,

This can help you ....

14 years ago
Hi chaitanya,

Generally this never happen, because when there is a new login , we use to create a new HttpSession and set the value in that.
You need to debug the code properly. I think the object which you are using to get the value is returning the same value,
Please try with userA, UserB and UserC if the value is same for all these case then... there is the problem with the object from which
you are getting the value.

when you are creating the session after successful login,
try to use this code...

14 years ago

Hi Patel,

I have done as below. But Its not populating the vaule in textbox.

In Y.jsp the code is like this.

var f1 = top.document.forms['tform'];
var f2 = top.document.forms['tform1'];

<input type=radio name=data value="data_res" onclick="javascript:getData();/>

on getData() method I have written the below code.

function getData() {

var rd = document.getElementsByName('data');

for(var i = 0; i < rd.length; i++) {
if(rd[i].checked) {
field = parent.document.createElement('INPUT');
field.value = rd[i].value;
document.forms[tform].data_back.value = rd[i].value; // Here data_back is the name of the textbox for form name tform which is the upper form already displayed


The above code is not replacing the selected the text value into the upper form textbox location. Please let me know whether I am missing something.

Baji Roy.

I know you have not given the complete code but still concentrate these lines:
var rd = document.getElementsByName('data');
is the data is a TextBox or RadioButton

that you are checking this with an array

I am not able to understand here .... Because you are taking the rd value to store in the "data_back"
If it is a checkBox or RadioButton we can check for "checked" or "Unchecked", if it is a TextBox then how you are checking for "checked"

You are creating a new filed and storing the data to it.... But I have not seen any line where you are using "f2" to get data from the textbox of second form.

you are using rd[i].value ... if it is a checkBox or RadioButton then it will return you only true and false.
So no where I found that you are taking the data from the form2 -> textbox

I think this code may help you , Please modify this as per your requirement:
Can you make it more clear that, what you mean by create struts html tag.

Struts Html tag is nothing but a Tag library file, which is get replace to html code after generating response.
There is nothing to do with javascript.
14 years ago
Are you sure there is multiple jsp is getting dynamically include to your one jsp file.
please check the code may be there is multiple <div> will be there . where while click on checkbox
it will make the <div> visiable...

If this is the case , if you are using multiple <div> and making it enable by clicking on check box then you can do it by javascript.

If this is not the scenario and you are calling the multiple jsp by <jsp:include> on click on checkbox... then javascript will not
help. You have to take a bean class and has to set the value in the jspbean and populate that bean value to the first jsp..

as when it will call first time there is no value in the bean,... when you click the second jsp you have to set the text value to the jspbean and has to call the same page....

while doing this ... the textfield in the first page will get the value from the jspbean .

Please note that keep the scope of the jspbean as session.
Class Variables
When a number of objects are created from the same class blueprint, they each have their own distinct copies of instance variables. In the case of the Bicycle class, the instance variables are cadence, gear, and speed. Each Bicycle object has its own values for these variables, stored in different memory locations.
Sometimes, you want to have variables that are common to all objects. This is accomplished with the static modifier. Fields that have the static modifier in their declaration are called static fields or class variables.

Thats why the value get change....
The Spring Dynamic Modules for OSGi(tm) Service Platforms project makes it easy to build Spring applications that run in an OSGi framework. A Spring application written in this way provides better separation of modules, the ability to dynamically add, remove, and update modules in a running system, the ability to deploy multiple versions of a module simultaneously (and have clients automatically bind to the appropriate one), and a dynamic service model. OSGi is a registered trademark of the OSGi Alliance. Project name is used pending approval from the OSGi Alliance.

OSGi R4 (or greater) platform
(Spring DM is tested daily against Eclipse Equinox 3.2.x, Knopflerfish 2.2.x and Apache Felix 1.x)
Spring Framework 2.5.6 or greater

[ UD: This post is copied verbatim from Please don't copy and paste text passages without attribution. ]
Do you mean to this ??

14 years ago