[opencms-dev] combining JSP an JavaScript

Scott Carlson scott at optionvue.com
Thu Feb 1 16:56:14 CET 2007


The key is that the OpenCms type needs to be JSP. The extension in the
name can still be "js" (i.e. it need not have a "jsp" extension).

I do this all the time. In fact, all my normal jsp pages have an
extension of "html" instead of "jsp". OpenCms is nice in the fact that
it handles the complexity of using the "wrong" extension for jsp pages
behind the scenes.

Scott

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Guillaume Lederrey
Sent: Thursday, February 01, 2007 6:25 AM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] combining JSP an JavaScript

>  I thought the cms-tags will be inserted with the information before
the
> script is sended to the client
>  so why is it working with css but not with javascript?

  I havent tried it myself but ...

  A ".js" file sould be treated as a simple resource, and should not
be interpreted by OpenCms. If you want to have dynamic content inside
you .js file, you should declare it as a JSP file. You can than
include "myJavaScript.jsp" in your template and it should  work.

   Good luck

     Guillaume

-- 
Jabber : gehel at amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

_______________________________________________
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



More information about the opencms-dev mailing list