-
July 1st, 2011, 07:44 AM
#1
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!
-
July 1st, 2011, 09:52 AM
#2
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.
-
July 1st, 2011, 10:08 AM
#3
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
-
July 1st, 2011, 10:11 AM
#4
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.
-
July 1st, 2011, 10:27 AM
#5
Re: No META-INF directory
Originally Posted by skiabox
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
-
July 1st, 2011, 10:55 AM
#6
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.
-
July 1st, 2011, 03:24 PM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|