Re: [Velocity Tools] - Struts

2002-09-04 Thread Gabriel Sidler

Day, Michael-IBM/TT wrote:

> I am attempting to use velocity tools 0.9 with struts 1.1-b2 and velocity
> 1.3.  Does anyone know how I could use a VM template for layout purposes,
> instead of doing #include for headers/footers/menus on each content page?
> For example, the login page may have a layout different from a product
> display page.  I'd like to define this separate from the content.
> 


In the Struts/JSP world there is Tiles. Tiles is a JSP Taglib and could be
described as a templating system or document assembler. You might be
able to get some ideas from it for use in Velocity. It seems quite
popular and successful within the Struts community.
http://jakarta.apache.org/struts/userGuide/dev_tiles.html

I also liked the article "UI design with Tiles and Struts" at
http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html
It's JSP-focused and therefore not directly applicable to Velocity,
but it nicely present the various concepts to eliminate redudancy
in web pages by using templates.

It would be really great to have something like Tiles for Velocity.
That would be a cool contribution...


Gabe


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Velocity-Tools / Struts

2002-02-19 Thread Matt Ho

We've been using Struts/Velocity for some time now and we find it to be
an extremely well matched combination.  One of the main advantages of
Velocity is that the syntax is incredibly easy.  I can explain it to a
designer who has never seen it before and expect them to be useful
within an hour.

One of the nicest things it enforces is the separation of presentation
layer and business logic.  It removes the desire to "fix" problems but
just putting a small change into the JSP via scriptlets.  It also makes
the code a _lot_ more readable which also reduces the development time.


> i have been looking at velocity periodically for a few months now, and
> although i understand what it is trying to do (define a clearer
separation
> between controller and view) i felt that its big disadvantage was that
it
> introduced another language/syntax for a developer/designer to learn.
In
> view of this i decided to stay with struts, and occasionally resort to
> using
> java scriptlets in my applications !-)

--
Matt Ho
Principal
Indigo Egg, Inc.
Providing VoiceXML Professional Services




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Velocity-Tools / Struts

2002-01-22 Thread Martin Farrell

hi

i have been looking at velocity periodically for a few months now, and
although i understand what it is trying to do (define a clearer separation
between controller and view) i felt that its big disadvantage was that it
introduced another language/syntax for a developer/designer to learn. In
view of this i decided to stay with struts, and occasionally resort to using
java scriptlets in my applications !-)

i would be interested in hearing other peoples opinions on this issue,
especially since struts can now integrate with velocity. i may be persuaded
to use velocity in my applications

thanks 

Martin




