The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Blog Management Progress

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Blog Management Progress Posted: Feb 15, 2005 8:33 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Blog Management Progress
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

I've finally gotten around to creating some tools for automating the management of the blog server. This afternoon I knocked out a web interface for creating a new blog, and finished up the interface for disabling existing blogs. Other than the tedium of creating the SSP pages, it was all pretty easy - the only place that gave me a small hitch was the resetting of server state. Here's what I was doing at first:

VisualWave.WebSite clearSites.
VisualWave.WebSite allSites.

The problem is, I was doing that in the #doPost method of a servlet, and on the page I was redirecting to there was an expectation of finding a session variable called 'currentUser'. In its absence, the page redirected over to the login page. This confused me for a few minutes, until the obvious dawned on me - clearing all the sites also cleared all existing session state - so of course there were no session variables left! As it happens, the WebToolkit has a very straightforward API, so I went and looked at class WebSite. What I wanted to do was programmaticall add a site, or remove a site (depending on which management page is in use. Here's all I had to do:

Adding a site:

site := VisualWave.WebSite
               new: siteName
               fromFile: self siteFile
               in: VisualWave.WebSite siteConfiguration.
VisualWave.WebSite addSite: site.

Removing a site:

VisualWave.WebSite removeSiteNamed: siteName.

That's it - it's pretty easy to create a small set of site specific tools with the api provided (other than that SSP creation :) ).

Read: Blog Management Progress

Topic: Bang your head against the wall, part two Previous Topic   Next Topic Topic: nofollow, only faster

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use