RE: How to get a File for a certain folder
-Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 8:34 PM To: Tomcat Users List Subject: Re: How to get a File for a certain folder [...] For maximum portability, you should use the ServletContext.getResourcePaths() method to give you the names of the resources in a particular directory of your webapp -- this will work whether or not the container actually runs your app from an unpacked directory. Does this mean that even if the webapp is run from a packed WAR file, the webapp is able to access file resources within that WAR file for *both* read and write purposes? Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
learning filters
I have been learning about servlet programming from Core Servlets. I like this book. But, since subscribing to this list, I have seen mention of filters. In a message from Yoav Shapira I was recommended to use filters to validate form data before passing it to a servlet. This seems to me a cleaner means of doing it, as opposed to putting form-validation code in the servlet. However, Core Servlets does not describe how to use filters (that I know of). Is there a reference for this technique somewhere, or is it a generic term for a servlet that intercepts, acts upon, and passes along data ? If it is the latter then I can figure it out from using getDispatcher().forward() etc but if it is a specific technique then where can I learn more? My Tomcat container is v. 4.0.6. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Y or N Q re: WEB-INF/lib
-Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 1:17 PM To: Tomcat Users List Subject: RE: Y or N Q re: WEB-INF/lib I don't think you answer is quite right. Classes will not be automatically served under 4.0.6 unless the default invoker is configured in server.xml. Classes must be explicitly named in the application deployment descriptor to be served otherwise. Sorry, I should have specified that I do have the invoker servlet uncommented in server.xml (so this is not an issue in my case). Thank you for your keen eye for detail, though. It's a good point. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: I don¥t understand the objective of this open list !
-Original Message- From: Mike DiChiappari [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:43 PM To: Tomcat Users List Subject: Re: I don¥t understand the objective of this open list ! referred to the mail archives). At least with a vendor I have someone to yell at. And I've seen that technique work. I think you've just established your MO. As another poster has said, that doesn't work with open source projects. (There are consulting companies who will let you yell at them about Tomcat, if that helps any.) Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Y or N Q re: WEB-INF/lib
Sorry to trouble you with this simple yes or no question (Tomcat 4.0.6): Classes placed in $CATALINA_HOME/myWebApp/WEB-INF/classes will be automatically picked up by Tomcat and served. Is the same true for JAR'd classes placed in $CATALINA_HOME/myWebApp/WEB-INF/lib ? or do I have to restart the webapp Thank you, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Overview of the various approaches to supressing directory contents listings in tomcat standalone
-Original Message- From: Kristján Rúnarsson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 7:04 AM To: Tomcat Users List Subject: Overview of the various approaches to supressing directory contents listings in tomcat standalone I know this has been asked before but please bear with me. I would like to go through the various methods to supress directory listings with Tomcat 4.0.x standalone. Below is a list of stupid quiestions. Could somebody please elaborate on how these things are done? 1) I have been told that it is possible to do this in server.xml. 2) Supposedly it is posseble to supress the listing for a single sub directory of the webapps directory but not others using web.xml. How? 3) Supressing certain items in the directory listing but not others. Not sure about #1 (don't think so) or #3 (probably some way to do it but I don't know), but for #2: Change the servlet directive to this: servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value /init-param load-on-startup1/load-on-startup /servlet HTH, and HIR Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: session problem with mod_jk
-Original Message- From: Matthias Erche [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 7:34 AM To: [EMAIL PROTECTED] Subject: session problem with mod_jk [...] What we want to have (only with IE): - login to first webapp per ssl - open new browser window so that it have the same session - typing the url of the second webapp so that we still have the same session for this application What happens: - if the webapps run on linux with the warp connector everything works fine - on windows with mod_jk the session changes when typing the url of the second webapp Can you not encode the URL for the session and pass this URL as the argument to the JavaScript for opening the new browser window? Presumably the URL will be rewritten if necessary, or not if the user has accepted the cookie... ?? Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Why run tomcat as root
-Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 9:31 AM To: 'Tomcat Users List' Subject: RE: Why run tomcat as root [...] You can also use a web forwarding or URL cloaking service, such as the one at ZoneEdit.com. If you were to use that, you could cloak www.host.com:8080 behind www.host.com. Your users would never know the difference. I thought that those web-cloaking techniques were just JavaScript hacks that manipulate a frameset so that the user doesn't see any change in the URL of the main frame. IOW, they can be easily shut off or don't even work for users who don't have JavaScript enabled. Please correct me if I'm wrong? Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Why run tomcat as root
-Original Message- From: Kristján Rúnarsson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 9:44 AM To: Tomcat Users List Subject: RE: Why run tomcat as root That is true enough but those sound like workarounds your option #2 suggests that Apache does not have this vulnerability of having to run as root to access privileged ports and I don´t see why Tomcat should be any different. I am still fishing for that simple attribute to be added to tomcat, or perhaps the JVM? that would enable tomcat to somehow reduce its privilege level after accessing privileged resources like any proper standalone server should. I may be simplistic but it seems to me that this would be a pretty fundamental ability for a standalone server and the thougth is just mindblowing that theJVM does not offer something similar. I find that hard to believe. Could not a solution be implemented like the Apache one, where the work of Tomcat (the JVM itself) is run by a non-privileged user, but it is connected to Port 80 by a process running as root? It's a question not a statement. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
hiding servlet URLs in JSPs
Hi, simple question (I hope): Does it really matter if someone can see the naked path to a servlet in the action attribute of an HTML form tag? I mean, if I have this form: form method=POST action=./servlet/SomeServlet !-- some input tags go here -- /form anyone can see the URL to my servlet and attempt to send it data directly. At first I thought that this was a security problem and that I should obfuscate the path to the servlet somehow, but on second thought it strikes me that this is no different than someone seeing the path to a CGI script in a form either. Any advice? Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: hiding servlet URLs in JSPs
-Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 10:49 AM To: Tomcat Users List Subject: RE: hiding servlet URLs in JSPs If you're running in a very security-aware environment (you're starting tomcat with the security manager, right? ;)), map all the servlets you need in web.xml. Disable the invoker servlet mapping in $CATALINA_HOME/conf/web.xml. Then all your form targets will be like /MyFormProcessingServlet, and you can put a filter in a chain prior to the form processor to validate form fields etc, and reject attacker inputs. Is there a way to override the invoker servlet mapping in an individual webapp's WEB-INF/web.xml file? Even though you clearly explain in your original message that this is set in $CATALINA_HOME/conf/web.xml, I just hunted through my webapp's WEB-INF/web.xml looking for it and when I didn't find it, I discovered it's in $CATALINA_HOME/conf/web.xml, and I don't want to inconvenience other users of the system by disabling this for all webapps, if possible. In other words, can I turn this off on a per-webapp basis, or is the only solution to have all other users add this to their individual WEB-INF/web.xml files and remove it from $CATALINA_HOME/conf/web.xml ? Thanks, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: SUCCESS w. Tomcat execution!
-Original Message- From: Jon Eaves [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 1:44 AM To: Tomcat Users List Subject: Re: SUCCESS w. Tomcat execution! Seriously Steve, unless you are a sadist and a masochist then please go and buy a book on Java Servlet development. [...] Maybe everybody on the list could chip in a get Steve an Amazon voucher for a Servlet book ? I know it would save me the cost of downloading all the help me messages. ;-) There is a free one, even formatted nicely into PDF, available at http://pdf.coreservlets.com/ It's very good. I read it. A little dated, but you can figure out which things are a little different. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat setup
-Original Message- From: Mark Walker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 6:33 PM To: [EMAIL PROTECTED] Subject: Re: tomcat setup I have 4.1.12 installed on a Wallstreet G3 Powerbook and it is running great! There's a document in Apple's Developer Forum (http://developer.apple.com/internet/java/tomcat1.html) that covers installing Tomcat on the Mac. It refers to 4.0.1 but should work fine for you. Actually, it sounds like you may be past that part already. The one hurdle I had in the whole process (not in the article) was caused by StuffIt! when it unzipped the download. The filename for the class SetCharacterEncodingFilter.class is too long for StuffIt! so it drops the ss off the end. Just an FYI, I have heard that there are sometimes other difficulties encountered when using Stuffit Expander's ZIP and GZIP unpacking. The gnutar and gunzip utilities in Terminal are a safer bet. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat Filter with RequestDispatcher - IncompatibleClassChangeError
This also leaves me wondering how I'm supposed to go about compiling all of my classes that use XML/JAXP on my machine, now that I've removed it all. I've been learning about Ant recently. Perhaps it can help you in this respect. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Over-aged Newbie needs some help
-Original Message- From: Michele Emmi [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 23, 2002 9:27 PM To: [EMAIL PROTECTED] Subject: Re: Over-aged Newbie needs some help But if he is an over-aged newbie he might prefer book over reading off a computer screengod knows this cough over-aged newbie does! I am reading: Apache Jarkart-Tomcat by Goodwill Sun one programming by Mogha and Bhargava I have been reading Core Servlets which is a free book online (I download and print the PDFs) at http://pdf.coreservlets.com/. It's a pretty good book. There is another book that I was considering taking a look at and I wonder if anyone could share their thoughts on it -- a New Riders book called Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to J2EE Solutions by Budi Kurniawan http://www.amazon.com/exec/obidos/ASIN/073571195X/qid=1038241284. It looks good, and more up to date than Core Servlets. The reviews say there are code errors, but since I feel somewhat comfortable with JSP/servlets I hope that this won't be too much of an obstacle Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat or JBoss?
-Original Message- From: Steve Lewis [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 11:33 AM To: Tomcat Users List Subject: RE: Tomcat or JBoss? We're currently running on WebLogic and are looking into retreating to Tomcat. Tyrex makes Tomcat pretty compelling. I think a lot of people are finding out that EJBs are overkill for web-based apps. If they are overkill for webapps, what sorts of situations would benefit from them? (Not asking rhetorically, I'm honestly curious about when to use EJB since I know nothing about them.) Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat or JBoss?
-Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 3:08 PM To: Tomcat Users List Subject: RE: Tomcat or JBoss? If they are overkill for webapps, what sorts of situations would benefit from them? flame-bait NEVER http://www.softwarereality.com/programming/ejb/index.jsp /flame-bait (Just kidding) ;) Thanks, I will read this regardless. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: does tomcat automatically revert to url rewriting...
-Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:05 PM To: Tomcat Users List Subject: Re: does tomcat automatically revert to url rewriting... We also need to remember that Tomcat does *not* scan the output your servlet or JSP page creates, and modifies the hyperlinks. If you do not call encodeURL() or encodeRedirectURL() yourself when creating the output, URL rewriting will never occur (and your app will require the client to support cookies if it uses sessions). A style question in this regard -- is the general practice for this: 1. To use a unique variable for each URL that needs to be encoded 2. To put all URLs into a list/array, then refer to them by their key in the page 3. To use a single variable name and just call encodeURL immediately before the point where the name is used, then echo the variable name to the browser 4. Not to use a variable name at all but rather just call echo encodeURL's output directly to the page Just curious, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: storing passwords
-Original Message- From: RXZ JLo [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:51 AM To: Tomcat Users List Subject: Re: storing passwords Thanks to all of you for the responses. apart from this password I will be storing some other things too(they too are passwords but for some other things in the application). I cant use one way hash as I cant use them further. what mechanism should I follow in this case? Have you considered LDAP? I haven't used it myself but it might be a better solution if you have to store a variety of user information that will be used in more than one context. Also, for the login case should I bother about encryption in the login form? Can I just use input type=password/ and rely on the brower? What are the pros and cons for this? If you see yahoo login, they generate md5 using javascript on the client side itself - is this really necessary? Generating the md5 on the client side doesn't really do too much, since if I know the MD5 then basically I know the password. I just can't type it into Yahoo's UI since then *that* will get MD5'd and it will change the value sent. (Of course, I could use Mozilla and disable the JavaScript that does this... or write my own page... etc.) If you use SSL then you don't need to do the JavaScript trick -- the passwords will be sent over the wire encrypted. But if you can't or don't want to use SSL, then just remember that it is SUPER easy to listen in on HTTP connections and watch the data go back and forth. There's dozens of scripts that basically do this and hunt down likely passwords. So you want to implement *some* level of encryption unless everything you're doing is within a secure environment like behind a corporate firewall (note the quotes, that indicates a level of facetiousness). Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: MacOS
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 4:18 PM To: Tomcat Users List Subject: Re: MacOS In regards to dev tools. I basically use a my favorite text editor, usual shell scripting, Jarkata Ant and will occasionally wonder into C and Objective-C and for that I used the Apple Dev Tools which are a free download. Be as it may, my understanding is that there a quite a few IDEs that MacOSX friendly i.e., JBuilder, Forte, NetBeans, CodeWarrior, TogetherJ and some others. Here's a link that I really like NetBeans 3.4 and I use it at work on the Win2k box (yes, it has the memory). But on my Mac it is very sluggish, as most Pure Java apps are. I only have a G3 w/384 MB RAM. I assume it performs better on the G4? (If NetBeans ran as fast on MacOSX as it does on Windows I'd be really happy.) Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: MacOS
-Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 3:49 PM To: Tomcat Users List Subject: Re: MacOS actually eclipse support Mac in the latest build. SWT has been ported to Aqua, or do you mean using an Xserver? Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: newbie Q
-Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 7:59 PM To: Tomcat Users List Subject: Re: newbie Q That's the context for the webapp ROOT . If you point your browser to your tomcat server like , http://localhost:8080/ ; That's the page that gets served to you. And there should be context for that webapp in server.xml as well. ps. There is only one server.xml, and it is located in $CATALINA_HOME/conf/ So presumably one can change the root webapp without putting it under a directory named $CATALINA_HOME/webapps/ROOT if they are handy with the server.xml file and know the correct Context node attributes. [...] Ah, after checking the config docs, it seems that this is done by specifying a Context node with an empty-string path attribute. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
webapp fails to start using /manager start command
Hello, I checked the archives for this but couldn't find the answer to my problem. I created a new webapp yesterday and put it into the $CATALINA_HOME/webapps directory. From this list I learned that it is possible to have a webapp recognized by restarting Tomcat *OR* by adding a Context node into $CATALINA_HOME/conf/server.xml that points to the path of the webapp. Since I do not have root access on this server, I cannot change root-owned files and have asked my system administrator to restart Tomcat for me, to get my webapp recognized. He sent me an email saying that he gave me access to the manager webapp, which I have studied from the HOWTO in the documentation. I understand how to use it, but I cannot get my webapp to start. Is it possible to get a webapp to start (for the very first time) from the manager webapp? Or does Tomcat really need to be restarted completely? When I list the webapps on the server using http://domainname:8080/manager/list I can see a list of the webapps that are recognized, including my webapp. But all of the other webapps are listed as running, and my own webapp looks like this: /epricetest:stopped:0 So I thought that I might have to start the webapp using the start command, so I try this: http://domainname:8080/manager/start?path=/epricetest But the error message I receive when I try this is FAIL - Application at context path /epricetest could not be started This does not match any of the error messages detailed in the manager app HOWTO, so I am unsure of what is causing the problem. Could it be that to start a webapp for the very first time, Tomcat must really be restarted? (In which case, there is no way to do it without bugging my system administrator again?) Any suggestions? Thank you, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: webapp fails to start using /manager start command
Eric, Great! I didn't know about the log files, but that had the answer. A SAX parse error in my WEB-INF/web.xml file. This is kind of surprising since I just copied the web.xml file from the URL at http://domainname:8080/tomcat-docs/appdev/web.xml.txt and removed the .txt extension. I realize that this example file is intended to be just that, an example, but did anyone know that it does not validate? There is a servlet node called graph that is missing a servlet-class node. It took me a few tries, some judicious log-reading, and some web.xml-editing, but I managed to get my webapp started! The HelloWorld is just a start, but now I can move forward. QUESTION: How important is the web.xml file to a webapp? All I did was comment the offending node and the webapp started. I still have completely invalid data in the web.xml file. The reason for this is that I have not really designed a webapp; this is just a testbed for miscellaneous servlets. So until I have designed a true web application and created a correct web.xml file, does the web.xml file really matter? Thanks again to all who help me on this list. (Please CC me in response as I am a digester, thank you) Erik -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:48 AM To: Tomcat Users List Subject: RE: webapp fails to start using /manager start command Have you checked the log files to see if there is a reason as to why the app could not be started? -Original Message- From: Price, Erik [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 14:43 To: [EMAIL PROTECTED] Subject: webapp fails to start using /manager start command Hello, I checked the archives for this but couldn't find the answer to my problem. I created a new webapp yesterday and put it into the $CATALINA_HOME/webapps directory. From this list I learned that it is possible to have a webapp recognized by restarting Tomcat *OR* by adding a Context node into $CATALINA_HOME/conf/server.xml that points to the path of the webapp. Since I do not have root access on this server, I cannot change root-owned files and have asked my system administrator to restart Tomcat for me, to get my webapp recognized. He sent me an email saying that he gave me access to the manager webapp, which I have studied from the HOWTO in the documentation. I understand how to use it, but I cannot get my webapp to start. Is it possible to get a webapp to start (for the very first time) from the manager webapp? Or does Tomcat really need to be restarted completely? When I list the webapps on the server using http://domainname:8080/manager/list I can see a list of the webapps that are recognized, including my webapp. But all of the other webapps are listed as running, and my own webapp looks like this: /epricetest:stopped:0 So I thought that I might have to start the webapp using the start command, so I try this: http://domainname:8080/manager/start?path=/epricetest But the error message I receive when I try this is FAIL - Application at context path /epricetest could not be started This does not match any of the error messages detailed in the manager app HOWTO, so I am unsure of what is causing the problem. Could it be that to start a webapp for the very first time, Tomcat must really be restarted? (In which case, there is no way to do it without bugging my system administrator again?) Any suggestions? Thank you, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: newbie Q
No, I have read through the guide for my distribution (4.0.6) and I cannot find an explanation of how to configure server.xml for a new webapp that I have created. (Though I did create the webapp along the guidelines provided in the Application Developer's Guide, so that should be all set once I can get Tomcat to recognize that there is a new webapp there.) If anyone can help me with this, that'd be much appreciated (CC me as I am a digester), thank you. Erik -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 10:05 PM To: 'Enok Strine '; '[EMAIL PROTECTED] ' Subject: RE: newbie Q More than likely, your questions are answered in the documentation. Perhaps things like the Application Developer's Guide would help: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html John -Original Message- From: Enok Strine To: [EMAIL PROTECTED] Sent: 11/19/02 10:01 PM Subject: Re: newbie Q I see. So the directories you talk of are not yet present, presumably I create them at my leisure? What about ROOT? Why when I create webapps/mydir/myfile.jsp and load it into the browser is it not accessible? (404) Must I define a WEB-INF for each app under webapps? What must it contain? Thank you E. yes, each webapp has its own web.xml, you can use that among other things to define your servlets, taglibs, resource-refs. unjared classes go into /WEB-INF/classes directory, jars go into /WEB-INF/lib How long a web.xml can be depends on how many things you wish to put in there. I think the tomcat doc has a section on best practices deployment. It *should* come with your installation of tomcat. Enok Strine wrote: Hi folks, I have installed TC 4.1 and have it apprently installed correctly. Can anyone tell me the significance of the WEB-INF dir please? Also, must everything run under webapps/root/..? I am presuming WEB-INF holds configuration / class libraries for each app? Yet there is a single web.xml, file 6 lines in length? Will someone please enlighten me? E. _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: newbie Q
Carsten, I forgot to thank you for helping me the other day with your suggestion to use a soft link from the $CATALINA_HOME/webapps directory to the directory in my ~/public_html directory. I appreciate it. I'm still waiting for my system administrator to restart Tomcat so I can test the HelloWorld servlet I wrote (in my webapp), but this makes me curious -- why would I edit server.xml if all that Tomcat needs is to see the presence of my webapp directory in $CATALINA_HOME/webapps ? There must be some more advanced functionality in the server.xml file that I'm not taking advantage of if I do it this way... Erik -Original Message- From: Carsten Ziegert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:28 AM To: Tomcat Users List Subject: Re: newbie Q It is sufficient to create the directory containing the new webapp directly nested under the webapps directory. Tomcat recognized the new webapp when being restarted. Am Mittwoch, 20.11.02, um 17:00 Uhr (Europe/Berlin) schrieb Price, Erik: No, I have read through the guide for my distribution (4.0.6) and I cannot find an explanation of how to configure server.xml for a new webapp that I have created. (Though I did create the webapp along the guidelines provided in the Application Developer's Guide, so that should be all set once I can get Tomcat to recognize that there is a new webapp there.) If anyone can help me with this, that'd be much appreciated (CC me as I am a digester), thank you. Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: newbie Q
Hi John, Thanks for the suggestion, but... I can't find it. Creating a Context entry is introduced but not really explained. The paragraph you mention is this: * Add a Context entry in the $CATALINA_HOME/conf/server.xml configuration file. This approach is described briefly below, and allows you to position the document root of your web application at some point other than the $CATALINA_HOME/webapps/ directory. You will need to restart Tomcat to have changes in this configuration file take effect. See the administrator documentation (TODO: hyperlink) for more information on configuring new Contexts in this way. I seem to be missing part of the docs. I would copy the one for examples webapp except that this is a very big Context node with a lot of details that I don't understand. Is the Administrators Guide available online somewhere? Erik -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:35 AM To: Price, Erik; [EMAIL PROTECTED] Subject: RE: newbie Q It's here: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html You want the part that says Add a Context entry in the $CATALINA_HOME/conf/server.xml configuration file, fifth paragraph under Deployment with Tomcat 4. You can also use server.xml's entries for the /examples directory/app as an example. John -Original Message- From: Price, Erik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:01 AM To: Turner, John; Enok Strine ; [EMAIL PROTECTED] Subject: RE: newbie Q No, I have read through the guide for my distribution (4.0.6) and I cannot find an explanation of how to configure server.xml for a new webapp that I have created. (Though I did create the webapp along the guidelines provided in the Application Developer's Guide, so that should be all set once I can get Tomcat to recognize that there is a new webapp there.) If anyone can help me with this, that'd be much appreciated (CC me as I am a digester), thank you. Erik -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 10:05 PM To: 'Enok Strine '; '[EMAIL PROTECTED] ' Subject: RE: newbie Q More than likely, your questions are answered in the documentation. Perhaps things like the Application Developer's Guide would help: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html John -Original Message- From: Enok Strine To: [EMAIL PROTECTED] Sent: 11/19/02 10:01 PM Subject: Re: newbie Q I see. So the directories you talk of are not yet present, presumably I create them at my leisure? What about ROOT? Why when I create webapps/mydir/myfile.jsp and load it into the browser is it not accessible? (404) Must I define a WEB-INF for each app under webapps? What must it contain? Thank you E. yes, each webapp has its own web.xml, you can use that among other things to define your servlets, taglibs, resource-refs. unjared classes go into /WEB-INF/classes directory, jars go into /WEB-INF/lib How long a web.xml can be depends on how many things you wish to put in there. I think the tomcat doc has a section on best practices deployment. It *should* come with your installation of tomcat. Enok Strine wrote: Hi folks, I have installed TC 4.1 and have it apprently installed correctly. Can anyone tell me the significance of the WEB-INF dir please? Also, must everything run under webapps/root/..? I am presuming WEB-INF holds configuration / class libraries for each app? Yet there is a single web.xml, file 6 lines in length? Will someone please enlighten me? E. _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: newbie Q
Whoops. I have the 4.0 docs on my host's server. That is what I was looking at. There are a lot more docs on the site you linked to. Are most of these applicable to 4.0, or is this for the most part 4.1 references? Thanks for the pointer, John. Erik -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 2:47 PM To: Price, Erik; [EMAIL PROTECTED] Subject: RE: newbie Q Most of the stuff in server.xml is explanation/documentation and optional. Minimum Context: Context path= docBase=ROOT debug=0/ Simple Context: Context path=/examples docBase=examples debug=0 reloadable=true crossContext=true / More involved Context: the Examples Context in server.xml. Are we looking at the same docs? There's all sorts of stuff in there, like this from the Configuration reference: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
making webapps without write access to $CATALINA_HOME
Hello, I have an account on my friend's Linux box, and he installed Tomcat 4.0.6 so that I could get some hands-on practice with servlet and JSP development. I was wondering if I will need to have write access to the $CATALINA_HOME subdirectories or whether there is a way to configure Tomcat to allow me to use my ~/public_html directory. If there is a HOWTO on this that I missed, I apologize -- please forward the link. ;) Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]