You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Harippriya Sivapatham <hs...@pingtel.com> on 2001/06/14 15:18:45 UTC

accessing files in one context from files in another context

Hi everyone,
   I would like to know how i could access files in one context from files
in another context. My scenario is:
I have two war files - abc.war and xyz.war When deployed, these war files
will expand into two directories:
<TOMCAT_HOME>/webapps/abc/ and <TOMCAT_HOME>/webapps/xyz.

I would a JSP file or a java program in <TOMCAT_HOME>/webapps/xyz to import
and access the methods of the class file in
<TOMCAT_HOME>/webapps/abc/web-inf/com/ping/web/test.class. How can i do
that? Will having both the directories in my classpath do the work?

Another question is:
I want http://www.abc.com (this is just for an example) to point to
<TOMCAT_HOME>/webapps/abc and i want http://www.xyz.com to point to
<TOMCAT_HOME>/webapps/xyz. We are using Apache as our web server. I think
that using Virtual hosts will let me do this. Should i define the virtual
host in both the conf file of apache and server.xml file of Tomcat?

I think many of you would have come across this situation. Hence i would
like to get your ideas rather than just reading through the docs.

Thanks in advance,
Harippriya

Pingtel Corporation,
Woburn, MA - 01801

Email: hsivapatham@pingtel.com
Phone: 781-938-5306 x 143


### TOMCAT+JsERV

Posted by Wils <we...@econnect.com.br>.
Hi i need jserv for run tomcat?

i receiving this erro in jserv install:

