PrettyUrl lead to blank pages (glassfish, Apache+mod_jk)

Splash Forums PrettyFaces Users PrettyUrl lead to blank pages (glassfish, Apache+mod_jk)

This topic contains 4 replies, has 3 voices, and was last updated by  Christian Kaltepoth 4 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18463

    fabichan
    Participant

    Hi.

    I have installed my webapp on glassfish with prettyfaces (3.3.2) to have pretty url. if I acces the site on the glassfish port It works fine.

    Next I have installed Apache and mod_jk as FrontEnd. In this configuration prettyUrl doesn’t work anymore and leads to a blank page. (really blank 0ko received)

    If I enter the full url on port 80 it works fine :

    http://<ip>/<appli>/login –> doesn’t work

    http://<ip>/<appli>/pages/login.xhtml –> works.

    The differents logs file say nothing.

    Here some extract of files:

    –web.xml–

    <!–Pretty faces filter –>

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    <async-supported>true</async-supported>

    </filter>

    <filter-mapping>

    <filter-name>Pretty Filter</filter-name>

    <url-pattern>/*</url-pattern>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>ERROR</dispatcher>

    </filter-mapping>

    […]

    <!– Welcome file list configuration –>

    <welcome-file-list>

    <welcome-file>/pages/index.xhtml</welcome-file>

    </welcome-file-list>

    <!– Error handling –>

    <error-page>

    <error-code>404</error-code>

    <location>/pages/index.xhtml</location>

    </error-page>

    <error-page>

    <exception-type>javax.faces.application.ViewExpiredException</exception-type>

    <location>/pages/login.xhtml</location>

    </error-page>

    <error-page>

    <error-code>500</error-code>

    <location>/pages/index.xhtml</location>

    </error-page>

    –pretty-config.xml–

    <pretty-config xmlns=”http://ocpsoft.com/prettyfaces/3.3.0&#8243;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;

    xsi:schemaLocation=”http://ocpsoft.com/prettyfaces/3.3.0

    http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.0.xsd“>

    <!– Public pages –>

    <url-mapping id=”login”>

    <pattern value=”/login”/>

    <view-id value=”/pages/login.xhtml” />

    </url-mapping>

    <url-mapping id=”login-error”>

    <pattern value=”/login/#{error}”/>

    <view-id value=”/pages/login.xhtml” />

    </url-mapping>

    <url-mapping id=”lost-login”>

    <pattern value=”/lostlogin”/>

    <view-id value=”/pages/lost-login.xhtml”/>

    </url-mapping>

    <url-mapping id=”new-user”>

    <pattern value=”/newuser”/>

    <view-id value=”/pages/nouvel-utilisateur.xhtml”/>

    <action onPostback=”false”>#{newUserBean.cleanParameters}</action>

    </url-mapping>

    […]

    </pretty-config>

    –mod_jk conf file–

    # Where to find workers.properties

    JkWorkersFile /etc/apache2/jk/workers.properties

    # Where to put jk logs

    JkLogFile /var/log/apache2/mod_jk.log

    # Set the jk log level [debug/error/info]

    JkLogLevel info

    # Select the log format

    JkLogStampFormat “[%a %b %d %H:%M:%S %Y] “

    # JkOptions indicate to send SSL KEY SIZE,

    JkOptions +ForwardKeySize -ForwardDirectories +ForwardURICompatUnparsed

    # JkRequestLogFormat set the request format

    JkRequestLogFormat “%w %V %T”

    # Locattion of shm file

    JkShmFile /etc/apache2/jk/jk.shm

    Ask if you need something else.

    Thanks if you can help me!

    #22672

    Is it only the pretty-URLs that are broken when using Mod_JK, or are other pages blank as well? It doesn’t make sense to me that only certain pages would stop working.

    #22673

    Could you perhaps post your workers.properties? Perhaps there is something wrong there?

    #22674

    fabichan
    Participant

    Here is my worker.properties:

    #Worker 1

    worker.list=worker1

    worker.worker1.type=ajp13

    worker.worker1.host=localhost

    worker.worker1.port=8009

    worker.worker1.lbfactor=50

    worker.worker1.cachesize=10

    worker.worker1.cache_timeout=600

    worker.worker1.socket_keepalive=1

    worker.worker1.socket_timeout=300

    And yes only the pretty urls are broken.

    Note: if there is an error on a page I see the glassfish error page well (ex: failed to connect the database). But if all is ok the server is long to respond and send an empty page.

    #22675

    Your workers.properties file looks fine. This is really a very weird issue, because which type of connector (HTTP vs. AJP) you use shouldn’t make any difference. The Servlet API doesn’t even provide any way to distinguish between the two.

    You wrote that the request takes a long time and finally you only see a blank page. You should try to do a thread dump to find out what is taking so long. And what HTTP response code is sent by the server when the blank page is showed?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Comments are closed.