You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Steve Ruby <st...@rubysolutions.com> on 2001/03/12 18:07:51 UTC

Re: New Turbine User needs (a lot of) help


Your screen code should extend one of the available
screen classes in Turbine (like VelocityScreen) and implement
doBuildTemplate(Rundata,Context)

The screen is not a servlet..
the URL to the screen is
http://myserver/myapplication/servlet/Turbine/template/Login
(unless you made changes to web.xml)

Turbine itself is the only servlet in a turbine setup all other
java clases are screens, actions and other stuff that you write to make
your screens and actions work.



jsoriano@es.wanadoo.com wrote:
> 
> Hi everybody:
> 
> I'm trying to run the Login.java from the 'tdk->Examples->Screens' folder.
> I've put it into my own src project folder (src/java/es/mycompany/modules/screens) and i've
> added a line like this
>         'package es.mycompany.modules.screens' to this file.
> After this i run the 'build.sh' script in order to compile the applications.
> Now i add an entry in the 'web.xml' file that looks like:
>         <servlet>
>                 <servlet-name>
>                         Login
>                 </servlet-name>
>                 <servlet-class>
>                         es.mycompany.modules.screens.Login
>                 </servlet-class>
>         </servlet>
> 
> Ok, everything seems perfect since here! (or not?)
> Now i start Tomcat (it's listening on 8080 port) and i try the servlet
> using Netscape and the url:
> 
> http://my_poor_machine:8080/my_aplication_name/servlet/Login
> 
> All that i get is an 500 error notifying something like:
> 
> "Internal servlet error:
> 
> java.lang.ClassCastException: es.mycompany.modules.screens.Login
>         at org.apache.tomcat.core.SerletWrapper.loadServlet(ServletWrapper.java.268)
>         (...and a lot of lines like this)"
> ____________________________________________________________________________
> 
> Anybody can help me?
> 
> Regards:
>         Jaume

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


Re: New Turbine User needs (a lot of) help

Posted by "Albrecht F.Leiprecht" <al...@mail.ccc-casino.com>.
> > Hi everybody:
> >
> > I'm trying to run the Login.java from the 'tdk->Examples->Screens'
folder.
> > I've put it into my own src project folder
(src/java/es/mycompany/modules/screens) and i've
> > added a line like this
> >         'package es.mycompany.modules.screens' to this file.
> > After this i run the 'build.sh' script in order to compile the
applications.

Think about a vm/wm Document with the same name in templates/screens

Depending on the Configuration, the Login will be called automatically, or
you can "manually" call it by setting the Screen in either the Javafile or
the
(calling) document.

Example (untested):

in the Document:

    $data.getTemplateInfo().setScreen("Login")

I believe, there is a reference in the TemplateLink Object also...

    $link.setScreen("whatever")

will cause the above named screen to be executed...
ask me, if you need more info :) I'm just a beginner,
but I had the same difficulties understanding the principles

btw: the FSD might be a good source for you...

kind regards
Albrecht F. Leiprecht

URL:

 http://jakarta.apache.org/turbine/fsd.html

for the FSD



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