jsp + templates

Author Message

anne martinet

Wednesday 06 August 2008 4:46:06 am

Good morning,

I would like to know if you can write jsp in the templates. And if so, how.
If you can not write jsp in the templates, how can you do with an extension .....
php call a script file. jsp?
where should find this file. jsp?

thank you in advance

André R.

Wednesday 06 August 2008 10:52:02 pm

eZ Publish runs on PHP, it is one of the most popular web server platforms, the most known are PHP, Java, .Net, Coldfusion, Phyton and Ruby. '.jsp' is a Java technology, and can not easily be mixed with the other server platforms like PHP.

But, ezfind uses Solr, a Java based search engine, and it works like this:
ezfind is a bunch of PHP code to make handle all updates / indexing / searching in eZ Publish.
But in the background these actions are sent using a http (alternatives in your case: Soap,Rest, Post or a simple Get) request to a Java server on the same machine (you can set it up on a different machine as well, but that would increase latency a bit) using a different port ( on ezfind its normally http://localhost:8984 ).

Edit: If your talking about .js (client side JavaScript) on the other hand, then you can easily mix the code with the (x)html in your templates.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Maxime Thomas

Thursday 28 August 2008 11:26:32 pm

There's a way, a tricky one, but a way to do that.
For one of my project, we put JSP code directly in templates between literal markups. We generated a static export to another plateform (Websphere portal) which will run those files and will serve it to the user.
We just did that because our client would like to keep his Websphere license. Another point is that when mixing two technologies, you are presuming to face more bugs...

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

anne martinet

Friday 29 August 2008 12:13:34 am

thanks for your answers, I try this solution.

:)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:20:37
Script start
Timing: Jan 19 2025 03:20:37
Module start 'layout'
Timing: Jan 19 2025 03:20:37
Module start 'content'
Timing: Jan 19 2025 03:20:38
Module end 'content'
Timing: Jan 19 2025 03:20:38
Script end

Main resources:

Total runtime0.8509 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0313152.6094
Module start 'layout' 0.00480.0031 741.640639.3984
Module start 'content' 0.00790.8414 781.0391595.1016
Module end 'content' 0.84930.0015 1,376.140612.5156
Script end 0.8508  1,388.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3748160.0002
Check MTime0.00130.1511160.0001
Mysql Total
Database connection0.00080.089410.0008
Mysqli_queries0.800694.0922620.0129
Looping result0.00050.0633600.0000
Template Total0.818996.220.4094
Template load0.00200.236120.0010
Template processing0.816996.003420.4084
Template load and register function0.00020.021010.0002
states
state_id_array0.00100.119810.0010
state_identifier_array0.00070.076720.0003
Override
Cache load0.00170.1949240.0001
Sytem overhead
Fetch class attribute can translate value0.00060.071530.0002
Fetch class attribute name0.00100.113060.0002
XML
Image XML parsing0.00110.128330.0004
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00180.2089230.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs