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)

javaprojectweb
  --> web-Inf
         -->servletconfig
               -->spring-security.xml


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
</property>
<bean>

any ideas?

thanks
Avatar of astaplesnerd
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
ASKER CERTIFIED SOLUTION
Avatar of Jay Roy
Jay Roy
Flag of United States of America image

Link to home
membership
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>${sql.map}</value> or <value ref="sql.map.id"/>.
Avatar of Jay Roy

ASKER

>>>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

ASKER

not satisfied with response