[opencms-dev] Accesing offline resources from the online project?

Matias Basilico mbasilico at gmail.com
Thu Jul 21 14:57:42 CEST 2005


Hi Michael !! I will try and I will send the options I test...

thanks! for your help.

2005/7/21, Michael Moossen <m.moossen at alkacon.com>:
> 
> hi, Matias!
> try to use org.opencms.util.CmsRequestUtil#forwardRequest(String,
> HttpServletRequest, HttpServletResponse) instead of sendRedirect.
> 
> --
> Regards
> Michael Moossen
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com
> 
> 
> 
> Quoting Matias Basilico <mbasilico at gmail.com>:
> 
> > Hi Thomas...thanks for your answer!!...
> >
> > Here more details:
> >
> > targetNewFolder = "/subFolder1/";
> >
> > >What does cms.getRequestContext().getSiteRoot() say?
> >
> > It says: "/sites/mySite"
> >
> > when I finish to create the resource in the offline the tree is:
> >
> > /sites/mySite/subFolder1/1.html
> > /sites/mySite/subFolder1/2.html
> >
> > and so on...
> >
> >
> > >response.sendRedirect( cms.link(n + "1.html") );
> >
> > It is the same line that I test...It doesn't work... :(
> >
> > I execute the the cms.link() AFTER create the user, login the new user 
> and
> > change it to the offline...
> >
> > Now I'm creating a normal CMS USER 'cause I thinki the webUser has not
> > permission
> > to the offline, is it?
> >
> > Again thanks for your interest in solve my problem...and I hope you or
> > someone can help
> > me with this problem...
> >
> > Matutek
> >
> >
> > 2005/7/19, Thomas Maerz <thomasmaerz at gmx.de>:
> > >
> > > Matias Basilico <mbasilico at gmail.com> writes:
> > >
> > > > When I create the folder I switch the user to the offline project
> > > > in the jsp with:
> > > > //4 = OFFLINE PROJECT
> > > > cmso.getRequestContext().setCurrentProject(cmso.readProject(4));
> > > > //-----------------
> > > >
> > > > then after all the operations I want to go to the new resources 
> with:
> > > > response.sendRedirect( cms.link(targetNewFolder + "1.html") );
> > >
> > > What's the URL of the resource if you preview it in your browser?
> > > And what content has targetNewFolder?
> > > What does cms.getRequestContext().getSiteRoot() say?
> > >
> > > Does the following work?
> > >
> > > | String n = targetNewFolder;
> > > | n = cms.getRequestContext().removeSiteRoot(n);
> > > | response.sendRedirect( cms.link(n + "1.html") );
> > >
> > >
> > > Regards,
> > > Thomas
> > >
> > >
> >
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> 


-- 
Matutek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050721/0394198c/attachment.htm>


More information about the opencms-dev mailing list