-Original Message-
From: Gabriel Sidler [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 17:05
To: Struts Users Mailing List
Subject: Re: Velocity-Tools / Struts


Will Spies/Towers Perrin wrote:
> 
> I mean your example *displays* an array. Let's say I change your example
> and instead of displaying an array I want to *edit* all elements in the
> array and post the results up to struts. Here is a JSP struts example of
> what we do:


Velocity is a view technology like JSP, so you would use it in the 
exact same way you currently use your JSP templates. With Velocity your 
example would like this:




  
 Employee Id 
 Client Id 
 Work Zip Code 
 Mail code 
 Delete 
  
#set ($empForm = $employmentForm)  To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


** For great Emap magazine subscription & gift offers visit 
http://www.emapmagazines.co.uk **


The information in this email is intended only for the addressee(s) named above.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient of this message any disclosure, copying, 
distribution or any action taken in reliance on it is prohibited and may be unlawful. 

Emap plc and or its subsidiaries do not warrant that any attachments are free from 
viruses or other defects and accept no liability for any losses resulting from 
infected email transmissions.

Please note that any views expressed in this email may be those of the originator 
and do not necessarily reflect those of this organisation.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Velocity-Tools / Struts

2002-01-22 Thread Gabriel Sidler

Will Spies/Towers Perrin wrote:
> 
> I mean your example *displays* an array. Let's say I change your example
> and instead of displaying an array I want to *edit* all elements in the
> array and post the results up to struts. Here is a JSP struts example of
> what we do:


Velocity is a view technology like JSP, so you would use it in the 
exact same way you currently use your JSP templates. With Velocity your 
example would like this:




  
 Employee Id 
 Client Id 
 Work Zip Code 
 Mail code 
 Delete 
  
#set ($empForm = $employmentForm)  To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-22 Thread Arron

Do you mean, serve a form in Velocity and have Struts interpret it?...

 From what I know (FWIK? :) Velocity is more of a "view" system. You can 
use Velocity and Struts at the same time, using Velocity as the "view" 
system in the Struts MVC paradigm.

They're alsmost complementary in a way, and a few people are putting 
some effort into getting them married in an elegant fashion.

Other mails in this list have focused on resources for this, so have a 
search around.

Arron.

Gabriel Sidler wrote:

>Will Spies/Towers Perrin wrote:
>
>>That's great! But how about the other way? Can I post an array in velcity
>>up to a struts form ( via a controller ) which contains an array?
>>
>
>Sorry, I don't get what you mean here. Can you elaborate/make an example?
>
>Gabe
>
>
>
>>___
>>Will Spies
>>Towers Perrin
>>Phone: (215)246-7145
>>e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> To: Struts Users Mailing List 
><[EMAIL PROTECTED]>
>>Gabriel Sidler   cc: (bcc: Will Spies/Towers Perrin)
>>>.ch>
>>
>>01/21/02 04:37
>>PM
>>Please respond
>>to "Struts
>>Users Mailing
>>List"
>>
>>
>>
>>Will Spies/Towers Perrin wrote:
>>
>>>It would be real helpful if this example include posting an array. Is
>>>
>>this
>>
>>>even doable with velstruts?
>>>
>>You mean like creating HTML output from the content of an array?
>>
>>That's quite simple. Assuming you have a 'user' object with 'orders'
>>associated
>>with the session, the template might look like this:
>>
>>
>>#foreach ($order in $session.user.orders)
>>  
>>$order.nbr
>>$order.text
>>$order.amount
>>  
>>#end
>>
>>
>>...would create a table of all orders. Were are going to add more doc and
>>examples. For now you find more info on the Velocity home page at
>>jakarta.apache.org/velocity/
>>
>>Gabe
>>
>>>___
>>>Will Spies
>>>Towers Perrin
>>>Phone: (215)246-7145
>>>e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> To:
>>>
>>[EMAIL PROTECTED]
>>
>>>Ted Husted   cc: (bcc: Will Spies/Towers
>>>
>>Perrin)
>>
>>>>>
>>Struts
>>
>>>.org>
>>>
>>>01/18/02 09:46
>>>AM
>>>Please respond
>>>to "Struts
>>>Users Mailing
>>>List"
>>>
>>>
>>>
>>>Will Spies/Towers Perrin wrote:
>>>
>>And Velocity can access the Struts controller too :)
>>
is this documented anywhere? Is this just in development now or is it

>>>part
>>>
of their release?

>>>It hasn't made it into the release yet, but the code is already working
>>>and seems mature. It's just a matter of making the Struts elements
>>>available as standard objects that Velocity can see.
>>>
>>>Really ~very~ cool. You can download the sample application WAR here.
>>>Very much worth a look.
>>>
>>>http://husted.com/struts/resources/velstruts.zip
>>>
>>>I'll be working on adding more documentation for this, and other
>>>contributions like the Commons-Validator and Tiles to the Struts User
>>>Guide.
>>>
>>>-- Ted Husted, Husted dot Com, Fairport NY USA.
>>>-- Building Java web applications with Struts.
>>>-- Tel +1 585 737-3463.
>>>-- Web http://www.husted.com/struts/
>>>
>>>--
>>>To unsubscribe, e-mail:   <
>>>mailto:[EMAIL PROTECTED]>
>>>For additional commands, e-mail: <
>>>mailto:[EMAIL PROTECTED]>
>>>
>>>--
>>>To unsubscribe, e-mail:   <
>>>
>>mailto:[EMAIL PROTECTED]>
>>
>>>For additional commands, e-mail: <
>>>
>>mailto:[EMAIL PROTECTED]>
>>
>>--
>>Gabriel Sidler
>>Software Engineer, Eivycom GmbH, Zurich, Switzerland
>>
>>--
>>To unsubscribe, e-mail:   <
>>mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <
>>mailto:[EMAIL PROTECTED]>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>--
>Gabriel Sidler
>Software Engineer, Eivycom GmbH, Zurich, Switzerland
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-22 Thread Will Spies/Towers Perrin




