Thanks,

I've submitted a bug and uploaded a .war file that demonstrates the behavior.

-Jeff

 Scott M Stark <[EMAIL PROTECTED]>wrote:

I added a testcase to the web integration unit tests and the call to
getServletContext().getRealPath("/") works correctly there. Post
an ear or war that demonstrates the null return value as an attachement
to a bug at sourceforge.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: Jeff Goke
To: [EMAIL PROTECTED]
Sent: Monday, June 17, 2002 8:16 AM
Subject: [JBoss-dev] inconsistent behavior: jboss/tomcat 2.4.6 &
jboss/tomcat 3.0


I am seeing some inconsistent behavior that is proving problematic for me
between Jboss 2.4.6 with Tomcat 4.0.3 and Jboss 3.0.0 with Tomcat 4.0.3.
In particular, in our web tier we need to load additional configuration
files at startup time, that is, additional XML files are read and processed.
The way we get the location of the XML files is by using the
servletContext.getRealPath method. In Jboss 2.4.6/Tomcat 4.0.3 this works
fine. In Jboss 3.0.0/Tomcat 4.0.3 real path always returns null. For
example, I have a servlet that loads at startup time with the following:
CODE IN JBOSS 2.4.6/TOMCAT 4.0.3:
System.err.println ("REAL PATH == "+getServletContext().getRealPath("/"));
OUTPUT IN JBOSS 2.4.6/TOMCAT 4.0.3:
REAL PATH ==
C:\JBoss-2.4.6_Tomcat-4.0.3\jboss\tmp\deploy\Default\my.war\web1004\
CODE IN JBOSS 3.0.0/TOMCAT 4.0.3:
System.err.println ("REAL PATH == "+getServletContext().getRealPath("/"));
OUTPUT IN JBOSS 3.0.0/TOMCAT 4.0.3:
23:55:50,359 ERROR [STDERR] REAL PATH == null
Does anyone have any suggestions or work around ideas?
Thanks,
-Jeff




Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup


_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Reply via email to