PDA

View Full Version : having it ignore non spring pages


jacksonpd
04-15-2005, 07:17 AM
Hi there,

I've just converted a page to use the web spring framework.
However I get the following error for the non spring asp pages

"No object named 'Default' is defined: Spring.Objects.Factory.Support.WebObjectFactory "

Is it possible to just ignore these pages rather than throw up an error?

The work around I currently have is to put the spring pages into a separate directory and setup the http handler to only use that.

I'm looking forward to giving this a real whirl....

Aleks Seovic
04-16-2005, 05:41 AM
Yeah, that's on a todo list...

Right now you can register Spring handler for a different extension (*.spring, for example), so your .aspx pages will still use standard handler and work fine.

However, I will add logic to Spring handler factory that will look for object definition in the application context and if it doesn't find it simply try to execute specified page, just like the standard handler does.

I'll let you know when this is implemented, shouldn't take long.

- Aleks

Aleks Seovic
04-27-2005, 07:46 PM
Just to close this post -- requested functionality is checked in and Spring PageHandlerFactory will now behave the same way as the standard ASP.Net PageHandlerFactory does.

If page definition does not exist in the Spring application context, handler factory will simply try to load it from the filesystem using standard ASP.Net mechanism.

Keep in mind that if your page extends Spring.Web.UI.Page and you use one of the GetMessage methods to retrieve localized messages, you need to create definition for the page so container can inject application context into it, which is then used to access message source. In general, if your page extends Spring Page class it is probably a good idea to create definition for it in the config file.

Regards,

Aleks