No META-INF directory
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: No META-INF directory

  1. #1
    Join Date
    Dec 2007
    Posts
    11

    No META-INF directory

    I am reading murach's book about jsp and servlets.
    He uses netbeans(I am using intellij idea) and I am at a point when he uses the META-INF folder that netbeans creates to save a context.xml file there that contains a Resource tag with information about a connection pool.
    The problem is that intellij idea projects do not contain such a folder.
    What should I do?
    Thank you!

  2. #2
    Join Date
    Jun 2011
    Posts
    35

    Re: No META-INF directory

    Hello,

    Personally when creating a new project (even for IntelliJ) I always prefer to use Maven's archetypes but that's just me.

    You should be able to just create the directory (in the root of the src) and define it as a Source directory in the Project Settings. I'm going to fire up IntelliJ myself to see if this is correct.
    Last edited by blaurent; July 1st, 2011 at 10:08 AM. Reason: I meant Source directory, not Resource directory.

  3. #3
    Join Date
    Jun 2011
    Posts
    35

    Re: No META-INF directory

    Hey,

    Ok so the Maven Archetype I use does not create the META-INF folder. All you need to do is create the directory in the src directory and include it as a source in your module (Ctrl-alt-shift-a, click on Modules, then on your module. In the sources tab (RHS) right click the META-INF folder and pick "Sources").

    That should be all.

    Hope I could help,

    Laurent

  4. #4
    Join Date
    Dec 2007
    Posts
    11

    Re: No META-INF directory

    I think that the META-INF folder must be created in the web directory and not the src directory.
    That is what netbeans do.(In fact murach uses in his books netbeans)
    Correct me if I am telling somthing wrong.
    Thank you again.

  5. #5
    Join Date
    Jun 2011
    Posts
    35

    Re: No META-INF directory

    Quote Originally Posted by skiabox View Post
    I think that the META-INF folder must be created in the web directory and not the src directory.
    That is what netbeans do.(In fact murach uses in his books netbeans)
    Correct me if I am telling somthing wrong.
    Thank you again.
    I'm actually not entirely sure so I'm hoping that somebody with more experience can help me out on this.

    I believe that the WAR you generate includes all of the META-INF information since it is included as a source. When it is loaded/deployed into the web server it is extracted from the war and therefore the META-INF directory created.

    Does this make any sense at all?

    (Based this on the example app from http://tomcat.apache.org/tomcat-5.5-...processes.html)
    Last edited by blaurent; July 1st, 2011 at 10:30 AM. Reason: Removing some uncertainty

  6. #6
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: No META-INF directory

    Cross-posted on Java Programming Forums.

    I'm out.

    No matter how far down the wrong road you have gone, turn back now...
    Turkish proverb
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  7. #7
    Join Date
    Dec 2007
    Posts
    11

    Re: No META-INF directory

    I created the whole folder and xml file by hand and it worked fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center