[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-07 Thread rintcius

Yes, but I am referring to the case when there is no Full(session).
I.e. how do I get the servlet context in the 2nd case at the place
where I am currently throwing a RTE.

  def servletContext = {
S.servletSession match {
  case Full(session) = session.getServletContext()
  case _ = throw new RuntimeException(no session)
}
  }



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-07 Thread rintcius

 Your best bet is to go find some Java static thing that's going to give you
 the ServletContext

Yes that could work, but is it an idea to make the liftServlet
available as an object in Lift (when it has the right provider)?
Then the servletContext can be obtained nicely via
liftServlet.getServletContext()


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-07 Thread rintcius

Thanks Marius, that was what I was looking for!

So in 1.0.2 I can call:
def servletContext = LiftRules.context

And when I upgrade to 1.1. I will change that into your suggestion.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-03 Thread rintcius

Hmm, I am still confused...

Maybe better to get into a specific use case.
Suppose i have the following:
1) a lift application just serving stuff via the Servlet interface
2) an object in the ServletContext (let's say spring's
ApplicationContext)
3) a snippet that does not need a session but needs access to this
object in the ServletContext
  (let's say just some static content but reusing spring's i18n
support)

How do I get access to this object in the ServletContext from such a
snippet?
Or are you telling me that this use case makes no sense in Lift?

Rintcius
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-02 Thread rintcius

No, I think you mean there is not a guaranteed **session** (it is
S.servletSession that returns a Box)

I agree that once I go through the servletSession I should not just
open_! the Box.
But that's not the point I am trying to make. I think there should be
a way to get the ServletContext without going through the
servletSession.
In other words: It's quite possible that there is no session in a lift
snippet, but there always is a ServletContext (I assume..).
However, it's a different question whether there's currently a method
available in lift that enables me to get the ServletContext from a
snippet (I couldn't find it).

Rintcius

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-02 Thread rintcius

Ok hopefully better phrased: It's quite possible that there is no
session, while there is a ServletContext.

 The context of the request is going to depend on how the current session is 
 instantiated.

I don't get that. Quote from 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html
:
There is one context per web application per Java Virtual
Machine. (A web application is a collection of servlets and content
installed under a specific subset of the server's URL namespace such
as /catalog  and possibly installed via a .war file.)

So why is it depending on how the current session is instantiated?

Rintcius
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Started integrating lift in a scala+spring project. Feedback?

2009-10-01 Thread rintcius

Hi,

I have started integrating Lift in a Scala + Spring example project
(see http://code.google.com/p/scala-spring). This first integration
just has a single template and snippet for now but should give an idea
how Lift can be integrated.
Before I go further with this I would like some Lift experts to review
the code I have written so far.
Anybody? The changeset that adds lift integration is in
http://code.google.com/p/scala-spring/source/detail?r=18

Thanks, Rintcius

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-01 Thread rintcius

Hi Tim,

This project is meant as an example for people (like me) that maintain
existing Spring architectures and are interested in using Scala and
Lift.
What I want to do now is port the existing jsp's and spring
controllers to lift, so that people can compare jsp and lift-webkit
with each other (and probably favor lift :) ).
Currently I have just looked at the easiest way to integrate Lift and
Spring (that is using the LiftFilter and access Spring's
ApplicationContext), but I am also interested in other ways to
integrate them (at a later stage).

Rintcius

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-01 Thread rintcius

Ok thanks David. What is the recommended way to get the ServletContext
from a lift snippet (in 1.0.2)?

Rintcius

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-01 Thread rintcius

Hmm, isn't there a direct way to get the ServletContext? I mean now
that I think about it looks to me that it should be possible to obtain
the ServletContext no matter if there's a session or not.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift and interoperability

2009-05-17 Thread rintcius

Interesting discussion! I think I see a bit where Glenn is coming
from. To me it's about *ease* of interoperability.
For enterprise architectures the most important question is: to what
extent is Lift helping me to build a **composable** software system.
A composable software system will offer gradual change from one
architecture to another and it will make this migration easy.
So suppose I am having a Spring based architecture with Hibernate and
struts and want to migrate this to Lift.
I think it would be a good exercise to check how such an architecture
can be gradually migrated to a lift based architecture.
So what to do if I just want to replace struts or hibernate. Or what
if I want to start with migrating my POJO's to POSO's.
My guess is that this is all possible in Lift but I haven't seen
anything in the code or docs that facilitates this.
Maybe I have overlooked something but what I have seen so far is based
on an all or nothing approach
(also nothing wrong with that, e.g. Grails doesn't facilitate this
either and this is a very productive framework as well).

Regards, Rintcius

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---