Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

gopal kishan

Ranch Hand
+ Follow
since Feb 23, 2005
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 gopal kishan

First of all there is no multiple instance of same Servlet. If more clients are accessing the Servlet then the container will create a thread for every request.

To answer your 1st question,

you can define that common variable in Web.XML which you want to share under <context-param> tag that way it will be shared by different client.

But if you use HttpSession it won't be shared by different Client but it will be shared by same client for different request.

for example Client opened a browser and hitting the servlet and the same client opened another browser hitting the servlet again.

To answer your point (1):
If you declare the variable in service method or accessing a property using HttpServeltRequest getParameter() method inside the service method it won't be shared by any thread at all. So it means no instance will be shared. these are thred safe by default.

But Session and application scope are not thread safe.

in EL , there are implicit scope objects, but those objects are not same as JSP implicit objects.

In EL all those implicit objects are map objects except PageContext which is same as JSP pageContext.

requestScope is just a Map of the request scope attributes, not the request object itself

In EL they just help you to specify what scope the values are in , but these are not the original objects, which means in JSP using scriptlet

here request refers to HttpServletRequest where as in EL

I hope you understand this.
The Symbol [] used to access map, bean, array, list.

In case of array you no need to use ${array["0"]} , you can simply use ${array[0]}, but how do you access map & bean? . There is no index concept in these two, map is based on key and bean is a POJO where you can retrieve the properties.

For accessing bean you have 2 options.



Thats why you have option for array to access the index item , either by using ["0] or [0].
Hi All,
I would like to take a SCJP exam. I don't have any java certication as of now.
What i want to know is before doing SCJP do i need any other java certification or no.

Please let me.

Hi All,

I found the problem and i resolved. Instead of overwriting LogoutFilter class, i implemented LogoutHandler and overwrite the method called logout(). That it. And in the XML configuration file add the following code

<bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
<constructor-arg value="/index.vm"/>
<ref bean="rememberMeServices"/>
<ref bean="testLogoutHandler"/>
<bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
<property name="filterProcessesUrl" value="/j_acegi_logout" />

<bean id="testLogoutHandler" class="com.somepackagename.somesubpackagename.TestLogoutHandler"/>

thats it. it works fine.
Hi All,
I am using acegi security for login & logout.i want to overwrite LogoutFilter class. bcos i want to do some operation when i logout. I wrote a class also. But the problem is when i start my server not even shows the page but it is automatically calls my UserDefinedLogoutFilter, and it goes like a infinite loop i am unable to do anything, i want to call this class only when i logout, do you have any idea why it is happening like this. I wrote another class for AuthenticationProcessFilter, that one works call only when i click login button. only logout creating issue.
I have a my module resource bundle and common application resource bundle,

i want to use application resource bundle in my module resource bundle.

i dont want to copy those contents from application resource bundle.

so how can i use application resource bundle in my module resource bundle.

is there is any way that i can import ???

please let me know

15 years ago
Hi I am new to unix, and build stuff.

But i need to do nightly build, for that i need to write a shell script which synchronize Perforce repository and do maven stuff and deploy it in the remote server.

can anybody have knowledge on this..

please let me know also.

thanks in advance
15 years ago
Hi All,

I am trying to find a solution for couple of days.

mine is not a legacy database. i am using oracle.

i have a parent and child table . my child table does not have a primary key.

it has only foreign key. So which column you will specify in <id> tag of child hbm file.

i specified foriegn key in <id> tag of child hbm.

<id name="foreignkey" column="FOREIGN_KEY">

and i also tried giving some other column which is in that child table.
<id name="age" column="AGE">
but the result i am getting is wrong.

for example:
i specified foreign key in <id> tag of child hbm. when i execute query for that id.

if there is two records for that id in child table.

when i display iam displaying two rows but the problem is first row printed twice. and the second original row is not showing. it means it overwrite the output with first record.

please if any body know this answer me.

thanks in advance
[ March 28, 2006: Message edited by: Mark Spritzler ]
Hi All,

Is it possible to use query string in JSF??.

like how we pass values in URL when you use JSP's.

" target="_blank">http://localhost:8080/pages/mypage.jsp?id=10[/CODE]

thanks in advance
16 years ago
Hi All,
Do you know, where the implementation of ResultSet, Statement, Connection are done.

In which package those implementation are done??

thanks in advance
Hi ,

instead of giving the list values in jsp , you can create a list in your backing bean and you can call that list in your jsf.

it will solve your problem.

for eg:

in backing bean:

private String eventType;
private static SelectItem[] allEventTypes = new SelectItem[] {
new SelectItem("Select All"),
new SelectItem("first"),
new SelectItem("second")

public SelectItem[] getAllEventTypes(){
return allEventTypes;

public static void setAllEventTypes(SelectItem[] allEventTypes) {
BackingbeanName.allEventTypes = allEventTypes;

getter and setter for eventType also.
in JSP:
<h:selectOneMenu id ="eventType" value="#{formName.eventType}" required="true">
f:selectItems value="#{formName.allEventTypes}"/>

hope this will help.

16 years ago
Hi Gerardo,

I got it. thanks.

what i did was i defined a clearAllValues() method in every backing bean.

Then in Search Menus command link i am calling these method first.
and set the navigation to the userinput page. so when it loads clear all the values and then it loads that search page.

thanks for your help...because of your idea i got this solution.

16 years ago
Hi Rahul,

yes, you are correct , if the field is readonly then we cant get the value in backing bean of JSF.

so what i did was i used <f:convertDateTime> and i wrote validation method to check the format of the date in my backing bean.

so anyway user can enter the date , if he enter wrong date then it will throw conversion error, if he enters wrong format then my validator method will fire.

to display the message i am using <h:message>

16 years ago