entity refs in struts config files

2003-06-26 Thread Derek Scherger
Does anyone know if entity refs (such as those described at the bottom 
of http://jamesholmes.com/struts/) work properly in struts 1.0.2 config 
files? They "sort of" seem to work for me, except that relative 
references seem to be relative to ${TOMCAT_HOME)/bin rather than 
${TOMCAT_HOME}/webapps/foocontext/WEB-INF where the struts config file 
is located.

Any info would be much appreciated!

Thanks,
Derek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: entity references in struts config xml

2003-06-19 Thread Derek Scherger
James Mitchell wrote:

On Wednesday 18 June 2003 17:14, Derek Scherger wrote:
 

James Mitchell wrote:
   

On Wednesday 18 June 2003 15:23, Derek Scherger wrote:
 

Does anyone know how to get entity references to work with struts 1.0.2
under tomcat 4.1.24?
The first few lines of my struts-config.xml look like this:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";
[]

  &barfoo;

When it comes to processing the &barfoo; entity reference it fails with
a file not found exception. Running tomcat with strace under linux I can
see it trying to find barfoo.xml in the tomcat/bin directory rather than
under the appropriate context's WEB-INF directory. Note that the same
entity reference in web.xml works fine (i.e. it looks for barfoo.xml
under the appropriate context's WEB-INF directory which is where I would
expect a relative reference to be relative to).
Using an absolute reference for the file isn't really a solution because
the environment this app has to run in is a mix of linux, windows and
solaris. (i.e.
"C:\\foo\\bar\\tomcat\\webapps\\foobarcontext\\WEB-INF\\barfoo.xml"
won't work on all platforms that is has to work on.).
   

While not an exact solution to your dilema, why don't you just use
multiple config files?
 

I'm not entirely sure what you mean by this, it might only be available
in struts 1.1.
The problem we have at the moment is that we have multiple web apps that
share
a bunch of common struts (and tiles) configuration. Rather than having
multiple copies
of this shared configuration in various config files I'd like to have on
copy of the shared
stuff referenced by the various config files.
   

Yes, I undertand your requirements.  There are patches available to enable 
backward compatibility to Struts 1.0.  See http://jamesholmes.com/struts/ for 
complete details.

Should you choose to use the Struts Console (also available from that same 
url), it doesn't work with entity refs.  That's one of the items standing in 
the way of supporting OJB configuration in the near future.

Good luck with whatever you choose.

I've just had a look at the url you mention above and it does seem to 
indicate that
entity refs in the struts config files should work. Before I go patching 
to get multiple
config files to work with 1.0.2 I'd like to get to the bottom of the 
problem I have
using entity refs. We're not using the struts console so I'm not too 
worried about
breaking that.

The problem that I have is that entity refs are relative to tomcat bin 
rather than the
context's WEB-INF.

BTW, thanks for the quick responses!

Cheers,
Derek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: entity references in struts config xml

2003-06-18 Thread Derek Scherger
James Mitchell wrote:

On Wednesday 18 June 2003 15:23, Derek Scherger wrote:
 

Does anyone know how to get entity references to work with struts 1.0.2
under tomcat 4.1.24?
The first few lines of my struts-config.xml look like this:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";
[]

   &barfoo;

When it comes to processing the &barfoo; entity reference it fails with
a file not found exception. Running tomcat with strace under linux I can
see it trying to find barfoo.xml in the tomcat/bin directory rather than
under the appropriate context's WEB-INF directory. Note that the same
entity reference in web.xml works fine (i.e. it looks for barfoo.xml
under the appropriate context's WEB-INF directory which is where I would
expect a relative reference to be relative to).
Using an absolute reference for the file isn't really a solution because
the environment this app has to run in is a mix of linux, windows and
solaris. (i.e.
"C:\\foo\\bar\\tomcat\\webapps\\foobarcontext\\WEB-INF\\barfoo.xml"
won't work on all platforms that is has to work on.).
   

While not an exact solution to your dilema, why don't you just use multiple 
config files?
 

I'm not entirely sure what you mean by this, it might only be available 
in struts 1.1.
The problem we have at the moment is that we have multiple web apps that 
share
a bunch of common struts (and tiles) configuration. Rather than having 
multiple copies
of this shared configuration in various config files I'd like to have on 
copy of the shared
stuff referenced by the various config files.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


entity references in struts config xml

2003-06-18 Thread Derek Scherger
Does anyone know how to get entity references to work with struts 1.0.2 
under tomcat 4.1.24?

The first few lines of my struts-config.xml look like this:


http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";
[]
>

   &barfoo;

When it comes to processing the &barfoo; entity reference it fails with 
a file not found exception. Running tomcat with strace under linux I can 
see it trying to find barfoo.xml in the tomcat/bin directory rather than 
under the appropriate context's WEB-INF directory. Note that the same 
entity reference in web.xml works fine (i.e. it looks for barfoo.xml 
under the appropriate context's WEB-INF directory which is where I would 
expect a relative reference to be relative to).

Using an absolute reference for the file isn't really a solution because 
the environment this app has to run in is a mix of linux, windows and 
solaris. (i.e. 
"C:\\foo\\bar\\tomcat\\webapps\\foobarcontext\\WEB-INF\\barfoo.xml" 
won't work on all platforms that is has to work on.).

Thanks for any info!

Cheers,
Derek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]