You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Jiujing Gu <jg...@met.fsu.edu> on 2010/03/10 17:29:15 UTC

Page not found error

Hi,

I'm a new to this.

I downloaded click.2.1.0 and got the examples working under tomcat.
Then I tried to follow the quick start guide on http://click.apache.org/
steps 1-4.  I didn't get what I suppose to get. All I got was 

Page Not Found
The page you requested was not found.

What have I done wrong?  Could that because I didn't put the files
under CATALINA_HOME?  If that is the case, what do I need to do to make
it work outside CATALINA_HOME?

Thanks in advance.
Jane



Re: Page not found error

Posted by Jiujing Gu <jg...@met.fsu.edu>.
I'll try that.

Thanks,
Jiujing
On Thu, 2010-03-11 at 10:50 -0600, Ray Garcia wrote:
> I started with the project template that comes with click release.    
> It didn't take but a few days with that and the user guide to start my  
> project.
> 
> -Ray
> 
> On Mar 11, 2010, at 10:33 AM, Andrei Ionescu <ai...@yahoo.com>  
> wrote:
> 
> >> I'm a new to this.
> > A new Quick Start Application generation tool was promised for the  
> > next version (to be released soon - if I got it right):
> > https://issues.apache.org/jira/browse/CLK-531
> >
> > It might be simpler Click to learn by studying what the tool will  
> > generate :).
> >
> > regards,
> > Andrei.
> >


Re: Page not found error

Posted by Ray Garcia <ra...@gmail.com>.
I started with the project template that comes with click release.    
It didn't take but a few days with that and the user guide to start my  
project.

-Ray

On Mar 11, 2010, at 10:33 AM, Andrei Ionescu <ai...@yahoo.com>  
wrote:

>> I'm a new to this.
> A new Quick Start Application generation tool was promised for the  
> next version (to be released soon - if I got it right):
> https://issues.apache.org/jira/browse/CLK-531
>
> It might be simpler Click to learn by studying what the tool will  
> generate :).
>
> regards,
> Andrei.
>

Re: Page not found error

Posted by Jiujing Gu <jg...@met.fsu.edu>.
I feel comforting to hear this.

Thanks,
Jiujing
On Thu, 2010-03-11 at 17:33 +0100, Andrei Ionescu wrote:
> > I'm a new to this.
> A new Quick Start Application generation tool was promised for the next 
> version (to be released soon - if I got it right):
> https://issues.apache.org/jira/browse/CLK-531
> 
> It might be simpler Click to learn by studying what the tool will 
> generate :).
> 
> regards,
> Andrei.
> 


Re: Page not found error

Posted by Andrei Ionescu <ai...@yahoo.com>.
> I'm a new to this.
A new Quick Start Application generation tool was promised for the next 
version (to be released soon - if I got it right):
https://issues.apache.org/jira/browse/CLK-531

It might be simpler Click to learn by studying what the tool will 
generate :).

regards,
Andrei.


Re: Page not found error

Posted by Jiujing Gu <jg...@met.fsu.edu>.
Hello Bob,

