Re: using jigadmin to add a resource

On Mon, 13 Oct 1997, Alex Liberman wrote:

> I am having trouble adding resources using Jigadmin. I was finally able 
> to add the tutorials example, FancyResources, after placing its class 
> file in nested directories: \w3c\jigsaw\tutorials. However, I am trying 
> to add the following java file:
> 
> package w3c.jigsaw.tutorials;
> 
> import w3c.jigsaw.http.*;
> import w3c.jigsaw.forms.*;
> import w3c.jigsaw.html.*;
> import w3c.jigsaw.resources.*; 
> import w3c.jigsaw.*;
> import w3c.www.http.*;
> 
> class MyNameResource extends PostableResource
> 	{
>         public Reply handle(Request request, URLDecoder data) 
>                 throws HTTPException
>         	{
> 		HtmlGenerator g = new HtmlGenerator("What is your name"); // set title
> 		g.append("<h1>The data you entered</h1>");
> 		g.append("your name is: ", data.getValue("name"));
> 		Reply reply = createDefaultReply(request, HTTP.OK);
> 		reply.setStream(g);
> 		return reply;
> 		}
> 	}
> 
> 
> I put the class file in the \w3c\jigsaw\tutorials and verified the 
> classpath environment variable, but Jigadmin won’t add it as a resource. 
> Does the java program itself need to extend a certain class, or contain 
> a certain import statement, in order for Jigadmin to add it? I don’t get 
> it...

Are you using the same CLASSPATH for Jigsaw and JigAdmin? The new class 
has to be present also in the CLASSPATH of JigAdmin.
The class may not appear in the menu of the Resource Helper of Jigadmin, 
to add it, you may do it manually in the textfield or add it in:
<INSTDIR>/Jigsaw/Jigsaw/config/jigadm/w3c.jigsaw.resources.ContainerResource/helpers
 (replace "/" by "\" for windows).

      /\          - Yves Lafon - World Wide Web Consortium - 
  /\ /  \                Architecture Domain - Jigsaw
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    

Received on Tuesday, 14 October 1997 03:40:12 UTC