On Sun, 2004-02-29 at 18:21, Thai Lam wrote: > > Thanks for the quick response in both email and in putting up the > tutorials. I'm going through the Fortress example now and trying to walk > my way through it. Currently, I'm encountering a JSP error from Tomcat. > Mainly the it can't find ServiceManager. Is there a configuration file > that I need to modify to let it know where to look for the framework jar > files or the fortress jars? > > How does the system know where to grab the information? Would I need to > create environment variables for Framework and Fortress as I did with > Merlin?
Hmmm. I know I had it working yesterday. What errors are you getting exactly? Are there any errors in the Tomcat logs (not on the JSP)? The Fortress container uses two configuration files (you can get away with one, but that's a different story). In the servlet example, these are in the WEB-INF directory: http://cvs.apache.org/viewcvs.cgi/avalon-sandbox/examples/fortress/servlet/src/webapp/WEB-INF/ Specifically, the system.xconf and system.roles files configure the Fortress container. Have you read the Developing With Avalon white paper yet? http://avalon.apache.org/developing/index.html ---------------> > > In the Fortress example, I saw a string variable "configDir" set to equal > "src/conf". Does that directory need to be created? > > <-------------- That just happens to be where I put the configuration files in the examples. To run the fortress standalone or fortress swing example, go to the project directory (there will be a Maven project.xml file there) and run: maven run to just build: maven jar > I've gone through the Merlin tutorials and I've built the "blocks". How do > I got about actually using these blocks? It brings up the results as > definied in the tutorial, but I'm kind of confused as to what to do. Yeah, that's the tricky part for a lot of people. I know it was for me. Like anything, you have lots of options. In a webapp, you could go a fairly simple route and do something like I showed in the Fortress servlet example. In this case, you would use Avalon to only handle your "business logic" or the "model" part of your app (if that doesn't make sense, you should read up on MVC or DAO programming). Basically, your Avalon components would contain the JDBC calls and other logic of your app. Your servlet or Struts action or whatever could then get the Avalon components (which would essentially be DAO's), use them to retrieve data from the database, and then present the info using standard servlet/jsp technology. If that didn't make any sense to you, please say so. If you go this route, then all you need is a way to look up Services from an Avalon container. The Fortress servlet example I provided shows how to do this. A merlin example is "on its way." :) Alternatively, you could use Avalon as a servlet controller and write a whole Avalon based web framework. This would be a bit more work and you would be duplicating efforts similar to Jakarta Turbine (http://jakarta.apache.org/turbine) or the Keel Framework (http://keelframework.org) or even Cocoon (http://cocoon.apache.org). You may want to check these out regardless. I'd also suggest you check out the "mutuals" example in the avalon-examples source code I put on my website. Also, there's a simple webserver example built with merlin in the Merlin tutorials section of CVS: http://cvs.apache.org/viewcvs.cgi/avalon/merlin/platform/tutorials/ These more complete examples might help you see how to write a full application using Avalon. > Thanks again, I'm kind of getting there... maybe. No problem. I'll be adding more to the docs this week. Good Luck! -- jaaron <http://jadetower.org> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
