You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Vjeran Marcinko <ma...@jware.net> on 2003/12/14 12:50:16 UTC

Migrating TDK2.3's newapp to Tomcat4.1.29

Hi folks.

I had built newapp web-app following TDK2.3's instructions and everything runs fine when starting Tomcat built in TDK (using <tdk-home>/bin/catalina.bat start). But when I move this newapp to my separate Tomcat-4.1.29 webapps/ dir, and call this newapp using URL - http://localhost:8080/newapp/servlet/newapp , it gives me following error :

The requested resource (/newapp/servlet/newapp) is not available

So, what is the difference between Tomcat contained inside TDK, and separate one ?

Regards,
Vjeran


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by Vjeran Marcinko <ma...@jware.net>.
----- Original Message ----- 
From: "David Demner" <tu...@demner.com>
To: "'Turbine Users List'" <tu...@jakarta.apache.org>
Sent: Sunday, December 14, 2003 7:43 PM
Subject: RE: Migrating TDK2.3's newapp to Tomcat4.1.29


> Hi Vjeran,
> 
> The links I posted earlier should satisfy your requirements.  Basically, at
> the bottom of the Application's web.xml web-app section, I added this:
> 
>   <servlet-mapping>
>     <servlet-name>newapp</servlet-name>
>     <url-pattern>/servlet/newapp</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>newapp</servlet-name>
>     <url-pattern>/servlet/newapp/*</url-pattern>
>   </servlet-mapping>
> 
> (Earlier in the file, the servlet-class for the servlet-name newapp is
> indicated to be org.apache.turbine.Turbine)
> 
> I put 2 since and I didn't want to have /servlet/newapp* since it could map
> to /servlet/newapplication or whatever, which may be a security risk (I have
> no idea), but you need servlet/newapp/* for all the actions to map properly.

Ahh. Thank a bunch.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by David Demner <tu...@demner.com>.
> 
> I didn't try the suggestions given to me, because these all include that I
have to modify servlet engine's (Tomcat's) default configuration which isn't

> good ... 
> Any web application should have all it's requirements (including
configurations) under it's directory, thus be able to be dropped inside
servlet engine's > /webapps directory and to work instantly.
> As far as I understand, sample web app called 'newapp' inside TDK is
called by URL:
> http://localhost:8080/newapp/servlet/newapp
> Since pattern of URL has /servlet/ in itself, by servlet specs it means
that part at the end should be name of servlet (for eg. 
> org.apache.turbine.SOMEServlet), and since it is obvious that it's not the
case above, it has to be some mapping name for that servlet ... These
mappings > should be declared in newapp's WEB-INF/web.xml file, but I don't
see any ?!
> 
> Some help?
> 
> -Vjeran

Hi Vjeran,

The links I posted earlier should satisfy your requirements.  Basically, at
the bottom of the Application's web.xml web-app section, I added this:

  <servlet-mapping>
    <servlet-name>newapp</servlet-name>
    <url-pattern>/servlet/newapp</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>newapp</servlet-name>
    <url-pattern>/servlet/newapp/*</url-pattern>
  </servlet-mapping>

(Earlier in the file, the servlet-class for the servlet-name newapp is
indicated to be org.apache.turbine.Turbine)

I put 2 since and I didn't want to have /servlet/newapp* since it could map
to /servlet/newapplication or whatever, which may be a security risk (I have
no idea), but you need servlet/newapp/* for all the actions to map properly.

Good luck,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by Vjeran Marcinko <ma...@jware.net>.
----- Original Message ----- 
From: "Terry McBride" <te...@boxitllc.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Sunday, December 14, 2003 5:47 PM
Subject: Re: Migrating TDK2.3's newapp to Tomcat4.1.29


> Make sure a line like this exists in your_tomcat_root/conf/server.xml:
> 
>        <Context path="/YourWebappName" docBase="YourWebappName"
> reloadable="false"/>

I didn't try the suggestions given to me, because these all include that I have to modify servlet engine's (Tomcat's) default configuration which isn't good ... 
Any web application should have all it's requirements (including configurations) under it's directory, thus be able to be dropped inside servlet engine's /webapps directory and to work instantly.
As far as I understand, sample web app called 'newapp' inside TDK is called by URL:
http://localhost:8080/newapp/servlet/newapp
Since pattern of URL has /servlet/ in itself, by servlet specs it means that part at the end should be name of servlet (for eg. org.apache.turbine.SOMEServlet), and since it is obvious that it's not the case above, it has to be some mapping name for that servlet ... These mappings should be declared in newapp's WEB-INF/web.xml file, but I don't see any ?!

Some help?

-Vjeran


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by Terry McBride <te...@boxitllc.com>.
 Make sure a line like this exists in your_tomcat_root/conf/server.xml:

       <Context path="/YourWebappName" docBase="YourWebappName"
reloadable="false"/>

You can make reloadable true if you want to add newly compiled classes to
your webapp without restarting.  It's a performance cost so if this is a
production server false is recommended.

TMcB

----- Original Message ----- 
From: "Peter Riegersperger" <ri...@subnet.at>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Sunday, December 14, 2003 11:36 AM
Subject: Re: Migrating TDK2.3's newapp to Tomcat4.1.29


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On Dec 14, 2003, at 12:50, Vjeran Marcinko wrote:
>
> > Hi folks.
> >
> > I had built newapp web-app following TDK2.3's instructions and
> > everything runs fine when starting Tomcat built in TDK (using
> > <tdk-home>/bin/catalina.bat start). But when I move this newapp to my
> > separate Tomcat-4.1.29 webapps/ dir, and call this newapp using URL -
> > http://localhost:8080/newapp/servlet/newapp , it gives me following
> > error :
> >
> > The requested resource (/newapp/servlet/newapp) is not available
> >
> > So, what is the difference between Tomcat contained inside TDK, and
> > separate one ?
>
> a had the same problem with a turbine 2.2 application. look at
> tomcat/conf/web.xml for this setting:
>      <servlet>
>          <servlet-name>invoker</servlet-name>
>          <servlet-class>
>            org.apache.catalina.servlets.InvokerServlet
>          </servlet-class>
>          <init-param>
>              <param-name>debug</param-name>
>              <param-value>0</param-value>
>          </init-param>
>          <load-on-startup>2</load-on-startup>
>      </servlet>
>
> it is commented out per default. removing the comment worked for me.
>
> peter
>
>
> peter riegersperger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (Darwin)
>
> iD8DBQE/3JGHIMP39JYOy9IRAnAMAKCrnbXZdLyekHc5hSZcja5AW0DsYgCeIfaD
> IpiF4PBWovdHhZDYNwoUsDc=
> =KqKd
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by David Demner <tu...@demner.com>.
> But apparently, the invoker shouldn't be run:
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#evil
> 
> But I'm not sure what the alternative is...  Any suggestions?
> 

Ok...  Found the answer to my own question.  Just above the bookmark on that
page there are 3 links which explain alternatives.

Silly, silly me.  

Here's the one I used:

http://marc.theaimsgroup.com/?l=tomcat-user&m=104327383710262&w=2

David


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by David Demner <tu...@demner.com>.
> 
> a had the same problem with a turbine 2.2 application. look at 
> tomcat/conf/web.xml for this setting:

<snip />

> 
> it is commented out per default. removing the comment worked for me.
> 

Later on in the file, there's this:

        <servlet-name>invoker</servlet-name>

        <url-pattern>/servlet/*</url-pattern>

which is commented out by default (actually, the other poster's lines
weren't commented out in my file).

But apparently, the invoker shouldn't be run:

http://jakarta.apache.org/tomcat/faq/misc.html#evil

But I'm not sure what the alternative is...  Any suggestions?

Good luck,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Migrating TDK2.3's newapp to Tomcat4.1.29

Posted by Peter Riegersperger <ri...@subnet.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Dec 14, 2003, at 12:50, Vjeran Marcinko wrote:

> Hi folks.
>
> I had built newapp web-app following TDK2.3's instructions and 
> everything runs fine when starting Tomcat built in TDK (using 
> <tdk-home>/bin/catalina.bat start). But when I move this newapp to my 
> separate Tomcat-4.1.29 webapps/ dir, and call this newapp using URL - 
> http://localhost:8080/newapp/servlet/newapp , it gives me following 
> error :
>
> The requested resource (/newapp/servlet/newapp) is not available
>
> So, what is the difference between Tomcat contained inside TDK, and 
> separate one ?

a had the same problem with a turbine 2.2 application. look at 
tomcat/conf/web.xml for this setting:
     <servlet>
         <servlet-name>invoker</servlet-name>
         <servlet-class>
           org.apache.catalina.servlets.InvokerServlet
         </servlet-class>
         <init-param>
             <param-name>debug</param-name>
             <param-value>0</param-value>
         </init-param>
         <load-on-startup>2</load-on-startup>
     </servlet>

it is commented out per default. removing the comment worked for me.

peter


peter riegersperger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE/3JGHIMP39JYOy9IRAnAMAKCrnbXZdLyekHc5hSZcja5AW0DsYgCeIfaD
IpiF4PBWovdHhZDYNwoUsDc=
=KqKd
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org