If you're using Velocity, the URL needs to be to the template, rather 
than the screen that builds it - i.e. 
http://localhost:8080/cdtrack/servlet/cdtrack/template/User.vm

Otherwise, you'll have to modify User.vm to build the screen up all by 
itself, possibly using ECS.

w

Shaun Campbell wrote:

> Will
> 
> There is something that puzzles me about this. I have built your cdtrack
> application and I was trying to extend it to add another screen, only I keep
> getting a blank page (and no error) when I enter something like:
> 
> http://localhost:8080/cdtrack/servlet/cdtrack/screen/User
> 
> When I try the following: 
> 
> http://localhost:8080/cdtrack/servlet/Turbine/screen/User
> 
> I get a 404 'page cannot be found error'.
> 
> What should the URL to access another screen be?
> 
> Thanks
> 
> Shaun Campbell
> 
> -----Original Message-----
> From: Will Stranathan [mailto:[EMAIL PROTECTED]]
> Sent: 31 December 2000 21:19
> To: Turbine
> Subject: Re: http://localhost:8080/[appname]/servlet/[appname]
> 
> 
> Check the web.xml.
> 
> The first [appname] is the context.  That gets you to the application 
> named [appname], so the servlet container will check the [appname] 
> context path for WEB-INF/web.xml for other information....
> 
> /servlet/[appname] maps to the class org.apache.turbine.Turbine - the 
> /servlet/* path is picked up by 
> org.apache.tomcat.request.InvokerInterceptor, which redirects to the 
> appropriate servlet indicated in your web.xml file as a <servlet>.
> 
> You could shorten things (I *think*) by modifying your web.xml for your 
> application and adding something like this inside the <web-app>:
> 
> <servlet-mapping>
>    <url-pattern>/gofoo/*</url-pattern>
>    <servlet-name>[appname]</servlet-name>
> </servlet-mapping>
> 
> Of course, replacing [appname] with your appname, and you don't (of 
> course) have to use gofoo.  This would make the following work:
> 
> http://[servername]:8080/[appname]/gofoo/
> 
> And you COULD (I don't recommend it - see why in a second) do something 
> silly like
> 
> <servlet-mapping>
>    <url-pattern>/*</url-pattern>
>    <servlet-name>[appname]</servlet-name>
> </servlet-mapping>
> 
> And then EVERYTHING in that context would be handled by the Turbine 
> class.  The problem with this is that you can't have ANYTHING static in 
> your context - including images.  I'm sure there's SOME way around this, 
> to specify that URL's including /images are NOT handled by the servlet, 
> but I'm not positive.
> 
> Now, all this to say that I've tested these with a very basic 
> application, but I can't gurantee that all of Turbine would function 
> properly with those changes.  I'm not sure if anything else in the 
> framework needs the servlet to be handled by the interceptor.
> 
> And all the veterans are welcome to slap me on the hand for saying 
> something wrong.
> 
> All of this information is available in the Servlet specification, I 
> believe.
> 
> Will Stranathan
> 
> John wrote:
> 
> 
>> This is a newbie question. I downloaded tdk and it worked out of box, 
>> that's great. I found it's weird to have something like
>> 
>> http://localhost:8080/[appname]/servlet/[appname]
>> 
>> Could someone explain the syntax of this url?
>> 
>> John
>> 
>> 
>> 
>> ------------------------------------------------------------
>> To subscribe:        [EMAIL PROTECTED]
>> To unsubscribe:      [EMAIL PROTECTED]
>> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
>> Problems?:           [EMAIL PROTECTED]
> 
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to