Blank Pages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Blank Pages

Kerry Wilson-3
Controller is rendering blank pages, I have one controller working. Saw
people having the same problem in mailing list archives but their
solution does not work for me ( executed: grails init, then grails build
)  Still getting the blank pages, no errors outputting to console.  Code
below

/grails-app/controllers/RegisterController.groovy

class RegisterController {

    @Property index = { }
}

/grails-app/views/register/index.gsp

<html>
    <head>
        <title>Register Controller</title>
        <meta name="layout" content="main"></meta>
    </head>
    <body>
      <div>
        <h1>Registration</h1>
        <p>Please enter your information below:</p>
      </div>
    </body>
</html>

/grails-app/views/layouts/main.gsp

<html>
    <head>
        <title><g:layoutTitle default="default title"/></title>
        <link rel="stylesheet"
href="${createLinkTo(dir:'css',file:'main.css')}"></link>
        <link rel="stylesheet"
href="${createLinkTo(dir:'css',file:'layout.css')}"></link>
        <g:layoutHead />
    </head>
     <body>
         <div id="header"></div>
        <div id="menu">
            <ul>
              <li><g:link controller="register"
class="menu">Register</g:link></li>
            </ul>
        </div>
        <div id="content">
            <g:layoutBody />
        </div>
        <div id="footer">
            <a href="http://grails.codehaus.org"><img
src="${createLinkTo(dir:'images',file:'grails_button.gif')}" width="97"
height="30" align="right" border="0"></a>
        </div>
     </body>
</html>

Anything seem out of place?  It shouldn't be since it is exactly like my
other controller that is working!  Very frustrated...

PS here is the contents of my log4j.properties, I switched it to trace
when nothing was showing up, but nothing changed.

log4j.rootLogger=info, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.logger.org.codehaus.groovy.grails=trace
log4j.additivity.org.codehaus.groovy.grails=false
log4j.logger.grails=trace
log4j.additivity.grails=false

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Blank Pages

graemer
Try changing you log4j config to this to see if there are any errors:

log4j.rootLogger=info, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.logger.org.codehaus.groovy.grails=trace,stdout
log4j.additivity.org.codehaus.groovy.grails=false
log4j.logger.grails=trace,stdout
log4j.additivity.grails=false

Cheers
Graeme

On 6/27/06, Kerry Wilson <[hidden email]> wrote:

> Controller is rendering blank pages, I have one controller working. Saw
> people having the same problem in mailing list archives but their
> solution does not work for me ( executed: grails init, then grails build
> )  Still getting the blank pages, no errors outputting to console.  Code
> below
>
> /grails-app/controllers/RegisterController.groovy
>
> class RegisterController {
>
>    @Property index = { }
> }
>
> /grails-app/views/register/index.gsp
>
> <html>
>    <head>
>        <title>Register Controller</title>
>        <meta name="layout" content="main"></meta>
>    </head>
>    <body>
>      <div>
>        <h1>Registration</h1>
>        <p>Please enter your information below:</p>
>      </div>
>    </body>
> </html>
>
> /grails-app/views/layouts/main.gsp
>
> <html>
>    <head>
>        <title><g:layoutTitle default="default title"/></title>
>        <link rel="stylesheet"
> href="${createLinkTo(dir:'css',file:'main.css')}"></link>
>        <link rel="stylesheet"
> href="${createLinkTo(dir:'css',file:'layout.css')}"></link>
>        <g:layoutHead />
>    </head>
>     <body>
>         <div id="header"></div>
>        <div id="menu">
>            <ul>
>              <li><g:link controller="register"
> class="menu">Register</g:link></li>
>            </ul>
>        </div>
>        <div id="content">
>            <g:layoutBody />
>        </div>
>        <div id="footer">
>            <a href="http://grails.codehaus.org"><img
> src="${createLinkTo(dir:'images',file:'grails_button.gif')}" width="97"
> height="30" align="right" border="0"></a>
>        </div>
>     </body>
> </html>
>
> Anything seem out of place?  It shouldn't be since it is exactly like my
> other controller that is working!  Very frustrated...
>
> PS here is the contents of my log4j.properties, I switched it to trace
> when nothing was showing up, but nothing changed.
>
> log4j.rootLogger=info, stdout
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> log4j.logger.org.codehaus.groovy.grails=trace
> log4j.additivity.org.codehaus.groovy.grails=false
> log4j.logger.grails=trace
> log4j.additivity.grails=false
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email