You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "A. Lotfi" <ma...@yahoo.com> on 2010/03/26 21:20:45 UTC

struts2 + Tiles, whypages shrink in top center ?

Hi,
I am learning struts2 + Tiles from some tutorials, I run them in tomcat 6, everything is working fine, but pages are just a small table in the center top of every page, I tried to change the height and width of the Layout page : 
 
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><tiles:insertAttribute name="title" ignore="true" /></title>
</head>
<body>
<table border="1"   cellpadding="2" cellspacing="2" align="center">
 <tr>
  <td height="30" colspan="2"><tiles:insertAttribute name="header" />
  </td>
 </tr>
 <tr>
  <td height="250"><tiles:insertAttribute name="menu" /></td>
  <td width="350"><tiles:insertAttribute name="body" /></td>
 </tr>
 <tr>
  <td height="30" colspan="2"><tiles:insertAttribute name="footer" />
  </td>
 </tr>
</table>
</body>
</html>
 
when I put width ="100%" of the table, the width take the whole page fine, but when I add height="100%" it does not work.
 
 
Please help me.
 
thanks


      

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/29 A. Lotfi <ma...@yahoo.com>:
> I put the  width attribute to 100%
>
> but look how it looks now :
> http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

It took the whole page width, as you wanted but you still mixing body
elements as Sandeep Kotha showed you. Maybe you should start with some
HTML tutorial?


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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


Re: struts2 + Tiles, whypages shrink in top center ?

Posted by "A. Lotfi" <ma...@yahoo.com>.
yes I want the page to occupy the whole screen.
 
thanks

 On Mon, 3/29/10, sandeep kotha <sa...@gmail.com> wrote:


From: sandeep kotha <sa...@gmail.com>
Subject: Re: struts2 + Tiles, whypages shrink in top center ?
To: "Struts Users Mailing List" <us...@struts.apache.org>
Date: Monday, March 29, 2010, 2:01 PM


it occupies entire screen right how do you want your screen to look like ?
can you send me a screen shot it may help better

On 29 March 2010 23:24, A. Lotfi <ma...@yahoo.com> wrote:

> I put the  width attribute to 100%
>
> but look how it looks now :
> http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
>
>
> --- On Mon, 3/29/10, sandeep kotha <sa...@gmail.com> wrote:
>
>
> From: sandeep kotha <sa...@gmail.com>
> Subject: Re: struts2 + Tiles, whypages shrink in top center ?
> To: "Struts Users Mailing List" <us...@struts.apache.org>,
> lukasz.lenart@gmail.com
> Date: Monday, March 29, 2010, 10:04 AM
>
>
> Hi Lenard
>
> Taking view source from your page i see width attribute is missing for your
> table. Set the width attribute to 100% that will fix your issue.
>
> Pasted is your view source with width attribute. This could help you.
>
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>    "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>     <head>
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>             <title>Welcome</title>
>     </head>
>     <body>
>         <table   border="1" cellpadding="2" cellspacing="2" align="center"
> width="100%">
>
>             <tr>
>                 <td height="30" colspan="2">
>                     <div align="center" style="font-weight:bold">TV
> shows</div>
>
>                 </td>
>             </tr>
>             <tr>
>                 <td height="250">
>
>
>
> <a
>
> href="/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
> >Friends</a><br>
> <a
>
> href="/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
> >The Office</a><br>
>
>                 </td>
>                 <td width="350">
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Insert title here</title>
> </head>
>
> <body>
> Welcome Guest.
> </body>
> </html>
>                 </td>
>             </tr>
>             <tr>
>                 <td height="30" colspan="2">
>                     <div align="center">© vaannila.com</div>
>
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
>
>
>
>
>
> On 29 March 2010 11:45, Lukasz Lenard <lu...@googlemail.com>
> wrote:
>
> > 2010/3/29 A. Lotfi <ma...@yahoo.com>
> > >
> > > I tried all the browsers but still small, plz take a look here :
> > >
> > > http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
> >
> > Did check the source of your page in browser? It's a mess, duplicated
> > body and so on. Check your tiles, only main page (the layout) should
> > have body tag. The reset has to be just a html snippet - no html, body
> > tags.
> >
> >
> > Regards
> > --
> > Łukasz
> > http://www.lenart.org.pl/
> > Kapituła Javarsovia 2010
> > http://javarsovia.pl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
>
>



      

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by sandeep kotha <sa...@gmail.com>.
it occupies entire screen right how do you want your screen to look like ?
can you send me a screen shot it may help better

On 29 March 2010 23:24, A. Lotfi <ma...@yahoo.com> wrote:

