Highlighted
vcarvalho Absent Member.
Absent Member.
1834 views

How to use (is it possible) HTML tags in a Velocity template?

Hello there!

I´m new to all this ArcSight and SIEM thing, but so far it´s a very interesting world!

So, I´m trying to develop a nice good looking Velocity template to implement in some of our customers and the first thing that came to my mind is to use HTML/CSS and all. So far, I could not even use some basic HTML tags like <b>, <br>, <i>, <ul>, etc.

Now, my question is: Is it possible to use HTML tags in Velocity templates? If so, how?

Note that the email client used will be most of the time Microsoft Outlook.

Thanks in advance!

Valdecir Carvalho

Cipher

www.cipher.com.br

São Paulo, Brazil

Labels (2)
0 Likes
Reply
5 Replies
Absent Member.. Dean Farrington Absent Member..
Absent Member..

Re: How to use (is it possible) HTML tags in a Velocity template?

Look at the built in custom columns for some samples. Some of these have HTML in the velocity:

"<HTML>
  <TABLE>
    <TR><TD nowrap>
      #if ($attackerAddress.length()>0)
      $attackerAddress
      #end
      #if ($attackerHostName.length()>0)
        <B>($attackerHostName)</B>
      #elseif ($attackerAssetName.length()>0)
        <B>($attackerAssetName)</B>
      #end     
    </TD></TR>
    </TR><TD nowrap>
      #if ($attackerZoneName.length()>0)
      $attackerZoneName
      #end
    </TD></TR>
  </TABLE>
</HTML>"

HTH

Dean

0 Likes
Reply
vcarvalho Absent Member.
Absent Member.

Re: How to use (is it possible) HTML tags in a Velocity template?

Hi Dean, thanks for your response.

I´ve tested your tip but with no results. This is what I got in my mailbox.

Now I´m not sure if the email client (MS Outlook) did no render the code OR it really didnt work.

<HTML>

  <TABLE>

    <TR><TD nowrap>

                </TD></TR>

    </TR><TD nowrap>

          </TD></TR>

  </TABLE>

</HTML>

I will keep with my tests here in make your guys posted.

Regards,


Valdecir

Cipher - www.ciphersec.com.br

São Paulo, Brazil

0 Likes
Reply
Absent Member.. Dean Farrington Absent Member..
Absent Member..

Re: How to use (is it possible) HTML tags in a Velocity template?

You might try the Velocity documentation, I know it can be done but I have never implimented it myself.

http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html

0 Likes
Reply
vcarvalho Absent Member.
Absent Member.

Re: How to use (is it possible) HTML tags in a Velocity template?

Yes, I´ve read the Velocity documentation from up down and still not working on ArcSight.

I think that ArcSight did not implement all Velocity functionalities on his core.

Thanks anyway. I appreciate your help.

Valdecir

0 Likes
Reply
Vini Acclaimed Contributor.
Acclaimed Contributor.

Re: How to use (is it possible) HTML tags in a Velocity template?

Humm, you want to send notification emails in HTML.

It would be a nice feature, the problem is that the email sent by ESM are plain text and the email client will never pase them as HTML since the header says it is plain text.

I have done this before but I had to write a rule in my email server to modiy all messages from ESM and change the plain text to HTML.

It worked but it may not be an easy solution.

0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.