Kr. Pallav

Ranch Hand
+ Follow
since Mar 06, 2010
Kr. likes ...
Netbeans IDE Eclipse IDE Spring
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 Kr. Pallav

In web.xml

Change is
7 years ago
to xml and check if your jsp hello.jsp is inside WEB-INF/jsp folder
7 years ago
I don't know exactly what are you asking , hopefully you want to do internationalization
below are code which set default language in spring with internationalization

For complete code you can refer Here

But this is on my assumption , if it is different than what you are asking , please clarify your question a bit more.
7 years ago
Are your other operation with database working ? Can you post codes for connection ?
7 years ago
Change to
7 years ago
I want to build a system where there are multiple users and can see if I update something , [based on certain conditions] almost like twitter and facebook , how can I write a live streaming updates with Spring , will spring social be of any help ,
System should fetch my updates from my websites and also from Facebook & twitter
Or should I approach another way , please guide.
7 years ago
Thanks a lot Bill. It's working now. Loved the learning experience with you

8 years ago
Yes Bill its under DaoImpl annotated with @Repository . If I try @value it takes Environment object is not null but when I do environment.getProperty it doesnt read it annd becomes null . Below is what I am doing
In DaoImpl

In method

in xml

8 years ago
imported the same and annotated with Autowire but I was getting nullpointer over it so , thought I need to define in xml for same or any component-scan to get it
8 years ago
Bill one more thing might be silly but I am not getting the class to which Implements Environment , or Do I need to write my own implementation to use it ..
8 years ago
Hii Bill,
Pretty much what I required , Anyway Since annotations are run at compile time so I guess exactly the kind of magic I wanted will not happen but yeah, I didn't wanted to write any new codes for application to read property files and your solution works that way.

Thanks a lot Bill.
8 years ago
Hi everyone,
I was searching if I can read any property file with annotation in Spring 3.x. I got @Value annotation which does the work almost. but there is a concern
Say I use following

Now I can use it from method and get the value of base.url.
But say if I want to read a sql property from from my DAO layer which has many queries I don't want to create that many variables ,for each query can I use anything which reads properties from method like
8 years ago
Dear All,
Greetings !!!
I just have been seeing few projects recently. There is a strange feeling I have.
We normally (if we are using Spring, then most of the times) expose our libraries to application with interface rather directly with class. Sure I know that if we have multiple implementation of methods we should use interface, I also understand the conditions when we should choose abstract class over interface but to my surprise I fail to understand
exposing entire class structure with interfaces. For example
If we are use Action (Struts) and Controller(Spring) , in either case we inject Service Interface.
Service Interface is accessed by its Impl method ,which injects DAO Interface
DAO Interface is accessed by its Impl

Of course you may add few more layers viz. Business and access that with BusinessImpl class .*
I understand the reason if you have multiple class implementing this interface giving it real meaning, but why there is 90 % times one to one mapping of One class One interface might be fore sighting future to add some more classes with similar methods ,again a future which 95% + times never comes in any project I guess.
Of course I guess you will not answer me saying it’s done because of IoC principal because we anyway if need only one class ,we still can follow IoC and can inject direct class object does no harm and even reduce code and load in JVM (Load in JVM I am still not sure about , Since they say Interface don’t create objects but JVM load balancer take reverse hit using so many interfaces and classes with only one to one mapping)
* Impl is just the most common name you can use whatever.
Sorry , I declared package structure wrongly .... while making package in "Source packages" in netbeans foolishly I made inside "Test Packages" it's working now with same above code .. Thanks for help and really sorry for putting such poor efforts and mistakes

9 years ago
Yup Mashal I already tried those tricks but in vein .. anyway I really appreciate you for your time and patience ,I am trying here lets see if I get the solution I will post too... my app name is JEE6 I tried putting "/JEE6/ShowParameters"
9 years ago