Forums / Developer / jsp + templates

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.

:)

eZ debug

Timing: Jan 31 2025 01:25:52
Script start
Timing: Jan 31 2025 01:25:52
Module start 'content'
Timing: Jan 31 2025 01:25:52
Module end 'content'
Timing: Jan 31 2025 01:25:52
Script end

Main resources:

Total runtime0.1812 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.7578370.3125
Module start 'content' 0.00660.0128 958.07031,005.4609
Module end 'content' 0.01940.1618 1,963.53133,893.7500
Script end 0.1812  5,857.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00432.3457200.0002
Check MTime0.00130.7028200.0001
Mysql Total
Database connection0.00060.329910.0006
Mysqli_queries0.085747.26221410.0006
Looping result0.00110.60021390.0000
Template Total0.161489.010.1614
Template load0.00090.489010.0009
Template processing0.160588.534810.1605
Override
Cache load0.00060.344810.0006
Sytem overhead
Fetch class attribute can translate value0.00170.963310.0017
XML
Image XML parsing0.00030.140210.0003
General
dbfile0.01005.5000200.0005
String conversion0.00000.003330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs