> From: "Steve Burrus" <[EMAIL PROTECTED]> > Sent: Friday, February 14, 2003 2:59 PM > Subject: Re: Need help - tomcat do not generate .java and .class file in the work folder
> hOW exactly is that particular process done anyway "Have you tailored > the server.xml file to have a context for your webapp??" I have tried > to do this before, but alas, without any successful results!! Now, > tell me please about editing the servlet mapping and the servlet name > tags because I know that these are quite essential in executing your > jsp/servlets correctly. [List Disclaimer: Pardon me all. I'm weak. I'm sorry. I'll become a pariah for this. Please, please, please don't hate me...] Steve - "Be careful what you ask for..." Here's how it's done. RTFM. Really. Read ALL TFM's. Every one you can get your hands on. No, really. READ them. Find Tutorials, find examples, find snippets. Follow them. Observe them. U-N-D-E-R-S-T-A-N-D them!. TYPE THEM IN. Don't just download a zip file, plop it some place and run it and go "Gee! That was easy!" If you TYPE THEM IN then you may wonder, as I often do, "Why do I have to do THIS? Why am I typing THESE SPECIFIC words and phrases?" First, read this: http://www.mindview.net/Books/TIJ/ It's a great book on Java. The basics. Classes, objects, scalars, class loaders, crap like that. Skip the stuff you think you know, read the stuff you don't, and if you find you don't understand the stuff you don't know, then reread the stuff you thought you did, because, apparently, you don't. Read these: http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html. These are the specifications. EVERYONE should read these. Why? Because every servlet container on the planet ASSUMES THAT YOU HAVE when they write their own documentation. This is why most documentation neglects details about the XML files, and file hierarchies, etc. This is why when you read many containers documentation you feel like you've walked in half way through the movie. Read these: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/introduction.html, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/README.txt, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/RUNNING.txt, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html and EVERYTHING in here http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html. Go to the Sun site and the Web Services page: http://java.sun.com/webservices/docs/1.0/tutorial/index.html. Read everything in the "Web Technology" section. These are wonderful, just like Craig has mentioned numerous times. Then read the section about the "Case Study". Head over to the O'Reilly OnJava site: http://www.onjava.com/pub/a/onjava/2003/01/08/tomcat4.html. "Creating a Web Application with Ant and Tomcat 4". GREAT article, goes through ALL OF THE STEPS. AFTER you have read all of these, AFTER you have done the tutorials, not BEFORE, not DURING, but AFTER, THEN if you have questions, come on back with questions. BE SURE to CITE EXAMPLES IN THE DOCUMENTATION that you do not understand. "Hi List, STEVE BURRUS here. I was reading http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html and these two paragraphs are confusing: The web application used to process each HTTP request is selected by Catalina based on matching the longest possible prefix of the Request URI against the context path of each defined Context. Once selected, that Context will select an appropriate servlet to process the incoming request, according to the servlet mappings defined in the web application deployment descriptor file (which MUST be located at /WEB-INF/web.xml within the web app's directory hierarchy). You may define as many Context elements as you wish, nested within a Host element in conf/server.xml. Each such Context MUST have a unique context path, which is defined by the path attribute. In addition, you MUST define a Context with a context path equal to a zero-length string. This Context becomes the default web application for this virtual host, and is used to process all requests that do not match any other Context's context path. ...." By citing the documentation, it lets others know where you are coming from, what assumptions you have made, and perhaps what you have tried before. It also lets us know you've read the documentation and tells us that you're serious about understanding this technology. This is EXACTLY HOW THIS PARTICULAR PROCESS IS DONE. This is how you do it. "But, Hi Will! STEVE BURRUS here! That's a *HELL* OF A LOT of reading to do!" Yes. Exactly. *ding* *ding* *ding* "A Winna!" That's why we as list members do not WISH TO TYPE IT ALL IN as replies to your posts. It is what is necessary to come up to speed to where everyone can communicate on an even playing field. This is basic knowledge that we pretty much assume everyone knows. That way when someone says "Oh, fix the context in the server.xml file", you will say "Oh yes, I remember READING ABOUT THAT, and KNOW WHAT THAT MEANS" so a one line message doesn't become a repetitive dissertation straight out of the documentation. Remember, it's not what you know, it's what you know where to look it up. Reading all of this gives you basic vocabulary, even if you don't understand it all, it exposes it all to you. The tutorials give you concrete experience in the concepts presented in the reading to make what you read become more clear and to give it some relevance and reference. Especially when you TYPE THEM IN yourself. You can read all of this stuff this weekend, do some of the tutorials on Sunday afternoon and tell us all about your adventures on Monday. So, remember. Read it all. Do the Tutorials (don't change the Tutorials, don't make them do something else and get side tracked and stuck in a snow bank somewhere. And remember to type the files in yourself, with your editor. Don't fight a development environment. You need Ant, a Command Line, and Notepad.). Then, read it all again, it will be MUCH clearer then. THEN, come back with questions. Odds are you won't need to. You'll become much more enlightened. You'll dance in the streets, raving like a loon. You'll be Brave Sir Robin saying "That's EASY!" and run off towards the Keeper of the Bridge... Good Luck. Enjoy. Regards, Will Hartung ([EMAIL PROTECTED]) P.S. No sneaking back in. Everyone will read this post and know what you need to do, so we all have the same expectations. And please appreciate how much time and effort it took for me to write this message to you. Don't make me look bad. P.P.S. Whoever was looking for FAQ entries, you can use this as a "How do I get started FAQ" :-) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
