You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "balaji.m.cs" <ba...@gmail.com> on 2008/04/29 05:53:48 UTC

error page and tiles.

             i want to show an error page with a application error
messages.... 2 the users when there is an technical error...
               i am using tiles 1.2 with struts 1.3.5 when there is an error
in a jsp tile say a body part or a left part the error page is replaced @
that particular tile 
           is there any way to show the full error page rather than
replacing the particular tile part... of the layout.
-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16952850.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
i have taken the tld version of struts-tiles which i have taken from
struts-blank.....

Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>                i am using tiles 1.2 with struts 1.3.5
> 
> What? Why Tiles 1.2 with Struts 1.3.5?
> Tiles 1.x and Struts 1.x must have the same version number.
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16955223.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>                i am using tiles 1.2 with struts 1.3.5

What? Why Tiles 1.2 with Struts 1.3.5?
Tiles 1.x and Struts 1.x must have the same version number.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>  finally u got it man.. its wat im sayin.. im using oracle app server 10 g. as
>  production server .....locally im using jdevloper with oc4j embedded
>  server....

I think that this problem cannot be solved. This "bug" should be
visible even with simple <jsp:include> tags, instead of
<tiles:insert>.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
finally u got it man.. its wat im sayin.. im using oracle app server 10 g. as
production server .....locally im using jdevloper with oc4j embedded
server....


Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>
>>  when there is an error
>>  in a jsp tile say a body part or a left part the error page is replaced
>> @
>>  that particular tile
> 
> 
> Oh finally I think that I understood :-)
> You are saying that, when you have an error occurring in a "tile", you
> see the error page instead of the tile itself, along with the rest of
> the layout.
> You wish to see the error page alone.
> AFAIK it's a bug (feature?) of various servlet containers, such as
> Tomcat <= 5.0.
> What server are you using?
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16958653.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>  when there is an error
>  in a jsp tile say a body part or a left part the error page is replaced @
>  that particular tile


Oh finally I think that I understood :-)
You are saying that, when you have an error occurring in a "tile", you
see the error page instead of the tile itself, along with the rest of
the layout.
You wish to see the error page alone.
AFAIK it's a bug (feature?) of various servlet containers, such as
Tomcat <= 5.0.
What server are you using?

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
its my /jsp/sample/error.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page isErrorPage="true"%>
<%@ page import="java.io.PrintWriter,java.io.StringWriter"%>
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
   </head>
    <body>
             <p> you have met with an application error sorry for the
trouble caused....</p>
                   <% 
                                            StringWriter stringWriter = new
StringWriter();
                                            PrintWriter printWriter   =  new
PrintWriter(stringWriter);
                                            if(exception != null) {
                                                
                                               
exception.printStackTrace(printWriter);
                                            }
                      %>
                      <p><%=stringWriter.toString()%></p>
    </body>
</html>


Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>
>>  Clearly stating you
>>
>>        My application uses tiles for my view purpose in the normal flow
>> if
>>  every thing goes fine....
>>
>>  if some exception raises @ jsp level
>>
>>          i will show a clean error jsp stating "sorry for the trouble u
>> have
>>  been met with an application error
>>  . (while rendering into the tiled jsp's if there is an error i want to
>>  forward to that error jsp  which is not a tilled one.)
> 
> Ok let me see this page then, that should be:
> /jsp/sample/error.jsp
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16958475.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>  Clearly stating you
>
>        My application uses tiles for my view purpose in the normal flow if
>  every thing goes fine....
>
>  if some exception raises @ jsp level
>
>          i will show a clean error jsp stating "sorry for the trouble u have
>  been met with an application error
>  . (while rendering into the tiled jsp's if there is an error i want to
>  forward to that error jsp  which is not a tilled one.)

Ok let me see this page then, that should be:
/jsp/sample/error.jsp

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
Clearly stating you

       My application uses tiles for my view purpose in the normal flow if
every thing goes fine....

if some exception raises @ jsp level 

         i will show a clean error jsp stating "sorry for the trouble u have
been met with an application error
. (while rendering into the tiled jsp's if there is an error i want to
forward to that error jsp  which is not a tilled one.)

hope i have explained you 
thanks & regards
Balaji.M


Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>
>>  error jsp or the tiles jsps...with the layout.?
> 
> Your "/jsp/sample/error.jsp" obviously.
> Wait a moment: are you using Tiles tags in that JSP files? But you
> told that you don't want to use Tiles.
> I just don't get your point.
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16957442.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>  error jsp or the tiles jsps...with the layout.?

Your "/jsp/sample/error.jsp" obviously.
Wait a moment: are you using Tiles tags in that JSP files? But you
told that you don't want to use Tiles.
I just don't get your point.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
error jsp or the tiles jsps...with the layout.?

Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>
>>     no i don want to show an error page made with tiles definition wat i
>> need
>>  is an error page say an simple jsp stating there is an application error
>>              <error-page>
>>                    <exception-type>java.lang.Exception</exception-type>
>>                     <location>/jsp/sample/error.jsp</location>
>>              </error-page>
>>
>>
>>          if i add the above entry <error-page/>  in web.xml it will
>> redirect
>>  to error page but when using tiles its replacing the particular tile say
>> a
>>  body or a footer.jsp where the error orrurs with this error page... not
>> the
>>  whole page... hope u got now...?
> 
> Can I see this JSP page?
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16956891.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>     no i don want to show an error page made with tiles definition wat i need
>  is an error page say an simple jsp stating there is an application error
>              <error-page>
>                    <exception-type>java.lang.Exception</exception-type>
>                     <location>/jsp/sample/error.jsp</location>
>              </error-page>
>
>
>          if i add the above entry <error-page/>  in web.xml it will redirect
>  to error page but when using tiles its replacing the particular tile say a
>  body or a footer.jsp where the error orrurs with this error page... not the
>  whole page... hope u got now...?

Can I see this JSP page?

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by "balaji.m.cs" <ba...@gmail.com>.
    no i don want to show an error page made with tiles definition wat i need
is an error page say an simple jsp stating there is an application error
             <error-page>
                   <exception-type>java.lang.Exception</exception-type>
                    <location>/jsp/sample/error.jsp</location>
             </error-page>


         if i add the above entry <error-page/>  in web.xml it will redirect
to error page but when using tiles its replacing the particular tile say a
body or a footer.jsp where the error orrurs with this error page... not the
whole page... hope u got now...?


Antonio Petrelli-3 wrote:
> 
> 2008/4/29 balaji.m.cs <ba...@gmail.com>:
>>
>>              i want to show an error page with a application error
>>  messages.... 2 the users when there is an technical error...
>>                i am using tiles 1.2 with struts 1.3.5 when there is an
>> error
>>  in a jsp tile say a body part or a left part the error page is replaced
>> @
>>  that particular tile
>>            is there any way to show the full error page rather than
>>  replacing the particular tile part... of the layout.
> 
> I cannot understand, do you want to display an error page made with a
> Tiles definition?
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-page-and-tiles.-tp16952850p16955727.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: error page and tiles.

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/29 balaji.m.cs <ba...@gmail.com>:
>
>              i want to show an error page with a application error
>  messages.... 2 the users when there is an technical error...
>                i am using tiles 1.2 with struts 1.3.5 when there is an error
>  in a jsp tile say a body part or a left part the error page is replaced @
>  that particular tile
>            is there any way to show the full error page rather than
>  replacing the particular tile part... of the layout.

I cannot understand, do you want to display an error page made with a
Tiles definition?

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org