Jetty + SessionVar = Big Problem

4 views
Skip to first unread message

Hannes

unread,
Nov 15, 2010, 8:25:07 AM11/15/10
to lif...@googlegroups.com
Hey Lifters,

I don't know what I've done wrong, but everything is not working as it
should!

After I spend ours with deployment stuff (Jetty and PostgreSQL), I
finally noticed that the SessionVar ist not working in Jetty.

I've shopping cart, without Jetty - NO PROBLEM - with Jetty - the
content is not cleared and can be seen in all browsers accessing the site!

This is definitely not good!


thanks.

David Pollak

unread,
Nov 15, 2010, 9:36:11 AM11/15/10
to lif...@googlegroups.com
Here's how I deploy my Lift apps.  I create the WAR file (this depends on your build tool).  mvn package or sbt package will do just fine.

Next, I download Jetty: https://github.com/dpp/lift-samples/raw/master/jetty_instance.tgz

I un-tar Jetty and copy my WAR file to webapps/root.war inside the Jetty directory structure.

To start my app, I type "start_prod.sh" from the top level of the Jetty container.

There are files that contain the heap setting and the port setting in the top level.

You can change the database connection settings in the props file at build time.  the default.props file is used for development and the production.default.props file is used in production mode.

We are here to help you be successful with your Lift application.  But we are not here to be your system administrators.  Please read some of the thousands of articles on deploying a WAR file in an J/EE web container and setting up JDBC connections before posting more questions on this issue.

Thanks,

David

PS -- Yes, this is a departure from the normal no-RTFM answers policy, but having a dozen+ posts on how to do something that is very well documented (deploying a WAR file on a J/EE container) crossed the line.



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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Hannes

unread,
Nov 15, 2010, 9:54:35 AM11/15/10
to lif...@googlegroups.com
Hi David,

It wasn't my purpose to SPAM the list with stupid questions.

But I think you have to understand, that somethings are not well documented for the beginner, like I am.

Besides that, I await that 'code' is working the same way on my production system as well as it does on my development machine.

That's why I wrote this message. I got beyond my deployment problem and it worked - and than I figured out, that the same application is behaving differently than without deployment (Jetty),ᅵ which is a little bit strange to me.

What shall I do - test for each machine and each setup? I'm only speaking about code not about configuration, and I expect that code always works the same way, right? I think that's what everybody's expecting...

Finally, I figured out, that I'm having this issue on my development machine, too. And without being offensive I did what you told me and I made an update from 2.1-M1 to 2.1.

I think that's where the problem comes from, because I didn't do other changes.

thanks.



Here's how I deploy my Lift apps.ᅵ I create the WAR file (this depends on your build tool).ᅵ mvn package or sbt package will do just fine.


Next, I download Jetty: https://github.com/dpp/lift-samples/raw/master/jetty_instance.tgz

I un-tar Jetty and copy my WAR file to webapps/root.war inside the Jetty directory structure.

To start my app, I type "start_prod.sh" from the top level of the Jetty container.

There are files that contain the heap setting and the port setting in the top level.

You can change the database connection settings in the props file at build time.ᅵ the default.props file is used for development and the production.default.props file is used in production mode.

We are here to help you be successful with your Lift application.ᅵ But we are not here to be your system administrators.ᅵ Please read some of the thousands of articles on deploying a WAR file in an J/EE web container and setting up JDBC connections before posting more questions on this issue.

David Pollak

unread,
Nov 15, 2010, 11:34:34 AM11/15/10
to lif...@googlegroups.com
On Mon, Nov 15, 2010 at 6:54 AM, Hannes <hannes...@gmx.li> wrote:
Hi David,

It wasn't my purpose to SPAM the list with stupid questions.

But I think you have to understand, that somethings are not well documented for the beginner, like I am.


Besides that, I await that 'code' is working the same way on my production system as well as it does on my development machine.

That's why I wrote this message. I got beyond my deployment problem and it worked - and than I figured out, that the same application is behaving differently than without deployment (Jetty),  which is a little bit strange to me.

Then you are doing something wrong in the deployment.  While normally, it would be entirely appropriate to ask about such an issue on this list, but, at least as far as I'm concerned, you've burned through a lot of good will asking questions about deployment which you should have done some basic research on.
 

What shall I do - test for each machine and each setup? I'm only speaking about code not about configuration, and I expect that code always works the same way, right? I think that's what everybody's expecting...

And the code does work the same way across development and deployment.  I have not seen a case where it does not, with the exception of bugs (e.g., timing issues).
 

Finally, I figured out, that I'm having this issue on my development machine, too. And without being offensive I did what you told me and I made an update from 2.1-M1 to 2.1.

2.1-M1 is no longer supported.  If you want help on this list, you'll have to use a version of Lift that is.

If you are having a problem deploying an app and your system administration skills are not strong, then hire a consultant who can help you.  Odesk and other services have plenty of folks who will help for $20 +/- per hour.  This is no different than asking about CSS over and over.  If you need help with design, hire a designer.  If you need help deploying an app, hire someone to help.


 

I think that's where the problem comes from, because I didn't do other changes.

thanks.




Here's how I deploy my Lift apps.  I create the WAR file (this depends on your build tool).  mvn package or sbt package will do just fine.


Next, I download Jetty: https://github.com/dpp/lift-samples/raw/master/jetty_instance.tgz

I un-tar Jetty and copy my WAR file to webapps/root.war inside the Jetty directory structure.

To start my app, I type "start_prod.sh" from the top level of the Jetty container.

There are files that contain the heap setting and the port setting in the top level.

You can change the database connection settings in the props file at build time.  the default.props file is used for development and the production.default.props file is used in production mode.

We are here to help you be successful with your Lift application.  But we are not here to be your system administrators.  Please read some of the thousands of articles on deploying a WAR file in an J/EE web container and setting up JDBC connections before posting more questions on this issue.
Reply all
Reply to author
Forward
0 new messages