>Jeff Dripps wrote: >> >> Hi folks, >> >> I wrote a really simple filter that I thought would be great for end users >> configuring Jigsaw. It's purpose was to eliminate having to hand type many >> of the admin URLs discussed in the configuration tutorials. It's goal was >> to replace embedded tags with the users actual host name and port number in >> any html document the filter was applied to. For example in the >> configuration.html example below, the tag <!--your.host.name--> is >> replaced, resulting in the ability to just click the link to configure >> rather than copy/paste it in. > >Very good. > >Your code is very similar to my ImageCountFilter. You can see the code >at >address http://www.netfly.it:8080/Extents/src/ImageCountFilter.java > >If the next tag is into same line, don't work becouse the following code >test for one tag for line > >while ((strTmp = ds.readLine()) != null) { > // System.out.println(strTmp); > > > // test if the line contains URL_TAG > if ((nPos = strTmp.indexOf(URL_TAG)) != -1) { > System.out.println("host tag found"); > > // replace the tag with host info > strTmp = insertURL(request, strTmp, nPos); > } > >... >... > >Loop on line for test other tags > > >Regards >Pasquale Yes, thank you Pasquale for your ImageCountFilter code example. I'm already using it in my pages and I did use it as a template for my simple filter. Also you were correct, I was attempting to have multiple tags in the same line. That was the problem. Thanks again for your code contribution. It helped a lot in my learning about filters. sinc, -jeffReceived on Friday, 9 August 1996 16:55:09 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:59:46 GMT