You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Wei Guan <wg...@bea.com> on 2003/01/29 08:02:54 UTC

JSP vs Velocity

I like Velocity. However, there are lots of JSP tags, such as JSP output stream buffer cache tag I could use, I had hard time to find similiar Velocity library.

Which do you prefer? Any serious JetSpeed Velocity development and deployment?

How is the popularity of JetSpeed? 

RE: JSP vs Velocity

Posted by Mark Orciuch <ma...@ngsltd.com>.
> But wondering the overall templates need to be still velocity in jetspeed
> framework.

They can be either Velocity or JSP.

> the portlets can be jsp.  remember that context object is always null in
> jsp :-)

Yes, with JspPortlet, you would use request attributes which is equivalent
to Velocity "context".

Best regards,

Mark Orciuch - morciuch@apache.org
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: JSP vs Velocity

Posted by Shan Gopalakrishnan <sg...@cisco.com>.
But wondering the overall templates need to be still velocity in jetspeed 
framework.
the portlets can be jsp.  remember that context object is always null in 
jsp :-)

At 10:40 PM 1/29/2003 -0800, Michael Rothrock wrote:
>I would say that it works perfectly well for my strategy, but I believe
>there's still an issue over how JSPs handle actions.  I've been pushing that
>one off, but I will eventually reach a point where I can't ignore it.
>
>FWIW, my strategy is to prototype in JSP, then move the code into a class
>that inherits from AbstractInstancePortlet.  For the most part, my approach
>has been to have that class generate what amounts to a List of objects
>which are placed into the request.  The JSP is then limited to iterating
>through the list and simply displaying the getXXX attributes of each object.
>My JSP files are nothing more than iterators, and this works pretty well for
>me.  If this is a radically incorrect approach, I'd appreciate the feedback
>now!!!
>
>Once you reach this level of isolation, it really doesn't matter if you
>choose JSP or Velocity.  My rational behind choosing JSPs is as follows:
>1) Its faster (for me, but YMMV) to prototype my Java code in JSPs
>2) Dreamweaver understands JSPs
>3) If I need to contract out, JSP-savvy designers are far more common (and
>hence cheaper) than Velocity-savvy ones
>4) Thus far, I have the CPU cycles to spare on JSP, though this may change
>once I go live
>
>-- Michael
>
>
>On 1/29/03 8:53 PM, "Mark Orciuch" <ma...@ngsltd.com> wrote:
>
> >> Furthermore, you'll find that JSP's integration is largely a kludge.
> >
> > How so? No, I'm not trying to start a Velocity vs. JSP war but I'm
> > interested in any shortcomings with the JSP integration.
> >
> > Best regards,
> >
> > Mark Orciuch - morciuch@apache.org
> > Jakarta Jetspeed - Enterprise Portal in Java
> > http://jakarta.apache.org/jetspeed/
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


How to set Security for Portlets ?

Posted by Sunil Sheshadri <ss...@cisco.com>.
Hi,
I have two new roles defined in my application. role1 and role2

I have 4 portlets.
role1 has to access only 1 and 2 portlets.
but role2 has to have access to all 1,2,3,4 portlets. How to sent the roles
for the portlets ?


Regards,
Sunil P S.
Off: 5010261 (extn :2261)
Res: 3329038


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: JSP vs Velocity

Posted by Michael Rothrock <mi...@michaelrothrock.com>.
I would say that it works perfectly well for my strategy, but I believe
there's still an issue over how JSPs handle actions.  I've been pushing that
one off, but I will eventually reach a point where I can't ignore it.

FWIW, my strategy is to prototype in JSP, then move the code into a class
that inherits from AbstractInstancePortlet.  For the most part, my approach
has been to have that class generate what amounts to a List of objects
which are placed into the request.  The JSP is then limited to iterating
through the list and simply displaying the getXXX attributes of each object.
My JSP files are nothing more than iterators, and this works pretty well for
me.  If this is a radically incorrect approach, I'd appreciate the feedback
now!!!