I mean your example *displays* an array. Let's say I change your example
and instead of displaying an array I want to *edit* all elements in the
array and post the results up to struts. Here is a JSP struts example of
what we do:



  
 Employee Id 
 Client Id 
 Work Zip Code 
 Mail code 
 Delete 
  
  <%EmploymentForm empForm=(EmploymentForm)request.getAttribute
("employmentForm");%>
  <%for (int i=0; i < empForm.getData().getRows().length;i++) {%>
  

  


  


  


  


  

  
  <%}%>
  
 
 
 
 
 
  




  


    





We go outside the struts tags here because in the 1.0 version the iterate
tag does not do this properly ( but the struts engine does ). Note in the
above how elements are generated as index ( [n] ) elements. The
ActionForm's would contain indexed properties in order for this to work.


What would the velocity equivalent of the above look  like?




___
Will Spies
Towers Perrin
Phone: (215)246-7145
e-mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-22 Thread Gabriel Sidler

Will Spies/Towers Perrin wrote:
> 
> That's great! But how about the other way? Can I post an array in velcity
> up to a struts form ( via a controller ) which contains an array?

Sorry, I don't get what you mean here. Can you elaborate/make an example?

Gabe



> 
> ___
> Will Spies
> Towers Perrin
> Phone: (215)246-7145
> e-mail: [EMAIL PROTECTED]
> 
> 
> 
>  To: Struts Users Mailing List 
><[EMAIL PROTECTED]>
> Gabriel Sidler   cc: (bcc: Will Spies/Towers Perrin)
>  .ch>
> 
> 01/21/02 04:37
> PM
> Please respond
> to "Struts
> Users Mailing
> List"
> 
> 
> 
> Will Spies/Towers Perrin wrote:
> >
> > It would be real helpful if this example include posting an array. Is
> this
> > even doable with velstruts?
> >
> 
> You mean like creating HTML output from the content of an array?
> 
> That's quite simple. Assuming you have a 'user' object with 'orders'
> associated
> with the session, the template might look like this:
> 
> 
> #foreach ($order in $session.user.orders)
>   
> $order.nbr
> $order.text
> $order.amount
>   
> #end
> 
> 
> ...would create a table of all orders. Were are going to add more doc and
> examples. For now you find more info on the Velocity home page at
> jakarta.apache.org/velocity/
> 
> Gabe
> 
> > ___
> > Will Spies
> > Towers Perrin
> > Phone: (215)246-7145
> > e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >  To:
> [EMAIL PROTECTED]
> > Ted Husted   cc: (bcc: Will Spies/Towers
> Perrin)
> >  Struts
> > .org>
> >
> > 01/18/02 09:46
> > AM
> > Please respond
> > to "Struts
> > Users Mailing
> > List"
> >
> >
> >
> > Will Spies/Towers Perrin wrote:
> > > >>And Velocity can access the Struts controller too :)
> > >
> > > is this documented anywhere? Is this just in development now or is it
> > part
> > > of their release?
> >
> > It hasn't made it into the release yet, but the code is already working
> > and seems mature. It's just a matter of making the Struts elements
> > available as standard objects that Velocity can see.
> >
> > Really ~very~ cool. You can download the sample application WAR here.
> > Very much worth a look.
> >
> > http://husted.com/struts/resources/velstruts.zip
> >
> > I'll be working on adding more documentation for this, and other
> > contributions like the Commons-Validator and Tiles to the Struts User
> > Guide.
> >
> > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > -- Building Java web applications with Struts.
> > -- Tel +1 585 737-3463.
> > -- Web http://www.husted.com/struts/
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> --
> Gabriel Sidler
> Software Engineer, Eivycom GmbH, Zurich, Switzerland
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-22 Thread Will Spies/Towers Perrin




No problem. I sent them a support email. I'll let you know what they say.


___
Will Spies
Towers Perrin
Phone: (215)246-7145
e-mail: [EMAIL PROTECTED]


   

   

 To: Struts Users Mailing List 
<[EMAIL PROTECTED]>
Gabriel Sidler   cc: (bcc: Will Spies/Towers Perrin)   

   

   

01/21/02 04:50 

PM 

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Will,
this is great feedback. Thanks a lot for hunting this down!

