I'm working on a HTML e-mail template.
The line-height in the html code below seems to work fine in Gmail and Outlook.
However, in the Outlook Web App the line height is increased.
I tried some fixes I found on the internet/stackoverflow: the css code in the header and the inline css code.
However, this doesnt do the trick.
Does anybody know how to fix the line-height in the Outlook Web App for the example below?
Thanks! Mark
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100% !important;}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="400" style="display:block;padding:0px;margin:0px;font-size:12px;font-family:Arial, Helvetica, sans-serif;color:#000000;mso-line-height-rule:exactly;line-height:12px;">
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
</td>
</tr>
</table>
</body>
</html>
This is the fix we've used but it looks like that may be similar to yours already.
<tr>
<td width="100%" height="15"
style="font-size:15px; line-height:15px; mso-line-height-rule: exactly;"
class="hide"> </td>
</tr>
Related
i have a developed gwt application and have it in production.
i would like to continue development in dart as developing/debugging
seems way better to me than with gwt.
i already have written some modules in pure dart and am able to integrate the compiled js in the gwt app. communication between gwt<->dart via json also works fine.
now i would like to integrate some dart/polymer elements but did not have any success doing it.
is anybody doing this? is it possible? any hints?
this is my gwt host page. how do i get polymer imported/initialised/started?
<!doctype html>
<html>
<script type="text/javascript" src="app/app.nocache.js"></script>
</head>
<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div id="cwm" style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<!-- DART integration-->
<script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="dart_application/web/dart_plain.dart" type="application/dart"></script>
<script src="dart_application/web/packages/browser/dart.js" type="text/javascript"></script>
</body>
</html>
my original setup as posted was to include the dart main file into the entry point html file of the gwt project.
script src="dart_application/web/dart_plain.dart" type="application/dart"></script>
in this setup i copied the outpout from pub build into a subdirectory of the gwt web app tree (dart_applikation)
this worked fine for plain dart.
what I do now is:
1) make the entry point html file of the dart/polymer app the entry point file for the gwt
app. (this is done by a script copying the dart2js/pub build output to the gwt tree)
2) include the gwt js file in the main html file of the dart polymer project at the very beginning of the file.
<script type="text/javascript" src="app/app.nocache.js"></script>
3) include also all the additional js files gwt needs in the main dart html file.
following are the steps top produce a app.war file that includes my gwt and dart-polymer app:
a) pub build the dart-polymer project
b) compile the gwt project
c) copy the "build/web" directory to the root of the webapps directory of the gwt project.
d) zip all together to one war file.
a bit hacky, but it seems to work.
I have built a new project using GWT. If I run the project from the Intellij IDEA IDE after a few seconds the 'clickme' control appears in the browser and everything works as expected.
I have created an artifact for a application war file, which is created in the expected ../out/artifact folder.
When I deploy the .war file to apache tomcat, and click on the webapp in the apache tomcat manager I just get the list of files under the webapps/MySampleApplication file location.
If I select the MySampleAppliacation.html file I see the text in that html file but the 'clickme' button never appears.
I have done a lot of googling but have not solved the problem. I checked and the gwt-user.jar file is in the lib folder of the webapp.
This is the GWT control file
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src /gwt-module.dtd">
<module rename-to="MySampleApplication">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.mySampleApplication.client.MySampleApplication'/>
<!-- Specify the app servlets. -->
<servlet path='/MySampleApplicationService' class='com.mySampleApplication.server.MySampleApplicationServiceImpl'/>
</module>
This is the project html page
<html>
<head>
<title>Wrapper HTML for App</title>
<link type="text/css" rel="stylesheet" href="MySampleApplication.css">
<!-- -->
<!-- This script is required bootstrap stuff. -->
<!-- -->
<script type="text/javascript" language="javascript"
src="MySampleApplication/MySampleApplication.nocache.js"></script>
</head>
<body>
<h1>Sample Application</h1>
<p>
This is an example of a host page for the App application.
You can attach a Web Toolkit module to any HTML page you like,
making it easy to add bits of AJAX functionality to existing pages
without starting from scratch.
</p>
<table align="center">
<tr>
<td id="slot1"></td>
<td id="slot2"></td>
</tr>
</table>
</body>
</html>
For good measure, here are all the files under webapps for this project
MySampleApplication\index.html
MySampleApplication\MySampleApplication
MySampleApplication\MySampleApplication.css
MySampleApplication\MySampleApplication.html
MySampleApplication\WEB-INF
MySampleApplication\MySampleApplication\0651E8A6D149EEF5E6386F087426CF0A.cache.html
MySampleApplication\MySampleApplication\0CE0D511D927FEB65BA6F6D96F24D2D4.cache.html
MySampleApplication\MySampleApplication\3C8C88AE707243315A0D688BD60B8CCA.cache.html
MySampleApplication\MySampleApplication\4A4AEE91A97252CBA376B9B27863F6ED.cache.html
MySampleApplication\MySampleApplication\644584634D68B773C08A73FA726669A5.gwt.rpc
MySampleApplication\MySampleApplication\clear.cache.gif
MySampleApplication\MySampleApplication\D003F7646BFEF3B8BE562132E77EFE59.cache.html
MySampleApplication\MySampleApplication\hosted.html
MySampleApplication\MySampleApplication\MySampleApplication.nocache.js
MySampleApplication\WEB-INF\classes
MySampleApplication\WEB-INF\web.xml
MySampleApplication\WEB-INF\classes\com
MySampleApplication\WEB-INF\classes\com\mySampleApplication
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client
MySampleApplication\WEB-INF\classes\com\mySampleApplication\MySampleApplication.gwt.xml
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$1.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$MyAsyncCallback.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService$App.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationServiceAsync.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server\MySampleApplicationServiceImpl.class
About the only other thing would be the IDEA project module settings......
I am VERY appreciative or your help Andy.
I am using Jenkins for our Maven/Tycho project and I am using Email-ext plugin to get the build reports in email. I am using a jelly script that I found here.
What I am looking for is to be able to add module build results (failed, successful, etc) instead of the build artifacts. Basically I'd like to include the table in the middle of the maven project build in my email. I looked in many places but all I found is test results or artifacts. But I'd like to get the module build result instead.
The problem was solved by modifying the artifacts table section like this:
<!-- MAVEN ARTIFACTS -->
<j:set var="mbuilds" value="${build.moduleBuilds}" />
<j:if test="${mbuilds!=null}">
<div class="content">
<h1>Module Builds</h1>
<TABLE>
<TR><TD class="bg1"><B>Bundle Name</B></TD>
<TD class="bg1"><B>Build Result</B></TD></TR>
<j:forEach var="m" items="${mbuilds}">
<tr>
<TD>${m.key.displayName}</TD>
<j:if test="${m.value==null or m.value.size()==0 }">
<td>didn't run</td>
</j:if>
<j:forEach var="mvnbld" items="${m.value}">
<td>${mvnbld.result}</td>
<td align="left">
<j:choose>
<j:when test="${mvnbld.result=='SUCCESS'}">
<img src="${rooturl}static/e59dfe28/images/16x16/blue.gif" />
</j:when>
<j:when test="${mvnbld.result=='FAILURE'}">
<img src="${rooturl}static/e59dfe28/images/16x16/red.gif" />
</j:when>
<j:when test="${mvnbld.result=='NOT_BUILT'}">
<img src="${rooturl}static/e59dfe28/images/16x16/grey.gif" />
</j:when>
<j:when test="${mvnbld.result=='UNSTABLE'}">
<img src="${rooturl}static/e59dfe28/images/16x16/yellow.gif" />
</j:when>
<j:otherwise>
<img src="${rooturl}static/e59dfe28/images/16x16/grey.gif" />
</j:otherwise>
</j:choose>
</td>
</j:forEach>
</tr>
</j:forEach>
</TABLE>
<br />
</div>
</j:if>
The main issue is however, the java docs are not good enough for jelly script or groovy implementation. I had to randomly try things because for instance you cannot find getModuleBuilds in the AbstractBuild api.
I am trying to use JSF Facelet template/Facelet template client first time. I am creating template and template client with Netbeans 7.2.1. When I run that created JSF project and call http://localhost:8080/jpaweb/template.xhtml I can see template style, but when I call client template http://localhost:8080/jpaweb/client.xhtml I see plain text without style. Both files are in the same directory and created by Netbeans wizard. Please, help me with this issue.
template.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
<link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
<title>Facelets Template</title>
</h:head>
<h:body>
<div id="top" class="top">
<ui:insert name="top">Top</ui:insert>
</div>
<div>
<div id="left">
<ui:insert name="left">Left</ui:insert>
</div>
<div id="content" class="left_content">
<ui:insert name="content">Content</ui:insert>
</div>
</div>
</h:body>
</html>
client.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
<ui:composition template="./template.xhtml">
<ui:define name="top">
Welcome, to my website
</ui:define>
<ui:define name="left">
My links
</ui:define>
<ui:define name="content">
This page is created for testing
</ui:define>
</ui:composition>
</body>
</html>
If you have Netbeans creating JSF project and JSF template and template client will get you this result. I tried in Netbeans 1.7.0 also. Same problem.
Edit: I run page not like http://localhost:8080/jpaweb/client.xhtml but likehttp://localhost:8080/jpaweb/faces/client.xhtml it worked. There is no "faces" directory in my project. Do we have to add "faces" to all JSF links?
Edit 2: I think netbeans auto-configures that all jsf files are kept in faces directory even there is no such directory in my project. And in Project properties -> Frameworks -> JavaServer Faces -> Configuration there is field JSF Servlet URL Pattern with value assigned /faces/*. I think that means one must call jsf files as if it is in faces directory. Trying to force it work as it appears in my project was a mistake :)
Solved. Changed value of Project properties -> Frameworks -> JavaServer Faces -> Configuration -> JSF Servlet URL Pattern from /faces/* to *.xhtml, and that worked OK.
Your client.xhtml content file is not properly composed. Don't include html tags, as JSF doesn't parse anything out from ui:composition tags here.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="./template.xhtml">
<ui:define name="top">
Welcome, to my website
</ui:define>
<ui:define name="left">
My links
</ui:define>
<ui:define name="content">
This page is created for testing
</ui:define>
</ui:composition>
I tested with your template and it works.
I just created a new IceFaces application and I'm trying to include a navigation bar in all of the pages. When I use the jsp:directive.include tag the file is included, but when I use jsp:include it does not seem to be loaded. In fact, when I check the HTML source code in my browser, it's like the included file was completely empty. I do not want to use jsp:directive.include because it will not automatically show any updates to the included file.
My environment: Eclipse 3.5, Tomcat 6, JSF 1.2, IceFaces 1.8.
Steps to reproduce the problem and pieces of code:
create a new Dynamic Web Project with the following options:
Target runtime: Apache tomcat v6.0
Dynamic web module version: 2.5
Configuration: ICEfaces project
create a new ICEFaces JSPX file -- the home file. Some code:
<jsp:directive.page contentType="text/html;charset=ISO-8859-1" />
<f:view >
<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
<html>
<head>
<title>test file</title>
<link rel="stylesheet" type="text/css"
href="./xmlhttp/css/rime/rime.css" />
</head>
<body>
<jsp:directive.include file="./vertical_navigation.jsp" /> <!-- working -->
<jsp:include page="./vertical_navigation.jsp" /> <!-- not working, no error though -->
</body>
</html>
</f:view>
create the file to be included, also as a new ICEFaces JSPX file. Simplified code:
<ice:form>
<ice:panelGrid columns="1" width="152">
<ice:graphicImage url="./img/image.jpg"></ice:graphicImage>
<ice:panelCollapsible expanded="true">
<f:facet name="header">
<ice:panelGroup>
<ice:outputText value="Customer"/>
</ice:panelGroup>
</f:facet>
<ice:panelGrid columns="1">
<ice:commandLink action="customer"><ice:outputText value="Customer name" /></ice:commandLink>
</ice:panelGrid>
</ice:panelCollapsible>
</ice:panelGrid>
</ice:form>
</body>
</html>
</f:view>
Some remarks:
I'm completely new to JSF, so forgive me for any obvious mistake.
In the home file (the first one) I'm not using both tags at the same time. I pasted both here just to show that I am trying both options.
I created both files as "ICEFaces JSPX file", but the second one was assigned the .jsp extension.
When I use the directive.include tag, the included file is loaded. But if I change it, it's not automatically republished.
To start, you have to separate and distinguish several technologies:
JSP is a Java based view technology which allows you to write HTML/CSS/JS in and use taglibs to call backend Java code and/or control the output flow.
JSPX is the same as JSP, but forces you to write code in XML format. JSP-specific tags are replaced by tags in XML format. JSPX is also called "JSP Document". Here is a basic tutorial which outlines the differences in tags.
JSF is a component based MVC framework which provides components in flavor of taglibs which outputs HTML/CSS/JS.
You cannot use <jsp:include> in a JSPX page. You have to transform the JSPX page into a JSP page. You need to rename the file .jspx to .jsp and replace JSPX specific tags by JSP tags. Here's a kickoff example for JSP with JSF/IceFaces:
<%# page pageEncoding="ISO-8859-1" %>
<%# taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%# taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%# taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice"%>
<!DOCTYPE html>
<f:view>
<html lang="en">
<head>
<title>Title</title>
</head>
<body>
<jsp:include page="include.jsp" />
</body>
</html>
</f:view>