Hum, since 5.0.6 tml fles can go to the webapp root folder.
:(

2007/11/14, Chris Lewis <[EMAIL PROTECTED]>:
>
> Where is your template for the start page (Start.tml)? If I'm not
> mistaken the archetype sticks it in WEB-INF, which I believe is wrong. I
> didn't run into a bug until I contributed a LibraryMapping to the
> component class resolver...
>
> Michael Bernagou wrote:
> > So is it why my start.tml is not found?? If yes (I'm really not sure),
> I'm
> > very surprised about the miss of flexibility T5 have...
> > For an existing project build in the usual way (Project/src,
> > Project/webroot), having to change this just for T5 is veru bad...
> >
> > 2007/11/14, Michael Courcy <[EMAIL PROTECTED]>:
> >
> >> Well it's a matter of convention
> >>
> >> When maven build the project, things are in the place they have to be.
> >>
> >> Michael Bernagou a écrit :
> >>
> >>> No I didn't because I don't understand why the webroot should be in
> the
> >>>
> >> src
> >>
> >>> directory.
> >>>
> >>> About that :
> >>> MyProject/src/papo/pages/
> >>> MyProject/src/papo/services/
> >>>
> >>> It is what I have but I wrote in my message
> >>> MyProject/src/papo.pages/
> >>> MyProject/src/papo.services/
> >>> instead, just to show it is packages in the point of view of eclipse
> and
> >>> java.
> >>>
> >>> The debug mode show me the Start.java is normally compiled and
> Tapestry
> >>> describe what it did with at runtime :
> >>> replacing method, etc...
> >>>
> >>> 2007/11/14, Joachim Van der Auwera <[EMAIL PROTECTED]>:
> >>>
> >>>
> >>>> Have you started using the project archetype? This is the easiest way
> >>>>
> >> to
> >>
> >>>> have a correct directory srtucture.
> >>>>
> >>>> Anyway, I think the paths should be
> >>>>
> >>>> MyProject/src/papo/pages/
> >>>> MyProject/src/papo/services/
> >>>>
> >>>> Kind regards,
> >>>> Joachim
> >>>>
> >>>> Michael Bernagou wrote:
> >>>>
> >>>>
> >>>>> I have something strange and it made me asking this question :
> >>>>>
> >>>>> What are the mandatory project tree elements? (sorry for my english
> I
> >>>>>
> >>>>>
> >>>> don't
> >>>>
> >>>>
> >>>>> now how to write it differently).
> >>>>>
> >>>>> So, my project is :
> >>>>>
> >>>>> MyProject/src/papo.pages/[all pages such as Start.java and
> >>>>>
> >>>>>
> >>>> Start.properties]
> >>>>
> >>>>
> >>>>> MyProject/src/papo.services/[ioc stuff]
> >>>>> MyProject/webroot/[all template such as Start.tml and Start_fr.tml]
> >>>>>
> >>>>> But I have this error :
> >>>>>
> >>>>> java.lang.RuntimeException Page Start did not generate any markup
> when
> >>>>> rendered. This could be because its template file could not be
> >>>>>
> >> located,
> >>
> >>>> or
> >>>>
> >>>>
> >>>>> because a render phase method in the page prevented rendering.
> >>>>>
> >>>>> ****************
> >>>>> Start.tml:
> >>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >>>>>    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> >>>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
> ">
> >>>>> <head>
> >>>>> <title>Paper and Pen Online</title>
> >>>>> </head>
> >>>>> <body>
> >>>>> <form t:type="BeanEditForm" object="login">
> >>>>>   <t:parameter name="password">
> >>>>>     <label t:type="Label" for="password"></label>
> >>>>>     <input t:type="PasswordField" t:id="password"
> >>>>>
> >> t:validate="required"
> >>
> >>>>> t:value="login.password" />
> >>>>>   </t:parameter>
> >>>>> </form>
> >>>>> <p>Si vous n'avez pas encore de compte, <t:pagelink
> >>>>>
> >>>>>
> >>>> page="Register">crees-en
> >>>>
> >>>>
> >>>>> un!!</t:pagelink></p>
> >>>>> <p color="red">${message}</p>
> >>>>> </body>
> >>>>> </html>
> >>>>> *******************
> >>>>> Start.java:
> >>>>> package papo.pages;
> >>>>>
> >>>>> import org.apache.tapestry.annotations.ApplicationState;
> >>>>> import org.apache.tapestry.annotations.InjectPage;
> >>>>> import org.apache.tapestry.annotations.Persist;
> >>>>> import org.apache.tapestry.ioc.annotations.Inject;
> >>>>> import papo.data.Login;
> >>>>> import papo.data.UserLite;
> >>>>> import papo.exception.PapoException;
> >>>>> import papo.model.User;
> >>>>> import papo.services.ApplicationService;
> >>>>> import papo.services.UserService;
> >>>>>
> >>>>>
> >>>>> /**
> >>>>>  * Start page of application papo.
> >>>>>  */
> >>>>> public class Start {
> >>>>>   private static final String SUCCESS = "Home";
> >>>>>   private static final String FAILURE = "Start";
> >>>>>
> >>>>>   @Persist
> >>>>>   private Login login;
> >>>>>   public Login getLogin() { return login; }
> >>>>>   public void setLogin(Login login) { this.login = login; }
> >>>>>
> >>>>>   private String message;
> >>>>>   public String getMessage() { return message; }
> >>>>>   public void setMessage(String message) { this.message = message; }
> >>>>>
> >>>>>   @ApplicationState
> >>>>>   private User user;
> >>>>>
> >>>>>   @InjectPage
> >>>>>   private Home home;
> >>>>>
> >>>>>   @Inject
> >>>>>   private UserService userService;
> >>>>>
> >>>>>   @Inject
> >>>>>   private ApplicationService applicationService;
> >>>>>
> >>>>>   String onSuccess() {
> >>>>>     try {
> >>>>>       user = userService.getAuthenticatedUser(login.getLogin(),
> >>>>> login.getPassword());
> >>>>>       if (user != null) {
> >>>>>         home.setUser(user);
> >>>>>         UserLite userLite = new UserLite(user.getLogin());
> >>>>>         applicationService.makeOnline(userLite);
> >>>>>         home.setUsers(applicationService.getUserList
> ().getUserList());
> >>>>>       }
> >>>>>       else {
> >>>>>         message = "Login ou Password inconnue. L'identification a
> >>>>>
> >>>>>
> >>>> échoué.";
> >>>>
> >>>>
> >>>>>         return FAILURE;
> >>>>>       }
> >>>>>     }
> >>>>>     catch (PapoException pe) {
> >>>>>       message = "La procedure d'identification a rencontré un
> probleme
> >>>>>
> >>>>>
> >>>> !!";
> >>>>
> >>>>
> >>>>>       return null;
> >>>>>     }
> >>>>>     return SUCCESS;
> >>>>>   }
> >>>>> }
> >>>>>
> >>>>> It didn't enter in Start.java (I put a debug point) because it was
> not
> >>>>>
> >>>>>
> >>>> able
> >>>>
> >>>>
> >>>>> to "compile" or "find" the Start.tml. Usually, when it found a
> >>>>>
> >>>>>
> >>>> compilation
> >>>>
> >>>>
> >>>>> problem, the error message explicitely explain where is the line in
> >>>>>
> >> the
> >>
> >>>>> template, but in my case, I have only a stack trace.
> >>>>>
> >>>>> When I see the Snapshot for the typicall project, there is something
> >>>>>
> >>>>>
> >>>> else as
> >>>>
> >>>>
> >>>>> Project tree, and I don't want to follow the architecture. Having
> the
> >>>>> webroot folder in the src/main and the java in the src/main/java is
> >>>>>
> >> not
> >>
> >>>>> logic for me.
> >>>>> A web application is not defined like that usually, why to change
> the
> >>>>>
> >>>>>
> >>>> way?
> >>>>
> >>>>
> >>>>> But this is another subject...
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> --
> >>>> Joachim Van der Auwera
> >>>> PROGS bvba, progs.be, blog.progs.be
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
> >
>
>


-- 
Michael Bernagou
Java Developper

Reply via email to