1 Reply Latest reply on Feb 25, 2014 11:21 AM by Siva P

    Download not working <h:commandlink>

    Asim Shaikh Novice

      Hello Guys I have a problem in Downloading After Click on Download # appears in url and UTF-8 warning appears I dont understand what has happened it was working previously

       

      WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /mercweb, because request parameters have already been read, or ServletRequest.getReader() has already been called

       

      <rich:column style="width:35%;" id="evntcol6">

                                                                          <f:facet name="header" >Attachment</f:facet>

                                                                          <rich:dataTable value="#{event.files}" var="file" id="table1"

                                                                                          style="width:100%;border: 0px;">

       

       

                                                                              <rich:column style="width:20%;  border: 0px;" id="eventdscol6">

                                                                                  <h:outputText value="#{file.fileDescription}" id="eventdstxt6"/>

                                                                                  <h:commandLink actionListener="#{eventMaster.downloadFile}"  value="#{lbl['label.download']}" id="eventdcmddownld">

                                                                                      <f:param name="fileName" value="#{file.uploadedFileName}"/>

       

       

                                                                                      <f:param name="caseFileId" value="#{file.caseFileId}"/>

                                                                                  </h:commandLink>

                                                                              </rich:column>

                                                                          </rich:dataTable>

                                                                      </rich:column>

        • 1. Re: Download not working <h:commandlink>
          Siva P Master

          Hi,

           

          Please re check the configurations and jar file,

          Inside your glassfish-web.xml - previously sun-web.xml, starting from glassfish 3.0 the configuration file was renamed - add this:

          <locale-charset-info>

                <locale-charset-map locale="your_locale_iso" charset="utf-8"/>

                <parameter-encoding default-charset="utf-8"/>

          </locale-charset-info>

           

          This parameter will mostly solve your issue, it solved mine, but as I’ve already told you it’s deprecated.

          If it didn’t do the trick, make sure your JSF pages and your database are well configured to handle unicode.