Link to home
Create AccountLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

access file between two java projects

hi guys
I have two java projects in my Eclipse IDE
javaprojectcore and javaprojectweb

javaprojectcore (has the below directory structure)

  --> respources  (folder)
       -->dao   (folder)
            -->jacks-sqlmap-config.xml   (file)

This is my second java project (has the below directory structure)

  --> web-Inf

The requirment is in my spring-security.xml i want to access jacks-sqlmap-config.xml. I tried couple of different options but no luck.

This is my spring-security.xml
<bean id="sqlMApClient" class="org.springframework.orm.ibatis.SQLMapClientFactory">
<property name="configLocation">  
<value> /javaprojectcore/resources/dao/jacks-sqlmap-config.xml </value> --> Here i want to access jacks-sqlmap-config.xml

any ideas?

Avatar of astaplesnerd

refer to it on the classpath (this is assuming that the project javaprojectcore is on classpath of javaprojectweb).

I think it would look like classpath://dao/jacks-sqlmap-config.xml
Avatar of Jay Roy
Jay Roy
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
You will need to look at spring's documentation. I do not remember the exact details.
You will declare something that essentially imports the content of jacks-sqlmap-config.xml as beans. You can then reference those beans just like they were defined in that file.
So it would likely be something liek <value>${}</value> or <value ref=""/>.
Avatar of Jay Roy


>>>This question will be closed on 1/21/2011 if there are no objections.

so does that mean i cannot ask a new question until then?
admin, can you please provide an answer?
Avatar of Jay Roy


not satisfied with response