You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Michael P. Soulier" <mi...@mitel.com> on 2005/11/14 15:51:59 UTC

error in jasper precompilation

I'm taking care of a site that uses a common header and footer, with a 
dynamic header title, like so

<!-- set the page title -->
<%! String title = "Pawsitive Approach Pet Services"; %>
<!-- header here -->
<%@ include file="comps/header.jsp" %>

In header.jsp, title is used to output the title.

<head>
<title><%= title %></title>

Now, this works just fine. I'm experimenting with precompiling the pages 
using jasper, but this really broke compilation of the pages. When javac 
tries to compile the precompiled header.jsp file, it says that "title" 
is not defined.

Doesn't that mean that jasper's precompilation is broken, or should I 
just tell it to exclude compiling header.jsp, as it's being included in 
all of the other pages?

Thanks,
Mike

-- 
Michael P. Soulier <mi...@mitel.com>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix

Re: error in jasper precompilation

Posted by Len Popp <le...@gmail.com>.
Don't compile header.jsp, as it's being included in all of the other
pages. It's the same as including a .h file in C++.
--
Len

On 11/14/05, Michael P. Soulier <mi...@mitel.com> wrote:
> I'm taking care of a site that uses a common header and footer, with a
> dynamic header title, like so
>
> <!-- set the page title -->
> <%! String title = "Pawsitive Approach Pet Services"; %>
> <!-- header here -->
> <%@ include file="comps/header.jsp" %>
>
> In header.jsp, title is used to output the title.
>
> <head>
> <title><%= title %></title>
>
> Now, this works just fine. I'm experimenting with precompiling the pages
> using jasper, but this really broke compilation of the pages. When javac
> tries to compile the precompiled header.jsp file, it says that "title"
> is not defined.
>
> Doesn't that mean that jasper's precompilation is broken, or should I
> just tell it to exclude compiling header.jsp, as it's being included in
> all of the other pages?
>
> Thanks,
> Mike
>
> --
> Michael P. Soulier <mi...@mitel.com>, 613-592-2122 x2522
> Linux applications development
> "...the word HACK is used as a verb to indicate a massive amount of
> nerd-like effort." -Harley Hahn, A Student's Guide to Unix

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: error in jasper precompilation

Posted by "Michael P. Soulier" <mi...@mitel.com>.
Richard Mixon wrote:
> Mike,
> 
> Doing an exclude is one approach (as mentioned by Len). When I encountered
> this issue a couple of years ago, my Googling turned up the recommended
> approach of naming your include files with a ".jspf" suffix instead of a
> ".jsp" suffix. Jasper should ignore them - and it will be clear which files
> are includes.

Thanks to both of you.

Mike

-- 
Michael P. Soulier <mi...@mitel.com>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix

RE: error in jasper precompilation

Posted by Richard Mixon <rn...@qwest.net>.
Mike,

Doing an exclude is one approach (as mentioned by Len). When I encountered
this issue a couple of years ago, my Googling turned up the recommended
approach of naming your include files with a ".jspf" suffix instead of a
".jsp" suffix. Jasper should ignore them - and it will be clear which files
are includes.

HTH - Richard

-----Original Message-----
From: Michael P. Soulier [mailto:michael_soulier@mitel.com] 
Sent: Monday, November 14, 2005 7:52 AM
To: Tomcat Users List
Subject: error in jasper precompilation

I'm taking care of a site that uses a common header and footer, with a
dynamic header title, like so

<!-- set the page title -->
<%! String title = "Pawsitive Approach Pet Services"; %>
<!-- header here -->
<%@ include file="comps/header.jsp" %>

In header.jsp, title is used to output the title.

<head>
<title><%= title %></title>

Now, this works just fine. I'm experimenting with precompiling the pages
using jasper, but this really broke compilation of the pages. When javac
tries to compile the precompiled header.jsp file, it says that "title" 
is not defined.

Doesn't that mean that jasper's precompilation is broken, or should I just
tell it to exclude compiling header.jsp, as it's being included in all of
the other pages?

Thanks,
Mike

--
Michael P. Soulier <mi...@mitel.com>, 613-592-2122 x2522 Linux
applications development "...the word HACK is used as a verb to indicate a
massive amount of nerd-like effort." -Harley Hahn, A Student's Guide to Unix


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org