I will make sure that the necessary changes are made to Velocity.
You may want to pass this info to the Web Logic people. I believe
the previous names should work. They do with all app servers I know.

Gabe



Will Spies/Towers Perrin wrote:
>
> On a hunch, I change the following JARs from
>
> velocity-tools-struts0.1.jar
> velocity-tools-view-0.3.jar
> velocity-1.3.dev.jar
>
> to
>
> velocity-tools-struts0-1.jar
> velocity-tools-view-0-3.jar
> velocity-1-3-dev.jar
>
> and it deployed. WebLogic must look for *.jar The other dots messed up
it's
> scan.
>
> Re: Velocity-Tools / Struts
>
>
----------------

>
> From: Gabriel Sidler
> Subject: Re: Velocity-Tools / Struts
> Date: Sat, 19 Jan 2002 04:37:09 -0800
>
>


>
> Will,
> I just downloaded the .war as well and tested it on a Tomcat 4.01
> installation. Everything works flawlessly. The class that it's
> complaining about is included in WEB-INF/lib/velocity-tools-view-0.3.jar
>
> What is special about WebLogic 6.1SP2 that it cannot find this class?
> Would it find the class if it's not contained in a jar? Maybe try to
> unwrap velocity-tools-view-0.3.jar below WEB-INF/classes/
>
> If anything about web development is difficult then it's these deployment
> issues...
>
> Gabe
>
> Will Spies/Towers Perrin wrote:
> >
> > I did a quick deployment of your war and got this message from WebLogic
> > 6.1SP2
> >
> > <[WebAppServletContext(7817190,velstruts,/velstruts)] Error loading
> > servlet: "velocity">
> > java.lang.ClassNotFoundException:
> > org.apache.velocity.tools.view.servlet.VelocityViewServlet
> >  at
> >
>
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:179)

> >  at
> >
>
>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)

> >  at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> >  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> >  at
> >
>
>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)

> >  at
> >
>
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:583)

> >  at
> >
>
>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2221)

> >  at
> >
>
>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2165)

> >  at
> >
>
weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:892)

> >  at
> >
>
weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)

> >  at
> > weblogic.servle

Re: Velocity-Tools / Struts

2002-01-22 Thread Will Spies/Towers Perrin




That's great! But how about the other way? Can I post an array in velcity
up to a struts form ( via a controller ) which contains an array?

___
Will Spies
Towers Perrin
Phone: (215)246-7145
e-mail: [EMAIL PROTECTED]


   

   

 To: Struts Users Mailing List 
<[EMAIL PROTECTED]>
Gabriel Sidler   cc: (bcc: Will Spies/Towers Perrin)   

   

   

01/21/02 04:37 

PM 

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Will Spies/Towers Perrin wrote:
>
> It would be real helpful if this example include posting an array. Is
this
> even doable with velstruts?
>

You mean like creating HTML output from the content of an array?

That's quite simple. Assuming you have a 'user' object with 'orders'
associated
with the session, the template might look like this:


#foreach ($order in $session.user.orders)
  
$order.nbr
$order.text
$order.amount
  
#end


...would create a table of all orders. Were are going to add more doc and
examples. For now you find more info on the Velocity home page at
jakarta.apache.org/velocity/

Gabe


> ___
> Will Spies
> Towers Perrin
> Phone: (215)246-7145
> e-mail: [EMAIL PROTECTED]
>
>
>
>  To:
[EMAIL PROTECTED]
> Ted Husted   cc: (bcc: Will Spies/Towers
Perrin)
>  .org>
>
> 01/18/02 09:46
> AM
> Please respond
> to "Struts
> Users Mailing
> List"
>
>
>
> Will Spies/Towers Perrin wrote:
> > >>And Velocity can access the Struts controller too :)
> >
> > is this documented anywhere? Is this just in development now or is it
> part
> > of their release?
>
> It hasn't made it into the release yet, but the code is already working
> and seems mature. It's just a matter of making the Struts elements
> available as standard objects that Velocity can see.
>
> Really ~very~ cool. You can download the sample application WAR here.
> Very much worth a look.
>
> http://husted.com/struts/resources/velstruts.zip
>
> I'll be working on adding more documentation for this, and other
> contributions like the Commons-Validator and Tiles to the Struts User
> Guide.
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Building Java web applications with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-21 Thread Gabriel Sidler

