<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">Hi Dominic,</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">plaintext is indexed by default, so you can read value directly from SOLR (code is valid for OpenCms 10.5):</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></div><div style=""><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><%@page</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"> buffer="none"</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"> session="false"</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"> trimDirectiveWhitespaces="true"%></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><c:set var="extraSolrParams">q="xxx"&fq=type:"plain"</c:set></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><c:set var="searchConfig"></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;">{</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><span style="white-space:pre"> </span>"ignorequery" : true,</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><span style="white-space:pre"> </span>"extrasolrparams" : "${fn:replace(extraSolrParams,'"','\\"')}",</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><span style="white-space:pre"> </span>"pagesize" : 10,</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><span style="white-space:pre"> </span>"pageparam" : 1</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;">}</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"></c:set></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><cms:search configString="${searchConfig}" var="search" /></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><c:forEach var="result" items="${search.searchResults}" varStatus="status"></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><span style="white-space:pre"> </span><div>${result.fields.content_en}</div></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"></c:forEach></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;"><br></span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif">Of course, cleaner way is to read content directly from txt file, but in this case you need some java developer:)</font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif">Good luck.</font></div><br><font face="Verdana, Arial, Helvetica, sans-serif">S pozdravem / Kind regards</font><br><br><font face="Verdana, Arial, Helvetica, sans-serif">Filip Kratochvil</font><br><font face="Verdana, Arial, Helvetica, sans-serif">OpenCms Consultant</font><br><br><font face="Verdana, Arial, Helvetica, sans-serif">IBA CZ, s.r.o.</font><br><font face="Verdana, Arial, Helvetica, sans-serif">Office: Radlická 751/113e, 158 00 Praha, CZ</font><br><font face="Verdana, Arial, Helvetica, sans-serif">Phone: +420 777 366 998</font><br><font face="Verdana, Arial, Helvetica, sans-serif">E-mail: </font><a href="mailto:filip.kratochvil@ibacz.eu" style="font-family: Verdana, Arial, Helvetica, sans-serif;">filip.kratochvil@ibacz.eu</a></div><br><br><font color="#990099" style="font-family: Verdana, Arial, Helvetica, sans-serif;">-----opencms-dev-bounces@opencms.org wrote: -----</font><div class="iNotesHistory" style="font-family: Verdana, Arial, Helvetica, sans-serif; padding-left: 5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: opencms-dev@opencms.org<br>From: Dominic Rothemel <dominic@rothemel.de><br>Sent by: opencms-dev-bounces@opencms.org<br>Date: 07/20/2018 12:19PM<br>Subject: [opencms-dev] Show content of a plaint text file<br><br><div><font face="Courier New,Courier,monospace" size="3">Hi there,<br><br>I need a hint....<br><br>I just want to show the content of a plain text file from the VFS on my <br>website.<br>(inside the plain text file is a XML configuration file from a software <br>- but let's say it's just text (Type is "Text file")).<br><br>Because it's not a valid content file with schema, I failed to use the <br>file directly.<br><br>So I created a document type with a VFSfileWidget and linked the plain <br>text file.<br>Inside the container page is the "UploadVFSfile - <br>UseCaseUpload-00001.xml" document and formatter showVFSfile.jsp.<br>But also with this construct I'm not able to put the content of the text <br>file as a part in my website.<br><br><br><cms:contentload collector="singleFile" <br>param="/CorrelationRules/CorrelatonExport.xml"><br> <cms:contentshow element="${opencms.filename}" /><br></cms:contentload><br><br>Container-page element "/CorrelationRules/UseCaseUpload-00001.xml" could <br>not be rendered with formatter <br>"/system/modules/test/formatters/showVFSfile.jsp".<br><br>javax.servlet.ServletException: javax.servlet.jsp.JspException: <br>org.opencms.xml.CmsXmlException: Resource <br>"/CorrelationRules/CorrelatonExport.xml" is not of required type XML <br>content.Stack trace<br><br><br>Hope someone can help me.<br><br>Thanks<br>Dominic<br><br>PS: I don't want to put the content in a text field of a content file.<br>PPS: OpenCms 10.5.4<br>_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br><br><br><br></font></div></dominic@rothemel.de></div></div><div><br><hr>Disclaimer:<br><br>The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it.<br>It may contain confidential or legally privileged information.<br>If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful.<br>If you have received this communication in error, please notify us immediately by forwarding this email to ict@ibacz.eu and then delete it from your system.<br>IBA Group is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.<br> </div></font>