checking JSDK... configure: error: javax.servlet.Servlet not found in
/usr/local/share/java/classes/jsdk.jar
===>  Script "configure" failed: here are the contents of "config.log"
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:784: checking for a BSD compatible install
configure:837: checking whether build environment is sane
configure:894: checking whether /usr/local/bin/gmake sets ${MAKE}
configure:940: checking for working aclocal
configure:953: checking for working autoconf
configure:966: checking for working automake
configure:979: checking for working autoheader
configure:992: checking for working makeinfo
configure:1083: checking host system type
configure:1104: checking build system type
configure:1124: checking for ranlib
configure:1154: checking for gcc
configure:1267: checking whether the C compiler (cc -O -pipe ) works
configure:1283: cc -o conftest -O -pipe   conftest.c  1>&5
configure:1309: checking whether the C compiler (cc -O -pipe ) is a
cross-compiler
configure:1314: checking whether we are using GNU C
configure:1342: checking whether cc accepts -g
configure:1385: checking for ld used by GCC
configure:1448: checking if the linker (/usr/libexec/elf/ld) is GNU ld
configure:1464: checking for BSD-compatible nm
configure:1501: checking whether ln -s works
ltconfig:603: checking for object suffix
ltconfig:604: cc -c -O -pipe  conftest.c 1>&5
ltconfig:776: checking if cc PIC flag -fPIC works
ltconfig:777: cc -c -O -pipe -fPIC -DPIC  conftest.c 1>&5
ltconfig:829: checking if cc supports -c -o file.o
ltconfig:830: cc -c -O -pipe -o out/conftest2.o  conftest.c 1>&5
ltconfig:862: checking if cc supports -c -o file.lo
ltconfig:863: cc -c -O -pipe -c -o conftest.lo  conftest.c 1>&5
ltconfig:914: checking if cc supports -fno-rtti -fno-exceptions
ltconfig:915: cc -c -O -pipe -fno-rtti -fno-exceptions -c conftest.c
conftest.c 1>&5
ltconfig:958: checking if cc static flag -static works
ltconfig:959: cc -o conftest -O -pipe   -static conftest.c  1>&5
GNU ld version 2.10.0 (with BFD 2.10.0)
ltconfig:1635: checking if global_symbol_pipe works
ltconfig:1636: cc -c -O -pipe  conftest.c 1>&5
ltconfig:1639: eval "/usr/bin/nm -B conftest.o | sed -n -e
*[      ]\([ABCDGISTW]\)[       ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1
\2\3 \3/p' > conftest.nm"
ltconfig:1691: cc -o
conftest -O -pipe -fno-builtin -fno-rtti -fno-exceptions   conftest.c
conftstm.o 1>&5
configure:1685: checking whether /usr/local/bin/gmake sets ${MAKE}
configure:1724: checking for a BSD compatible install
configure:1777: checking whether ln -s works
configure:1800: checking for gcc
configure:1913: checking whether the C compiler (cc -O -pipe ) works
configure:1929: cc -o conftest -O -pipe   conftest.c  1>&5
configure:1955: checking whether the C compiler (cc -O -pipe ) is a
cross-compiler
configure:1960: checking whether we are using GNU C
configure:1988: checking whether cc accepts -g
configure:2026: checking for echo
configure:2061: checking for find
configure:2096: checking for sed
configure:2131: checking for test
configure:2166: checking for rm
configure:2201: checking for head
configure:2236: checking for tr
configure:2271: checking for grep
configure:2306: checking for cut
configure:2341: checking for touch
configure:2376: checking for cat
configure:2411: checking for cp
configure:2446: checking for make
configure:2481: checking for chmod
configure:2517: checking for GNU make
configure:2547: checking for working const
configure:2601: cc -c -O -pipe  conftest.c 1>&5
configure:2622: checking how to run the C preprocessor
configure:2643: cc -E  conftest.c >/dev/null 2>conftest.out
configure:2702: checking for ANSI C header files
configure:2715: cc -E  conftest.c >/dev/null 2>conftest.out
configure:2782: cc -o conftest -O -pipe   conftest.c  1>&5
configure:2806: checking for mode_t
configure:2839: checking whether time.h and sys/time.h may both be included
configure:2853: cc -c -O -pipe  conftest.c 1>&5
configure:2874: checking whether struct tm is in sys/time.h or time.h
configure:2887: cc -c -O -pipe  conftest.c 1>&5
configure:2910: checking for ANSI C header files
configure:3016: checking for gettimeofday
configure:3044: cc -o conftest -O -pipe   conftest.c  1>&5
configure:3251: checking for apxs
configure:3285: checking for perl
configure:3346: checking for Apache installation directory (assume shared
build)
configure:3351: checking for Apache include directory
configure:3356: checking for Apache configuration directory
configure:3361: checking for Apache library directory
configure:3374: checking for Apache layout consistency
configure:3485: checking for JDK location (please wait)
configure:3593: checking Java platform
configure:3621: checking for false
configure:3659: checking java
configure:3729: checking javac
configure:3799: checking javadoc
configure:3869: checking jar
configure:3938: checking JSDK
(end of "config.log")
*** Error code 1

Stop in /usr/ports/www/apache-jserv.
*** Error code 1

Stop in /usr/ports/www/apache-jserv.
*** Error code 1

Stop in /usr/ports/www/apache-jserv.
*** Error code 1

Stop in /usr/ports/www/apache-jserv.
*** Error code 1

Stop in /usr/ports/www/apache-jserv.
*** Error code 1

Stop in /usr/ports/www/apache-jserv.

Somebody  help me
----- Original Message -----
From: "Todd Wilson" <to...@starkmedia.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, June 14, 2001 10:26 AM
Subject: Re: accessing files in one context from files in another context


> Hello All,
>
> I'm pretty new to JSP, so please be patient. I'm working throught the
> tutorial "Deploying Web Applications to Tomcat" at
> http://www.onjava.com/lpt/a//onjava/2001/04/19/tomcat.html . Works fine
> until I get to the taglib deployment. I get the following error when the
jsp
> page containing the custom tag is called:
>
> "org.apache.jasper.compiler.CompileException:
> C:\tomcat\webapps\onjava\welcome.jsp(0,0) Unable to open taglibrary
/onjava
> : Parse Error in the tag library descriptor: External entity not found:
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"."
>
> I followed the tutorial to the letter, and after that didn't work I tried
> various other configuration options. Still can't get it.
> Any ideas anybody. All help greatly appreciated.
>
> Todd Wilson
> todd@starkmedia.com
>
>
>
>


Re: accessing files in one context from files in another context

Posted by Todd Wilson <to...@starkmedia.com>.
Hello All,

I'm pretty new to JSP, so please be patient. I'm working throught the
tutorial "Deploying Web Applications to Tomcat" at
http://www.onjava.com/lpt/a//onjava/2001/04/19/tomcat.html . Works fine
until I get to the taglib deployment. I get the following error when the jsp
page containing the custom tag is called:

"org.apache.jasper.compiler.CompileException:
C:\tomcat\webapps\onjava\welcome.jsp(0,0) Unable to open taglibrary /onjava
: Parse Error in the tag library descriptor: External entity not found:
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"."

I followed the tutorial to the letter, and after that didn't work I tried
various other configuration options. Still can't get it.
Any ideas anybody. All help greatly appreciated.

Todd Wilson
todd@starkmedia.com