Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!


+ Follow
since Aug 07, 2008
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 Ishika

Hello ranchers,
Can one provide me with code for uploadin multiple files in spring.

Any help will be appreciated.
hello All,

I m able to download a file from server using spring..I can download text file,doc files etc. But not images.
I m using this code...

Any help will be appreciated..
thnks in advance
Hello ranchers,
can any one provide me with the code for downloading a file using spring.
thnks in advance

got that working to..
just added the following code which gets the file name.

Any ways thnks for the help.
Hello ranchers,
Thanks a lot now i m able to upload file.But facing one problem.
ie.If my file is text file ,it is not getting saved as text file,it is getting saved without any extension.For opening that file i have always do a
openwith -->Notepad.
any help will be appreciated.
Thanks in advance.
thnks,but my html file is same as the one you posted..but still it is not working.
hello ranchers,

My Controller Code :

My problem is :In my controller
MultipartFile multipart = multipartRequest.getFile("file1");
returns null....
Which is it returning null....

Please help me....
Hello All,
Please gimme somr sample project for uploading a file using spring.

Thanks in advcance
thnks...but i want a small that i can refer it .....apply the same to my project...
Can any one provide me a example application for uploading a file using spring.
I referred this link
but it not wroking.

Thanks in advance,
Hello Ranchers,
WE are using ireport for producing word documents.
My report has multiple section.Each section is put in a table.
Now,my problem is how to hide a table when no data is present in that section.
This has become a major issue...........
Thanks ,
Saloon Java Ranch User
Can any one help me to configure multiple database using spring and jdbc.

Problem Statement:
My application needs to have functionality of year wise login.So for that I have 3 datasources db0607, db0708, db0809 and by default it points to db0809. I thought of using AbstractRoutingDataSource.
However,I recognized a problem.I would switch to a Datasource say db0708, and then navigate around and realize that i am back at the default db0809. I can't seem to figure out how to fix this.How would i go about fixing this?

This is how my Code goes

Dao Code:

application-data.xml code :

<bean name="employeeDao" class="com.testdb.testeg.persistance.EmployeeDaoImpl">
<property name="dataSource">
<ref bean="dataSource">

<bean id="parentDataSource"
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url">

<bean id="dataSource0809" parent="parentDataSource">
<property name="username" value="${db.0809.username}"></property>
<property name="password" value="${db.0809.password}"></property>


<bean id="dataSource0708" parent="parentDataSource">
<property name="username" value="${db.0708.username}"></property>
<property name="password" value="${db.0708.password}"></property>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="WEB-INF/"/>

<bean id="dataSource" class="com.testdb.testeg.web.LoginRoutingDataSource">
<property name="targetDataSources">
<map >
<entry key="com.testdb.testeg.web.LoginType.login0708" value-ref="dataSource0708"/>
<entry key="com.testdb.testeg.web.LoginType.login0809" value-ref="dataSource0809"/>
<property name="defaultTargetDataSource" ref="dataSource0809"/>

Thanks in Advance,
Java Ranch User
[ August 11, 2008: Message edited by: dev Cats ]