Will, 
this is great feedback. Thanks a lot for hunting this down!

I will make sure that the necessary changes are made to Velocity.
You may want to pass this info to the Web Logic people. I believe 
the previous names should work. They do with all app servers I know.  

Gabe



Will Spies/Towers Perrin wrote:
> 
> On a hunch, I change the following JARs from
> 
> velocity-tools-struts0.1.jar
> velocity-tools-view-0.3.jar
> velocity-1.3.dev.jar
> 
> to
> 
> velocity-tools-struts0-1.jar
> velocity-tools-view-0-3.jar
> velocity-1-3-dev.jar
> 
> and it deployed. WebLogic must look for *.jar The other dots messed up it's
> scan.
> 
> Re: Velocity-Tools / Struts
> 
> ------------
> 
> From: Gabriel Sidler
> Subject: Re: Velocity-Tools / Struts
> Date: Sat, 19 Jan 2002 04:37:09 -0800
> 
> 
> 
> Will,
> I just downloaded the .war as well and tested it on a Tomcat 4.01
> installation. Everything works flawlessly. The class that it's
> complaining about is included in WEB-INF/lib/velocity-tools-view-0.3.jar
> 
> What is special about WebLogic 6.1SP2 that it cannot find this class?
> Would it find the class if it's not contained in a jar? Maybe try to
> unwrap velocity-tools-view-0.3.jar below WEB-INF/classes/
> 
> If anything about web development is difficult then it's these deployment
> issues...
> 
> Gabe
> 
> Will Spies/Towers Perrin wrote:
> >
> > I did a quick deployment of your war and got this message from WebLogic
> > 6.1SP2
> >
> > <[WebAppServletContext(7817190,velstruts,/velstruts)] Error loading
> > servlet: "velocity">
> > java.lang.ClassNotFoundException:
> > org.apache.velocity.tools.view.servlet.VelocityViewServlet
> >  at
> >
> weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:179)
> >  at
> >
> 
>>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
> >  at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> >  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> >  at
> >
> 
>>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
> >  at
> >
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:583)
> >  at
> >
> 
>>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2221)
> >  at
> >
> 
>>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2165)
> >  at
> >
> weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:892)
> >  at
> >
> weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
> >  at
> > weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
> >  at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
> >  at weblogic.j2ee.Application.addComponent(Application.java:163)
> >  at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
> >  at
> >
> 
>>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
> >  at
> >
> 
>>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
> >  at
> >
> weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
> >  at java.lang.reflect.Method.invoke(Native Method)
> >  at
> >
> 
>>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
> >  at
> >
> weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
> >  at
> >
> 
>>weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
> >  at
> > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
> >  at
> > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> >  at
> weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
> >  at
> weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
> >  at $Proxy37.addWebDeployment(Unknown Source)
> >  at
> >
> > ___
> > Will Spies
> > Towers Perrin
> > Phone: (215)246-7145
> > e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >  

Re: Velocity-Tools / Struts

2002-01-21 Thread Gabriel Sidler

Will Spies/Towers Perrin wrote:
> 
> It would be real helpful if this example include posting an array. Is this
> even doable with velstruts?
> 

You mean like creating HTML output from the content of an array?

That's quite simple. Assuming you have a 'user' object with 'orders' associated
with the session, the template might look like this:


#foreach ($order in $session.user.orders)
  
$order.nbr
$order.text
$order.amount
  
#end


...would create a table of all orders. Were are going to add more doc and
examples. For now you find more info on the Velocity home page at 
jakarta.apache.org/velocity/

Gabe


> ___
> Will Spies
> Towers Perrin
> Phone: (215)246-7145
> e-mail: [EMAIL PROTECTED]
> 
> 
> 
>  To: [EMAIL PROTECTED]
> Ted Husted   cc: (bcc: Will Spies/Towers Perrin)
>  .org>
> 
> 01/18/02 09:46
> AM
> Please respond
> to "Struts
> Users Mailing
> List"
> 
> 
> 
> Will Spies/Towers Perrin wrote:
> > >>And Velocity can access the Struts controller too :)
> >
> > is this documented anywhere? Is this just in development now or is it
> part
> > of their release?
> 
> It hasn't made it into the release yet, but the code is already working
> and seems mature. It's just a matter of making the Struts elements
> available as standard objects that Velocity can see.
> 
> Really ~very~ cool. You can download the sample application WAR here.
> Very much worth a look.
> 
> http://husted.com/struts/resources/velstruts.zip
> 
> I'll be working on adding more documentation for this, and other
> contributions like the Commons-Validator and Tiles to the Struts User
> Guide.
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Building Java web applications with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-21 Thread Will Spies/Towers Perrin




