You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jan Pinkert <Ja...@net-linx.de> on 2000/05/19 15:09:14 UTC

a tomcat bug?

i 've written an several jsps ,one including another and with decisions
in the jsp what to include

it looks like that

<% if ( this is true?) {%>
    <%@ include file ="first.jsp"%>
<%}else{%>
    <%@ include file ="second.jsp"%>
<%}%>

looks very simple but the jspCompiler isn't able to set the brackets in
the generated work\path\servlet.java
in the right way it seems it always forgets to close some brakets

had anybody else same experience
can someone help me
thanks
jan


Re: a tomcat bug?

Posted by Jan Pinkert <Ja...@net-linx.de>.
sorry all, it was me
i did work with paste and copy and so i forgot to make all changes right, sorry
again and thanks for all help

guru@edamame.stinky.com wrote:

> The JSP FAQ at jGuru has a question describing the 3 or 4 different
> types of include. Go to http://www.jguru.com/faq/JSP and search for
> jsp:include if you're still confused about which to use.
>
> Cheers -
>
>  - Alex
>
> On Fri, May 19, 2000 at 03:09:14PM +0200, Jan Pinkert wrote:
> > i 've written an several jsps ,one including another and with decisions
> > in the jsp what to include
> >
> > it looks like that
> >
> > <% if ( this is true?) {%>
> >     <%@ include file ="first.jsp"%>
> > <%}else{%>
> >     <%@ include file ="second.jsp"%>
> > <%}%>
> >
> > looks very simple but the jspCompiler isn't able to set the brackets in
> > the generated work\path\servlet.java
> > in the right way it seems it always forgets to close some brakets
> >
> > had anybody else same experience
> > can someone help me
> > thanks
> > jan
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Re: a tomcat bug?

Posted by Jan Pinkert <Ja...@net-linx.de>.
additional notes :
when i write not this
<% if ( this is true?) {%>
    <%@ include file ="first.jsp"%>
<%}else{%>
    <%@ include file ="second.jsp"%>
<%}%>
but this
<% if ( this is true?) {%>
     <%@ include file ="first.jsp"%>
<%}else{%>
<%}%>
<%@ include file ="second.jsp"%>
everything goes right
maybe there is a iteration max depth or something in this kind?

Jan Pinkert wrote:

> thanks for your try to help,
> but i need this <%@ include file="first.jsp"%> cause in the first.jsp i use
> variable data set in a jsp more above (that includes over theire childs the
> first .jsp) and at all should this not happen even what include i use
>
> just another problem: why does the following happen
> i step to path were my jsps are situated ant type in c:\test\iyp tomcat jspc
> nameofjsp.jsp
> and the jspcompiler return c:\test\iyp\iyp\nameofjsp.jsp not found
>
> i have an entry in the servlet.xml for my project has this do do with this
>
> thanks jan
>
> guru@edamame.stinky.com wrote:
>
> > The JSP FAQ at jGuru has a question describing the 3 or 4 different
> > types of include. Go to http://www.jguru.com/faq/JSP and search for
> > jsp:include if you're still confused about which to use.
> >
> > Cheers -
> >
> >  - Alex
> >
> > On Fri, May 19, 2000 at 03:09:14PM +0200, Jan Pinkert wrote:
> > > i 've written an several jsps ,one including another and with decisions
> > > in the jsp what to include
> > >
> > > it looks like that
> > >
> > > <% if ( this is true?) {%>
> > >     <%@ include file ="first.jsp"%>
> > > <%}else{%>
> > >     <%@ include file ="second.jsp"%>
> > > <%}%>
> > >
> > > looks very simple but the jspCompiler isn't able to set the brackets in
> > > the generated work\path\servlet.java
> > > in the right way it seems it always forgets to close some brakets
> > >
> > > had anybody else same experience
> > > can someone help me
> > > thanks
> > > jan
> > >
> > >
> > > --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Re: a tomcat bug?

Posted by Jan Pinkert <Ja...@net-linx.de>.
thanks for your try to help,
but i need this <%@ include file="first.jsp"%> cause in the first.jsp i use
variable data set in a jsp more above (that includes over theire childs the
first .jsp) and at all should this not happen even what include i use

just another problem: why does the following happen
i step to path were my jsps are situated ant type in c:\test\iyp tomcat jspc
nameofjsp.jsp
and the jspcompiler return c:\test\iyp\iyp\nameofjsp.jsp not found

i have an entry in the servlet.xml for my project has this do do with this

thanks jan

guru@edamame.stinky.com wrote:

> The JSP FAQ at jGuru has a question describing the 3 or 4 different
> types of include. Go to http://www.jguru.com/faq/JSP and search for
> jsp:include if you're still confused about which to use.
>
> Cheers -
>
>  - Alex
>
> On Fri, May 19, 2000 at 03:09:14PM +0200, Jan Pinkert wrote:
> > i 've written an several jsps ,one including another and with decisions
> > in the jsp what to include
> >
> > it looks like that
> >
> > <% if ( this is true?) {%>
> >     <%@ include file ="first.jsp"%>
> > <%}else{%>
> >     <%@ include file ="second.jsp"%>
> > <%}%>
> >
> > looks very simple but the jspCompiler isn't able to set the brackets in
> > the generated work\path\servlet.java
> > in the right way it seems it always forgets to close some brakets
> >
> > had anybody else same experience
> > can someone help me
> > thanks
> > jan
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Re: a tomcat bug?

