• No replies
6420 Posts

Pinned topic javax.servlet.ServletException: WriteText method cannot write null text

‏2012-11-16T04:58:18Z |
0 down vote favorite
I have created a Web application using JSF+Icefaces+Richfaces+Primefaces.It is working great while I run it from eclipse as a project but When I created its WAR file and deployed in GlassFish Server then while rendering a page it is throwing this exception

javax.servlet.ServletException: WriteText method cannot write null text

I searched but didn't get any good solution.A quick help is highly appreciated

I think this would be the relevant part for this

  • <!-- this is for hide (<li class="page_item hide" id="liMasterSearch"> applied to every class) -->
    <h:commandLink value="Search" action="#{masterRenderBean.showSimpleSearch}"></h:commandLink>

  • <h:commandLink value="Advance Search" action="#{masterRenderBean.showADVS}"></h:commandLink>

  • Here you can see to two links (1) Search and (2) Advance Search
    when I click on Search , It shows search page (By rendering-Actually I have included all pages in masterpage and render them on commandlink functions)

    <h:panelGroup rendered="#{not masterRenderBean.simpleSearch}">
    <ui:include src="../../WebPages/SearchPages/MasterSearch.xhtml"></ui:include>

    But When I click on Advance Search link (on which this part should render)

    <h:panelGroup rendered="#{not masterRenderBean.advs}">
    <ui:include src="../../WebPages/SearchPages/PersonalAdvanceSearch.xhtml"/>

    The browser show the above exception.
    NOTE: Keep in mind that this problem is occurring in deploying.It is not coming in actual application when I run it from eclipse from code