<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2>Hi !<br>You can have it if you initialize your controller into a jsp.<br>So, instead of having a Servlet-Controller, you will have an " objet Controller into your jsp" which can be initialized using pageContext, request and response.<br>then instead of calling somthing.do you will call something.jsp (or use rewrite rules ...)<br><br>@+<br><br> <br><div><br></div><font color="#990099">-----opencms-dev-bounces@opencms.org a écrit : -----<br><br></font><blockquote style="border-left: 2px solid #000000; padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">Pour : "The OpenCms mailing list" <a class="moz-txt-link-rfc2396E" href="mailto:opencms-dev@opencms.org"><opencms-dev@opencms.org></a><br>De : "Alexandre Morozov" <a class="moz-txt-link-rfc2396E" href="mailto:morozov@codecentric.de"><morozov@codecentric.de></a><br>Envoyé par : <a class="moz-txt-link-abbreviated" href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a><br>Date : 06/02/2008 15:59<br>Objet : Re: [opencms-dev] MVC in Opencms: how to get the pageContext into        the model?<br><br><font face="Courier New,Courier,monospace" size="3">Hi Aden,<br><br>I think it is not possible to have the PageContext Object in the Struts Action... Do you really need PageContext Object in your NewUserBean? <br><br>Regards,<br>Alex Morozov<br><br>codecentric GmbH<br>Grünewalder Str. 29-31<br>42657 Solingen<br><br>Telefon +49 (212) 2494 - 331<br>Fax +49 (212) 2494 - 334<br>Mobil +49 (151) 16706497<br>E-Mail <a class="moz-txt-link-abbreviated" href="mailto:morozov@codecentric.de">morozov@codecentric.de</a><br>Internet <a class="moz-txt-link-abbreviated" href="http://www.codecentric.de">www.codecentric.de</a><br>Geschäftsführer: Peter Gierse, Mirko Novakovic und Rainer Vehns<br>Sitz der Gesellschaft: Solingen<br><br><br>-----Original Message-----<br>From: <a class="moz-txt-link-abbreviated" href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a> on behalf of aden<br>Sent: Wed 2/6/2008 3:27 PM<br>To: <a class="moz-txt-link-abbreviated" href="mailto:opencms-dev@opencms.org">opencms-dev@opencms.org</a><br>Subject: [opencms-dev] MVC in Opencms: how to get the pageContext into the model?<br> <br><br>I want to start with MVC-architecture (type 2) without struts or jsf. <br><br>So my idea is following: The view start the controller with html-code for<br>instance <form name="form" method="post" action="/opencms/Controller.do">,<br>then the controller should init() the model for instance<br>NewUserBean(pageContext, request, response ) and  collect the "result" from<br>the model-method NewUserBean.newUser( bla-bla, ...) und put it in an<br>RequestDispatcher. So the view.jsp is called and this have access to the<br>"result" and show the page.<br><br>But how I get the PageContext in this controller? Please send me some<br>code-pieces for help. Or I am completly wrong with this controller-code?<br><br>thanks.<br><br>public class Controller extends OpenCmsServlet{<br><br>public void doPost ( HttpServletRequest request, HttpServletResponse<br>response) throws IOException, ServletException{<br><br>NewUserBean ub = new NewUserBean( !!pageContext!!, request, response );<br>result = ub.newUser( emailName, lastName, firstName, password1, password2,<br>addInfos, group );<br><span>    </span>        <span>    </span>        <span>    </span>        <span>    </span>        <br>request.setAttribute("result", result);<br>RequestDispatcher rd = request.getRequestDispatcher( "/view.jsp" );<br>rd.forward(request, response);<br>}<br>}<br>-- <br>View this message in context: <a href="http://www.nabble.com/MVC-in-Opencms%3A-how-to-get-the-pageContext-into-the-model--tp15306671p15306671.html">http://www.nabble.com/MVC-in-Opencms%3A-how-to-get-the-pageContext-into-the-model--tp15306671p15306671.html</a><br>Sent from the OpenCMS - Dev mailing list archive at Nabble.com.<br><br><br>_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br><br></font><font face="Courier New,Courier,monospace" size="3"><br>_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></font></blockquote><br></FONT><font face="sans-serif"><html>
<head>
<meta http-equiv="content-type">
</head>
<body>
<font size="1" face="Default Sans Serif">
Ce message est à l'attention exclusive des destinataires désignés. Il peut contenir des informations confidentielles. Si vous n'êtes pas destinataire du message, merci d'en avertir immédiatement l'expéditeur et de détruire ce message. Le contenu de ce message ne pourrait engager la responsabilité de Steria que s'il a été émis par une personne dûment habilitée agissant dans le strict cadre de ses fonctions et à des fins non étrangères à ses attributions. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis.
<br />
This message is intended exclusively for the designated addressee. It may contain confidential material. If you are not the correct addressee, please notify the sender immediately and destroy the message. The content of this message will engage the responsibility of Steria only if it has been sent by an authorized person acting in the strict scope of his functions and for purposes that are related to his competence. Although reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
</font>
</body>
</html></font>