Blog-gae example

1 view
Skip to first unread message

George Moschovitis

unread,
Dec 17, 2009, 12:00:46 PM12/17/09
to nitro-devel
Dear devs,

I updated the link to the blog-gae example on www.appenginejs.org to
point to a tarball that includes everything needed to easily run the
example.

There is no need to download any narwhal packages (narwhal itself is
included) and no need to create symbolic links (also included in the
tarball)

Hopefully, it will be easier for newcomers to evaluate appenginejs
and
nitro/narwhal.

Let me know if it works for you out of the box,

George

PS: The actual code of the blog example is outdated though, it need
to
update it to the latest Nitro concepts.

Robin B

unread,
Dec 18, 2009, 5:38:06 PM12/18/09
to nitro-devel
I modified build.xml:

<property environment="env"/>
<property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>

did 'ant runserver'

GET 'http://localhost:8080/' -> HTTP ERROR 404

So it will not work out of the box for me.

Robin

On Dec 17, 11:00 am, George Moschovitis

George Moschovitis

unread,
Dec 18, 2009, 5:45:46 PM12/18/09
to nitro...@googlegroups.com
  <property environment="env"/>
 <property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>

what is ${env.AP...} ?

you should put the path to the SDK here, for example: location="../appengine-java-sdk"
 
did 'ant runserver'

GET 'http://localhost:8080/' -> HTTP ERROR 404

can you past the error message from the console? What OS are you using, this is only tested on Unix OSes...

-g.
 

So it will not work out of the box for me.

Robin





On Dec 17, 11:00 am, George  Moschovitis
<george.moschovi...@gmail.com> wrote:
> Dear devs,
>
> I updated the link to the blog-gae example onwww.appenginejs.orgto
> point to a tarball that includes everything needed to easily run the
> example.
>
> There is no need to download any narwhal packages (narwhal itself is
> included) and no need to create symbolic links (also included in the
> tarball)
>
> Hopefully, it will be easier for newcomers to evaluate appenginejs
> and
> nitro/narwhal.
>
> Let me know if it works for you out of the box,
>
> George
>
> PS: The actual code of the blog example is outdated though, it need
> to
> update it to the latest Nitro concepts.

--

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





--
blog.gmosx.com

Robin B

unread,
Dec 18, 2009, 6:10:10 PM12/18/09
to nitro-devel

On Dec 18, 4:45 pm, George Moschovitis <george-moschovi...@gmosx.com>
wrote:


> >   <property environment="env"/>
> >  <property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>
>
> what is ${env.AP...} ?

It is a nice convention from jack-servlet, so you do not have to copy
the SDK into every project. It is orthogonal to the problem.


>
> you should put the path to the SDK here, for example:
> location="../appengine-java-sdk"
>
> > did 'ant runserver'
>
> > GET 'http://localhost:8080/'-> HTTP ERROR 404
>
> can you past the error message from the console? What OS are you using, this
> is only tested on Unix OSes...


I am using OSX 10.5.8. There is no error message, the app
'successfully' returns a HTTP 404:

HTTP ERROR: 404

NOT_FOUND

RequestURI=/

Powered by jetty://

Robin

> > nitro-devel...@googlegroups.com<nitro-devel%2Bunsu...@googlegroups.com>

Roberto Saccon

unread,
Dec 18, 2009, 6:23:58 PM12/18/09
to nitro-devel
You do NOT have to copy the SDK into every project, if you use (as
George suggested):

location="../appengine-java-sdk"

> > > nitro-devel...@googlegroups.com<nitro-devel%2Bunsubscribe@googlegr oups.com>

Robin B

unread,
Dec 18, 2009, 6:28:34 PM12/18/09
to nitro-devel
> You do NOT have to copy the SDK into every project, if you use (as
> George suggested):

You are right, but the downside is that I then have to edit every GAEJ
project to match my SDK location.

I think the convention from jack-servlet solves the problem best:

<property environment="env"/>
<property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>

Everyone is free to put their SDK where they wish, and you do not have
to modify projects to use them.

Robin

George Moschovitis

unread,
Dec 19, 2009, 3:25:01 AM12/19/09
to nitro...@googlegroups.com
I think the convention from jack-servlet solves the problem best:

<property environment="env"/>
<property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>


I don't know about this convention. And I am not sure how this may work?
How can the Servlet have access to the web.xml file?

Can you elaborate?

-g.

--
blog.gmosx.com

Robin B

unread,
Dec 19, 2009, 10:12:35 AM12/19/09
to nitro-devel
> How can the Servlet have access to the web.xml file?

Not web.xml, build.xml:

http://github.com/tlrobinson/jack-servlet/blob/master/build.xml

<property environment="env"/>
<property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>

When the project is built, one of the ant tasks already copies the SDK
from sdk.dir to the project.

> I don't know about this convention. And I am not sure how this may work?

It is just an environment variable that you set once for your system
in ~/.bashrc:

export APPENGINE_JAVA_SDK='/user/lib/appengine....' # your SDK
location


Why should everyone have to edit build.xml, that is what environment
variables were made for? If everyone edits build.xml differently,
they need to be careful about not committing those changes in patches
or pull in those changes, it is better not to edit build.xml in this
situation.


Sorry to getting things side tracked on build.xml, it is only an
optimization and a suggestion not a requirement.

The real question is does blog-gae [ http://www.nitrojs.org/appenginejs/blog-gae.tar.gz
] return 404 from '/' for others too and if so why?

Thanks,

Robin

On Dec 19, 2:25 am, George Moschovitis <george-moschovi...@gmosx.com>
wrote:

George Moschovitis

unread,
Dec 19, 2009, 12:45:06 PM12/19/09
to nitro...@googlegroups.com
<property environment="env"/>
<property name="sdk.dir" location="${env.APPENGINE_JAVA_SDK}"/>

ah, you mean ant interpolates ${..}, ok didn't know that.

Sorry to getting things side tracked on build.xml, it is only an
optimization and a suggestion not a requirement.

OK, will change this.
 
The real question is does blog-gae [ http://www.nitrojs.org/appenginejs/blog-gae.tar.gz
] return 404 from '/' for others too and if so why?

can you paste the console output? a stack trace or something?
-g.



--
blog.gmosx.com
Reply all
Reply to author
Forward
0 new messages