I think you got at least one of my mistakes. How could I forgot about 
all this? :(  I made the change & got the directory structure right. But
I still have the same error. 

When you say:
You should see the following 
> statement:
> 
> [Click] [debug] /home.htm -> com.quickstart.page.HomePage

I'm guessing that you are talking about the log file. Here is what I
see in my tomcat log file:

[Click] [info ] renderTemplate: /click/not-found.htm - 1 ms
[Click] [info ] handleRequest:  /home.htm - 5 ms

Any idea what else went wrong?

Thank you very much.
Jiujing

On Fri, 2010-03-12 at 00:03 +1100, Bob Schellink wrote:
> Hi Jiujing,
> 
> The "Page Not Found" error means that the URL you are accessing does not map to a Java Class. In 
> this case the home.htm template does not map to HomePage.class. Stating this differently, Click 
> cannot find the Java class belonging to the home.htm template.
> 
> Since you are following the quickstart guide you will notice that the "click.xml" file maps Pages 
> under the Java package "com.quickstart.page". This means you have to compile HomePage.java to the 
> folder "WEB-INF/classes/". You should end up with the class under 
> "WEB-INF/classes/com/quickstart/page/HomePage.class"
> 
> When Click starts up it will print which templates maps to which files. You should see the following 
> statement:
> 
> [Click] [debug] /home.htm -> com.quickstart.page.HomePage
> 
> kind regards
> 
> bob
> 
> 
> On 11/03/2010 11:41 PM, Jiujing Gu wrote:
> > I'm not sure what do you mean by setup the project.  I do not use IDE.
> > Do you mean I need to have something in build.xml file for each project?
> > All I did was to follow the steps in apache click quickstart page. i.e.
> >
> > 1. add a click.xml and web.xml configuration file to applications
> >     WEB-INF directory:
> > 2. add the  JAR files to application WEB-INF/lib
> > 3. add a redirect.html file to the web root directory
> > 4. define a HomePage class, in applications WEB-INF/classes directory
> > 5. add a corresponding Home page home.htm in the web root director
> >
> > (Please go http://click.apache.org/&  click on quickstart for details.)
> >
> > Are you saying that there is something missing in this instruction?
> > I think I did similar things as you on the tomcat side.
> >
> > Thank you very much for your help.
> >
> > Jiujing
> > On Wed, 2010-03-10 at 18:03 -0300, Gilberto C. Andrade wrote:
> >>
> >>
> >> On Wed, Mar 10, 2010 at 1:29 PM, Jiujing Gu<jg...@met.fsu.edu>  wrote:
> >>          Hi,
> >>
> >>          I'm a new to this.
> >>
> >>          I downloaded click.2.1.0 and got the examples working under
> >>          tomcat.
> >>          Then I tried to follow the quick start guide on
> >>          http://click.apache.org/
> >>          steps 1-4.  I didn't get what I suppose to get. All I got was
> >>
> >>          Page Not Found
> >>          The page you requested was not found.
> >>
> >>          What have I done wrong?  Could that because I didn't put the
> >>          files
> >>          under CATALINA_HOME?
> >>
> >> How did you setup your project?
> >> Are you using any IDE - eclipse, netbeans - or any build tool - ant,
> >> maven?
> >>
> >> Gilberto
> >>
> >>           If that is the case, what do I need to do to make
> >>          it work outside CATALINA_HOME?
> >>
> >> In Tomcat 5, application Context Descriptor XML files are placed in
> >> the
> >> $CATALINA_HOME/conf/<engine name>/<host name>  directory.
> >>
> >> Its my example:
> >> /home/gilberto/bin/apache-tomcat-6.0.14/conf/Catalina/localhost/com.gilbertoca.park-park-webapp.xml
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <Context
> >> docBase="/home/gilberto/dev/netbeans-config/park-jpa/web/target/com.gilbertoca.park-park-webapp" path="/com.gilbertoca.park-park-webapp">
> >>    <Logger className="org.apache.catalina.logger.FileLogger"
> >> prefix="ROOT." suffix=".log" timestamp="true"/>
> >> </Context>
> >>
> >>
> >> Gilberto
> >
> >
> 


Re: Page not found error

Posted by Jiujing Gu <jg...@met.fsu.edu>.
It finally worked after I restart tomcat.

Thanks a lot,
Jiujing
On Fri, 2010-03-12 at 00:03 +1100, Bob Schellink wrote:
> Hi Jiujing,
> 
> The "Page Not Found" error means that the URL you are accessing does not map to a Java Class. In 
> this case the home.htm template does not map to HomePage.class. Stating this differently, Click 
> cannot find the Java class belonging to the home.htm template.
> 
> Since you are following the quickstart guide you will notice that the "click.xml" file maps Pages 
> under the Java package "com.quickstart.page". This means you have to compile HomePage.java to the 
> folder "WEB-INF/classes/". You should end up with the class under 
> "WEB-INF/classes/com/quickstart/page/HomePage.class"
> 
> When Click starts up it will print which templates maps to which files. You should see the following 
> statement:
> 
> [Click] [debug] /home.htm -> com.quickstart.page.HomePage
> 
> kind regards
> 
> bob
> 
> 
> On 11/03/2010 11:41 PM, Jiujing Gu wrote:
> > I'm not sure what do you mean by setup the project.  I do not use IDE.
> > Do you mean I need to have something in build.xml file for each project?
> > All I did was to follow the steps in apache click quickstart page. i.e.
> >
> > 1. add a click.xml and web.xml configuration file to applications
> >     WEB-INF directory:
> > 2. add the  JAR files to application WEB-INF/lib
> > 3. add a redirect.html file to the web root directory
> > 4. define a HomePage class, in applications WEB-INF/classes directory
> > 5. add a corresponding Home page home.htm in the web root director
> >
> > (Please go http://click.apache.org/&  click on quickstart for details.)
> >
> > Are you saying that there is something missing in this instruction?
> > I think I did similar things as you on the tomcat side.
> >
> > Thank you very much for your help.
> >
> > Jiujing
> > On Wed, 2010-03-10 at 18:03 -0300, Gilberto C. Andrade wrote:
> >>
> >>
> >> On Wed, Mar 10, 2010 at 1:29 PM, Jiujing Gu<jg...@met.fsu.edu>  wrote:
> >>          Hi,
> >>
> >>          I'm a new to this.
> >>
> >>          I downloaded click.2.1.0 and got the examples working under
> >>          tomcat.
> >>          Then I tried to follow the quick start guide on
> >>          http://click.apache.org/
> >>          steps 1-4.  I didn't get what I suppose to get. All I got was
> >>
> >>          Page Not Found
> >>          The page you requested was not found.
> >>
> >>          What have I done wrong?  Could that because I didn't put the
> >>          files
> >>          under CATALINA_HOME?
> >>
> >> How did you setup your project?
> >> Are you using any IDE - eclipse, netbeans - or any build tool - ant,
> >> maven?
> >>
> >> Gilberto
> >>
> >>           If that is the case, what do I need to do to make
> >>          it work outside CATALINA_HOME?
> >>
> >> In Tomcat 5, application Context Descriptor XML files are placed in
> >> the
> >> $CATALINA_HOME/conf/<engine name>/<host name>  directory.
> >>
> >> Its my example:
> >> /home/gilberto/bin/apache-tomcat-6.0.14/conf/Catalina/localhost/com.gilbertoca.park-park-webapp.xml
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <Context
> >> docBase="/home/gilberto/dev/netbeans-config/park-jpa/web/target/com.gilbertoca.park-park-webapp" path="/com.gilbertoca.park-park-webapp">
> >>    <Logger className="org.apache.catalina.logger.FileLogger"
> >> prefix="ROOT." suffix=".log" timestamp="true"/>
> >> </Context>
> >>
> >>
> >> Gilberto
> >
> >
> 


Re: Page not found error

Posted by Bob Schellink <sa...@gmail.com>.
Hi Jiujing,

The "Page Not Found" error means that the URL you are accessing does not map to a Java Class. In 
this case the home.htm template does not map to HomePage.class. Stating this differently, Click 
cannot find the Java class belonging to the home.htm template.

Since you are following the quickstart guide you will notice that the "click.xml" file maps Pages 
under the Java package "com.quickstart.page". This means you have to compile HomePage.java to the 
folder "WEB-INF/classes/". You should end up with the class under 
"WEB-INF/classes/com/quickstart/page/HomePage.class"

When Click starts up it will print which templates maps to which files. You should see the following 
statement:

[Click] [debug] /home.htm -> com.quickstart.page.HomePage

kind regards

bob


On 11/03/2010 11:41 PM, Jiujing Gu wrote:
> I'm not sure what do you mean by setup the project.  I do not use IDE.
> Do you mean I need to have something in build.xml file for each project?
> All I did was to follow the steps in apache click quickstart page. i.e.
>
> 1. add a click.xml and web.xml configuration file to applications
>     WEB-INF directory:
> 2. add the  JAR files to application WEB-INF/lib
> 3. add a redirect.html file to the web root directory
> 4. define a HomePage class, in applications WEB-INF/classes directory
> 5. add a corresponding Home page home.htm in the web root director
>
> (Please go http://click.apache.org/&  click on quickstart for details.)
>
> Are you saying that there is something missing in this instruction?
> I think I did similar things as you on the tomcat side.
>
> Thank you very much for your help.
>
> Jiujing
> On Wed, 2010-03-10 at 18:03 -0300, Gilberto C. Andrade wrote:
>>
>>
>> On Wed, Mar 10, 2010 at 1:29 PM, Jiujing Gu<jg...@met.fsu.edu>  wrote:
>>          Hi,
>>
>>          I'm a new to this.
>>
>>          I downloaded click.2.1.0 and got the examples working under
>>          tomcat.
>>          Then I tried to follow the quick start guide on
>>          http://click.apache.org/
>>          steps 1-4.  I didn't get what I suppose to get. All I got was
>>
>>          Page Not Found
>>          The page you requested was not found.
>>
>>          What have I done wrong?  Could that because I didn't put the
>>          files
>>          under CATALINA_HOME?
>>
>> How did you setup your project?
>> Are you using any IDE - eclipse, netbeans - or any build tool - ant,
>> maven?
>>
>> Gilberto
>>
>>           If that is the case, what do I need to do to make
>>          it work outside CATALINA_HOME?
>>
>> In Tomcat 5, application Context Descriptor XML files are placed in
>> the
>> $CATALINA_HOME/conf/<engine name>/<host name>  directory.
>>
>> Its my example:
>> /home/gilberto/bin/apache-tomcat-6.0.14/conf/Catalina/localhost/com.gilbertoca.park-park-webapp.xml
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Context
>> docBase="/home/gilberto/dev/netbeans-config/park-jpa/web/target/com.gilbertoca.park-park-webapp" path="/com.gilbertoca.park-park-webapp">
>>    <Logger className="org.apache.catalina.logger.FileLogger"
>> prefix="ROOT." suffix=".log" timestamp="true"/>
>> </Context>
>>
>>
>> Gilberto
>
>


Re: Page not found error

Posted by Jiujing Gu <jg...@met.fsu.edu>.
I'm not sure what do you mean by setup the project.  I do not use IDE.
Do you mean I need to have something in build.xml file for each project?
All I did was to follow the steps in apache click quickstart page. i.e.

1. add a click.xml and web.xml configuration file to applications 
   WEB-INF directory:
2. add the  JAR files to application WEB-INF/lib
3. add a redirect.html file to the web root directory
4. define a HomePage class, in applications WEB-INF/classes directory
5. add a corresponding Home page home.htm in the web root director

(Please go http://click.apache.org/ & click on quickstart for details.)

Are you saying that there is something missing in this instruction? 
I think I did similar things as you on the tomcat side.

Thank you very much for your help.

Jiujing
On Wed, 2010-03-10 at 18:03 -0300, Gilberto C. Andrade wrote:
> 
> 
> On Wed, Mar 10, 2010 at 1:29 PM, Jiujing Gu <jg...@met.fsu.edu> wrote:
>         Hi,
>         
>         I'm a new to this.
>         
>         I downloaded click.2.1.0 and got the examples working under
>         tomcat.
>         Then I tried to follow the quick start guide on
>         http://click.apache.org/
>         steps 1-4.  I didn't get what I suppose to get. All I got was
>         
>         Page Not Found
>         The page you requested was not found.
>         
>         What have I done wrong?  Could that because I didn't put the
>         files
>         under CATALINA_HOME? 
>  
> How did you setup your project?
> Are you using any IDE - eclipse, netbeans - or any build tool - ant,
> maven?
> 
> Gilberto
>  
>          If that is the case, what do I need to do to make
>         it work outside CATALINA_HOME?
>         
> In Tomcat 5, application Context Descriptor XML files are placed in
> the
> $CATALINA_HOME/conf/<engine name>/<host name> directory. 
> 
> Its my example:
> /home/gilberto/bin/apache-tomcat-6.0.14/conf/Catalina/localhost/com.gilbertoca.park-park-webapp.xml
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Context
> docBase="/home/gilberto/dev/netbeans-config/park-jpa/web/target/com.gilbertoca.park-park-webapp" path="/com.gilbertoca.park-park-webapp">
>   <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="ROOT." suffix=".log" timestamp="true"/>
> </Context>
> 
> 
> Gilberto


Re: Page not found error

Posted by "Gilberto C. Andrade" <gi...@gmail.com>.
On Wed, Mar 10, 2010 at 1:29 PM, Jiujing Gu <jg...@met.fsu.edu> wrote:

> Hi,
>
> I'm a new to this.
>
> I downloaded click.2.1.0 and got the examples working under tomcat.
> Then I tried to follow the quick start guide on http://click.apache.org/
> steps 1-4.  I didn't get what I suppose to get. All I got was
>
> Page Not Found
> The page you requested was not found.
>
> What have I done wrong?  Could that because I didn't put the files
> under CATALINA_HOME?


How did you setup your project?
Are you using any IDE - eclipse, netbeans - or any build tool - ant, maven?

Gilberto


>  If that is the case, what do I need to do to make
> it work outside CATALINA_HOME?
>
> In Tomcat 5, application Context Descriptor XML files are placed in the
$CATALINA_HOME/conf/<engine name>/<host name> directory.

Its my example:
/home/gilberto/bin/apache-tomcat-6.0.14/conf/Catalina/localhost/com.gilbertoca.park-park-webapp.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context
docBase="/home/gilberto/dev/netbeans-config/park-jpa/web/target/com.gilbertoca.park-park-webapp"
path="/com.gilbertoca.park-park-webapp">
  <Logger className="org.apache.catalina.logger.FileLogger" prefix="ROOT."
suffix=".log" timestamp="true"/>
</Context>

Gilberto