You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Schneider <in...@iSOLUTION.de> on 2000/05/26 14:07:39 UTC
Renaming of URL
Hi all,
I guess this is a silly Newbie question but nonetheless I couldn“t
figure it out myself.
Everything works like a charme with my Tomcat and Apache configuration.
My URL lokks like: http://domain/foo/servlet/myservletname
But I want it to look like: http://domain/foo/myservletname
How can I accomplish that?
Thanks in advance
Alexander Schneider
--
__________________________________
iSOLUTION - Alexander Schneider
Rathausallee 10 53757 Sankt Augustin
T 02241 921 567-0 F 02241 921 567-89
as@iSOLUTION.de www.iSOLUTION.de
Newbie Question from another Newbie
Posted by Chris ten Den <ct...@itemus.com>.
I am trying to get the build.bat file to work for me.
Everything in the build.xml works up until the call to java denoted by the
*********** line below
The problem i am having is described by the *********** line area as well.
Any help would be appreciated.
------------------------------------------------------
Here is my build.bat
------------------------------------------------------
@ECHO OFF
ECHO Setting Class Paths
set CLASSPATH=.\;c:\jdk1.2.2\lib\tools.jar;c:\jdk1.2.2\jre\lib\rt.jar
ECHO Setting Environment Variables
set JAVA_HOME=c:\jdk1.2.2\
set TOMCAT_HOME=c:\tomcat\
set PATH=c:\jdk1.2.2\bin;c:\tomcat;c:\tomcat\development\itemus\;%PATH%
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\classes
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
rem Execute ANT to perform the requested build target
ECHO Executing Build - Please Wait
java org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6
%7 %8 %9
pause
------------------------------------------------------
Here is my build.xml
------------------------------------------------------
<project name="itemus" default="compile" basedir=".">
<property name="app.name" value="itemus"/>
<property name="deploy.home" value="${tomcat.home}/webapps/${app.name}"/>
<property name="dist.home" value="${deploy.home}"/>
<property name="dist.src" value="${app.name}.jar"/>
<property name="dist.war" value="${app.name}.war"/>
<property name="javadoc.home" value="${deploy.home}/javadoc"/>
<target name="prepare" init="init">
<mkdir dir="${deploy.home}"/>
<copydir src="web" dest="${deploy.home}"/>
<mkdir dir="${deploy.home}/WEB-INF"/>
<copyfile src="etc/web.xml" dest="${deploy.home}/WEB-INF/web.xml"/>
<mkdir dir="${deploy.home}/WEB-INF/classes"/>
<mkdir dir="${deploy.home}/WEB-INF/lib"/>
<copydir src="lib" dest="${deploy.home}/lib"/>
<mkdir dir="${javadoc.home}"/>
</target>
<target name="clean" init="init">
<deltree dir="${deploy.home}"/>
</target>
<target name="compile" depends="prepare" init="init">
******************************************************************
<javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes"
classpath="${deploy.home}/WEB-INF/classes"
debug="on" optimize="off" deprecation="off"/>
******************************************************************
The error returned is that it cannot find the srcdir. If I use src/*, I get a
message which
shows the path it makes (errored of course because of the *). The path is
right and the
directory exists where is should.
******************************************************************
</target>
<target name="javadoc" depends="prepare" init="init">
<!-- TODO -->
</target>
<target name="all" depends="clean,prepare,compile,javadoc" init="init"/>
<target name="dist" depends="prepare,compile" init="init">
<jar jarfile="${dist.home}/${dist.src}"
basedir="."/>
<jar jarfile="${dist.home}/${dist.war}"
basedir="${deploy.home}"/>
</target>
</project>
RE: Renaming of URL
Posted by Kevin Jones <ke...@develop.com>.
You need something like the following in your web.xml file -
obviously your servlet names will be different.
<servlet>
<servlet-name>Simple</servlet-name>
<servlet-class>ewebjava.Simple</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Simple</servlet-name>
<url-pattern>/Simple</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Simple</servlet-name>
<url-pattern>*.sml</url-pattern>
</servlet-mapping>
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: Alexander Schneider [mailto:info@iSOLUTION.de]
> Sent: 26 May 2000 13:08
> To: tomcat-user@jakarta.apache.org
> Subject: Renaming of URL
>
>
> Hi all,
>
> I guess this is a silly Newbie question but nonetheless I couldn“t
> figure it out myself.
>
> Everything works like a charme with my Tomcat and Apache configuration.
>
> My URL lokks like: http://domain/foo/servlet/myservletname
>
> But I want it to look like: http://domain/foo/myservletname
>
> How can I accomplish that?
>
> Thanks in advance
> Alexander Schneider
> --
> __________________________________
> iSOLUTION - Alexander Schneider
> Rathausallee 10 53757 Sankt Augustin
> T 02241 921 567-0 F 02241 921 567-89
> as@iSOLUTION.de www.iSOLUTION.de
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org