It would be real helpful if this example include posting an array. Is this
even doable with velstruts?

___
Will Spies
Towers Perrin
Phone: (215)246-7145
e-mail: [EMAIL PROTECTED]


   

   

 To: [EMAIL PROTECTED]

Ted Husted   cc: (bcc: Will Spies/Towers Perrin)   

  

   

01/18/02 09:46 

AM 

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Will Spies/Towers Perrin wrote:
> >>And Velocity can access the Struts controller too :)
>
> is this documented anywhere? Is this just in development now or is it
part
> of their release?

It hasn't made it into the release yet, but the code is already working
and seems mature. It's just a matter of making the Struts elements
available as standard objects that Velocity can see.

Really ~very~ cool. You can download the sample application WAR here.
Very much worth a look.

http://husted.com/struts/resources/velstruts.zip

I'll be working on adding more documentation for this, and other
contributions like the Commons-Validator and Tiles to the Struts User
Guide.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-21 Thread Will Spies/Towers Perrin



On a hunch, I change the following JARs from

velocity-tools-struts0.1.jar
velocity-tools-view-0.3.jar
velocity-1.3.dev.jar

to

velocity-tools-struts0-1.jar
velocity-tools-view-0-3.jar
velocity-1-3-dev.jar

and it deployed. WebLogic must look for *.jar The other dots messed up it's
scan.









Re: Velocity-Tools / Struts



From: Gabriel Sidler
Subject: Re: Velocity-Tools / Struts
Date: Sat, 19 Jan 2002 04:37:09 -0800



Will,
I just downloaded the .war as well and tested it on a Tomcat 4.01
installation. Everything works flawlessly. The class that it's
complaining about is included in WEB-INF/lib/velocity-tools-view-0.3.jar

What is special about WebLogic 6.1SP2 that it cannot find this class?
Would it find the class if it's not contained in a jar? Maybe try to
unwrap velocity-tools-view-0.3.jar below WEB-INF/classes/

If anything about web development is difficult then it's these deployment
issues...

Gabe


Will Spies/Towers Perrin wrote:
>
> I did a quick deployment of your war and got this message from WebLogic
> 6.1SP2
>
> <[WebAppServletContext(7817190,velstruts,/velstruts)] Error loading
> servlet: "velocity">
> java.lang.ClassNotFoundException:
> org.apache.velocity.tools.view.servlet.VelocityViewServlet
>  at
>
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:179)
>  at
>
>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>  at
>
>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
>  at
>
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:583)
>  at
>
>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2221)
>  at
>
>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2165)
>  at
>
weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:892)
>  at
>
weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
>  at
> weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
>  at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
>  at weblogic.j2ee.Application.addComponent(Application.java:163)
>  at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
>  at
>
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
>  at
>
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
>  at
>
weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at
>
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
>  at
>
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
>  at
>
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>  at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
>  at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
>  at $Proxy37.addWebDeployment(Unknown Source)
>  at
>
> ___
> Will Spies
> Towers Perrin
> Phone: (215)246-7145
> e-mail: [EMAIL PROTECTED]
>
>
>
>  To:
[EMAIL PROTECTED]
> Ted Husted   cc: (bcc: Will Spies/Towers
Perrin)
>  .org>
>
> 01/18/02 09:46
> AM
> Please respond
> to "Struts
> Users Mailing
> List"
>
>
>
> Will Spies/Towers Perrin wrote:
> > >>And Velocity can access the Struts controller too :)
> >
> > is this documented anywhere? Is this just in development now or is it
> part
> > of their release?
>
> It hasn't made it into the release yet, but the code is already working
> and seems mature. It's just a matter of making the Struts elements
> available as standard objects that Velocity can see.
>
> Really ~very~ cool. You can download th

