You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Todd Nine <to...@gmail.com> on 2005/02/15 13:50:02 UTC

Construting HTML Email from Struts

Hi all,
   Does anyone know of a way to construct an HTML formatted email
using a struts jsp and a DynaForm?  I want our visual designers to be
able to updload an email "template", which is just a Struts jsp with
the dynabean properties.  We would then upload a mapping (something
like hql in nature), that would query our database, and fill in the
dynabean.  The batch job would fire and create the html from the
struts jsp, inserting into the body.  We would then email that text.

Any Ideas?
Todd

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


Re: Construting HTML Email from Struts

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Its just the name of the scripting variable that you use in the
<bean:define> where the body of whats enclosed in the <bean:define> will be
written to (in this case the genrated email).

Niall

----- Original Message ----- 
From: "Shey Rab Pawo" <pa...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, February 15, 2005 3:29 PM
Subject: Re: Construting HTML Email from Struts


> Niall,
>
> What is the origin of the "emailStuff" in this wiki page?  Thanks.
>
>
> On Tue, 15 Feb 2005 14:25:29 -0000, Niall Pemberton
> <ni...@blueyonder.co.uk> wrote:
> > I posted this for someone who asked a similar quesiton recently.
> >
> > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> >
> > Niall



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


Re: Construting HTML Email from Struts

Posted by Shey Rab Pawo <pa...@gmail.com>.
Niall,

What is the origin of the "emailStuff" in this wiki page?  Thanks.


On Tue, 15 Feb 2005 14:25:29 -0000, Niall Pemberton
<ni...@blueyonder.co.uk> wrote:
> I posted this for someone who asked a similar quesiton recently.
> 
> http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> 
> Niall
-- 
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..

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


Re: Construting HTML Email from Struts

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
I posted this for someone who asked a similar quesiton recently.

http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html

Niall

----- Original Message ----- 
From: "Todd Nine" <to...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, February 15, 2005 12:50 PM
Subject: Construting HTML Email from Struts


> Hi all,
>    Does anyone know of a way to construct an HTML formatted email
> using a struts jsp and a DynaForm?  I want our visual designers to be
> able to updload an email "template", which is just a Struts jsp with
> the dynabean properties.  We would then upload a mapping (something
> like hql in nature), that would query our database, and fill in the
> dynabean.  The batch job would fire and create the html from the
> struts jsp, inserting into the body.  We would then email that text.
> 
> Any Ideas?
> Todd



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


Re: Construting HTML Email from Struts

Posted by Joe Germuska <Jo...@Germuska.com>.
At 7:50 AM -0500 2/15/05, Todd Nine wrote:
>Hi all,
>    Does anyone know of a way to construct an HTML formatted email
>using a struts jsp and a DynaForm?  I want our visual designers to be
>able to updload an email "template", which is just a Struts jsp with
>the dynabean properties.  We would then upload a mapping (something
>like hql in nature), that would query our database, and fill in the
>dynabean.  The batch job would fire and create the html from the
>struts jsp, inserting into the body.  We would then email that text.

It's pretty awkward to use JSP to render templated text not to a 
browser; I've settled on using Velocity for that even though we still 
use JSP for web pages.

You could probably work out a way to call a URL from within your Java 
code to retrieve a page and use the results as the body of your 
email, if you really wanted to stick with JSP.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

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


RE: Construting HTML Email from Struts

Posted by Nils Liebelt <ni...@candor.co.za>.
Ok got it! 

>> do you mean creating custom tags?

That's what I meant. I mean you don't need recursive degression in order
parse a file like this. ;-)

GreetZ

Nils

-----Original Message-----
From: Todd Nine [mailto:todd.nine@gmail.com] 
Sent: Tuesday, February 15, 2005 4:26 PM
To: Struts Users Mailing List
Subject: Re: Construting HTML Email from Struts

Nils,
    When you say special tags, do you mean creating custom tags?  The
reason I want to have this dynamic environment is so that we can
upload content without the need to deploy another ear.  This way when
the business people change the content of the email, we can easily
upload a new format and send out the email.