Posted by gu...@edamame.stinky.com.
The JSP FAQ at jGuru has a question describing the 3 or 4 different
types of include. Go to http://www.jguru.com/faq/JSP and search for
jsp:include if you're still confused about which to use.

Cheers -

 - Alex

On Fri, May 19, 2000 at 03:09:14PM +0200, Jan Pinkert wrote:
> i 've written an several jsps ,one including another and with decisions
> in the jsp what to include
> 
> it looks like that
> 
> <% if ( this is true?) {%>
>     <%@ include file ="first.jsp"%>
> <%}else{%>
>     <%@ include file ="second.jsp"%>
> <%}%>
> 
> looks very simple but the jspCompiler isn't able to set the brackets in
> the generated work\path\servlet.java
> in the right way it seems it always forgets to close some brakets
> 
> had anybody else same experience
> can someone help me
> thanks
> jan
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

Re: a tomcat bug?

Posted by Danno Ferrin <sh...@earthlink.net>.
that is basically the code that the tag wraps.  It actually calls
pageContext.handleInclude(...) (or some call like it) which in turn does
something like the code snipped you just wrote.  Hotspot should optimize
that out after an hour.

--Danno

Pete Marsden wrote:
> 
> The other way to handle includes in a JSP is:
> 
>         RequestDispatcher rd =
> getServletContext().getRequestDispatcher("page-to-include.jsp");
>         rd.include(request, response);
> 
> -----Original Message-----
> From: Danno Ferrin [mailto:shemnon@earthlink.net]
> Sent: Friday, May 19, 2000 12:34 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: a tomcat bug?
> 
> the <%@ are included at translation time, before compilation and before
> the condition is tested, so both includes will happen.  Do both includes
> work properly?  meaning can you view first.jsp and second.jsp?  My guess
> is that the unbalanced brackets are occurring in those pages.  Perhaps
> the effect you want is <jsp:include file="first.jsp"> so that the files
> are only executed at run-time, otherwise both of the pages will appear
> in the generated servlet.
> 
> --Danno
> 
> Jan Pinkert wrote:
> >
> > i 've written an several jsps ,one including another and with decisions
> > in the jsp what to include
> >
> > it looks like that
> >
> > <% if ( this is true?) {%>
> >     <%@ include file ="first.jsp"%>
> > <%}else{%>
> >     <%@ include file ="second.jsp"%>
> > <%}%>
> >
> > looks very simple but the jspCompiler isn't able to set the brackets in
> > the generated work\path\servlet.java
> > in the right way it seems it always forgets to close some brakets
> >
> > had anybody else same experience
> > can someone help me
> > thanks
> > jan
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

RE: a tomcat bug?

Posted by Pete Marsden <pk...@earthlink.net>.
The other way to handle includes in a JSP is:

	RequestDispatcher rd =
getServletContext().getRequestDispatcher("page-to-include.jsp");
	rd.include(request, response);

-----Original Message-----
From: Danno Ferrin [mailto:shemnon@earthlink.net]
Sent: Friday, May 19, 2000 12:34 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: a tomcat bug?


the <%@ are included at translation time, before compilation and before
the condition is tested, so both includes will happen.  Do both includes
work properly?  meaning can you view first.jsp and second.jsp?  My guess
is that the unbalanced brackets are occurring in those pages.  Perhaps
the effect you want is <jsp:include file="first.jsp"> so that the files
are only executed at run-time, otherwise both of the pages will appear
in the generated servlet.

--Danno

Jan Pinkert wrote:
>
> i 've written an several jsps ,one including another and with decisions
> in the jsp what to include
>
> it looks like that
>
> <% if ( this is true?) {%>
>     <%@ include file ="first.jsp"%>
> <%}else{%>
>     <%@ include file ="second.jsp"%>
> <%}%>
>
> looks very simple but the jspCompiler isn't able to set the brackets in
> the generated work\path\servlet.java
> in the right way it seems it always forgets to close some brakets
>
> had anybody else same experience
> can someone help me
> thanks
> jan
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org



Re: a tomcat bug?

Posted by Danno Ferrin <sh...@earthlink.net>.
the <%@ are included at translation time, before compilation and before
the condition is tested, so both includes will happen.  Do both includes
work properly?  meaning can you view first.jsp and second.jsp?  My guess
is that the unbalanced brackets are occurring in those pages.  Perhaps
the effect you want is <jsp:include file="first.jsp"> so that the files
are only executed at run-time, otherwise both of the pages will appear
in the generated servlet.

--Danno

Jan Pinkert wrote:
> 
> i 've written an several jsps ,one including another and with decisions
> in the jsp what to include
> 
> it looks like that
> 
> <% if ( this is true?) {%>
>     <%@ include file ="first.jsp"%>
> <%}else{%>
>     <%@ include file ="second.jsp"%>
> <%}%>
> 
> looks very simple but the jspCompiler isn't able to set the brackets in
> the generated work\path\servlet.java
> in the right way it seems it always forgets to close some brakets
> 
> had anybody else same experience
> can someone help me
> thanks
> jan
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org