Abhish Sharma

Greenhorn
+ Follow
since Nov 14, 2011
Merit badge: grant badges
For More
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 Abhish Sharma

Where you are declaring your bean "SessionFactory" there is a space while defining the class make sure you spell word correctly.
Thanks all. I am done with it. I used bind() method to handle my error. View resolver is necessary
12 years ago
OK i am using multiActionController. So can any one tell me how could i get the current value of form as object like we used to get in onSubmit() method
12 years ago
Whenever i am trying to access a page my view resolver gives above error. So I use handleRequestInternal(Http....)
But when i use this method in my controller, I am not able to use onSubmit() method. Can any one help me out in this
12 years ago
Thanks for reply but my problem in am not able to add my bean to JNDI. It is not getting the bean ref so that jndi tree is made.

And as far as manager which is commented out is simply because it would end up giving multiple declaration for bean manager. How would i add it to jndi. If you want I can add my whole code there.

Andrew Gabriel wrote:I ran into this thread i find very helpful. Spring and EJB can be used interchangeably. It depends on the project at hand.

https://coderanch.com/t/320460/EJB-JEE/java/Advantages-EJB-JPA-over-spring



Thanks gabriel and jeanne, but my problem is severe.
Now i started my application and about to come at end of module1 but i am facing problem in calling ejb from spring. Somewhat in jndi name. service-name not bound is what i get every time. Can you help me out to get rid of it. My servlet dispatcher named spring-app.xml is



and i get this error every time
Can any suggest me some links or pdf's which could help me in developing one application using all three. I tried my best but till now i only got Failure.Can some one suggest me how can i develop the application> And most important i am new to all the three technology although i got few concept of spring and hibernate. Or any sample application which just fetch all the data from database and allow entering of Data. HELP ME PLEASE!!!1
I am trying to develop one application which shows few data of all candidate. I am using spring and Ejb. My web portion is handled by spring and service through EJB and connectivity through hibernate. But when ever i am trying to start the the server its showing error,

org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'Manager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: ejb not bound

I know i am doing something wrong in applicationContext.xml where spring is integrating with EJB. Can any body help me out.I am in a serious help as I am stuck on this from past 3 days. My applicationContext.xml is


For the ref. I am adding rest of my code also. Please Help!!!

My Controller

Remote Interface(This is EJB portion and in jar)



Interface Implementation


My ejb-jar.xml


Rest of my file is domaincontext containing connection and one xml file which contains mapping of jsp with controller, which calls applicationContext bean.

Can any help me out What wromg i m doing???!!!

Yatish Sonkeshariya wrote:Hello Tim,
Why we should not to write java-code in jsp and wht dou you mean by "Java code has no place in JPSs" ?



Java code should not be written in JSP simply because when you need to change the code , this becomes quite hectic. Apart from that code get engraved in JSP and MVC architecture gives you rather more flexibilty. So that when you need to change some portion of code like adding or removing some field you need not to scam all the java files to add the associated document.
MVC architecture clearly distinguished Model,controller and view.
12 years ago
Hello friends.
There is a simple problem which is working in wndows xp but not in windows 7. Can any one suggest me something fruitful.

Ok My problem is.....
I need o choose a file from network using file chooser. So i wrote the code as follows
JFileChooser fileChooser = new JFileChooser();
FileNameExtensionFilter filter = new FileNameExtensionFilter ("Excel files", new String[] {
"xls", "xlsx" });
fileChooser.setFileFilter(filter);
fileChooser.setCurrentDirectory(new File("C:\\Documents and Settings\\$USER$\\NetHood"));
int status = fileChooser.showOpenDialog(this);

The line C:\\Documents and Settings\\$USER$\\NetHood is working fine for XP but not in windows 7 for obvious reason. That is in 7 we have somewhat different directory structure. So can any one suggest me what should i change in my code so that i get the same result as what i was getting in winXP. It is quite important to mention that path users\$USER$\AppData\Roaming\Microsoft\windows\Network Software is not working here
12 years ago

Rob Spoor wrote:With java.io.File you can't get all the shares, because the share is the lowest part that's still a directory; the server itself (\\server) isn't.

Perhaps JCIFS does not have this limitation, and you can use SmbFile and its listFiles methods to find the shares themselves. I haven't used JCIFS myself so I couldn't tell you.




K. thanks for your concern
12 years ago

Rob Spoor wrote:If the current user has access to the share, you can just use java.io.File to work with the files. Just note that the file path must start with \\. When using that in a String you get \\\\. Alternatively, java.io.File is smart enough to convert any / into \ if needed, so you can also use only // (and then / to separate paths in the remainder of the path).




Thank you for replying sir, but i need the name of all the shared folder so that i change my file path acc. to requirement. So that if required i could later retrieve the file if required.
12 years ago
Hello friend ,
I am developing a program which reads some excel file from a remote computer and stores the path in UNC format. That is <machine name>\<shared folder name or say file path starting from shared folder>\<file name>.
I am storing the path in as local machine format right now. like wise c:\some_folder1\shared_folder\some_folder3\file.xls. But I need to store it as comp_name\shared_folder\some_folder3\file.xls. I know how to get all other, but How would i get to know the shared folder name and change my path acc. to my requirement. Yes this to note that I also retrived the name of all the shared folder through net share, but is not able to extract the name of local shared folder name. Can any one help me out in this???
12 years ago