Once you reach this level of isolation, it really doesn't matter if you
choose JSP or Velocity.  My rational behind choosing JSPs is as follows:
1) Its faster (for me, but YMMV) to prototype my Java code in JSPs
2) Dreamweaver understands JSPs
3) If I need to contract out, JSP-savvy designers are far more common (and
hence cheaper) than Velocity-savvy ones
4) Thus far, I have the CPU cycles to spare on JSP, though this may change
once I go live

-- Michael


On 1/29/03 8:53 PM, "Mark Orciuch" <ma...@ngsltd.com> wrote:

>> Furthermore, you'll find that JSP's integration is largely a kludge.
> 
> How so? No, I'm not trying to start a Velocity vs. JSP war but I'm
> interested in any shortcomings with the JSP integration.
> 
> Best regards,
> 
> Mark Orciuch - morciuch@apache.org
> Jakarta Jetspeed - Enterprise Portal in Java
> http://jakarta.apache.org/jetspeed/
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: JSP vs Velocity

Posted by Mark Orciuch <ma...@ngsltd.com>.
> Furthermore, you'll find that JSP's integration is largely a kludge.

How so? No, I'm not trying to start a Velocity vs. JSP war but I'm
interested in any shortcomings with the JSP integration.

Best regards,

Mark Orciuch - morciuch@apache.org
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: JSP vs Velocity

Posted by "Andrew C. Oliver" <ac...@apache.org>.
I suggest you will find that Velocity performs better in Jetspeed. 
Furthermore, you'll find that JSP's integration is largely a kludge.  I 
would suggest that JSP is not appropriate for outputting binary files.

-Andy

Wei Guan wrote:
> I like Velocity. However, there are lots of JSP tags, such as JSP output stream buffer cache tag I could use, I had hard time to find similiar Velocity library.
> 
> Which do you prefer? Any serious JetSpeed Velocity development and deployment?
> 
> How is the popularity of JetSpeed? 




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


User Roles(Admin.security) Portlet Problem

Posted by Sunil Sheshadri <ss...@cisco.com>.
Hi,
I am getting the following error which i try to add the User Role portlet.
portlet gets added and it is display $user.FirstName rather than actual
name. I am not able to see all the Users and Assign the Roles to them. How
to assign Users the roles?????
I am also facing these problem with Role Permission Portlet also..
I am using Jetspeed 1.4b1.

Pls let me know what could be the problem..


Error is :
2003-01-29 12:01:06,784 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = /portlets/html/user-role-form.vm [line 8,column 15] :
$user.FirstName is not a valid reference.
2003-01-29 12:01:06,784 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = /portlets/html/user-role-form.vm [line 8,column 31] :
$user.LastName is not a valid reference.

2003-01-29 11:56:12,661 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = /portlets/html/permission-form.vm [line 3,column 19] :
$ui.sansSerifFonts is not a valid reference.
2003-01-29 11:56:12,671 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = /portlets/html/permission-form.vm [line 2,column 17] :
$ui.sansSerifFonts is not a valid reference.
2003-01-29 11:56:12,671 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = /portlets/html/permission-form.vm [line 37,column 20] :
$ui.buttonAlignment is not a valid reference.
2003-01-29 11:56:12,671 - Left side ($mode) of '==' operation has null
value. If a reference, it may not be in the context. Operation not possible.
/portlets/html/permission-form.vm [line 43, column 24]
2003-01-29 11:56:12,671 - Left side ($mode) of '==' operation has null
value. If a reference, it may not be in the context. Operation not possible.
/portlets/html/permission-form.vm [line 45, column 28]
2003-01-29 11:56:13,823 - ResourceManager : found navigations/html/bottom.vm
with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader



Regards,
Sunil P S.
Off: 5010261 (extn :2261)
Res: 3329038



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org