users@glassfish.java.net

Re: Deployment contexts with GF v3 Prelude

From: Bill Kocik <bkocik_at_gmail.com>
Date: Sun, 9 Nov 2008 12:35:51 -0500

One more note on all of this . . .

On 8 Nov, 2008, at 10:48 PM, Peter Williams wrote:

>> Once the application is running in its own context, I can access
>> the admin console again athttp://localhost:4848. But now my
>> application's routes seem not to work correctly. If I try to access
>> my one scaffolded controller (this is a brand new blank Rails-
>> generated app with only one scaffolded controller and model for
>> testing), I get a routing error: No route matches "/twittertracks/
>> fakes" with {:method=>:get}.
> I recall that inside rails, there are some changes you need to add
> to make sure that the context root is stripped before doing internal
> routing. See this message, and the entire thread:
>
> http://markmail.org/message/msijwo7gm73aw5ea#query:%22server
> %20integration%20in%20rails%20project%22+page:1+mid:es7ymjy4t7as4hlg+state:results


If you view Arun Gupta's screencast about debugging Rails apps with NB
6.5 and GF v3 (http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug
) and watch closely, you'll see that his demo application is deployed
in its own context when he's not running in debug mode, and that he is
able to access the controller he created at that context without any
further configuration. In my setup, I cannot - even after adding a
relative_url_root setting to my routes.rb file. I can access the
default "Welcome Aboard" index.html page that new Rails apps create,
but everything else generates a routing error.

Clearly this works correctly, though - Arun's screencast proves it. I
really don't know what's so weird about my setup.

I'm working around all of this by just deploying my app at "/" and
foregoing access to the GlassFish admin console, which I don't really
need for development.


--
Bill Kocik