List Info

Thread: RE: combining JSP an JavaScript




RE: combining JSP an JavaScript
user name
2007-02-01 09:56:14
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-bouncesopencms.org
[mailto:opencms-dev-bouncesopencms.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 : gehelamessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.
com/
* http://rwandatech.wo
rdpress.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

_______________________________________________
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

Re:
country flaguser name
Germany
2007-02-04 02:16:59
do you think it is very "unconventional" if I mix JSP and CSS?

like different background images on every load of the css?

best regards volkmar



Scott Carlson schrieb:
newman.optionvue.local" type="cite">
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.org">opencms-dev-bouncesopencms.org
[opencms.org">mailto:opencms-dev-bouncesopencms.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


  

--


Mit freundlichen Grüßen

Volkmar Emberger
Diplomand

e-tecture GmbH
Hirschstraße 2
76133 Karlsruhe

Tel: +49 721 570458-17
Fax: +49 721 1205468
volkmar.embergere-tecture.com" style="color: rgb(160, 20, 20);">volkmar.embergere-tecture.com
www.e-tecture.com

e-tecture GmbH
Darmstädter Landstraße 112
60598 Frankfurt am Main
Amtsgericht Frankfurt am Main
HRB 56449
Gesellschaft mit Sitz in Frankfurt am Main
Geschäftsführer: Christian Schwab

Diese e-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese e-Mail irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese e-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser e-Mail ist nicht gestattet.

This e-Mail may contain confidential and/or privileged information. If you are not
the intended recipient (or have received this e-Mail in error) please notify the sender
immediately and destroy this e- Mail. Any unauthorized copying, disclosure or
distribution of the material in this e-Mail is strictly forbidden.
RE:
country flaguser name
United Kingdom
2007-02-04 06:17:01
It's not that unconventional - after all, all it means is there may need to be some element of the CSS which is dynamic.
 
However, you may find a problem if you expect a CSS to be loaded on each request.&nbsp; Browsers tend to cache linked stylesheet files for longer than they're meant to, in my experience, so you can't reliably use a CSS for the purpose you describe.&nbsp; Instead, you could make the background style part of the main page itself ("<body style="background: url(....)" ).
 
Jon


From: sfdbfouihost2.scintillance.com [mailto:sfdbfouihost2.scintillance.com] On Behalf Of Volkmar Emberger
Sent: 04 February 2007 08:17
To: The OpenCms mailing list
Subject: Re: [opencms-dev] combining JSP an JavaScript + [edit: and CSS]

do you think it is very "unconventional" if I mix JSP and CSS?

like different background images on every load of the css?

best regards volkmar



Scott Carlson schrieb:
newman.optionvue.local type="cite">
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.org">opencms-dev-bouncesopencms.org
[opencms.org">mailto:opencms-dev-bouncesopencms.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


  

--


Mit freundlichen Grüßen

Volkmar Emberger
Diplomand

e-tecture GmbH
Hirschstraße 2
76133 Karlsruhe

Tel: +49 721 570458-17
Fax: +49 721 1205468
e-tecture.com">volkmar.embergere-tecture.com
www.e-tecture.com

e-tecture GmbH
Darmstädter Landstraße 112
60598 Frankfurt am Main
Amtsgericht Frankfurt am Main
HRB 56449
Gesellschaft mit Sitz in Frankfurt am Main
Geschäftsführer: Christian Schwab

Diese e-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese e-Mail irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese e-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser e-Mail ist nicht gestattet.

This e-Mail may contain confidential and/or privileged information. If you are not
the intended recipient (or have received this e-Mail in error) please notify the sender
immediately and destroy this e- Mail. Any unauthorized copying, disclosure or
distribution of the material in this e-Mail is strictly forbidden.
RE:
country flaguser name
Germany
2007-02-04 23:57:27
I do create CSS files from JSP's. But, the final output is
static (i.e. from request to request, it is the same). I
personally would not create CSS files that change from
request to request.
 
If I were using a style that changed from page to page, I
would set that style in the HEAD of each specific page. That
allows the CSS file to be cached by the browser, and also
allows for the dynamic changing of a few specific styles.
 
Even if style sheet files are properly loaded for each
request, I think there might be side effects of the changing
style sheets. For example, image displaying page A, then
page B, then using the browser to display the previous page.
Will page A display with page B style sheet? That would be
my guess...
 
Scott

________________________________

From: opencms-dev-bouncesopencms.org on behalf of
Jonathan Woods
Sent: Sun 2/4/2007 6:17 AM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] combining JSP an JavaScript +
[edit: and CSS]


It's not that unconventional - after all, all it means is
there may need to be some element of the CSS which is
dynamic.
 
However, you may find a problem if you expect a CSS to be
loaded on each request.  Browsers tend to cache linked
stylesheet files for longer than they're meant to, in my
experience, so you can't reliably use a CSS for the purpose
you describe.  Instead, you could make the background style
part of the main page itself ("<body
style="background: url(....)" ).
 
Jon

________________________________

From: sfdbfouihost2.scintillance.com
[mailto:sfdbfouihost2.scintillance.com] On Behalf Of
Volkmar Emberger
Sent: 04 February 2007 08:17
To: The OpenCms mailing list
Subject: Re: [opencms-dev] combining JSP an JavaScript +
[edit: and CSS]


do you think it is very "unconventional" if I mix
JSP and CSS?

like different background images on every load of the css?

best regards volkmar



Scott Carlson schrieb: 

	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-bouncesopencms.org
	[mailto:opencms-dev-bouncesopencms.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
	
	  


-- 


Mit freundlichen Grüßen

Volkmar Emberger
Diplomand

e-tecture GmbH
Hirschstraße 2
76133 Karlsruhe

Tel: +49 721 570458-17
Fax: +49 721 1205468
volkmar.embergere-tecture.com
www.e-tecture.com

e-tecture GmbH
Darmstädter Landstraße 112
60598 Frankfurt am Main
Amtsgericht Frankfurt am Main
HRB 56449
Gesellschaft mit Sitz in Frankfurt am Main
Geschäftsführer: Christian Schwab

Diese e-Mail enthaelt vertrauliche und/oder rechtlich
geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese e-Mail
irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese e-Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser e-Mail ist nicht gestattet.

This e-Mail may contain confidential and/or privileged
information. If you are not
the intended recipient (or have received this e-Mail in
error) please notify the sender
immediately and destroy this e- Mail. Any unauthorized
copying, disclosure or
distribution of the material in this e-Mail is strictly
forbidden.



_______________________________________________
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
  
RE:
country flaguser name
United Kingdom
2007-02-05 02:12:44
I've found that I even have to rename my stylesheet from
build to build
(i.e. I include a build timestamp in the filename) just to
avoid the caching
issues.
 
Jon

  _____  

From: sfdbfouihost2.scintillance.com
[mailto:sfdbfouihost2.scintillance.com] On Behalf Of Scott
Carlson
Sent: 05 February 2007 05:57
To: The OpenCms mailing list
Subject: RE: [opencms-dev] combining JSP an JavaScript +
[edit: and CSS]


I do create CSS files from JSP's. But, the final output is
static (i.e. from
request to request, it is the same). I personally would not
create CSS files
that change from request to request.
 
If I were using a style that changed from page to page, I
would set that
style in the HEAD of each specific page. That allows the CSS
file to be
cached by the browser, and also allows for the dynamic
changing of a few
specific styles.
 
Even if style sheet files are properly loaded for each
request, I think
there might be side effects of the changing style sheets.
For example, image
displaying page A, then page B, then using the browser to
display the
previous page. Will page A display with page B style sheet?
That would be my
guess...
 
Scott

  _____  

From: opencms-dev-bouncesopencms.org on behalf of
Jonathan Woods
Sent: Sun 2/4/2007 6:17 AM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] combining JSP an JavaScript +
[edit: and CSS]


It's not that unconventional - after all, all it means is
there may need to
be some element of the CSS which is dynamic.
 
However, you may find a problem if you expect a CSS to be
loaded on each
request.  Browsers tend to cache linked stylesheet files for
longer than
they're meant to, in my experience, so you can't reliably
use a CSS for the
purpose you describe.  Instead, you could make the
background style part of
the main page itself ("<body style="background:
url(....)" ).
 
Jon

  _____  

From: sfdbfouihost2.scintillance.com
[mailto:sfdbfouihost2.scintillance.com] On Behalf Of
Volkmar Emberger
Sent: 04 February 2007 08:17
To: The OpenCms mailing list
Subject: Re: [opencms-dev] combining JSP an JavaScript +
[edit: and CSS]


do you think it is very "unconventional" if I mix
JSP and CSS?

like different background images on every load of the css?

best regards volkmar



Scott Carlson schrieb: 

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-bouncesopencms.org

[mailto:opencms-dev-bouncesopencms.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



  


-- 


Mit freundlichen Grüßen

Volkmar Emberger
Diplomand

e-tecture GmbH
Hirschstraße 2
76133 Karlsruhe

Tel: +49 721 570458-17
Fax: +49 721 1205468
volkmar.embergere-tecture.com
www.e-tecture.com

e-tecture GmbH
Darmstädter Landstraße 112
60598 Frankfurt am Main
Amtsgericht Frankfurt am Main
HRB 56449
Gesellschaft mit Sitz in Frankfurt am Main
Geschäftsführer: Christian Schwab

Diese e-Mail enthaelt vertrauliche und/oder rechtlich
geschuetzte
Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese e-Mail
irrtuemlich
erhalten
haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese
e-Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser e-Mail ist
nicht gestattet.

This e-Mail may contain confidential and/or privileged
information. If you
are not
the intended recipient (or have received this e-Mail in
error) please notify
the sender
immediately and destroy this e- Mail. Any unauthorized
copying, disclosure
or
distribution of the material in this e-Mail is strictly
forbidden.



_______________________________________________
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
  
Re:
user name
2007-02-05 05:07:57
> I've found that I even have to rename my stylesheet
from build to build
> (i.e. I include a build timestamp in the filename) just
to avoid the caching
> issues.

  You could also change the page itself. Define different
classes for
your different background images in the CSS. Than, change
the class in
the HTML everytime the HTML is generated. You will not
experience CSS
caching problems this way. One could argue that it would put
style
information in the HTML which is a bad thing. But it's just
a small
class tag, isnt it ?

   Good luck,

     Guillaume


-- 
Jabber : gehelamessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.
com/
* http://rwandatech.wo
rdpress.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

Re:
user name
2007-02-05 11:35:23
For me, it is mandatory to mix jsp and css.

CSS is for style, and if your backgound is style verse function, then I think you should use CSS. But it sounds like you need to look into skins for this. That way each page can determin a different skin that is defined in CSS.

xSkins is pretty good...


On 2/4/07, Volkmar Emberger < volkmar.embergere-tecture.com">volkmar.embergere-tecture.com > wrote:
do you think it is very "unconventional&quot; if I mix JSP and CSS?

like different background images on every load of the css?

best regards volkmar



Scott Carlson schrieb:
newman.optionvue.local" type="cite">
The key is that the OpenCms type needs to be JSP. The extension in the
name can still be "js&quot; (i.e. it need not have a "jsp&quot; extension).

I do this all the time. In fact, all my normal jsp pages have an
extension of "html" instead of "jsp&quot;. 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-bouncesopencms.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">opencms-dev-bouncesopencms.org [ opencms-dev-bouncesopencms.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mailto:opencms-dev-bouncesopencms.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&quot; 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


--


Mit freundlichen Grüßen

Volkmar Emberger
Diplomand

e-tecture GmbH
Hirschstraße 2
76133 Karlsruhe

Tel: +49 721 570458-17
Fax: +49 721 1205468
volkmar.embergere-tecture.com" style="color: rgb(160, 20, 20);" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">volkmar.embergere-tecture.com
www.e-tecture.com

e-tecture GmbH
Darmstädter Landstraße 112
60598 Frankfurt am Main
Amtsgericht Frankfurt am Main
HRB 56449
Gesellschaft mit Sitz in Frankfurt am Main
Geschäftsführer: Christian Schwab

Diese e-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese e-Mail irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese e-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser e-Mail ist nicht gestattet.

This e-Mail may contain confidential and/or privileged information. If you are not
the intended recipient (or have received this e-Mail in error) please notify the sender
immediately and destroy this e- Mail. Any unauthorized copying, disclosure or
distribution of the material in this e-Mail is strictly forbidden.


_______________________________________________
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




--
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
---
[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )