WebMacro: Frequently Asked Questions

This document answers some questions which are commonly asked on the mailing list. Hopefully you'll find the answers you're looking for here, or elsewhere in the documentation.

If not, please join the mailing list and ask! That's how answers wind up being in this FAQ. The mailing list is also the best place to suggest new features, talk about interesting uses of WebMacro, and debug problems you're having.

To join the mailing list, send an email to webmacro-request@webmacro.org containing the single word "subscribe" in either the subject or the body.

What is WebMacro?

WebMacro is a free Java servlet development framework, including a template language and extensible component model. It uses beans and introspection to make any Java object in your servlet accessible in your template.

The big idea is that HTML and other layout information should not appear in your program code; and program code should not appear in your HTML:

WebMacro allows programmers to implement functionality with traditional objects and data structures, paying little or no attention to formatting issues.

Page designers then use WebMacro's template language to build standard looking HTML pages, with format-oriented script codes (variables, loops, conditionals) that have full access to the data structures created by the programmer.

Where do I find help?

Use the mailing list for bug reports, feature suggestions, comments, criticisms, or any other feedback. Other users may be able to help you, and the developers are on the list if not.

To join the list send a message with the word "subscribe" as the subject or in a line in the body to:

Commercial users may also purchase support, along with a commercial license, if support beyond that provided by the mailing list is inadequate. However, the mailing list is pretty good.

Why should I join the mailing list?

If you're using WebMacro we really want to hear from you--you'll become our best resource: we want to know what works well, and we especially want to know what doesn't work. You must have some ideas about how it could be improved, and you've probably noticed a few bugs.

If you don't report them, we can't fix them! And if you have a good idea that you don't tell us about--how are we supposed to implement it?

We also use the mailing list to post announcements, and hold votes on features or the direction WebMacro should go.

As mentioned above, to join the list send a subscribe message to webmacro-request@webmacro.org.

How much does it cost?

WebMacro is free under the GNU Public License.

Commercial use licenses are available for a fee for people who are unable to work with the GPL--this non-free license will entitle you to distribute binary only versions of your software.

To learn more about the WebMacro license, look here..

Why is it free?

We've used free software extensively in our business, and we thought it was high time we gave something back. Releasing WebMacro to the world makes me feel good about myself.

In addition, it makes good business sense. Semiotek is a small company without a large marketing department. We live off contract work, and needed a way to get some more exposure. Releasing WebMacro does that for us--we're hoping people will like it so much, they come and hire us to use it.

Finally, it'll improve the product we use for our regular work. We've got a growing mailing list full of people using WebMacro for their own work--regularly sending in feature suggestions, code reviews, and bug reports.

So in my opinion, the open-source route is a big win all around: I get to feel good about life, Semiotek gets some badly needed PR, WebMacro gains market share and beta testers, and you get WebMacro for free!

Who wrote it?

WebMacro was designed and implemented primarily by Justin Wells at Semiotek Inc.; initially with a lot of help from Yuen-Ping Leung. The people on the mailing list also deserve a lot of credit as well: many of the design ideas, and a large number of bug fixes, are due to helpful list members! WebMacro's README gives them better credit.

Semiotek Inc. is a consulting company in Toronto, Ontario. We work primiarliy with large OO web projects, especially in Java. If you have some web design or programming you need done, perhaps using WebMacro, you might contact us: info@semiotek.com

How do I contact you?

Use the mailing list for support, feature requests, bug reports, general queries about WebMacro, and so forth--we read it! However for other issues, such as acquiring a different license (if the GPL is not acceptable to you), information about Semiotek Inc., services, etc., you should contact us via the general address: info@webmacro.org

I can't get the WebMacro examples to work

I have trouble compiling the WebMacro sources

First, you need to have at least JDK 1.1.6 to compile WebMacro.

Second, you cannot use javac under JDK 1.1.6 and 1.1.7 since it has some bugs (with respect to final and static variables). Instead, use the jikes compiler which is freely available from IBM. Check here for a link to jikes.

Third, to compile WebMacro under Java2 you will have to edit the sources to fix minor incompatibilities. I have mirrored some of the Java2 classes to make a future migration easier--in particular, the classes in com/semiotek/util/java2 must be deleted to avoid conflicts with the built in collection API.

Why don't updates to my templates show up in the running version?

Edit your WebMacro.properties file and set the cache expire time for templates to zero. This will seriously degrade performance, but prove invaluable during development. Set it back to 10min or so for production use. Note the expire clock is reset each time that the template is accessed.

There is no way to do this prior to version 0.85.

What about syntax highlighting editors? If you use EMACS, try this, it will highlight WebMacro directives in templates.

Can I use JavaScript in a WebMacro template?

Yes. However, to avoid conflicts with WebMacro's braces you must put your JavaScript in a #use block, like this:
  #use 'text' until end
    Javascipt here will not be parsed, { and } are safe
  end

WebMacro will not attempt to parse anything between the start of the #use directive and the matching 'end' statement.

You only need to do this for blocks of JavaScript which include {, }, #, or $ characters which are meaningful to WebMacro.

Under WebMacro 0.75.3 and earlier I get errors in the log indicating a problem with UserDB

Ignore them. UserDB is a prototype class that is broken under 0.75.3, and not actually used by any of the example code. To turn these errors off, edit your WebMacro properties file and remove the line which loads the UserProvider. It isn't needed.

Introduction | Download

api | design | faq | goals | links | license | othertech | quickstart | script | status