> I put the  width attribute to 100%
>
> but look how it looks now :
> http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
>
>
> --- On Mon, 3/29/10, sandeep kotha <sa...@gmail.com> wrote:
>
>
> From: sandeep kotha <sa...@gmail.com>
> Subject: Re: struts2 + Tiles, whypages shrink in top center ?
> To: "Struts Users Mailing List" <us...@struts.apache.org>,
> lukasz.lenart@gmail.com
> Date: Monday, March 29, 2010, 10:04 AM
>
>
> Hi Lenard
>
> Taking view source from your page i see width attribute is missing for your
> table. Set the width attribute to 100% that will fix your issue.
>
> Pasted is your view source with width attribute. This could help you.
>
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>    "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>     <head>
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>             <title>Welcome</title>
>     </head>
>     <body>
>         <table   border="1" cellpadding="2" cellspacing="2" align="center"
> width="100%">
>
>             <tr>
>                 <td height="30" colspan="2">
>                     <div align="center" style="font-weight:bold">TV
> shows</div>
>
>                 </td>
>             </tr>
>             <tr>
>                 <td height="250">
>
>
>
> <a
>
> href="/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
> >Friends</a><br>
> <a
>
> href="/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
> >The Office</a><br>
>
>                 </td>
>                 <td width="350">
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Insert title here</title>
> </head>
>
> <body>
> Welcome Guest.
> </body>
> </html>
>                 </td>
>             </tr>
>             <tr>
>                 <td height="30" colspan="2">
>                     <div align="center">© vaannila.com</div>
>
>                 </td>
>             </tr>
>         </table>
>     </body>
> </html>
>
>
>
>
>
>
> On 29 March 2010 11:45, Lukasz Lenard <lu...@googlemail.com>
> wrote:
>
> > 2010/3/29 A. Lotfi <ma...@yahoo.com>
> > >
> > > I tried all the browsers but still small, plz take a look here :
> > >
> > > http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
> >
> > Did check the source of your page in browser? It's a mess, duplicated
> > body and so on. Check your tiles, only main page (the layout) should
> > have body tag. The reset has to be just a html snippet - no html, body
> > tags.
> >
> >
> > Regards
> > --
> > Łukasz
> > http://www.lenart.org.pl/
> > Kapituła Javarsovia 2010
> > http://javarsovia.pl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
>
>

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by "A. Lotfi" <ma...@yahoo.com>.
I put the  width attribute to 100%
 
but look how it looks now :
http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action


--- On Mon, 3/29/10, sandeep kotha <sa...@gmail.com> wrote:


From: sandeep kotha <sa...@gmail.com>
Subject: Re: struts2 + Tiles, whypages shrink in top center ?
To: "Struts Users Mailing List" <us...@struts.apache.org>, lukasz.lenart@gmail.com
Date: Monday, March 29, 2010, 10:04 AM


Hi Lenard

Taking view source from your page i see width attribute is missing for your
table. Set the width attribute to 100% that will fix your issue.

Pasted is your view source with width attribute. This could help you.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Welcome</title>
    </head>
    <body>
        <table   border="1" cellpadding="2" cellspacing="2" align="center"
width="100%">

            <tr>
                <td height="30" colspan="2">
                    <div align="center" style="font-weight:bold">TV
shows</div>

                </td>
            </tr>
            <tr>
                <td height="250">



<a
href="/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
>Friends</a><br>
<a
href="/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
>The Office</a><br>

                </td>
                <td width="350">

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>

<body>
Welcome Guest.
</body>
</html>
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2">
                    <div align="center">&copy; vaannila.com</div>

                </td>
            </tr>
        </table>
    </body>
</html>






On 29 March 2010 11:45, Lukasz Lenard <lu...@googlemail.com> wrote:

> 2010/3/29 A. Lotfi <ma...@yahoo.com>
> >
> > I tried all the browsers but still small, plz take a look here :
> >
> > http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
>
> Did check the source of your page in browser? It's a mess, duplicated
> body and so on. Check your tiles, only main page (the layout) should
> have body tag. The reset has to be just a html snippet - no html, body
> tags.
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



      

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by sandeep kotha <sa...@gmail.com>.
Hi Lenard

Taking view source from your page i see width attribute is missing for your
table. Set the width attribute to 100% that will fix your issue.

Pasted is your view source with width attribute. This could help you.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Welcome</title>
    </head>
    <body>
        <table   border="1" cellpadding="2" cellspacing="2" align="center"
width="100%">

            <tr>
                <td height="30" colspan="2">
                    <div align="center" style="font-weight:bold">TV
shows</div>

                </td>
            </tr>
            <tr>
                <td height="250">



<a
href="/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
>Friends</a><br>
<a
href="/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF"
>The Office</a><br>

                </td>
                <td width="350">

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>

<body>
Welcome Guest.
</body>
</html>
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2">
                    <div align="center">&copy; vaannila.com</div>

                </td>
            </tr>
        </table>
    </body>
</html>






On 29 March 2010 11:45, Lukasz Lenard <lu...@googlemail.com> wrote:

> 2010/3/29 A. Lotfi <ma...@yahoo.com>
> >
> > I tried all the browsers but still small, plz take a look here :
> >
> > http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
>
> Did check the source of your page in browser? It's a mess, duplicated
> body and so on. Check your tiles, only main page (the layout) should
> have body tag. The reset has to be just a html snippet - no html, body
> tags.
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/29 A. Lotfi <ma...@yahoo.com>
>
> I tried all the browsers but still small, plz take a look here :
>
> http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

Did check the source of your page in browser? It's a mess, duplicated
body and so on. Check your tiles, only main page (the layout) should
have body tag. The reset has to be just a html snippet - no html, body
tags.


Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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


Re: struts2 + Tiles, whypages shrink in top center ?

Posted by "A. Lotfi" <ma...@yahoo.com>.
I tried all the browsers but still small, plz take a look here :
 
http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
 
thanks

--- On Sun, 3/28/10, Lukasz Lenart <lu...@googlemail.com> wrote:


From: Lukasz Lenart <lu...@googlemail.com>
Subject: Re: struts2 + Tiles, whypages shrink in top center ?
To: "Struts Users Mailing List" <us...@struts.apache.org>
Date: Sunday, March 28, 2010, 3:57 AM


2010/3/26 A. Lotfi <ma...@yahoo.com>:
> when I put width ="100%" of the table, the width take the whole page fine, but when I add height="100%" it does not work.

It has nothing to do with Struts2 or Tiles, not all browser correctly
interprets height attribute in a table. Please try with other
browsers.


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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




      

Re: struts2 + Tiles, whypages shrink in top center ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/26 A. Lotfi <ma...@yahoo.com>:
> when I put width ="100%" of the table, the width take the whole page fine, but when I add height="100%" it does not work.

It has nothing to do with Struts2 or Tiles, not all browser correctly
interprets height attribute in a table. Please try with other
browsers.


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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