Re: Velocity-Tools / Struts

2002-01-19 Thread Gabriel Sidler

Will,
I just downloaded the .war as well and tested it on a Tomcat 4.01 
installation. Everything works flawlessly. The class that it's 
complaining about is included in WEB-INF/lib/velocity-tools-view-0.3.jar

What is special about WebLogic 6.1SP2 that it cannot find this class?
Would it find the class if it's not contained in a jar? Maybe try to
unwrap velocity-tools-view-0.3.jar below WEB-INF/classes/

If anything about web development is difficult then it's these deployment
issues...

Gabe


Will Spies/Towers Perrin wrote:
> 
> I did a quick deployment of your war and got this message from WebLogic
> 6.1SP2
> 
> <[WebAppServletContext(7817190,velstruts,/velstruts)] Error loading
> servlet: "velocity">
> java.lang.ClassNotFoundException:
> org.apache.velocity.tools.view.servlet.VelocityViewServlet
>  at
> weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:179)
>  at
> 
>weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>  at
> 
>weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
>  at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:583)
>  at
> 
>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2221)
>  at
> 
>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2165)
>  at
> weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:892)
>  at
> weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
>  at
> weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
>  at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
>  at weblogic.j2ee.Application.addComponent(Application.java:163)
>  at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
>  at
> 
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
>  at
> 
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
>  at
> weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at
> 
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
>  at
> weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
>  at
> 
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>  at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
>  at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
>  at $Proxy37.addWebDeployment(Unknown Source)
>  at
> 
> ___
> Will Spies
> Towers Perrin
> Phone: (215)246-7145
> e-mail: [EMAIL PROTECTED]
> 
> 
> 
>  To: [EMAIL PROTECTED]
> Ted Husted   cc: (bcc: Will Spies/Towers Perrin)
>  .org>
> 
> 01/18/02 09:46
> AM
> Please respond
> to "Struts
> Users Mailing
> List"
> 
> 
> 
> Will Spies/Towers Perrin wrote:
> > >>And Velocity can access the Struts controller too :)
> >
> > is this documented anywhere? Is this just in development now or is it
> part
> > of their release?
> 
> It hasn't made it into the release yet, but the code is already working
> and seems mature. It's just a matter of making the Struts elements
> available as standard objects that Velocity can see.
> 
> Really ~very~ cool. You can download the sample application WAR here.
> Very much worth a look.
> 
> http://husted.com/struts/resources/velstruts.zip
> 
> I'll be working on adding more documentation for this, and other
> contributions like the Commons-Validator and Tiles to the Struts User
> Guide.
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Building Java web applications with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity-Tools / Struts

2002-01-18 Thread Will Spies/Towers Perrin




I did a quick deployment of your war and got this message from WebLogic
6.1SP2

<[WebAppServletContext(7817190,velstruts,/velstruts)] Error loading
servlet: "velocity">
java.lang.ClassNotFoundException:
org.apache.velocity.tools.view.servlet.VelocityViewServlet
 at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:179)
 at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
 at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:583)
 at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2221)
 at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2165)
 at
weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:892)
 at
weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
 at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
 at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
 at weblogic.j2ee.Application.addComponent(Application.java:163)
 at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
 at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
 at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
 at
weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
 at java.lang.reflect.Method.invoke(Native Method)
 at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
 at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
 at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
 at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
 at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
 at $Proxy37.addWebDeployment(Unknown Source)
 at



___
Will Spies
Towers Perrin
Phone: (215)246-7145
e-mail: [EMAIL PROTECTED]


   

   

 To: [EMAIL PROTECTED]

Ted Husted   cc: (bcc: Will Spies/Towers Perrin)   

  

   

01/18/02 09:46 

AM 

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





Will Spies/Towers Perrin wrote:
> >>And Velocity can access the Struts controller too :)
>
> is this documented anywhere? Is this just in development now or is it
part
> of their release?

It hasn't made it into the release yet, but the code is already working
and seems mature. It's just a matter of making the Struts elements
available as standard objects that Velocity can see.

Really ~very~ cool. You can download the sample application WAR here.
Very much worth a look.

http://husted.com/struts/resources/velstruts.zip

I'll be working on adding more documentation for this, and other
contributions like the Commons-Validator and Tiles to the Struts User
Guide.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--