Stephanie Zohner wrote:

Hi,

I tried to configure the Tomcat Service with the Properties dialog under
Administrative Tools/Services. This time I could set the login account to
"my" account, however the password was not taken. It is always overwritten.
And I think this is the reason why the Directorygenerator still does not
like shared drives.

Is my Tomcat version buggy, or did I miss a detail, when setting the login
account for Tomcat?


Just a thought. Does the user you are logged in as have administrative rights for the machine? They will have to have in order to make changes to these settings. I have had situtations before where it will let me change them, but won't remember them.

Regards, Upayavira

Upayavira wrote:



Sounds like a reasonable case for a patch to the DirectoryGenerator. Anyone fancy creating one?


The code change required is at the bottom (it's a 1-liner).
Semantically, the old code said

/**************************************/
If the resolved file is Not a directory:
        Throw a ResourceNotFoundException
/**************************************/

My version says:

/**************************************/
If the resolved file is Not a directory
        Try using the configuration string verbatim (i.e. don't run it
through the resolver)
        IF that doesn't work:
                Throw a ResourceNotFoundException
/**************************************/

This works for fully resolved network paths. The correct solution would
be to change the MutableEnvironmentFacade to correctly resolve the name.
However, my knowledge of Cocoon is not sufficient to be able to assess
the impact of that. Also, the string is run through the resolver for a
reason. I am loath to circumvent that without knowing more.


You never know, it might be fixed in 2.1.6.1 :oP

The following is my definition of the generate() method of the
DirectoryGenerator class (based on 2.1.5.1 release, look for XXXXX for
change). I ran it by the dev mailing list yesterday, but have had no
response.

  public void generate() throws SAXException, ProcessingException {
       String directory = super.source;
       Source inputSource = null;
       try {
           inputSource = this.resolver.resolveURI(directory);
           String systemId = inputSource.getURI();
           if (!systemId.startsWith(FILE)) {
               throw new ResourceNotFoundException(systemId + " does
not denote a directory");
           }
           // This relies on systemId being of the form "file://..."
           File directoryFile = new File(new URL(systemId).getFile());
           if (!directoryFile.isDirectory()) {
                        // XXXXXXXXXXXX THIS ASSIGNMENT AND FOLLOWING IF
STATEMENT ARE NEW, PREVIOUSLY IT JUST THREW THE EXCEPTION XXXXXXXXXXXXX

                        directoryFile = new File(directory);
                
                if  (directoryFile.isDirectory() == false){
                   throw new ResourceNotFoundException(directory + " is
not a directory.");
                }
           }

           this.contentHandler.startDocument();
           this.contentHandler.startPrefixMapping(PREFIX, URI);

           Stack ancestors = getAncestors(directoryFile);
           addAncestorPath(directoryFile, ancestors);

           this.contentHandler.endPrefixMapping(PREFIX);
           this.contentHandler.endDocument();
       } catch (SourceException se) {
           throw SourceUtil.handle(se);
       } catch (IOException ioe) {
           throw new ResourceNotFoundException("Could not read
directory " + directory, ioe);
       } finally {
           this.resolver.release(inputSource);
       }
   }

Matt Innes, UTB Consulting
[EMAIL PROTECTED]
07795 300 735


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to