Issues serving static HTML

71 views
Skip to first unread message

Dave Murray-Rust

unread,
Apr 28, 2012, 6:57:47 AM4/28/12
to lif...@googlegroups.com
Hi List,

I have a lift application, where we're also using a bunch of static HTML pages to serve up a flash application.

I've got all of the flash stuff in a directory in /src/main/webapp, and it's in the Sitemap as:

      :: Menu(Loc("Flash", Link(List("flash"), true, "/flash/Main.html"), "Flash Content",Hidden)) 

It gets served OK, but the HTML is processed on the way out; in particular, javascript has single quote characters converted to their HTML entity equivalents.

Is there a way to stop processing of HTML pages?

Alternatively, am I going about this the wrong way? I'm creating a WAR file with everything in to make it easy to do cloud hosting, and if I can keep deploying in this way, that's great, but if I need to consider alternative techniques, that's also OK.


Thanks,

dave

David Pollak

unread,
Apr 28, 2012, 5:14:57 PM4/28/12
to lif...@googlegroups.com
If you put an HTML page in SiteMap, it's going to be served by Lift and Lift processes all the HTML pages it serves.

If you want to have a page that's not served by Lift, then use:

LiftRules.liftRequest.append{
  case Req("flash" :: "Main" :: Nil, "html", _) => false
}

--
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



--
Visi.Pro, Cloud Computing for the Rest of Us http://visi.pro
Lift, the simply functional web framework http://liftweb.net


Dave Murray-Rust

unread,
May 1, 2012, 6:01:07 AM5/1/12
to lif...@googlegroups.com


On Saturday, 28 April 2012 22:14:57 UTC+1, David Pollak wrote:
If you put an HTML page in SiteMap, it's going to be served by Lift and Lift processes all the HTML pages it serves.

If you want to have a page that's not served by Lift, then use:

LiftRules.liftRequest.append{
  case Req("flash" :: "Main" :: Nil, "html", _) => false
}


Great, that's perfect, thanks.

As a followup, I've found it confusing figuring out what happens in Boot.scala; there are different bits of documentation, with different ways of doing things, and I couldn't piece together a good overview. What's the recommended resource for figuring out how things are served? Where could I have found out the solution above?

Thanks! 

David Pollak

unread,
May 1, 2012, 9:41:10 AM5/1/12
to lif...@googlegroups.com
On Tue, May 1, 2012 at 3:01 AM, Dave Murray-Rust <da...@mo-seph.com> wrote:


On Saturday, 28 April 2012 22:14:57 UTC+1, David Pollak wrote:
If you put an HTML page in SiteMap, it's going to be served by Lift and Lift processes all the HTML pages it serves.

If you want to have a page that's not served by Lift, then use:

LiftRules.liftRequest.append{
  case Req("flash" :: "Main" :: Nil, "html", _) => false
}


Great, that's perfect, thanks.

As a followup, I've found it confusing figuring out what happens in Boot.scala;

Nothing other than configuration happens in Boot.scala
 
there are different bits of documentation, with different ways of doing things, and I couldn't piece together a good overview. What's the recommended resource for figuring out how things are served?

Where could I have found out the solution above?

Thanks! 

--

Dave Murray-Rust

unread,
May 1, 2012, 12:42:06 PM5/1/12
to lif...@googlegroups.com


On Tuesday, 1 May 2012 14:41:10 UTC+1, David Pollak wrote:


As a followup, I've found it confusing figuring out what happens in Boot.scala;

Nothing other than configuration happens in Boot.scala

Sorry, that was horribly unclear from my end; I meant the effects of the statements in Boot.scala on how requests are handled.
 
 
there are different bits of documentation, with different ways of doing things, and I couldn't piece together a good overview. What's the recommended resource for figuring out how things are served?

 

That's exactly what I needed, thanks. Not sure why I didn't find those previously. 
Reply all
Reply to author
Forward
0 new messages