On Tue, 15 Feb 2005 15:31:38 +0200, Nils Liebelt <ni...@candor.co.za> wrote:
> Sounds a bit complicated! Why do you need
> to have struts tags? I would go for plain html and add
> special tags for whatever you need.
> Path of least resistence...
> 
> GreetZ
> 
> Nils
> 
> -----Original Message-----
> From: Todd Nine [mailto:todd.nine@gmail.com]
> Sent: Tuesday, February 15, 2005 2:50 PM
> To: Struts Users Mailing List
> Subject: Construting HTML Email from Struts
> 
> Hi all,
>    Does anyone know of a way to construct an HTML formatted email
> using a struts jsp and a DynaForm?  I want our visual designers to be
> able to updload an email "template", which is just a Struts jsp with
> the dynabean properties.  We would then upload a mapping (something
> like hql in nature), that would query our database, and fill in the
> dynabean.  The batch job would fire and create the html from the
> struts jsp, inserting into the body.  We would then email that text.
> 
> Any Ideas?
> Todd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


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


Re: Construting HTML Email from Struts

Posted by Todd Nine <to...@gmail.com>.
Nils,
    When you say special tags, do you mean creating custom tags?  The
reason I want to have this dynamic environment is so that we can
upload content without the need to deploy another ear.  This way when
the business people change the content of the email, we can easily
upload a new format and send out the email.


On Tue, 15 Feb 2005 15:31:38 +0200, Nils Liebelt <ni...@candor.co.za> wrote:
> Sounds a bit complicated! Why do you need
> to have struts tags? I would go for plain html and add
> special tags for whatever you need.
> Path of least resistence...
> 
> GreetZ
> 
> Nils
> 
> -----Original Message-----
> From: Todd Nine [mailto:todd.nine@gmail.com]
> Sent: Tuesday, February 15, 2005 2:50 PM
> To: Struts Users Mailing List
> Subject: Construting HTML Email from Struts
> 
> Hi all,
>    Does anyone know of a way to construct an HTML formatted email
> using a struts jsp and a DynaForm?  I want our visual designers to be
> able to updload an email "template", which is just a Struts jsp with
> the dynabean properties.  We would then upload a mapping (something
> like hql in nature), that would query our database, and fill in the
> dynabean.  The batch job would fire and create the html from the
> struts jsp, inserting into the body.  We would then email that text.
> 
> Any Ideas?
> Todd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Tiles scope headache assistance needed.

Posted by Jason Long <su...@sbcglobal.net>.
I have the following problem with scope and tiles.  The whole point of this
is to be able to put a holder around items presented in a list on the page
to give better delineation. Here is what I am attempting to do.

<logic:iterate id="quote" property="quoteValues">      
    <table>
      <tr>
        <td>
          <bean:write name="quote" property="size"/>
        </td>
      </tr>
    </table>
</logic:iterate>

I would like to define the following tile definition:

<definition extends=".table.holder" name=".quote">
  <put name="content" value="/quote.jsp"/>
</definition>

And have quote.jsp as follows:
<table>
  <tr>
    <td>
      <bean:write name="quote" property="size"/>
    </td>
  </tr>
</table>

And then switch the page to the following:

<logic:iterate id="quote" property="quoteValues">      
   <tiles:insert definition=".quote" flush="false"/>
</logic:iterate>

I always get Cannot find bean quote in any scope no matter what I do.  I
have tried many variations of <tiles:useAttribute/> and
<tiles:mportAttribute/>.  I do not want to want to simply pass a string to
the tile.  I need to be able to make any bean availble to other tiles
inserted into a page.  I would greatly appreciate any advice on how to make
this available to my subtiles.

Thank you for your time, 

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com 



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


RE: Construting HTML Email from Struts

Posted by Nils Liebelt <ni...@candor.co.za>.
Sounds a bit complicated! Why do you need 
to have struts tags? I would go for plain html and add 
special tags for whatever you need. 
Path of least resistence...

GreetZ

Nils


-----Original Message-----
From: Todd Nine [mailto:todd.nine@gmail.com] 
Sent: Tuesday, February 15, 2005 2:50 PM
To: Struts Users Mailing List
Subject: Construting HTML Email from Struts

Hi all,
   Does anyone know of a way to construct an HTML formatted email
using a struts jsp and a DynaForm?  I want our visual designers to be
able to updload an email "template", which is just a Struts jsp with
the dynabean properties.  We would then upload a mapping (something
like hql in nature), that would query our database, and fill in the
dynabean.  The batch job would fire and create the html from the
struts jsp, inserting into the body.  We would then email that text.

Any Ideas?
Todd

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


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