Anjali Pal

Greenhorn
+ Follow
since Oct 03, 2009
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 Anjali Pal

Hi all,

I was just wondering if there is any difference between



Thanks in advance
10 years ago
Hi all,

I have written a function which generates combination in a desired order. The code is somthing like this



The output of this code is and this is what is required :



My problem is all the hard coding in that function i am passing "min" "max" for range of digits and this part is ok (more or less)
Please ignore the Boolean value.

"noOfControls" is something i need to implement ie all the combination i am getting are 3 digits max (governed by number of for loop).

I need to remove this dependency i don't want to write new method every time say "if i need series upto 6 digits and write method with 6 loops"

My question is what should be the approach ?
and what are the possible ways to do it.

Thanks in advance.
11 years ago
Hi Experts,

I am working on a struts based project, I am facing some problems displaying data on jsp .
My problem is like this :

I have a ActionForm with a list :


and i am able to iterate over it using logic:iterate and display the contents on the jsp by doing this


This works all very well but the problem is that the list "subjectAndGradeList" contains another list


"RemarksListDTO" class contains some properties and there getter and setters.

And i want to display the values of "remarkList" also on the jsp.

ie. some thing like this

Obviously this does not work but i want it achieve something like this .

What to put in side the nested logic:iterate tag i have no clue

In my Action Class i can iterate over the "remarkList" (for test purposes ).

But i need these values to be displayed on the jsp also .

I tried and tried and am still trying But no use .

Please help me solve this problem i know this is a basic problem but i am stuck .

Thank you all in advance.

Regards.







12 years ago
Hi Experts ,

Am working on a projects that creates tickets and stores it in the data base we also store the date at witch the ticket is created .

Tickets date of creation is pretty important as we generate reports base on "Ticket Creation Date".

Our site is hosted in USA and we work in India . So the problem is that when we test our code in India it works perfectly OK .

But when we host it the ticket creation date changes , depending upon the date time difference between India and USA. ( works normally and consistently but with date time difference!!! )

Am trying to do something like this :


The Output : dateString = 18/02/2010
date Wed Feb 17 12:30:00 CST 2010
2010-02-17

See what the problem is i am getting what i want in the variable "dateString" ("IST" date) , but as soon as a try to parse it into Mysql date for insertion then again i get (US date)
that i do not want to insert into my data base .

I am doing this so that i parse it in the proper MySql format

In short i want to insert is this : 18/02/2010 (2010-02-18)
but instead the value getting inserted is : 2010-02-17

What is it that am doing wrong . What should i be doing instead?

Please help me out.

Regards,

12 years ago
Thank You John ,

I might be doing it wrong but some how it did not worked the first time , But sure am going to give it another try .

Rregards,

Anjali
12 years ago
Hi Experts ,

I have a question, i am writing a file depending upon the user's selection.

that is : If i select "abc" then i can download a file that contains relevant data with "abc" and there are various selection options.

something like this :



And then am providing an <a>tag link to download it from the specific location.

Here essentially am overwriting one file "Test.doc" over and over again .

Its working fine on the site and all but i have a question for you Experts

1] If multiple user log in and select different options what will happen will they both download the file containing the same data irrespective of what the other user have selected?
2] Shall I create a new file for every user, or will that be handled automatically by the servlet ?
3] If i keep on creating new files how should i get rid of them once they are not required ?


I am not considering to create a temp file .

Give me directions i do not want to end up writing a very very bad web application .

I am using struts1.3.

Thank you and Regards.



12 years ago
Hi,

1. Create a temp file
2. Write all the string into that file.



Am just confused about where this temp file should be stored to avoid any problems at the time of deployment.

Right now during development i can store it any where but which is the right and best place to store or create the temp file, to avoid deployment time troubles.



And i tried this code but as i said it returns the entire jsp and not the specific section of it .

Thank you ,

Regards.



12 years ago
HI Experts,

I am working on project in struts and tomcat 6.0 .

I am displaying some data on a jsp and i want that the data i am displaying on the jsp the user should be able to download it as a .txt or .html file. The data is basically a Array list of type String .
This data is coming dynamically from database and changes depending on user selection.

I tried some code from the net but the code returns all my other stuff from jsp like images,javascript etc. Its like looking at my jsp's source code.

I have the the Array List available at my Action Class. And i want that only the contents inside this Array list should only be downloaded .

I am stuck So please guide me through this . I cannot store this file on the server as the content of the file changes on every selection .

Thank you in advance ,

Regards.
12 years ago
Hi,

I am using eclipse from quite a while know and work with people who are working on it for even longer,
but you can not learn all the ins and outs of eclipse because,

1] its huge,
2]you do not need to know it inside out , just knowing the stuff that you need, will do just fine.

I always find the documentation provided with eclipse more the sufficient for things i need to look for .

Regards.
Hi Raja,

If you go with the common scene you would definitely want to go with the latest version of java(i.e 1.5).
Primarily because you get newer features, more predefined class and java 1.5 is faster the 1.4 .
And speed dose matter in an real time application.
So if you do not have something really BIG going for java 1.4 use 1.5

Hope this helps.
Regards.

12 years ago
Thanks a lot .
12 years ago
Hi Experts,

Its bugging me a lot so i am turning to the last resort i want to ask

Why is the code below is legal and produces an infinite loop.



is this because there is no condition to stop the loop?(for being infinite loop).
And why are we entering inside the loop

Regards,
Anjali
12 years ago
Hi Experts,

1] I have a domain say with URL : "www.abcd.com" and this site is up and running .

2] Now i have another .war file namely say "wxyz.war" (working)

what i want is to deploy the second war "wxyz.war" on the same tomcat so that my second web site is also up and running

that is some thing like this URL : "www.abcd.com/wxyz" and now the second war should run.

I know that this can be achieved by making appropriate changes in "server.xml"

1] But what changes i do not know .

2] Also where else do you need to make changes in my web application

Please guide me through this process !!!

Regards.
12 years ago
Hi,

Thank you for the response but then dose not this defeats the whole purpose of objects being immutable ?

Regards,

Anjali
12 years ago
HI All,

I was just kidding around with some core concepts of java in my spare time , very small nothing too big at all ,

Strings and Objects as a whole are mutable in java and "==" should not work on them , that is in theory that is.

But every time i write a code like this

public class MutableString {

public static void main(String[] args) {


String i = "hi";
String j = "hi";

if(i==j)
{
System.out.println("The Strings are equal !!!");
}
else
{
System.out.println("The Strings are NOT equal !!!");
}
}

}

The if part executes !!!
I get the Output : The Strings are equal !!! .

How is this happening its amazing i want to know what happens behind the seen?
How can one do see what is going on ?

Even more amazing is when i do this !!!

public class MutableString {

public static void main(String[] args) {


Integer i = 100;
Integer j = 100;

if(i==j)
{
System.out.println("The Integers are equal !!!");
}
else
{
System.out.println("The Integers are NOT equal !!!");
}
}

}
And again the if part executes !!!
I get the Output : The Integers are equal !!! .

But this is a consistent behavior with the first "String" example program. Right!!!

Now the magical part , I change the value of variable i and j to 1000 as given below

public class MutableString {

public static void main(String[] args) {


Integer i = 1000;
Integer j = 1000;

if(i==j)
{
System.out.println("The Integers are equal !!!");
}
else
{
System.out.println("The Integers are NOT equal !!!");
}
}

}

and guess what i get the else part as an output : The Integers are NOT equal !!!

Please experts let this misery be unfold to me

Regards,
Anjali

12 years ago