[opencms-dev] Réf. : Opencms with Spring

jacek grzebyta (RRes-Roth) jacek.grzebyta at bbsrc.ac.uk
Thu Sep 30 17:36:08 CEST 2010


Hi again,

So nothing useful in Apache doc however I found that:
http://www.fwd.at/tomcat/sharing-session-data-howto.html

In example “How to put shared data into a Context” I found a method which have an argument ServletContext. I’d test:

class MainTemplate extends CmsJspActionElement {

public MainTemplate(ServletContext mainContext, PageContext pcontext, HttpServletRequest req, HttpServletResponse resp)  {
...
}

....
}


And further controller like

Public String getlogin(ServletContext maincontext, ....)

I’ve never tested if Cms & Spring use the same HttpSession I suppose they don’t cos thee is no general reason to do that but I don’t know ☺. Buth otherwise if I run spring stuff inside cms jsp:

 <c:choose>
                <c:when test="${jsp.springView == 'true'}">
                                <c:import url="${jsp.uri.path}"/>
                </c:when>
                <c:otherwise>
                                <p>This is no spring</p>
                </c:otherwise>
</c:choose>

?? I don’t know. And where put <% page session=”true” ... %>? In the main jsp or spring stuff loader?

Regards,
Jacek

From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of jacek grzebyta (RRes-Roth)
Sent: 30 September 2010 12:31
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Réf. : Opencms with Spring

Hi,

I am diving in Tomcat docs now but I have some idea. In the web.xml we shows to tomcat what spring beans should be loaded so maybe we can put a kind of tunnel as a bean to create. Than it could be shared among servlets. Also cms and spring are in the same context (I guess) so it must be some easy way to join them together.

Jacek




From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of olivier.camus at steria.com
Sent: 30 September 2010 08:06
To: The OpenCms mailing list
Subject: [opencms-dev] Réf. : Opencms with Spring

Hi,
We are currently starting to use SpringMVC && OpenCms on one of our project.
We forsake to transfer data using the HTTPSession, did you already try that ?
Another Way is to consider that once Spring did is job you just send the request (sendRedirect) to opencms (and actually you had attached all your info to the request).

I am very interresting to be involve in this discussion since there no real info about that on the Internet.

I hope it helps
Olivier CAMUS

Steria
2 rue de la Faisanderie
BP 95 - Lingolsheim
F-67380 Strasbourg

Tel : +33 3 90 20 77 52
Mobile: +33 6 32 97 22 32
olivier.camus at steria.fr<mailto:olivier.camus at steria.fr>
www.steria.fr<http://www.steria.fr/>

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce courriel que si nécessaire

-----opencms-dev-bounces at opencms.org a écrit : -----
Pour : "opencms-dev at opencms.org" <opencms-dev at opencms.org>
De : "jacek grzebyta (RRes-Roth)" <jacek.grzebyta at bbsrc.ac.uk>
Envoyé par : opencms-dev-bounces at opencms.org
Date : 30/09/2010 00:41
Objet : [opencms-dev] Opencms with Spring

Hi guys,

I have problem with simple passing CmsUser to Springs` controllers. In my projects database (not cms database) I store information about curators. Since before any change inside, the curator must login through cms so the best way is just passing CmsUser from cms level to the spring. I considered:

1. using spring inside cms not as usually the parallel servlet but it makes difficulties with generating html code from views. And in that way I'll lose a lot of functionalities.
2. The most obvious way is doing as usually (parallel servlet) but it makes difficulties with passing Cms* classes to spring.
3. I found something like servlet-servlet communication but some people says it's more risky or too difficult to do it.
4. Another way is just simple serialisation. But than it must be a way to inform spring that there is some "parcel" for it.

What do you think about? What is your opinion about that? Is any other way to consider?
Thank you for help,

Best wishes,
Jacek Grzebyta

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

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.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100930/a1fa8034/attachment.htm>


More information about the opencms-dev mailing list