This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!

Jass Singh

Ranch Hand
+ Follow
since Mar 30, 2006
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 Jass Singh

Both can be enjoyed at outlets serving them,
or can be ordered for home delivery as well
13 years ago
Try following links:

Team-Bhp (Indian Car Scene)

Team-Bhp (What Car)

It is a forum for Car lovers with focus on indian car market.

Regards
Jass
[ February 06, 2007: Message edited by: Jass Singh ]
13 years ago
Hi,

Sometime back I implemented weblogic clustering in active-active mode.
Now I have to do clustering of servers in Active-Passive mode.

My question is, can we do it with weblogic itself or we need some other clustering software/hardware (e.g. OS level clustering etc.). I tried googling on "weblogic active-passive clustering" but could not find required info.

I am using folling:

Weblogic 8.1 SP5
Windows 2003 Server

Thanks in advance

Regards,
Jass
13 years ago
Movie name I don't remember, the quote goes like this:

Husband(to wife): You are looking beautiful.
Wife: Thats because I am looking at you.
Huband: Thats because I am looking at you too.

Regards,
Jass
14 years ago

Originally posted by Shailesh Pillai:
Thanks a LOT Jass and Brent,
It worked.
Nothing was wrong with the Java Code.
The problem was - I was missing the semi-colon between
<html optionsCollection>.
I think you might have also missed it in the post - Jass.
But once again thanks a lot, the funda is clear now.

Regards,
Shailesh

[ May 09, 2006: Message edited by: Shailesh Pillai ]



No I didn't miss it in my post. The real culprit is smiley code of Javaranch. Combination of : and small 'o' is interpreted as a smiley. See your 1st post, it showing a smiley in red color.

Even in my post though I put colon : between <html and options but it due some procssig for smilies it got removed. But anyways, you found your way thats the main point.

Regards,
Jass
14 years ago

Originally posted by Harpreet Hira:
However, you can share data using HttpServletRequest/Response when you forward request to a different servlet in different application.



It is not possible to forward a request to another application. However you can do that by using reasponse.sendRedirect(). But then again I dont know that will help in sharing session data.

Regards,
Jass
14 years ago

[/qb]<hr></blockquote>
You missed the point in my above post. I was asking for cheking arraylist size in JSP. Try doing that.

Regarding following check done by you:



Are you sure "success" & "failure" are not pointing to same JSP.
Check <forward.. > tag in struts-config.xml for "failure" and "success" and ensure that.

Regards,
Jass
[ May 05, 2006: Message edited by: Jass Singh ]
14 years ago

Originally posted by Shailesh Pillai:
Do i need to do logic:iterate in my JSP as specified by Raghavendra.



Note: Allover in code below I used "empForm" assuming that in struts-config.xml you have defined it like <form-bean name="empForm" ..../>. If you have used some other name then replace "empForm" with that name.

Yes you can use that as well. Use:



Another options is to use follwoing. This is better alternative to <html options... :



But main concern is to check if employees arraylist that you are getting in JSP has some values or is it getting reset somewhere. To check length of arraylist in JSP do following:



Regards,
Jass
14 years ago

Originally posted by Shailesh Pillai:

But, now i am getting an empty drop-down box with no values.
I am trying out....



1.Are you sure that your query is returning any data.

2. Make sure that code in execute() of EmpAction is just like what i wrote in post#8 above.

3. To see if ArrayList is being populated, add follwing line after while{...} loop:
System.out.println(empList.size());
This will tell you how many Employee objects are added to ArrayList

If you still get problem, post code of your execute() again.

Regards,
Jass
14 years ago
EmpAction :


Employee class is as specified by Jass Singh.
Pls help out as i am stuck on this for quite some days now.

[ May 04, 2006: Message edited by: Shailesh Pillai ][/qb]<hr></blockquote>

1. Shailesh, your EmpForm seems alright. However in EmpAction you seem to miss the point raised in 1st paragraph of Brent's post i.e. move line Employee emp=new Employee(); inside the loop.

2. EmpForm empForm=new EmpForm(); This line is the center of problem. In struts Action you never create Form bean instance. Get EmpForm bean instance by type casting ActionForm that you get as parameter in execute() method of EmpAction.

3.Another issue is you are using two loops. One to get data form rs to results array and another to creat ArryaList from results. You can manage with one loop only.

here is the code that should go to execute() of EmpAction:



I assume you are doing other handling of struts like forwarding etc correctly.

Regards,
Jass
[ May 04, 2006: Message edited by: Jass Singh ]
14 years ago

Originally posted by Brent Sterling:
First off...for something like the code you posted to work, you would have to move the line "Employee emp=new Employee();" inside the for loop. Otherwise, each loop just updates the same instance and you will end up with a list full of duplicate objects.

- Brent



Ahh... how could I miss that.


Regards,
Jass
14 years ago
Wouldn't it be better if you use RandomAccessFile and directly call seek(length()-4) to move to last but 4th postion and read last 4 characters, rather than readnig whole file in a whilr loop.

Regards,
Jass
14 years ago

Originally posted by Justin Fox:
well can packages be defined as public?

cause if so..

just have package c public..



We can't specify access modifiers with package declaration.



and packages a and b extend package c



Also a package can't extend another package. Only a Class or Interface can do that

Regards,
Jass
14 years ago
You can have look at Java Boutique Struts tutorial as well.

Regards,
Jass
14 years ago