Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JSP纯文本电子邮件不呈现换行符_Jsp_Email_Outlook_Line Breaks_Plaintext - Fatal编程技术网

JSP纯文本电子邮件不呈现换行符

JSP纯文本电子邮件不呈现换行符,jsp,email,outlook,line-breaks,plaintext,Jsp,Email,Outlook,Line Breaks,Plaintext,我有一个联系人表单,在提交时,将表单的所有数据发布到电子邮件操作中,然后以纯文本形式呈现确认电子邮件。数据通过得很好,但有些行忽略了各自的换行符 JSP: <%@ page language="java" contentType="text/plain;" %><%@ page import="com.shared.Configuration" %><%@ taglib uri="/WEB-INF/jstl-core.tld" prefix="c" %>Con

我有一个联系人表单,在提交时,将表单的所有数据发布到电子邮件操作中,然后以纯文本形式呈现确认电子邮件。数据通过得很好,但有些行忽略了各自的换行符

JSP:

<%@ page language="java" contentType="text/plain;" %><%@ page import="com.shared.Configuration" %><%@ taglib uri="/WEB-INF/jstl-core.tld" prefix="c" %>Contact Us Form: ${issue}

Name: ${name}
Email Address: ${emailAddress}
<c:if test="${not empty accessCode}">Access Code: ${accessCode}</c:if>
<c:if test="${not empty itemId}">Inventory Number: ${itemId}</c:if>
<c:if test="${not empty title}">Title: ${title}</c:if>
<c:if test="${not empty device_active}">User Device: ${device}</c:if>
<c:if test="${not empty os_active}">User Operating System/Version: ${operatingSystem}</c:if>
<c:if test="${not empty browser_active}">User Web Browser/Version: ${webBrowser}</c:if>
<c:if test="${hasError eq 'Y' or hasError eq 'N'}"><c:choose><c:when test="${hasError eq 'Y'}">Error Message: ${errorMessage}</c:when><c:otherwise>No Error message was present</c:otherwise></c:choose></c:if>
<c:if test="${not empty otherDetails}">Other Details: ${otherDetails}</c:if>
<c:if test="${not empty problemDetails}">Problem Details: ${problemDetails}</c:if>**
Contact Us Form: Can't access the extra PlayBack+ features

Name: me
Email Address: jjozwowski@halleonard.com
Access Code: aqwsedrftgyhuj87
Inventory Number: 12345678
Title:Title: this track
User Device: Desktop
User Operating System/Version: Mac OS 10.9.5 User Web Browser/Version: Chrome 55 Error Message:
Other Details:no other details Problem Details:

用户操作系统、用户浏览器、错误消息和问题详细信息中的换行符不存在。办公室里没有人有解决办法。有人知道发生了什么吗?

我会在三个地方搜索问题:

(一)

这可能是JSP中新行的不可打印字符的问题

<c:if ...></c:if>\r\n
<c:if ...></c:if>\n
<c:if ...></c:if>\r
如果trimDirectiveWhitespaces设置为true,这在许多情况下都有意义,那么您可以通过在JSP中添加以下行来停用它:

请看以下示例:

<jsp-config>
  <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <trim-directive-whitespaces>true</trim-directive-whitespaces>
  </jsp-property-group>
</jsp-config>