Re: [Lift] Can not load Comet/Ajax JS

30 views
Skip to first unread message

David Pollak

unread,
May 22, 2013, 1:45:00 PM5/22/13
to liftweb
That's because the comet and Ajax paths have to be in the root of the path. There's no way to have the comet or ajax path be not at the root without a ton of surgery on Lift. Perhaps you can expand your url-pattern to include /comet_request and /ajax_request


On Wed, May 22, 2013 at 10:35 AM, <pzmes...@gmail.com> wrote:
I am running a websocket and a web api in the same app and have had to create 2 mappings in web.xml (/logs/* and /web/*) in order to avoid the apparent url hogging issue pointed out by another user (https://groups.google.com/forum/m/#!topic/liftweb/_JU0-7_1xEU).

Now, when I attempt to load my page, both the ajax_request and comet_request from lift 404.  I have attempted to override the ajax/comet lift rules directives in boot to no avail.  How can I force lift to load comet/ajax from /web/.... instead of /.... ?

Relevant web.xml:

    <filter-mapping>
        <filter-name>LiftFilter</filter-name>
        <url-pattern>/web/*</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>XWebSocketV1</servlet-name>
        <display-name>X WebSocketServlet v1</display-name>
        <servlet-class>com.organization.projectx.websockets.XWebSocketServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>XWebSocketV1</servlet-name>
        <url-pattern>/logs/*</url-pattern>
    </servlet-mapping> 


Relevant Boot.scala:

    LiftRules.cometPath = "web/comet_request"
    LiftRules.ajaxPath = "web/ajax_request"

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net

Reply all
Reply to author
Forward
0 new messages