You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by 蒋剑峰 <ji...@gmail.com> on 2008/04/01 12:24:37 UTC
What is the "/roller-ui/setup.rol" ??
Hi Dave,
In the roller/index.jsp.
RequestDispatcher setuppage = request.getRequestDispatcher
("/roller-ui/setup.rol");
setuppage.forward(request, response);
But I didn't find the file of "/roller-ui/setup.rol" .what is this?
Thanks!!!
jiangjf
Re: What is the "/roller-ui/setup.rol" ??
Posted by Dave <sn...@gmail.com>.
On Tue, Apr 1, 2008 at 7:49 AM, Vivien Barousse
<ba...@gmail.com> wrote:
> Hi jiangjf.
>
> In roller, *.rol request aren't files, but are intercepted by the Struts
> framework. These request are mapped to Java classes, called an "Action".
>
> Actions are mapped to Java classes thought /WEB-INF/classes/struts.xml.
>
> In this case, "/roller-ui/setup.rol" is mapped to the
> org.apache.roller.weblogger.ui.struts2.core.Setup class.
>
> This class choose a title for this page (into the constructor), provides
> some attributes (userCount and blogCount), and a particular method
> "execute". This method is called every time a user request the
> "/roller-ui/setup.rol". It just gives a value to userCount and
> blogCount, and returns "SUCCESS".
>
> Back to struts.xml, we can see that the "success" result are mapped to a
> tile named ".Setup".
>
> Tiles are mapped into /WEB-INF/tiles.xml. In our case, .Setup is a tile
> which extends ".tiles-simplepage" and put an "content" attribute with
> the "/WEB-INF/jsps/core/Setup.jsp" value. It means that the ".Setup"
> tile is formed by the "/WEB-INF/jsps/core/Setup.jsp" page, inserted into
> another tile named ".tiles-simplepage".
>
> This tile, once rendered, corresponds to the response for the
> "/roller-ui/Setup.rol" request.
>
> For more about the struts framework, you can see the project website
> (which contains great tutorials) at http://struts.apache.org/.
>
> Hope this was helpful.
>
> Vivien Barousse
Thanks! that's a very nice explanation.
- Dave
Re: What is the "/roller-ui/setup.rol" ??
Posted by Vivien Barousse <ba...@gmail.com>.
Hi jiangjf.
In roller, *.rol request aren't files, but are intercepted by the Struts
framework. These request are mapped to Java classes, called an "Action".
Actions are mapped to Java classes thought /WEB-INF/classes/struts.xml.
In this case, "/roller-ui/setup.rol" is mapped to the
org.apache.roller.weblogger.ui.struts2.core.Setup class.
This class choose a title for this page (into the constructor), provides
some attributes (userCount and blogCount), and a particular method
"execute". This method is called every time a user request the
"/roller-ui/setup.rol". It just gives a value to userCount and
blogCount, and returns "SUCCESS".
Back to struts.xml, we can see that the "success" result are mapped to a
tile named ".Setup".
Tiles are mapped into /WEB-INF/tiles.xml. In our case, .Setup is a tile
which extends ".tiles-simplepage" and put an "content" attribute with
the "/WEB-INF/jsps/core/Setup.jsp" value. It means that the ".Setup"
tile is formed by the "/WEB-INF/jsps/core/Setup.jsp" page, inserted into
another tile named ".tiles-simplepage".
This tile, once rendered, corresponds to the response for the
"/roller-ui/Setup.rol" request.
For more about the struts framework, you can see the project website
(which contains great tutorials) at http://struts.apache.org/.
Hope this was helpful.
Vivien Barousse
--
Vivien Barousse <ba...@gmail.com>
barousse.vivien@gmail.com
On Tue, 2008-04-01 at 18:24 +0800, 蒋剑峰 wrote:
> Hi Dave,
> In the roller/index.jsp.
> RequestDispatcher setuppage = request.getRequestDispatcher
> ("/roller-ui/setup.rol");
> setuppage.forward(request, response);
>
> But I didn't find the file of "/roller-ui/setup.rol" .what is this?
>
> Thanks!!!
>
> jiangjf