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

Thomas Maerz thomasmaerz at gmx.de
Wed Jul 20 00:56:07 CEST 2005


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




More information about the opencms-dev mailing list