Re: make the app as ROOT.war
Billy Ng writes: If my app needs to overwrite the ROOT.war, will it only kill the tomcat's examples? if not, what are the problems will I get? I notice the tomcat 4 exe installer installs the admin stuff, will it be a problem if I overwrite the ROOT? Thanks! Billy Ng Hello Billy, u don't want to do this. the ROOT application context is actually a docBase defined in server.xml. and, this is the /examples webapp that lets u see the tc documentation and other usefull stuff online w/o directory references. in the long run u r much better off creating u own webapp .war and exanding it in ur own webapps directory. see the /examples build: ant and build.xml. i u r not already familiar w/ the java and tc way of building projects u really need to look in to using ant. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: File structure in webapps for tomcat.
Simon Kelly writes: Hi, I am trying to get my servlet to write to and read from files within my webapp structure. However, when the servlet runs it seems that the working directory during its lifecycle is c:\xxx\tomcat 4.1. Is there any way, in web.xml, to force the servlet to run in it's own app directory structure? Regards Simon Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Simon, servlets do run in their own webapp directory structure if defined in their own web.xml and deploy w/ and expanded .war file. u have not given enough info on what u have done in terms of deployment and what u r planning to do as a project goal. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't read POST parameters in a Servlet
Ivan Venuti writes: Hi, I have this problem: from an HTML page I call a Servlet via a form like this: form name=richiesta method=post action=servletName input type=hidden name=in_file value=9177.doc ... input type=hidden name=port value=8787 /form In the Servlet I retrieve the parameters with request.getParameter(paramName); With Tomcat3.x everithing goes well, but with Tomcat 4.0.3 I can't retrieve the parameters in the Servlet: every getParameter returns null, and printing all with for (Enumeration namesList = request.getParameterNames(); namesList.hasMoreElements();) { String curName =(String)namesList.nextElement(); System.out.println(Param +curName+ value: '+request.getParameter(curName)+'); } prints nothing! I really can't figure out where to look for a solution. Any help is welcome! -- Ivan Venuti -- Hello Ivan, in the examples i think their is a servlet called the EchoServlet.java. this servlet simply prints the complete requests headers and parms for both get and post and other info (meta data etc.). u could try this a diagnostic tool. once the servlet is running all u have to do is temporarily put: http://localhost: in ur form action to see the results. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: What HTTP Status Code is returned when transport-guarantee is CONFIDENTIAL?
Matt Raible writes: I've noticed that if you set a transport-guaranteeCONFIDENTIAL/transport-guarantee in web.xml that the user is automatically redirected to an https://server:443. I'm wondering how I can reproduce this behavior in a my welcome JSP and was thinking I could possibly return the same http status code. Is this possible? Thanks, Matt Hello Matt, u haven't specified ur version of tc but have u tried uncommenting the 8443 ssl connector in server.xml. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: OT: how can an intranet Internet share the same appserver, but remain secure?
Becky Phaneuf writes: Has anyone tried to do this before? The dilemma: How would one architect a system that requires an intranet and an Internet site be able to share the same appserver (EJBs, logic), but still remain as secure as possible? It doesn't have to be a Tomcat/JBoss-specific solution (actually, they've decided on Oracle 9iAS), just some methodologies, suggestions, thoughts, comments... Thanks! -Becky -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Becky, i thought that was the purpose of the oracle 9i portals. someone correct me if i'm wrong. the only disadvantage over 9i is oracle is going to want u to use jdeveloper (a huge resource pig, minimum 1+ ghz dual and 1gb mem) and the 9i designer stuff severely limiting flexibilty in design options compare to using jboss/jetty or jboss/tc. the implications of this statement are in terms of overall design flexibility if u r used to design using an erd/uml base design methodology or system (toad/qdesigner, rational, visio etc.) u won't be able to do that using the oracle 9iAS. the 9iAS is a package of the leading techologies: apache and tc servlet server and the orion j2ee (oc4j.jar) is embedded in the jdeveloper. if u don't believe me compile and deploy a jdeveloper project w/ a zero length server.xml (the only xml file the remains in the entire 9i package) and watch the tomcat exception error message that comes up. ultimately, u will be using the same technologies but different packaging. if ur company can afford the 9iAS cpu license and the hardware to run it then make sure u get the oracle meta-link for online expert help. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: trying to use jar file in jsp page.
Brian O. Bozarth writes: Still stuck on this.I also re-jar-ed the file so that com was the first directory in the jar file.The java files are in the tools folder. Any insights? I put the jar file in the /tomcat/webapps/ROOT/WEB-INF/lib folder, which is where I am doing my app. I am trying to use this in my jsp file (but I get an error): %@ page import=com.equifax.rcas.tools.*% getting an error of: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file /web1/labwerks/tomcat/work/Standalone/localhost/_/dev/credit_check_jsp.java:7: package com.equifax.rcas.tools does not exist import com.equifax.rcas.tools.*; ^ 1 error I am using Apache Tomcat/4.1.12 Hello Brian, using the docBase=ROOT as ur webapp is unadvisable. learn to create/deploy ur on webapps through an expanded .war. u have a packaging and deployment problem easily rectified using the ant build system. see the tc /examples webapp ant build.xml to see how the tc gurus get all the doco and demos to work out-of-the-box. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: RE: I don´t understand the objective of this open list !
Jim Henderson writes: I think it an opportunity to sell updated books! ;) -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 3:48 PM To: 'Tomcat Users List' Subject: RE: I don´t understand the objective of this open list ! I disagree. There's lots of documentation out there. It's just not blasted into peoples' faces, nor is it bound into a nice little book and shrinkwrapped. You have to go find it, and you have to read it. Most people are too lazy to do either, they want everything handed to them. John -Original Message- From: Mike DiChiappari [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 4:37 PM To: Tomcat Users List Subject: Re: I don´t understand the objective of this open list ! I know the reason for this list - at least as it applies to Jakarta. It is meant to address the complete lack of adequate documentation for tomcat. Of course, nobody can answer your questions. The purpose of Jakarta is not to build useful software for the rest of us. It is to keep geeks happy, programming something (that may or may not be of use). Documentation is only supplied for software when the builders of it are serious about wanting it to be used. Mike Well, you have lots of answers now. At 08:40 AM 12/9/2002 -0500, you wrote: In 3 opportunities i wrote to this stuped (sorry) list, and NEVER i found help. I hope that the people that participates of this list, don´t have damages about other people that don´t belong´s at your countries. Thank´s for NOTHING. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mike, John is right. i subscribe to 6 technical mailing lists. that's a lot of traffic but i can handle suscribing to this many lists because i learned how to build my own email server running on a fast linux box and i learned how to do most of this on a mailing list. if u think tc-user is bad u should venture into installing a j2ee server like jboss or the oracle 9i application server and get on those lists and try to get some help. and, not to mention the beast mother of all mailing lists: QMAIL. try installing qmail w/o help. then when u give up trying to install qmail by urself subscribe to the qmail users list and ask a flimsy question and hope someone like charles cazabon reponds. good luck, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Layout/setup for a web-app...help?
Patrick Martz writes: Hi all, please bear with me as I'm new to the whole web application thing. I recently downloaded and installed Tomcat 4.1. After reading all the documentation I could find, I tried to set it up so that I could run a small web-app, but I simply cannot seem to get the web page to access the java servlet. The details: I have created a project directory under the root tomcat/webapps directory. Within that directory is an index.html (which I'm able to successfully access by http://localhost:8080/myproject/index.html). In the myproject directory I have created a WEB-INF subdirectory, and a classes subdirectory under that where my servlet.class file resides. I have a web.xml file in the WEB-INF directory which is essentially empty (doesn't list any servlet classes). No matter what link I've tried to put in my index.html to access the servlet.class, it always fails to find it. So my question is, what do I need to do to make this work??? Do I need the servlet class defined in the web.xml file? If so, how? And if I defined it, what is the relative path from the index.html that I need to include? Do I need to make some modifications to the server.xml file as well? I have been working on this thing for well over a day and I just can't seem to make it work (no matter how many examples I mimic or documents I read). Help! :) Patrick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Patrick, u r dealing w/ a deployment problem. creating the servlet server directory structure by hand is done much more easily using the .war file that the tc server will gladly expand for u correctly everytime u update ur project and rebuild the .war file. speaking of build u might want to look at what the tc gurus have given us in the tc package: look at how the /examples webapp was build and deploye using the ant build system which is avaiable at the same place at tc: jakarta-tomcat project site. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with starting Tomcat 4.1.12 - PLEASE HELP
Siobhan Quigley writes: I have installed the Java SDK and Tomcat 4.1.12 (release version). I have set the JAVA_HOME and the CATALINA_HOME variables and did the ECHO test. When I try to start up Tomcat, I type C:\Tomcat\jakarta-tomcat-4.1.12\bin\startup.bat but I get an error message saying it can not find the path specified. What do I need to type to (a) start the application and (b) shut down the application.? (I am a complete beginner) Thanks for your help rocket Hello rocket, since u did not specify more info like: type and version of: os, jdk under ur %JAVA_HOME%, dev environment (command-line?) etc. i assume u mean a windoz system. so, does %CATALINA_HOME%\bin resolve to: C:\Tomcat\jakarta-tomcat-4.1.12\bin? if not, that is ur problem. hope, this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache Tomcat with Apache 1.3.27 or 2.0.43
Rafael Fernandez writes: Is it possible to open a JSP file through Apache HTTP 1.3.27 or 2.0.43 and Apache Tomcat run it? Hello Rafael, have u looked at the mod_jk connector for apache/tomcat? and server.xml non-ssl port 8080 connector? thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: localization recommendation for tomcat
HAVENS,PETER (HP-Cupertino,ex3) writes: I am looking for a recommendation for serving localized HTML content via tomcat. I am looking to have Tomcat provide the most accurate HTML file based on the locale of the browser. The Apache web server handles this nicely and I would like to implement the same functionality in tomcat 4.1.x. For example, when a request comes in for index.html and the browser locale is french [fr], if the server has an index.html.fr file and an index.html.en file, I would like it to serve the French version. I am not looking for a complete solution but rather a pointer for a developer. I have read a little about turbine services and servlets filters. Can someone make a recommendation for the most applicable technology for this feature? Hello Peter, java.util.Locale has methods for getting the local language and cultural stuff especially if used with ResourceBundle. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: RE: RE: I don?t understand the objective of this open list !
Noel J. Bergman writes: I want proper user level documentation. If you are unsatisfied with the documentation: 1) contribute some time to help 2) contribute some $ to help 3) wait for someone else to do 1 or 2 4) spend even MORE money and buy IBM WebSphere. Basically the same code, more docs, LOTS more money. Insulting people probably is the least effective thing you can do. --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Or even more money than Noel's #4: oracle 9i Application Server + the really hefty hardware u will need to run it + the oracle meta-link email and phone support to get it installed. Or, to avoid installation, you can call Dell about the oracle 9iAS in a box solution they sell($). And underlying the whole shebang is Apache/jserv,tomcat,orion j2ee container (but, wait a minut... this is all open source techonology). david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javabean problems
Mikael Göransson writes: hey, it seems like i can't run my javabeans. i'm using tomcat 4.1.12 binary distrubtion. i get the error cannot resolve symbol. and i have no idea what it could be, it's just a simple bean: public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, what is ur overall environment/system?: running apache?, iis? r u running any jsp or servlet? do u have a webapp that gets expanded from a .war. if so, what? i have many javabean class files in directories that branch off at the same point as my servlets under WEB-INF after expansion of my .war and using the full package import i can access all constructors and methods. someone on this ml can help u but pls reply w/ what u r trying to do and what errors/exceptions u r logging. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javabean problems
Mikael Göransson writes: On Sun, 08 Dec 2002 09:23:56 -0500 David Brown [EMAIL PROTECTED] wrote: Mikael Göransson writes: hey, it seems like i can't run my javabeans. i'm using tomcat 4.1.12 binary distrubtion. i get the error cannot resolve symbol. and i have no idea what it could be, it's just a simple bean: public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, what is ur overall environment/system?: running apache?, iis? r u running any jsp or servlet? do u have a webapp that gets expanded from a .war. if so, what? i have many javabean class files in directories that branch off at the same point as my servlets under WEB-INF after expansion of my .war and using the full package import i can access all constructors and methods. someone on this ml can help u but pls reply w/ what u r trying to do and what errors/exceptions u r logging. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] atm i'm running tomcat as standalone on linux/slackware 8.1 and i'm not using a webapp that expands from a .war file. my servlets and jsp code workes fine, it's just when i try to implement my javabeans in jsp code i get the error (cannot resolve symbol). this is the code in the jsp page: jsp:useBean id=jb scope=session class=JellyBean / jsp:setProperty name=jb property=color param=newColor / bThe color has been set to:/b jsp:getProperty name=jb property=color /p and the javabean code (again): public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } and the first error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /setbeancolor.jsp Generated servlet error: [javac] Compiling 1 source file /usr/program/tomcat4/work/Standalone/localhost/_/setbeancolor_jsp.java:48: cannot resolve symbol symbol : class JellyBean location: class org.apache.jsp.setbeancolor_jsp JellyBean jb = null; ^ i appreciate any help -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, if i read u right u mean no WEB-INF? w/o this very special directory some of tc scope has been chopped off. how, do u get the jsp/servlet to work? how do u have docbase defined in ur server.xml? tc needs docbase to know where to look in the directory hierarcy. also, i assume u r not using a web.xml? u have a very unusual environment. can u send any inkling of ur directory hierarchy? say, something like: $CATALINA_HOME/what?... thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javabean problems
Mikael Göransson writes: On Sun, 08 Dec 2002 09:23:56 -0500 David Brown [EMAIL PROTECTED] wrote: Mikael Göransson writes: hey, it seems like i can't run my javabeans. i'm using tomcat 4.1.12 binary distrubtion. i get the error cannot resolve symbol. and i have no idea what it could be, it's just a simple bean: public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, what is ur overall environment/system?: running apache?, iis? r u running any jsp or servlet? do u have a webapp that gets expanded from a .war. if so, what? i have many javabean class files in directories that branch off at the same point as my servlets under WEB-INF after expansion of my .war and using the full package import i can access all constructors and methods. someone on this ml can help u but pls reply w/ what u r trying to do and what errors/exceptions u r logging. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] atm i'm running tomcat as standalone on linux/slackware 8.1 and i'm not using a webapp that expands from a .war file. my servlets and jsp code workes fine, it's just when i try to implement my javabeans in jsp code i get the error (cannot resolve symbol). this is the code in the jsp page: jsp:useBean id=jb scope=session class=JellyBean / jsp:setProperty name=jb property=color param=newColor / bThe color has been set to:/b jsp:getProperty name=jb property=color /p and the javabean code (again): public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } and the first error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /setbeancolor.jsp Generated servlet error: [javac] Compiling 1 source file /usr/program/tomcat4/work/Standalone/localhost/_/setbeancolor_jsp.java:48: cannot resolve symbol symbol : class JellyBean location: class org.apache.jsp.setbeancolor_jsp JellyBean jb = null; ^ i appreciate any help -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, sorry, i hit the reply button b4 thinking. what is in ur work directory as part of my last message question? as a minimum u must have a JellyBean$something.java that tc compiles to a servlet under the work directory. where is this directory in ur overall directory hierarchy under tc docbase? thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javabean problems
Mikael Göransson writes: On Sun, 08 Dec 2002 09:49:58 -0500 David Brown [EMAIL PROTECTED] wrote: Mikael Göransson writes: On Sun, 08 Dec 2002 09:23:56 -0500 David Brown [EMAIL PROTECTED] wrote: Mikael Göransson writes: hey, it seems like i can't run my javabeans. i'm using tomcat 4.1.12 binary distrubtion. i get the error cannot resolve symbol. and i have no idea what it could be, it's just a simple bean: public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, what is ur overall environment/system?: running apache?, iis? r u running any jsp or servlet? do u have a webapp that gets expanded from a .war. if so, what? i have many javabean class files in directories that branch off at the same point as my servlets under WEB-INF after expansion of my .war and using the full package import i can access all constructors and methods. someone on this ml can help u but pls reply w/ what u r trying to do and what errors/exceptions u r logging. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] atm i'm running tomcat as standalone on linux/slackware 8.1 and i'm not using a webapp that expands from a .war file. my servlets and jsp code workes fine, it's just when i try to implement my javabeans in jsp code i get the error (cannot resolve symbol). this is the code in the jsp page: jsp:useBean id=jb scope=session class=JellyBean / jsp:setProperty name=jb property=color param=newColor / bThe color has been set to:/b jsp:getProperty name=jb property=color /p and the javabean code (again): public class JellyBean implements java.io.Serializable { private String color; public JellyBean() { } public String getColor() { return color; } public void setColor(String newColor) { color = newColor; } } and the first error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /setbeancolor.jsp Generated servlet error: [javac] Compiling 1 source file /usr/program/tomcat4/work/Standalone/localhost/_/setbeancolor_jsp.java:48: cannot resolve symbol symbol : class JellyBean location: class org.apache.jsp.setbeancolor_jsp JellyBean jb = null; ^ i appreciate any help -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, if i read u right u mean no WEB-INF? w/o this very special directory some of tc scope has been chopped off. how, do u get the jsp/servlet to work? how do u have docbase defined in ur server.xml? tc needs docbase to know where to look in the directory hierarcy. also, i assume u r not using a web.xml? u have a very unusual environment. can u send any inkling of ur directory hierarchy? say, something like: $CATALINA_HOME/what?... thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] i got a WEB-INF and a web.xml, and the javabean class is located in $CATALINA_HOME/webapps/ROOT/WEB-INF/classes and my working servlets classes are located in $CATALINA_HOME/webapps/ROOT/WEB-INF/classes and the jsp source files in $CATALINA_HOME/webapps/ROOT -- _ _ . | _ _ | [EMAIL PROTECTED] | )( | | | (_| (-` | http://micke.debinary.net -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mikael, u r using the docBase=ROOT i assume uncommented in server.xml. though this is ok it is unadvisable. for a much more satisfying development environment u should seriously consider doing things the way the tc gurus have generated the .war for the /examples webapp. if u r familiar w/ the ant build development tool then u r on ur way just study the build.xml file the /examples webapp and make a modified version 4 ur own webapps. in case u r not familiar w/ ant the go back to jakarta-tomcat.org and study what they have to say about building a rock solid development system. by the way this works me and i have used many ide's and contrived development systems that try to hide the xml config in the servlet server/j2ee development environment. the java/j2ee world has really been very well thought out and any
Re: Tomcat 4.1, DBCP and Oracle
Campano, Troy writes: Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working with DBCP and Oracle (classes12.zip)? I've tried a billion combinations of configurations and nothing works. I've see other people on the web have also had this problem. I've tried for months to figure this out and I've opened bug cases, but nothing seems to work. Anyone able to do it? thank you! ~ Troy Campano ~ Hello Troy, i have oracle 9.2 (9i) installed working with JDBC connections and the JDBCRealm using classes12.jar (not zip, this is for micro$oft) in $CATALINA_HOME/lib. i don't know what DBCP is or what impact it may have on ur installation. i know 9i is somewhat more straight forward on tc than earlier versions because of oracle dumping of the internal (to the database) jdk and going with a more traditional approach. also, u should give more detail on ur overall system version and type of: os, jdk, jdbc driver connection type, network considerations. also, what are the errors or exceptions u have been getting. there r gurus on this ml that can diagnose and possibly solve ur problems but even they need info. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Two Questions Tomcat 4.1.12 Win2000
Scott Purcell writes: Running Tomcat 4.1.12 on Win2000. Problem 1) I created a site under webapps in which only servlets will run. I created a web-xml file: (see Below): All works good. Question: When I hit the URL http://localhost/site I see a directory listing. I do not want this. I thought the welcome-file-list was my solution, but maybe I am wrong. How is the best way to turn off any type of directory listing.? Problem 2) I am also running a vendors software on the same box, which uses tomcat running on 8091. I was told not to use any of its servlet engine to run my stuff, so I need to run another tomcat lets say on 8080. A tomcat for use on some servlets and rpc-xml stuff. Anyway, is it ok to run two tomcats on one box, as long as they have different port numbers? Anything I may need to be aware of in this case? Thanks, Sincerely Scott ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nametestServlet/servlet-name servlet-class/servlet/testServlet/servlet-class /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app ~ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Scott, asuuming u have not packaged ur servlet try: web-app servlet servlet-nametestServlet/servlet-name servlet-classtestServlet/servlet-class /servlet servlet-mapping servlet-nametestServlet/servlet-name url-pattern/testServleturl-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app in any case u have to get rid of the invoker. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: bypassing memory realms
J Doe writes: Background: Consider two webapps: foo and bar. When a user of foo performs a certain action, foo shares files with bar by calling actions on each other via HTTP. We are being asked to put a memory realm on foo and bar so that users must login. The problem is that now the above system-level communication between foo and bar will break. Question: if one knows the username and password for a webapp, can it be placed on the URL? E.g. http://mydomain.com:8080/foo?username=xpassword=y I've tried this but no luck. More generally, is there a way to do it with the java.net URL class? Any ideas? I realize that perhaps foo and bar could communicate in a different way (RMI, JMS) but that is not really an option for us. thanks, Mike __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mike, u could use java beans type classes and session attributes get and set between the to webapps. store and check the session id's to insure valid data by using the corresponding session id. i personally would not use the users id and password in the url even if it was private as long as there were other as yet unauthenticated users on the local subnet. and, of course, don't even mention doing this on the public wire (you would be asking to get severely compromised). the memoryRealm would be ok if u MD5 digest the passwords in the otherwise human readable flat ASCII text tomcat-users.xml file but u would prove to be a PITA under load of many simultaneous users (though a low user count would be ok). preferably, use the JDBCRealm which works great 4 me running oracle but u can run mySQL or postgresql and allows queries where the users table can be a fk to some other business logic table. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Configurion tomcat
Fabricio B. Teixeira writes: I want to install TomCat in my computer but i don´t know if it requires a hard configuration time. Could you please tell me the dificulties in configurin tomcat. Fabricio ___ Busca Yahoo! O melhor lugar para encontrar tudo o que você procura na Internet http://br.busca.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Fabrocio, 4 a question like this u will want to get the right folks' attention. impart this info: type of environment tc server will run under. type/version of: os, tc u plan to install, vendor software that may conflict or already uses a modified tc or modified os, jdk, j2ee.jar. there r many variables. generally, tc is not difficult to configure but the mistakes many users make is not digging deep enough and reading and studying the tomcat docs enough b4 they goto the ml's like this one. also, config depends on the background of the user. someone w/ a heavy admin and development background in the computer industry at large but unrelated field may fair better on config than someone who does not have a similar background. u will have to ask urself how much learning curve to u need to overcome to get what u want from a tc configuration/install. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: MySQL JAR File Location
Johnson, Garrett writes: Ladies and Gentlemen: Where should I drop a copy of the JDBC Driver .jar file that I need to connect to MySQL from Tomcat? I understand there are a variety of classloaders, invoked on a number of different directories. Obviously, I could just dump it into %JAVA_HOME%\jre\lib\ext, but what if I wish to restrict access to the Database? So I suppose this is 2 questions: 1. If I want all of my web applications to have access to the .jar file, where's it go? 2. If I want only one of my web application to have access, where's it go? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Garrett, the tc docs says the $CATALINA_HOME/lib is global to tc webapps (after tc restart). this works me running oracle db 9.2 the oracle jar that contains the JDBC drivers is in the directory i mentioned and db access is available from all the webapps. i control user access from oracle and not from tc because oracle has more control over user access. i don't know what mySQL offers in terms of user access controls. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Security constrant to force SSL works with apache+tomcat?
Alexander Wallace writes: I have not tested this, but wanted to make sure before I do all the necesary changes. I have apache in front of tomcat, apache handles the ssl communication... I need to make sure that some stuff happens only via ssl, and i had a filter for that. But i was recommended to use a security constranint in tomcat instead. Will this work having apache on top of tomcat? Also. I only have apache + tomcat becouse when I enabled SSL to tomcat stand alone, whenever switching to ssl, i would not be able to access all my session objects created before the switch. Is there a way to avoid that? If is i would just remove apache from the picture. Al my static content needs to come from tomcat anyway. Also, is there a way to read the ip address of the requesting user if apache is the front to tomcat? I realize some of this are different topics, but have to do with the same stuff... Thanks to all in advance! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Alexander, i know tc can enable/disable dns lookups on requests (i'm not sure if this is what u r looking 4). a dns resolver can do reverse lookups but getting the ip i'm not sure if there is anyway to do this from within tc. all i can say is the standard config as laid down by apache and tc works 4 me. i have several servlets and jsp's running on 4 virtual hosts all ssl capable depending on the webapp deployed and the user/role defined in my JDBCRealm. everything runs pretty much out-of-the-box config. all my tc ssl requests go through: https://localhost:8443/webapp, all my cgi-bin requests go through htts://localhost:443/cgi-bin/someexec and all other traffic routes as: port 80 or 8080 as expected. removing apache is not advisable. apache has many directives that r very usefull as user access controls. also, u need to impart more info on ur environment and what u plan to do to give the gurus on this ml a better picture. if u plan to operate on the public wire much more consideration will need to be given b4 u expose ports: 80, 8080, 443, 8443 etc. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JK and multiple virtual hosts on Apache (repost)
Madere, Colin writes: I might have had some list trouble so I'm reposting this (since I got no responses so far). -Original Message- From: Madere, Colin [SMTP:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 5:55 PM To: '[EMAIL PROTECTED]' Subject: 4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK connectors? Before I go off into JK configuration craziness, I thought I'd post my situation and see what rises to the top. What I have: 1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL) 1 Tomcat 4.12 (no virtual hosts as of yet) 1 JK 1.2.0 connector working properly with the non-SSL host from Apache What I want to do: Have any requests for apps running on Tomcat from any of the 4 virtual hosts to be redirected to the same Tomcat instance. This is mainly for simplicity since I will be using Tomcat Realms for login to determine what to do for a user in the app based on role. If I have to do 4 virtual hosts in Tomcat, then let me know :) Is the correct way to make this work with JK to create 4 Connector instances at, say, ports 8009-8012 in my tomcat server.xml, then set up 4 JK workers in workers.properties with each respective virtual host's domain name and redirection port? Or is there some way to use a single connector? (I'm guessing NOT the latter due to the port probably being bound by the connector process) Having said this and if my former idea is the correct way, for the JK connector entry in my Tomcat server.xml, is the redirectPort arbitrarily chosen? I have 8443 in for my single connector/site/host setup, would I simply use 8443-8446? Any input on this setup appreciated. -- 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] Hello Colin, i'm unsure about advising on this because i'm running the non-threading apache 1.3.27. i have a very similar setup as u describe that works 4 me: i have 4 virtual hosts running on the public wire plus a dns server. the virtual hosts 4 defined in apache only w/ all https JDBCRealm protected directories serving jsp and servlets redirected from apache on port 8443. all https cgi-bin is redirected through port 443. otherwise all http is port 80 and 8080 for jsp/servlets. this config is pretty much out-of-the-box w/o any undue config on the tc side except for the JDBCRealm and a custom web.xml for each webapp both secure and non-secure. only server.xml editing done was basically to uncomment the connectors for port 8443 (ssl and non-ssl connectors). no extra stuff like Host tags or anything like that to confuse the issue. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how many linux processes should tomcat create???
Brandon Cruz writes: Does anyone know how many processes tomcat should create? When I start my server, there are about 525 processes created. The number constantly grows as time goes on, but I think it is related to a database connection being left open. 525 seems like a lot to start with though. Brandon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Brandon, i case the gurus have not responded i wil put in $0.02. i have been running tc for a few years and have been running on public access 4 about a year and i monitor (i'm running a linux box) using top all my processes, memory, cpu etc. all the time. i have not really kept any vital stats type records, mostly just eyeball. for whatever it is worth i ran a ps -waux on my system and see that i have 45 processes as a result of executing catalina.sh (tc server). i have many servlets and jsp running in 4 different virtual hosts. i cannot expertly confirm of course but 525 processes would in my estimation a run-away condition that needs fulltime attention until u get this reigned. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: out of Context
Hari Venkatesan writes: Is there a way to retrieve windows userid from the client side using java or javascript? Hari -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Hari, i u r using realm and form based login this works 4 me: String user = request.getUserPrincipal().getName(); hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mutliuser setup
Rolf Borgen Guescini writes: Does anybody know what to do when setting up tomcat on a UNIX environment for more than one user? Is the best way to define a directory owned by a group where all the users belong,and then make contexts in server.xml? Or is there another way of doing it? RBG ~\\|//~ -(o o)- oOOOo**(_)**oOOOo * Rolf Borgen Guescini * *---* * * * [EMAIL PROTECTED]* * [EMAIL PROTECTED]* * http://folk.uio.no/rolfbg * * * * * * .oooO Oooo. * **( )***( )** \ ( ) / \_) (_/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Rolf, d u mean UNIX users or just tc? if u mean just tc u can use the RealBase class that defines users and roles. i also assume u mean to use a secure login (ssl) and secure webapps page/directories. this is all documented in tc out-of-the-box. preferably, u will want to use JDBCRealm and a database (the MemoryRealm would require MD5 or SHA digest of the passwords in flat ASCII text files) and not as useful as if the users and roles tables in a db (the users and roles tables can be used as fk in other tables 4 other process logic uses). each user could have his own webapp which is what i'm doing now and it works 4 me. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: out of Context
Hari Venkatesan writes: Yes, I am using realm. But actually I don't want the user to type in the userid. I want to use the same id that he types in when he logs on to windows. I am creating an Intranet application and want to use the same id that the user logs in signing on to the network. Hari -Original Message- From: David Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: Re: out of Context Hari Venkatesan writes: Is there a way to retrieve windows userid from the client side using java or javascript? Hari -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Hari, i u r using realm and form based login this works 4 me: String user = request.getUserPrincipal().getName(); hope this helps, david. -- 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] Hello Hari, it is probably not practical to try and fetch the windoz userid. u best bet may be to put everything into a LDAP database centralized to everything else: windoz, tc etc. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: out of Context
Hari Venkatesan writes: David, Thanks for the input. We have all the users in LDAP (Active Directory). But for this specific application, we have roles defined and I need to retrieve the roles for the user and store them in session bean. For this I need the userid from windows. Since the user has already been authenticated against LDAP to signon to windows, I don't want to authenticate him again by making him enter his id again. Hari -Original Message- From: David Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 2:27 PM To: Tomcat Users List Subject: Re: out of Context Hari Venkatesan writes: Yes, I am using realm. But actually I don't want the user to type in the userid. I want to use the same id that he types in when he logs on to windows. I am creating an Intranet application and want to use the same id that the user logs in signing on to the network. Hari -Original Message- From: David Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: Re: out of Context Hari Venkatesan writes: Is there a way to retrieve windows userid from the client side using java or javascript? Hari -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Hari, i u r using realm and form based login this works 4 me: String user = request.getUserPrincipal().getName(); hope this helps, david. -- 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] Hello Hari, it is probably not practical to try and fetch the windoz userid. u best bet may be to put everything into a LDAP database centralized to everything else: windoz, tc etc. hope this helps, david. -- 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] Hello Hari, well since u r running LDAP just have a central (or director type) servlet running that authenticates the users as they login from LDAP and uses the tc SingleSignon. this way that don't get prompted again. what r the holes in this idea? thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: exception loading sessions from persistent storage?
Paul Tomsic writes: When I stop/start tomcat 4.1.12, I'm getting the following error: Exception loading sessions from persistent storage java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: org.apache.xerces.util.DOMErrorHandlerWrapper it doesn't seem to prevent tomcat from starting, but it's troubling, none-the-less. how can I fix this? thanks, Paul [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Paul, in case u don't get an answer from the gurus, as a shot in the dark, take a look at your server.xml file. in this file their is an application context defined out-of-the-box called /examples. this webapp can use a PersistentManager if it has been uncommented. read this carefully and u will know what to look for. 4 example i'm using the /manager webapp that uses the PersistentManager and the important attribute in this context is: saveOnRestart=true. this may be a source of ur problems. also, u have not specified tc version, os type/version, platform, hardware, network and other myriad of services and conditions deployed that may help shed light on ur problem and will help to get the attention of the gurus. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mutliuser setup
Rolf Borgen Guescini writes: Does anybody know what to do when setting up tomcat on a UNIX environment for more than one user? Is the best way to define a directory owned by a group where all the users belong,and then make contexts in server.xml? Or is there another way of doing it? RBG ~\\|//~ -(o o)- oOOOo**(_)**oOOOo * Rolf Borgen Guescini * *---* * * * [EMAIL PROTECTED]* * [EMAIL PROTECTED]* * http://folk.uio.no/rolfbg * * * * * * .oooO Oooo. * **( )***( )** \ ( ) / \_) (_/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Rolf, this is a two edged sword. if u r talking about localhost only w/ no public access this is not a problem but just allow each user to have their own webapps directory e.g. $CATALALINA_HOME/user1_webapps,user2_webapps,.../ all defined in their own web.xml files at: $CATALINA_HOME/someuser_webapps/WEB-INF. on other edge to this sword can be cutting and care is needed if u r mean to run public. i'm working on this now and have a infrastructure that would allow users to update servlets and jsp's remotely and install webapps using the /manager application. i can do this because i have all such accesses under protected webapp directories and encrypted w/ ssl requiring pam cert and user id's and password logins. this is an involved step and an order of magnitude of labor over the other sword edge. i have done things this way because as many will agree the public internet is a place where nobody's sandbox is safe from attack and intrusion. tc vulnerabilities r the same as for other services that have public access. if u do mean to offer public access then u have choosen a good package. tc has no security defaults but has all the tools necessary to harden its public server capabilties especially if used w/ apache version 1.3.27 or better. reply w/ more info on where u r technically: hardware, os, software services installed, network (connection), dns etc. and maybe u will get the attention of the gurus. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: TC 4.1.12 auto re-deploy problem/confusion
Mark writes: I have an expanded-war app where it will initially auto-deploy (ie. expand the directories under /webapps), but not able to get it to hot redeploy after changes are made. By 'hot', I mean automatically have a new.war file re-expanded without restarting Tomcat. If I make changes to the app and create a new.war file, the only way I can get it to re-deploy is if I remove the existing directory under webapps then shutdown/restart Tomcat. If I delete the directory and move a new .war file into /webapps while TC is running, it's not automatically expanded. I've tried removing the app via the TC manager first, but it still won't auto-deploy. If I simply rename the .war file while it's in the /webapps directory, it's immediately deployed with the new directory name w/o restarting TC. In a nutshell, if I use the same .war name, it won't redeploy unless I restart TC. I'm using the out-of-the-box server.xml, where unpackWARs=true and autoDeploy=true for localhost. Is there no way to 'hot' deploy an existing app the way I'd like without restarting Tomcat? I've looked at the documentation and searched the archives/Internet. In almost all cases, the last step is to 'restart Tomcat'. My goal is to have automatic continuous-integration, including auto-deployment. Having to manually restart TC each time throws a wrench into that process. Thanks Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mark, i u r using: http://localhost:8080/manager then this works 4 me: http://localhost:8080/manager/remove?path=webapp and http://localhost:8080/manager/install?path=webapp where webapp means ur application context generated from ur .war. u must remove then re-install using the /manager webapp and hot deploy works w/o bouncing tc. hope this helps, david -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to connect to a Data-File above the WEB-INF-Folder from a servlet????
Patrick Kosiol writes: Hi, How do I connect to a Data-File above the WEB-INF-Folder from a servlet For example my class is placed in $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/myApp/server/servlet.class and my data-files are placed in $CATALINA_HOME/webapps/data/data.dat or so. Is this possible or does anybody know a better way to place my data-files? And how do I connect to them? thx a lot Patrick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Patrick, it would be easier and more prudent to create ur own application context, a so-called webapp, and get away from the ROOT application. for example i have an online application that uses a java properities file in conjuction w/ a webapp. this properties file is located just above: WEB-INF after the .war expands and i access the file w/o conflicts. if i have a webapp that is accessed via: http://localhost:8080/webapp where the actual servlet class resides here: $CATALINA_HOME/webapps/webapp/WEB-INF/classes/com/myhost/webappservlet.class i would access my properites file at: $CATALINA_HOME/webapps/my.properties. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: VIRTUAL HOST CONFIGURATION
karthikeyan.balasubramanian writes: Hi All, I have sucessfully integarated Apache with Tomcat using WarpConnecter. But how do i go about from here to implement lots of Virtual Host for our clients. I need to setup atleast 5 virtual hosts. I couldnt actually figure a way to host 5 real domains with JSP and Servlet support. What are all the changes I need to do in the Httpd.conf and Server.xml. I dont want to keep users folder under TOMCATHOME/Webapps/UserContext it will be under /usr/home/users-home-directory. Can anybody help me out on this. If somebody out here who have hosted some real domains rather then localhost thing please advice. Looking forward for yours response. karthikeyan. Hello, i'm hosting 4 public virtual domains. i am using mod_jk w/ apache and JkMount in httpd.conf and the ajp13 connector. i have many servlets, java beans and jsp running in different protected application context directories, jdbc connection to oracle, etc. this works 4 me. i know about the WarpConnector but have not used it. i have seen a lot of controversy on this ml about WarpConnector. maybe u could try the mail-archive to find out more or just keep trying here. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Infos about Windows NT Authentication
Jasper Dammann writes: Hello, where can I get basic-information about Windows NT Authentication and Tomcat. I read the Tomcat Documentation JNDI-Resource HOW-TO and REALM HOW-TO, but I didnt understand for example how to configure the Windows NT Server to run Tomcat with Windows NT Authentication thanks for help, Jasper -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Jasper, the actual os should not matter. what matters is ur http server. i'm running a linux box w/ apache http server that talks to tomcat. though possible, apache can run on nt but it seems many people elect to run ms iis. iis presents its own set of problems: 1) more difficult to config w/ tomcat. 2) to run a publicly accessible server u will have to run a firewall router appliance like a cisco router because nt/win2k/xp have no built-in firewall protection that is reliable. also, iis is one of the most security compromised servers on the planet. check out ur local isp running linux or solaris servers and take a look at their syslog logs to see the amount of compromised iis servers running that r looking for more platforms to compromise. also, the cisco tcp stack has flaws that r easily compromised if the router is not configured correctly. finally, look at: http://www.netcraft.net/survey/. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: SUCCESS w. Tomcat execution!
micael writes: Congratulations, even from me. ///;-). Would you like a small list of books that will give you the inside scoop on this sort of technology? I think that it would serve the list well if you asked for the same under a Subject of Tomcat Book List, and people could make their recommendations for your perusal. Congratulations again. (The Ant suggestion was a good one for you to pay attention to, Steve.) Micael At 10:36 PM 12/2/2002 -0800, you wrote: Yes, SUCCESS is what I have finally met with in trying/attempting to get Tomcat activated!!! I make a thunderous declaration that I have finally done it, and of course I thank all those who helped me out, and that even includes Micael!! Now, I need some help with trying to see a JSP/Servlet in my browser, a long time problem with me!! I have just now installed Ant. Does that aid me in trying to get a JSP going or not? __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, ant is never a step backwards. ant is always a step forward. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: TC 4.1.12 auto re-deploy...revisited
Mark writes: At 12/3/2002 09:09 AM, you wrote: Mark writes: I have an expanded-war app where it will initially auto-deploy (ie. expand the directories under /webapps), but not able to get it to hot redeploy after changes are made. By 'hot', I mean automatically have a new.war file re-expanded without restarting Tomcat. If I make changes to the app and create a new.war file, the only way I can get it to re-deploy is if I remove the existing directory under webapps then shutdown/restart Tomcat. If I delete the directory and move a new .war file into /webapps while TC is running, it's not automatically expanded. I've tried removing the app via the TC manager first, but it still won't auto-deploy. If I simply rename the .war file while it's in the /webapps directory, it's immediately deployed with the new directory name w/o restarting TC. In a nutshell, if I use the same .war name, it won't redeploy unless I restart TC. I'm using the out-of-the-box server.xml, where unpackWARs=true and autoDeploy=true for localhost. Is there no way to 'hot' deploy an existing app the way I'd like without restarting Tomcat? I've looked at the documentation and searched the archives/Internet. In almost all cases, the last step is to 'restart Tomcat'. My goal is to have automatic continuous-integration, including auto-deployment. Having to manually restart TC each time throws a wrench into that process. Thanks Mark -- Hello Mark, i u r using: http://localhost:8080/manager then this works 4 me: http://localhost:8080/manager/remove?path=webapp and http://localhost:8080/manager/install?path=webapp where webapp means ur application context generated from ur .war. u must remove then re-install using the /manager webapp and hot deploy works w/o bouncing tc. hope this helps, david -- Actually, this isn't working the way I thought it was/would. By doing a remove/install of the app, TC is running from the .war file vs. unpacking the .war and running the app from the subdirectories. This works, but (as we discovered) if/when TC is restarted, the result is the 'old' version of the app running from the subdirectory because we didn't remove it. Maybe we're trying to mix-match or doing something real unconventional (dumb), but the question/problem seems pretty straightforward: given a previously-deployed unpacked app called 'myapp', can Tomcat refresh the contents of the /webapps/myapp subdirectories automatically from a new .war file? The only way we've been able to do that is to shutdown TC, delete the /myapp directory and restart TC, allowing it to unpack the .war and re-create the /myapp directory structure. Based on what I've found, it looks like we should use one of these 2 methods for hot-deployment: 1) Run the app from the .war vs. unpacking it, and use remove/install. 2) Replace changed files in the /myapp directory structure, and use reload. Both work but I'm curious what method is typically used/recommended, or whether it's just personal preference. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mark, acutally u need to do both 1 and 2 as i do but i guess i left out part of my automation process which is: ant. this little (no pun intended) but very powerful development tool is indespensible as part of my development structure. the ant tool basically automates the phsysicall removal of the old webapp directory as it completes the compile, generation and deployment of all my .ear, .war and .jar files. i run ant with 2 or more (depending on the depth of the webapp directories) build.xml files and 2 scripts namely: cleansite.sh and buildsite.sh (w/ controlling parms). these tools completely build or rebuild webapp/site, tear down the old and replace w/ the new and all is immediately accessible and tc never knows the difference. i can make edit changes or create whole new application contexts and webapp directory sites w/ these tools running all in the public no less (not so much brag i just can't afford a separate dev server). hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javax.servlet.ServletException when starting
David Mehringer writes: I have a (valid) jar file in the WEB-INF/lib directory of one of my web apps. Threre are other jar files in the same directory which seem to load fine on startup, but when loading this one, there is some error which I don't understand (snippets from trace below from the log). I'm running tomcat 4.1.12 under linux. I can elaborate more if this description isnt adequate. Thanks for any assistance. Dave 2002-12-03 11:56:42 ContextConfig[/archive] Exception processing JAR at resource path /WEB-INF/lib/huh.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/huh.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.lang.IllegalArgumentException: Invalid TLD resource path /WEB-INF/lib/huh.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:898) 2002-12-03 11:56:42 ContextConfig[/archive]: Marking this application unavailable due to previous error(s) ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Dave, i have special interest when people named Dave running linux boxes and tc ask questions so here goes: how do ur jars get to the locatin under: WEB-INF? how u r generating ur jars? what do the jars do? r the jars from another source or have u generated them? what version and flavor of linux r u running? what dev tools r u running? what version of jdk? anything that may help shed light on the problem. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: modifications to web.xml
[EMAIL PROTECTED] writes: Sir, When I want to create an application and call a servlet from html page, what essential modification I have to made to web.xml file? warm regards, Ch. Sasi Bhushan. CGMAERSK INFO. TECH. PVT. LTD., ALEXANDER SQUARE, 1ST FLOOR, SP ROAD, GUINDY, CHENNAI. Ph: 044-2300053 #2602 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, u must define the servlet using the servlet and servlet-mapping tags as minimum. look at the tomcat docs if u have tc running at: http://localhost:8080. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JDBCRealm/Form login get current user ?(hope Craig is listening).
Hello tc-users and Craig McClanahan, i have been very successfull and lucky developing protected webapps using form-based login and JDBCRealm for the oracle database. WooHoo! i have searched the source JDBCRealm and RealmBase and cannot come up any ideas on how to determine who is currently logged in and using the protected webapp locations. the users, roles, and user_roles tables are working perfectly. Anyone w/ ideas on how to do a so-called: getUser or getCurrentLogin programmatically? maybe there is some server.xml config i could do. any and all ideas, suggestion, rants and raves welcomed. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: clearing sessions
Felipe Schnack writes: There is a way I can access all currently active sessions from a servlet? Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Felipe, yes u can run: http://localhost:8080/manager/sessions?path=/examples where a web app is defined as: /examples here is the doc: http://localhost:8080/tomcat-docs/manager-howto.html hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: startup classes in tomcat 4.1.12
P Sasidhar writes: Hi, Can any one tell me how to configure start up classes in tomcat 4.1.12 server sasi Hello sasi, what r u trying to do? need more info: is tc running? if tc is running, what happened? what url did u invoke? have u checked ur logs? what more can u find out to report? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to configure data transport constraint for a URL in Tomcat?
Peter Lee writes: I have this online form page that needs to be secure, so I do not want to send it in plain text. How do I apply data transport constraint to the URLused to generate the form in Tomcat? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, u have to use the tc ssl and security realm as provided in server.xml and ur whatever is to be protected application directory web.xml file. to get rolling u will want the memory realm in server.xml uncommented first. u will have to have a security key for the tomcat user home. after u get going if this secure page is in the public exposure u will want to go to one of the database security realms or at least PGP encrypt the tomcac-users.xml file and chmod 600 so non-root intruders don't get any passwords. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How do I get the absolute path of a file in a directory above WEB-INF directory of my web application?
Peter Lee writes: I am using Tomcat for servlets. How do I get the absolute path of a file in a directory above WEB-INF directory of my web application? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, probably deprecated but probably still works: request.getRealPath(/). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mozilla crashes Tomcat.
Christopher Mark Balz writes: Mozilla 1.x/N6+ causes a devastating memory leak on Tomcat 3.2.4. In side-by-side tests, IE 5.5 causes no such leak, but Moz1.x/N6+ cause Tomcat to simply start allocating memory until the heap size limit is exceeded by about 20MB, resulting in an eventual shutdown of the JVM. I'm pretty sure it's not my code since the leak starts immediately on secure (ssl) session log-in to a static page (no servlet action whatsoever). If a Moz/N6+ browser is already logged in however, after restarting the Tomcat server it takes a request from Moz1.x/N6 to start the big leak that leads to an eventual JVM shutdown. I thought that Netscape existed only to torture client-side developers; it seems they've got something going on the server-side now! Of course, it would be Tomcat's bug, but it's funny how many bugs always surround Netscape. Since this bug crashes my server, I would very much appreciate help with it. I've seen other postings on the web indicating that this is a problem but have not seen anyone address it in a response. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Christopher, can u upgrade tc? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Host Context - Unpacking of WARs
Kwok Peng Tuck writes: For the context of the webapp in the server.xml . RXZ JLo wrote: For the applications deployed through WAR files, where do I specify attributes like reloadable? thanks. rf __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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] Hello rf, try server.xml. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet and Applet working in Tomcat 4.0.4 standalone
Patrick Kosiol writes: Hi, I am using the Tomcat 4.0.4 as a standalone-server. Esspecially because JBuilder7 supports Servlet debugging. OK. I have an webApplication that includes a client- and a server-directory (package). The server-dir contains the Servlet-Class and the client-dir contains the client, of course. This client is a java.applet and does work fine (it is startet through out a html-page). But my problem is to connect to the servlet. I have also tried to put the .war file into the %CATALINA_HOME%/webapps - folder and added the Lines !-- TOMCAT Bfpl-Context -- Context path=/myApp docBase=myApp debug=0 reloadable=true / into the server.xml. So the .war - File should be extracted at the next start of Tomcat. But that doesn't work What am I doing wrong? An other question is: How do I connect from an Applet or a java.frame (opened by the applet) to this servlet. What the adress of the servlet? So my Applet is working fine but I do not get a connection to the servlet, so I cannot get my data from the webserver. :-( I hope anyone can help me. thx Patrick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Patrick, based on ur info i have to make some assumptions. from ur statment: I have also tried to put the .war file into the %CATALINA_HOME%/webapps - folder... and on: So the .war - File should be extracted at the next start of Tomcat. But that doesn't work... i am compelled to ask: does the .war expanded into something expected like: $CATALINA_HOME/webapps/myApp? if not, this is the source of ur problem. if u do get expansion does this exist?: $CATALINA_HOME/webapps/myApp/WEB-INF/web.xml? if not, this is the source of ur problem. if u do have a web.xml then look 4 the following (depending on package naming): $CATALINA_HOME/webapps/myApp/WEB-INF/classes/package name/myApp/myApp.class (assuming ur servlet is named myApp.java). if this does not exits then definitely a source of problems. one small observation: ur statement: I have also tried to put the .war file... is disturbing because any good development system should work such that correct deployment is automatic. i'm not criticisizing jbuilder and borland. i like borland products. and, i'm not criticisizing u 4 ur choices. it just seems many people have problems w/ tc dev based more on deployment issues. if u have not progressed try the following: try to use the command line and deploy a test servlet (not myApp). and, invoke the servlet from the browser. ur applet should be outside ur webapps environment. if u can invoke ur test servlet then try to invoke it from ur applet. if u r comfortable working from the command line u might want to try the ant build system that is used to build the tc /examples applications. ant is a very powerfull tool and can really help w/ deployment issues. ide's r ok 4 debugging code issues but i have found most java developers have issues based more on: packaging, directories, files systems and deployment in general than code issues. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: URGENT: Tomcat4 - Setting my Application as Default
Bob McCormick writes: I'm having a devil of a time configuring my Application so that when I enter 'http://someIP_or_name_or_localhost/' I get my application rather than than the Tomcat Startup Screen. At this point, I'm brain-dead I think. Here's what I've done so far: 1. Changed the CoyoteConnector to listen on port 80, instead of 8080. 2. Created the following connector: Context path= docBase=var/tomcat4/webapps/myapp debug=0/ I still keep getting the Tomcat Congrads screen. Could somebody chime in here and lay this out for a complete idiot? Still feeling very new to this Tomcat stuff and need to get this nailed down SOON. (deadline looms) Any help here would be GREATLY appreciated. Thanks...Bob Bob McCormick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Bob, next time start out w/ info that can get the attention of people that can help u by supplying the following: tomcat version, platform, os, hardware, network config, name or type of tc application u r trying to run (jsp, servlet, other java object), protocal used: http, rmi, smtp. this is just the short list. back to ur question i don't understand ur statement: I get my application rather than than the Tomcat Startup Screen. i assume u mean u r not getting ur application but the tomcat congrats screen instead. based on this assumption i will continue w/ a possible stab at this problem. typically, when an application is built for tc the invocation of the newly built application (defined here as app_context) would be something like: http://localhost:8080/app_context where app_context lives under $CATALINA_HOME/webapps and the definition/config for app_context may be found: $CATALINA_HOME/webapps/app_context/WEB-INF/web.xml. the entire app_context business is created by tc from ur .war/.jar file combo that u hopefully created using ant and the build.xml that u used for ur app_context (whatever that may be). the ant build places the .war file below /webapps and when u bounce (preferably not) ur tc server the .war file is expanded 4 u into what i described above: $TOMCAT_HOME/webapps/app_context. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [ Tomcat as Webserver ]
Osvâneo A. Ferreira writes: Hi, I´m using tomcat-4.1.2 and I would like know, it´s can used as WebServer. I configured a non-SSL legacy HTTP/1.1 connector on port 80. It´s possible ? [ Osvâneo ] Hello Osvaneo (sorry, no circumflex), within networks, protocols and tcp all things r possible but maybe not recommended. the 2 tiered approach of apache http web server and tomcat servlet server is by far much more configurable (but more learning curve) and more security than either server alone. i assume since u specify port 80 u intend to use this as a publicly accessible server? tread carefully. u have not specified platform or os. if u r using linux then u should look into linux security. if u r using windoz then u need to get a firewall hardware appliance such as a cisco router (ther r many other hardware appliances to choose from). hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache Mod_jk.conf file.
Andoni writes: I have my .conf files working fine, I just have a question that is bugging me. I am told everywhere to put my mod_jk.conf file under the /tomcat/conf/ directory and then include it in the bottom of my httpd.conf file. Is there any real reason for this separation? Can I just take all that is in this file and paste it into the bottom of my httpd.conf file where the include statement is? Thanks. Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Andoni, what version of tc do u have installed? thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache/Tomcat sendRedirect :0 problem
John Cho writes: Hello, I'm having an issue with Tomcat 4.1.12 and Apache 1.3.x where if I make a call to response.sendRedirect(http://hostname/servlet/foo;) Apache for some reason sends a redirect URL to the browser in the form of: http://hostname:0/servlet/foo Does anyone know what is causing this? And how to fix it? I can get around the problem only by using a RequestDispatcher.forward instead of the redirect but that's not optimal for me as I want the browser's URL changed. And although the :0 has no effect on IE, Mozilla doesn't like it at all. I apologize in advance if this is a common problem although I've search the archives and can find only one email that also mentions this problem and the thread doesn't discuss a resolution. Thanks, john -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello John, this works for me: response.sendRedirect(http://hostname:8080/servlet/foo;). All servers: smtpd, httpd, ftpd, others and tc listen on predefined ports. look closer at the docs. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to add a servlet to a new Webapp
Curley, Thomas writes: Hi All, Using Tomcat 4.1.12 on Win 2K I am getting a 404 error when I try to create a new webapp and add a very basic servlet. The servlet works if I create the package structure within the examples WEB-INF/classes. Here are the steps: 1. created webapps/study 2. created .../study/WEB-INF/classes/com/wrox/projsp/ch03/TestServlet.java and compiled [ok] 3. added the following line to server.xml after the examples /Context Context path=/study docBase=study debug=0 /Context 4. just copied the examples web.xml to study/WEB-INF and added the following lines servlet servlet-name TestServlet /servlet-name servlet-class com.wrox.projsp.ch03.TestServlet /servlet-class /servlet servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/TestServlet/url-pattern /servlet-mapping 5. restart tomcat RESULT - The requested resource (/study/servlet/TestServlet) is not available. Can anyone see what I am missing ? thanks Thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Thomas, i see this all the time on this ml. i don't know what folks' fascination is w/ server.xml and a basic application. yes, this is working 4 u because web.xml is already defined for the webapp /examples. look closer at how the tc folks do it, namely, using the ant build and allowing tc to do its job by creating a .war/.jar combo and letting the tc server (when bounced, autoreload or using the webapp /manager) expand the .war into its very own: $CATALINA_HOME/webapps/ur_application_context/WEB-INF/web.xml and $CATALINA_HOME/webapps/ur_application_context/classes/package_path.../So meServletUbuild.class. pls allow me recommend u look into ant and build.xml. it's worth the trouble if u r serious about tc learning and dev. trying to build anything structured by hand is not recommended. even seasoned vets don't do this because they r the ones that invented this stuff. using ide's r ok (especially when employers require ide use) but i use 3 or 4 tc tools to develop anything i want w/ ease because the chore of structured compilation and deployment is pretty much automatic. hope this help, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat 4 and javax.sevlet.*
Tushar Kulkarni writes: Hi, I have installed Tomcat4.1. I want to change the directory webapps\examples\JSP to say C:\myExamples. So that I can store my jsp files in to the myexamples directory and access it through the browser with the address , http://localhost:8080/myexamples instead http://localhost:8080/examples. Please tell me how to I accomplish this task. Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Tushar, no need to change directories and should not be necessary if u create ur application context: /myexamples the same way /examples was created. ur installed tc came w the application context: /examples ready to go right? but, b4 it got tarballed the tc magicians created a .war/.jar file combo that gets expanded to: $TOMCAT_HOME/webapps/examples and under the: /examples context u will find: $TOMCAT_HOME/webapps/examples/WEB-INF/web.xml a very important file that is created to define and describe to the tc server how to unpack the .war/.jar that was created for the /examples application. And, under: $TOMCAT_HOME/webapps/examples/WEB-INF/classes u should find a myriad of example applications including: $TOMCAT_HOME/webapps/examples/WEB-INF/classes/examples (and many others). in fact all the examples and demos displayed at: http://localhost:8080 r expanded and stored her. allow me to recommend: discover how this is done by studying ant and the build.xml that escorts the tc server to great heights. if u accomplish this u should have when comleted the following: $TOMCAT_HOME/webapps/myexamples when the tc server expands ur .war file. And, u should be able to access the contents w/ the following url: http://localhost:8080/myexamples. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Coyote:: ArrayIndexOutOfBoundsException
Reynir Hübner writes: Hi, When using version tc. 4.1.14 this exception sometimes occures : java.lang.ArrayIndexOutOfBoundsException at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:615) at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:407) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:901) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:471) at org.apache.coyote.Response.action(Response.java:214) at org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:371) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:428) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536) What should I bee looking at ? -reynir Hello Reynir, difficult to get people to answer questions like these. it would be prudent to add: app type running (jsp, servlet, applet, cgi, html etc.) what were u trying to do w/ the application? what defines: platform, os, environment, config (apache, tomcat, other servlet container, j2ee container), network (firewall, proxies, public, private, etc.)? anything that may tip off an experienced developer as to what ur probem is and how to solve it. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Load on Tomcat 4.1.12
P Sasidhar writes: Hi All, I need urgent help! I have installed my small webapp on Tomcat 4.1.12 on Windows NT machine but after few requests it is getting hung. Is there any load factor to be configured? What is the maximum no of users it can take? I had downloaded this Tomcat form Jakarta.apache.org site. Where I may be going wrong? Please help, Thanks, Sasi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Sasi, what small app? (jsp, servlet)? did u try the out-of-the-box /examples or demos first? e.g. http://localhost:8080 ? did u change any config? if so, what did u change? (build.xml, web.xml, server.xml)? since this is a windoz box what other services r u running that may conflict? how is ur environment setup? (CLASSPATH, PATH)? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.1.12 not responding after few requests
P Sasidhar writes: After few requests my Tomcat server 4.1.12 is not responding and gives lots of null pointer exception and following message in the end: Nov 26, 2002 11:50:28 AM org.apache.tomcat.util.log.CommonLogHandler log INFO: All threads are busy, waiting. Please increase maxThreads or check the ser vlet status75 75 What do I do now? Sasi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Sasi, again what r u trying to do? what requests? i must assume browser requests. what is ur url? have u tried to re-install tc and run only a simple test or tomcat supplied example or demo? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Why does Tomcat 4 suspend itself?
Luca Ventura writes: Hello! I have Tomcat 4.0.4-b3 as Servlet Container (I use it as a plug-in of IIS 5, using the ISAPI filter isapi_redirector.dll )and I have seen that sometimes the following strange thing happens When Tomcat doesn't receive user's requests (forwarded from IIS) for a period of time (that can take minutes or hours) it suspends itself and I must restart the service manually because Tomcat doesn't answer to the users' requests any more. In fact when this happens and the user tries to connect to Tomcat he waits for an answer forever without success until the connection is closed by the Web Browser because it is timed out. Is there some setting in Tomcat to avoid this? Has someone already had such problem? If yes, how did he solve it? Is this a bug of the version of Tomcat (or of the ISAPI filter) I am using? I hope someone can help me Thanks in advance. Luca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Luca, try running tc as standalone and not as a service to test. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: OFF-TOPIC: creating classes
Kristján Bjarni Guðmundsson writes: You could check out BCEL. http://jakarta.apache.org/bcel/index.html Felipe Schnack [EMAIL PROTECTED] wrote on 27.11.2002 13:40:59: Hi all, I know this is off-topic, but I just had a crazy idea and couldn't find about it anywhere... There is a way to modify/create java classes at runtime? I mean, create plain new classes, or add attributes/methods to an existing, etc? Maybe I'm asking for Java++? :-) -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Felipe, when java classes r executed w/ java... ur classes become part of one big program called the JVM. study closer and u will see why this is not possible or desirable. one of the reasons java is so popular (reference c language) is when classes r designed and implemented properly the application never crashes or disrupts the os. dig deeper. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Search engine for the tomcat-user mailing list
Luca Ventura writes: Hello everybody! Is there a search engine for the tomcat-user and tomcat-dev mailing list? I would like to find and read old posts using key-words. Thanks to everybody in advance! Luca Hello Luca, try this: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/ thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Host Context - Unpacking of WARs
Andoni writes: unpackwars=false should only mean that the app runs from the packed .war file, or so the Tomcat documentation seems to say. I do also have a web.xml but I don't see where this comes in to the configuration of the Host elements? Andoni. - Original Message - From: David Brown [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 27, 2002 11:47 AM Subject: Re: Host Context - Unpacking of WARs Andoni writes: Hello, I have two configurations: 1st one works 2nd doesn't. I want to get the 2nd to work though as it stops .war files unpacking. Can anyone tell me how to make the 2nd one work? The error I get is: Forbidden You don't have permission to access / on this server. But I think that's coming from the Apache server so it isn't even getting to tomcat? Thanks, Andoni. Host name=animo.andoni.[mydomain].ie debug=0 appBase=webapps/animo unpackWARs=true Aliasandoni.[mydomain].ie/Alias Context path= docBase= debug=0 workDir=[disk_name]/apache/jakarta/tomcat/work/animo reloadable=false /Context /Host Host name=animo.andoni.[mydomain].ie debug=0 appBase=webapps/animo.war unpackWARs=false Aliasandoni.[mydomain].ie/Alias Context path= docBase= debug=0 workDir=[disk_name]/apache/jakarta/tomcat/work/animo reloadable=false /Context /Host -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Andoni, so did u look at ur httpd.conf directives: directory..., alias... etc? but tc is a web server too when requests r handed off from apache. tc looks at / as docbase or appbase root so what u have in ur war file becomes /application_context where application_context is the web app u have defined 4 tc to unpack. i don't see how the web app can execute if unpackWARS=false. r u defining a web.xml at all or r u only interested in configuring server.xml? thanx, david. -- 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] Hello Andoni, for sake of experimentation or argument try a minimally uncommented server.xml and go w/ ur web.xml (below WEB-INF not $CATALINE_HOME/conf/web.xml). in fact this begs the question: WEB-INF is created when the .war file is unpacked. this is the whole beauty of .ear, .war, .jar techonoly namely one word: deployment. i have 4 domains running and a lot of servlets and jsp running over the range of tc services running both http and https. i can make any number of reasonable changes, update and redeploy w/o a user so much as noticing a hiccup. all of dev is more or less directly from tc docs reflected in books, online how-to's and ml's such as this one. follow the instructions of these resource and u should succeed. that's my $0.02, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache and Tomcat port mapping
Brian Dixon writes: I have recently installed Tomcat 3.3.1 along with Apache. The two are working well together, and I have no complaints except that my Apache pages all have the xxx.mydomain.org/ structure while my Tomcat pages are isolated and appear under the xxx.mydomain.org:8080/ structure. Is there a way to get Tomcat to respond to port 80 requests or some other mechanism for removing the port number from appearing to users??? Thanks, Brian Brian Dixon Regenstrief Institute, Inc. Indiana University Medical Center 1050 Wishard Blvd. Indianapolis, IN 46202 (317) 630-8822 Web: www.regenstrief.org Email: [EMAIL PROTECTED] Human creativity multiplied by the computing power of super-recursive devices and algorithms will cause the real revolution in information technology and in our lives. - Mark Burgin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Brian, the port 80 that apache uses is a tcp socket that apache listens to. the same w/ tomcat. apache has directives to define the ports it listens to for different schemes: (http, https). typically, apache does not display port 80 in the url because apache is a web or http static content server so the default port 80 is not required to be displayed. and, port 80 is a so-called priviledged port on 'nix systems ( 1023). when apache fires up it does so as root or the super-user allowing use of port 80 but forks a new child process for the actual http request/resonse processing. also, when apache executes cgi-bin it can hide some of the url to execute cgi-programs by using apache alias or scriptalias directives. tomcat is not a static http web server but is a dynamic content servlet/jsp server (and other objects) and therefore needs to listen to the non-standard port of: 8080. this port can be redefined to be any non-priviledged port ( 1023). displaying port numbers in the url r not a problem if u restrict who sees the urls. as a suggestion u can authenticate ur users through encryption, user/password logins using ssl or read this about url obfuscation: http://www.n3dst4.com/articles/urlobfus . thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How do I integrate my CLASSPATH on Tomcat?
Emma Johansson writes: Hi! I'm wondering how I should do to make tomcat use the paths that are in my CLASSPATH? Regards, / Emma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Emma, it should not be necessary to make tomcat use anything in the CLASSPATH. is there some question about whether tomcat is using ur CLASSPATH or not? if tomcat is not using ur CLASSPATH how do u know? more info is required: tomcat version, what r u trying to do? what application have u defined using what implementation?: servlets, jsp, what? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Howto specify servlets directory
Rafael Angarita writes: Hi, I want to configure tomcat to handle servlets in the URL /servlet and in /some_dir/servlet, is it necesary to indicate something in the config files? or change anything? I'm using tomcat 3.2.4 Thanks in advance, -- Rafael Angarita -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Rafael, yes must define an application context and define the servlets url path and mapping in web.xml that is created under WEB-INF when the .war file u create gets expand below webapps (NOT in $CATALINA_HOME/conf/web.xml). hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Is it possible to have a serlvet as a first page?
[EMAIL PROTECTED] writes: I'm using ajp13 with apache1.3 and tc4.0.x. Im using virtual hosts, and the config I use for this one looks like this: VirtualHost 130.236.228.174:80 DocumentRoot /home/httpd/html/blaskan ServerName blaskan.studorg.liu.se ServerAlias www.blaskan.studorg.liu.se ErrorLog /var/log/apache/blaskan-error.log CustomLog /var/log/apache/blaskan.log common_with_mod_gzip_info2 Directory /home/httpd/html/blaskan DirectoryIndex index.cgi /Directory JkMount /blaskan/* ajp13 JkMount /*.cgi ajp13 /VirtualHost I have a servlet mapped to index.cgi (don't ask me why .cgi, its mostly a pun). The problem is that I can not get apache to serve tomcat the request for www.blaskan.studorg.liu.se. It just gives me a listing of the contents in the folder. Right now I'm using a index.html that redirects (after adding index.html in the DirectoryIndex tag), but its not really how I want it to be. Is there a way to map this? It seems like its possible to do with .jsp-files, but I do not use any, and my index.cgi does most of the logic, so it would not make sense to change that into a .jsp-file. Any sugestions? Another question, is there something in server.xml for host that enables funktionality equal to ServerAlias in apaches VirtualHost? It seems odd that I have to define two hosts, one with www. and one without. Last thing, I can not get my server.xml to build my mod_jk.conf properly, it just does the Hosts, but never specify where to find the logs, the workerfiles and such. I have it specified like this in server.xml (but do not use that config-file it produces). Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/lib/apache/1.3/mod_jk.so jkDebug=info workersConfig=/usr/local/jakarta-tomcat-4.0.4/conf/workers.properties jkLog=/usr/local/jakarta-tomcat-4.0.4/logs/mod_jk.log noRoot=true forwardAll=true/ /Best regards Björn Bergenheim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Bjorn, (sorry no Swedish or Norweian vowels), i agree there is no reason (and mostly incompatible) to define host both in apache and tomcat. people i read about on this ml keep futzing aroung w/ the server.xml. if u r running apache and tomcat u have the best combo going. use each server for its best strength in technology. allow apache to serve and admin the static content and allow tomcat to serve and admin the dynamic. web.xml should be enough to fire off an index.whatever and if there is more tc will take up the slack. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Which connector for Apache 2 + Tomcat 4.1 on HP-UX 11?
Wendy Smoak writes: I asked once before and was assured I could replace the HP-provided Tomcat 3.3.1 with a newer version. I have Tomcat 4.1.12-LE (with Java 1.4.0) working fine standalone and although I thought I wasn't going to have to do this part, it looks like I've been elected to try to convince Tomcat to play nicely with Apache. Since I have only mod_jk.so on the web server side, it looks like I will use Ajp13 on the Tomcat side. (Unless anyone has mod_jk2 for HP-UX? I won't hold my breath waiting for HP to provide it.) I am reading and re-reading these two pages for now: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html Please let me know if I'm on the right track. If anyone is feeling extra-generous and would like to share their configuration files, I would really appreciate some examples to work from! -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management Hello Wendy, u have all the config u need if u download: jakarta-tomcat-4.x.x-src. the /examples r great and w/ the docs u should be able to do a lot out-of-the-box. get an apache reference book for examples on the web server side. i have installed the apache/tomcat duo on many machines and it is like hand in glove. if u r just beginning don't do too much. allow me to suggest try to get apache to server up http://localhost:8080 and if successfull u will have the seed start u need. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Errors when compiling Tomcat Connectors
Kevin Andryc writes: I downloaded the Tomcat connectors (jakarta-tomcat-connectors-4.1.12-src) and Ant version 1.5.1. I unzipped that to an appropriate directory and then edited the build.properties file located in jakarta-tomcat-connectors-4.1.12/jk. Such that it looks like this: tomcat40.home=%TOMCAT_HOME% apache2.home=%APACHE2_HOME% apr.include=${apache2.home}/include apr.lib=${apache2.home}/lib so.debug=true so.optimize=false so.profile=false I then ran Ant in the same directory and it came up with a lot of compiler errors saying that it could not import org.apache.tomcat.util.* and that the package does not exist. Those classes are found in tomcat-util.jar and is located in %TOMCAT_HOME%/server/lib. I tried to put that in my CLASSPATH environment variable and then ran Ant again, but still it had the same errors. I am new to Ant and would appreciate any help. Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Kevin, ant was designed w/ CLASSPATH in mind. namely, ant does not use the environment classpath at all. ant defines classpath as part of a pathelement attribute. look closely in ur build.xml file and u will see something like this: path id=build.path. the encompassing end tag complete the path id definition which will consist of 1 to many classes, jars and their paths. also, tomcat needs special jars like: servlet.jar found in a special directory: $CATALINA_HOME/lib. look closer and dig deeper. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re-deploying webapps from war files
Mark D.Porter writes: Hello All, I'm working with the latest builds of tomcat (4.1.15) in hopes of moving from tomcat 3.3. One thing that seems to be missing in the 4.x line is a 'redeploy' feature for war files. In tomcat 3.3 I can setup my 'webapp' directory to 'look' for changes in a .war file and on a change event redeploy the application. This is a valuable feature for our development workflow and is sorely missed. If i am overlooking something obvious in the documentation of if this is an as yet 'undocumented feature' can someone please let me know. Thanks! Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mark, is this not done in server.xml as an attribute for a context e.g. /examples? if not then use of http://localhost:8080/manager/remove?path=context and httpd://localhost:8080/manager/install?path=context should work. the latter, though manual, has the added advantage of remote invocation. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: serverside include
David Howard writes: I don't know if this would help, but what about setting environment variable through the tomcat administration interface. David Howard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 12:25 AM To: Tomcat Users List Subject: serverside include Hello, Is there anyhting like a server side inlcude that is loaded into memory when the server starts, making variables specified in the include file accessible? Or is what I am trying to acheive (in previous posts) - session or application to be loaded when the server is started - the nearest solution to this? I have seen documentation to have a jsp:include, but I can't see how variables within the servlet would be accessible from any other page? Any thoughts? Thanks Paul. WorldSecure Server safeway.com made the following annotations on 11/26/02 08:52:58 -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Paul, if u use a parallel directory and bean class files w/ setter/getter methods u can persist variable information in the bean file and then retrieve the information in a jsp once the the server has changed pages. example directory tree follows. hope this helps, david. $TOMCAT_HOME | /webapps | /app_context | /WEB-INF | /classes | /com | /app_context /\ / \ /web /beans where ur servelets r under web and ur bean class files r under beans. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: WAR files not expanding.
Andoni writes: When I put a .war file over to my tomcat server it doesn't work. - It only creates an empty directory in webapps. If I put over the war and unzip the file, it works fine. If I put over the .war file and set unpackWARs=false it does not work. - The unpack command is understood though as it does not create the directory in webapps I am using Tomcat 4.0.4. Has anyone come across anything similar? Thanks in advance, Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Andoni, have u tried to build and deploy using ant? david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Virtual host problem
xyber writes: I have a HP-UX server with Tomcat 4.0.4, and I want to host 30+ virtual host. I fill up the server.xml, start catalina, and the Tomcat's java process allocate gigabytes(1+) of memory!!! When i remove virtual hosts from server.xml, the memory usage go lower. Is the 1g+ allocation normal, or a bug? What can I do? XYBeR ps: sorry for my english -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, try to use virt host in apache and configure apache for tomcat. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help for newbie?
[EMAIL PROTECTED] writes: Greetings to all. I am new to JSP and Tomcat - but trying diligently to learn quickly. I have what are most probably basic questions. I am using the latest, so I assume, Tomcat 4.1.12. I am attempting to create a Webapp and Servlet. I get the Tomcat 404 error, The Requested resource is not available. I suspect I have two problems(more details follow basic descriptions): 1. My servlet isn't recognized once compiled from .java to .class using latest java 1.4.1_01 javac command. 2. I think my webapp is not recognized. DETAILS What I tried: after inital failure, I attempted copying my .class file to the example directory and executing with localhost:8080/examples/servlet/MyServlet just as the HellowWorld servlet is called in an attempt to eliminate possible causes. No luck with this. (I had restarted Tomcat after pasting .class file.) I also tried copying and pasting the HelloWorldExample .class file to my webapp directory and it would not execute. My webapp Directory (courtesy of WROX Professional JSP [which has not a few typo's]: %TOMCAT%\ch03\WEB-INF\classes\com\wrox\projsp\ch03\app1\ and the URL that should activate it: localhost:8080/ch03/servlet/com.wrox.projsp.ch03.app1.MyFirstServlet I changed the laboriously long .myfirstwebapp. to .app1. both in the package declaration of my .class as well as the call the attempted activation URL. If this is the wrong place to ask for help with basics such as this, plese forgive me - I am hoping this is the place and am all too happy to go where directed for answers. If this is the right place, all help is appreciated. Kind regards, Jered p.s. java follows package com.wrox.projsp.ch03.app1; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpRequest; import javax.servlet.http.HttpResponse; import javax.servlet.ServletException; public class MyFirstServlet extends Httpservlet { public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setConentType(text/plain); PrinWriter out = response.getWriter(); out.println(Frustration: bane of inspiration); } } -=| Just say NO to post-modernism. |=- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Jered, this is the right place. code is not ur problem. on the surface (because servlet code is all u sent) i suspect u have not defined ur servlet in web.xml. this aside, if u r really interested in learning use the tools provided by tc: ant build. also, don't do too much: this means don't develop a Hello World servlet and jsp. allow me to suggest to develop only a servlet at first, then progress to jsp's and other objects later. look closely at the http://localhost:8080/examples and the other demos supplied w/ tc. learne to build and deploy a Hello World using ant and preferably if u can congifure apache w/ tc. tc by itself is not very usefull unless u r inside a protected environment (no internet connection or very heavy firewall and CA encrpted ssl stuff). hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Can't start tomcat
[EMAIL PROTECTED] writes: Hello, I have downloaded tomcat 4.1.12. When I try to startup the server a DOS Window appears and disappears immediately and I have no comment about what's going on. Can anybody help me? - NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com Téléphone/Fax : 08 92 69 00 21 (0,34 TTC/min) Minitel: 3615 NETCOURRIER (0,15 TTC/min) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, ur server is crashing. u need to look in $TOMCAT_HOME/logs. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: serverside include
[EMAIL PROTECTED] writes: Ugh, thanks. I really dont know where to start however. How are the variables made persistent? Can you possibly provide a little syntax? Finally, what is 'app_context'? A directory? Thnaks Paul. Hello Paul, if u use a parallel directory and bean class files w/ setter/getter methods u can persist variable information in the bean file and then retrieve the information in a jsp once the the server has changed pages. example directory tree follows. hope this helps, david. $TOMCAT_HOME | /webapps | /app_context | /WEB-INF | /classes | /com | /app_context /\ / \ /web /beans where ur servelets r under web and ur bean class files r under beans. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, app_context is application context. this is namely the object of ur questions. there r many, many examples of bean usage all over the net. u will have to dig deeper to find the syntax. there r a myriad of ways to accomplish the simple outline i have given here. here is a starting point: http://www.oreilly.com/catalog/javabeans/ . hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re-deploying webapps from war files
Mark D.Porter writes: Hi David! Thanks for your response - I've found that your second suggestion is automatable (is that a word?) via ant and as such is a good replacement for the functionality in Tomcat 3.3. However, it appears that these tasks rewrite server.xml and overwrite any ResourceParams elements that your re-deployed context may have contained. Is this a bug or am I mis-using these ant tasks/manager app functions. Thanks again, Mark On Tuesday, November 26, 2002, at 09:44 AM, David Brown wrote: Mark D.Porter writes: Hello All, I'm working with the latest builds of tomcat (4.1.15) in hopes of moving from tomcat 3.3. One thing that seems to be missing in the 4.x line is a 'redeploy' feature for war files. In tomcat 3.3 I can setup my 'webapp' directory to 'look' for changes in a .war file and on a change event redeploy the application. This is a valuable feature for our development workflow and is sorely missed. If i am overlooking something obvious in the documentation of if this is an as yet 'undocumented feature' can someone please let me know. Thanks! Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Mark, is this not done in server.xml as an attribute for a context e.g. /examples? if not then use of http://localhost:8080/manager/remove?path=context and httpd://localhost:8080/manager/install?path=context should work. the latter, though manual, has the added advantage of remote invocation. hope this helps, david. -- 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] Hello Mark, i don't understand how u r overwriting server.xml? if used correctly, the ant build should only be generating a jar/war combination that when the server is restarted (or if u r using reloadable attribute) ur application context u have defined should overwrite ur application context directory under $TOMCAT_HOME/webapps and nothing else. u will need to examine much more closely what ur build.xml file is actually doing. sprinkle echo statements throughout ur build.xml to see what paths and files r being defined 4 for what actions (mkdir, copy, delete, javac, pathelements, etc.). tread carefully. ant is a great tool but will do only those instructions it receives from the user. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat setup
Joseph Boccuzzi writes: to start I am new to Tomcat. I have installed 4.1.12 on my Mac and can get to the initial page. From here the links for the jsp examples and the servlet examples return a http status 404 not available. The link for the Tomcat Administrator and Tomcat Manager return a 403 access denied. I can however use the Tomcat documention link. In here I found something about the tomcat-users.xml file. I edited this file to add the manager role the document was talking about and create a user name line with a pasword and assigned the manager role to it. I restarted tomcat but still no go. So my question is How do I start the jsp and servlet services so I can test the examples and how to I create a user to get into the administrator? The documentation that comes with this is not much help in trying to configure or administer Tomcat. Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Joseph, u could do w/ supplying more info. i will make a stab at this: u r curious or dead serious about the tomcat servlet server and what to see some tc basics working. if basic works is ur interest then u do not need to edit tomcat-users.xml unless u r very serious about security, ssl logins and r much more familiar w/ tomcat innerworkings. to see the basic tc install functionality assuming u have installed tc correctly the only thing u need to do is if the tc standalone server is running correctly then u only need to invoke the following: http://localhost:8080 and u should see the standard tomcat demos screen w/ the tomcat logo. once u have acquired some development skills then using http://localhost:8080/manager is a good idea especially if u need to control the tc server remotely. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat as bundle
[EMAIL PROTECTED] writes: Hi, Can any one tell me whether tomcat is avalable for download as a single tar.gz file?! and where is it available... I would like to install tomcat on Irix 6.5.16, anyone suggest if experimented already on this. thanks, Ranjit. - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, apache.org. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Protectind directory
Osvâneo A. Ferreira writes: Hi, I want protect a directory in my structure ( http://localhost/directory ) I use Apache+Tomcat and all test, it´s failed. Try .htaccess of apache, but nothing. Try permission org.apache.naming.JndiPermission jndi://localhost/examples/* , but nothing. How I do ? Osvâneo A. Ferreira Hello, u need to supply more info (how u build is important): OS: TOMCAT VERSION: PLATFORM: ENVIRONMENT: NETWORK: BUILD: ant (build.xml), scripts (.sh , .bat, manual, etc.) if u want tomcat directory protection don't fiddle around with apache (i assume u mean httpd.conf). the tomcat instructions r very clear if u downloaded: jakarta-tomcat-x.y.z-src. u have to build a directory w/ WEB-INF and its own web.xml file (preferably using a war/jar file) where u define the protected directory something like this: $TOMCAT_HOME | /webapps |protected_dir | /WEB-INF | /web.xml u must be able to generate a war file and put it in your webapps directory and then bounce ur tomcat server (i prefer to use: http://localhost/manager/install?path=protected_dir). get the src as described above and read thoroughly and carefully. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jasper.error.emptybodycontent.nonempty, MySQL
Eric Earnst writes: Hi all, I've read a lot of docs but over a long enough period of time that I forget most of what I read, the recent over-age newbie really applies here... I am putting together my first site and am getting the following error message from Tomcat (4.1.12-LE-jdk14): org.apache.jasper.JasperException: /pnDatabaseConnect.jsp(3,0) jasper.error.emptybodycontent.nonempty Here is the top of the file in question: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % sql:setDataSource var=PartNumDB scope=application driver=org.gjt.mm.mysql.driver url=jdbc:mysql://localhost:3306/PartNumberMaster user=Root password= /sql:setDataSource sql:query var=PartNum scope=request datasource=${PartNumDB} SELECT * FROM PartNumberMaster /sql:query I don't have a web.xml file, every one I've come up with causes Tomcat to not find my pages... I've loaded the JSTL into: C:\Jakarta\jakarta-tomcat-4.1.12-LE-jdk14\webapps\myapp\WEB-INF\lib and the TLD files into the WEB-INF directory. Thanks, Eric -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Eric, i will have to admit that i'm using a tc version 4.1.12 but i cannot fathom tc w/o a web.xml file. if u r a newbie then u r taking leaps that r too big. u have crammed a lot of functinality into a jsp using the tags. this is ok 4 someone w/ a lot of background but i personally don't recommend this approach. 4 the time being if u r interested in the functionality and not the implementation then allow me to suggest that u take a more tiered approach to make ur jdbc connection and sql query: 1) lay off the tags untill u r more experienced. 2) what i mean by tier is put ur jdbc connection and sql query in a separate class or bean away from ur web content directory. i use oracle and mysql all the time this way. get the class bean to execute standalone first b4 u put it into ur directory structure. an ascii directory tree follows. 3) inspect ur build process. using ant and bulid.xml is highly recommended. 4) if u get step two above to work (separating ur web content from ur process) then allow me to suggest introducing a third leg (in technogeek this is MVC: model-view-controller). this third piece is a servlet or better yet a director servlet that handles all requests from all of ur jsp's (1 to serveral jsp's). case in point: ur jsp requests ur servlet for db info. the servlet requests info from ur class bean. the servlet sends the db info and sql query results back to the jsp. in the long run much simpler and cleaner not to mention the ability to scale this design pattern (more technogeek). an example of my directory structure follows: $TOMCAT_HOME | /webapps | /app_dir /WEB-INF | /web.xml $TOMCAT_HOME | /webapps | /app_dir /WEB-INF | /classes | /app_dir /\ / \ /\ /web /beans this is just one director. i have the directory separated to show the different file contents: web.xml is always under /WEB-INF. under /web contains: jsp's, html's, css's, etc. and under /beans contains: ordinary class files w/ constructors and getter/setter methods 4 ur web objects. also, the /beans directory or yet another aply named directory could contained serialized classes 4 even more advance data movement. this is the classic design pattern most developers have at least some familiarity: http://java.sun.com/blueprints/patterns/ or better yet just type: model-view-controler at the google prompt and start reading. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Applet from servlet
Andreas Probst writes: Hi David, don't put the class files and jars, which you need for an applet, below WEB-INF. Tomcat won't serve these files to the user's browser. Just put these files in your webapp's directory. If you need the same classes also on the server, than you need to have two copies of them. Hope this solves your problem. Andreas On 24 Nov 2002 at 10:07, David Brown wrote: Hello tc-user, has anyone successfully invoked an applet from a servlet using: response.sendRedirect(url) where url=http://localhost/somehtml.html w/ the APPLET/APPLET tag embedded? my efforts so far result in: Exception: java.lang.ClassNotFoundException: com.x.y.MyApplet.class. i have repackaged the applet in different ways to no avail. i am using jakarta-tomcat installed out-of-box and using the same ant build infrastructure as the examples and demos: $TOMCAT_HOME | | /bin /classes /common /conf /lib /logs /server /temp /webapps /work $TOMCAT_HOME | | /webapps | /myapplication | /manager | /ROOT | /examples | /webdav $TOMCAT_HOME | | /webapps | /index.html | /META-INF | /WEB-INF $TOMCAT_HOME | | /webapps | /WEB-INF | /web.xml | /classes $TOMCAT_HOME | | /webapps | /classes | /com | /myapplication | /web /beans i can place any number of servlets in /web and any number of java bean or ordinary class files in /beans and reference their constructors, variables and methods from servlets in /web. however, no amount of packaging or lack of packaging of an applet stored anywhere in this directory tree referenced w/ APPLET/APPLET in the index.html (see above) will work (ClassNotFoundException). TOMCAT VERSION: 4.0.6 JDK: 1.3.1_02 OS: RH7.2 NETWORK: linux box as router ENVIRONMENT: TOMCAT_HOME, JDK_HOME BUILD: ant build.xml i welcome any and all ideas, suggestions, rants etc.. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Andreas, thanx 4 the accurate and speedy reply. i (on a hunch) put my applet class under /webapps and can now load which ur message confirms (thanx). the history of this applet started out as a java standalone which works perfectly from any remote client. however to avoid downloads and client compiles i decided to convert the standalone to an applet. the applet depends on classes12.jar (or classes12.zip if on windoz). again, class not found exception because of classes found in classes12.jar. again, on a hunch, i unpacked the jar under /webapss along w/ the applet class (i know this is a poor solution but it helped throw light). when the applet loads i can see that i completes some of the init() but eventually hangs w/ the following: Exception: java.util.MissingResourceException: Can't find bundle for basename Connection.locale en_US i know the best solution is for the applet to find the packed jar and then all should be ok but how? i have put the jar everywhere: classpath, build.xml property, $TOMCAT_HOME/lib, $TOMCAT_HOME/common/lib, etc.. any and all ideas, references, rants and raves welcomed. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with Tomcat 4.1.12 and FORM based authentication
Quenten Van Egeren writes: I'm having the following problem when using FORM based authentication with Tomcat 4.1.12 : When I bring up a new browser window, and go to a protected page (under /do/) I am redirected to the login.jsp as I should be. If I enter the correct username / password, I am logged in correctly and forwarded back to the page I was trying to access. This all works correctly. However, if I enter garbage for a username and password, I am redirected to the error.jsp page, which is also correct. I then click the link on the error.jsp page that takes me back to the login.jsp page and try to login again with a valid username/password combo, and it instantly redirects me back to the error.jsp page. This isn't correct (as far as I can tell) since it should have successfully authed me the second time into the page. I was wondering if anyone else had run into this issue, or if there was something I was missing in one of the config files or my web.xml file. I am also using struts, but I don't think that has anything to do with this error, since it appears to be a j_security_check setup issue somehow. Any help would be greatly appreciated. Thanks, Quenten Here is my code : + my application web.xml + security-constraint display-nameSecurity Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/do/*/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint role-nameeadmin/role-name role-namemember/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameMy JDBCRealm/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.jsp/form-error-page /form-login-config /login-config security-role descriptionadmin role./description role-nameeadmin/role-name /security-role security-role descriptionmember role./description role-namemember/role-name /security-role + tomcat server.xml + Realm className=org.apache.catalina.realm.JDBCRealm debug=50 driverName=org.postgresql.Driver connectionURL=jdbc:postgresql://localhost:5432/mydb?user=postgres:password=postgres userTable=members userNameCol=login userCredCol=password userRoleTable=member_roles_view roleNameCol=user_role / + my login.jsp + html head titleLogin Page for Examples/title body bgcolor=white form method=POST action='%= response.encodeURL(j_security_check) %' table border=0 cellspacing=5 tr th align=rightUsername:/th td align=leftinput type=text name=j_username/td /tr tr th align=rightPassword:/th td align=leftinput type=password name=j_password/td /tr tr td align=rightinput type=submit value=Log In/td td align=leftinput type=reset/td /tr /table /form /body /html + my error.jsp + html head titleError Page For Examples/title /head body bgcolor=white Invalid username and/or password, please try a href='%= response.encodeURL(login.jsp) %'again/a. /body /html __ Do you Yahoo!? Yahoo! Mail Plus Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Quenten, if ur web.xml is: $TOMCAT_HOME | /webapps | /do | /WEB-INF then change ur web.xml tag: security-constraint url-pattern/do/* to only: url-pattern*/url-pattern hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat Connector JK2 + Apache + SSL
SAG - Jose Antonio Tarifa writes: Hello group. I'm not able to configure Apache + SSL with Tomcat to make available to servlets the SSL data, such like are returned by request.getRemoteUser() function (always return NULL). Apache runs correctly with HTTPS, but Tomcat no. Any idea? - José Antonio Tarifa Lorenzo Departamento de Desarrollo Compañía Operadora del Mercado Español de Electricidad, S.A. c/Alfonso XI, 6 4ª Planta. 28014 Madrid email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - Hello, have u uncommented the ssl connector in server.xml? what version of tc? what version of apache? what platform? os? have u configured mod_ssl and JkMount in httpd.conf? many variables that can break ssl between apache and tc. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Why can't put weblogic.jar to classpath when using ant
james writes: Hi, I have a question, when I use ant to compile some files, the following error popped up, after tried a few times, I found if I delete weblogic.jar in the classpath, it is OK! Why is that? Thanks in advance James java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/Native2Asc ii, method: createMapper signature: ()Lorg/apache/tools/ant/types/Mapper;) Incom patible type for getting or setting field at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.tools.ant.Project.init(Project.java:163) at org.apache.tools.ant.Main.runBuild(Main.java:387) at org.apache.tools.ant.Main.main(Main.java:149) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, how r u defining property name=classpath in ur build.xml? david -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.1.12 Logs??
Prashanth Pushpagiri writes: Hi: I am running Tomcat 4.1.12 alongside IIS 5.0. I have no installation problems, but what I'd like to know is how to set up my logs. In all previous versions of Tomcat I observed Tomcat logging access details (complete HTTP requests made) in files like localhost_accesslog_***.txt, but in 4.1.x I havent seen these files being created in $CATALINA_HOME/logs. Do we need to set it up? If so how? If not where are these logs? Thanks Prashanth __ Do you Yahoo!? Yahoo! Mail Plus Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Prashanth, i thought these logs were set up in server.xml within a context definition. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: I think I broke jsp compiler
Grinvald, Edward writes: Hello all, I'm trying to swap out a jre/jdk (yes, I know the diff) on the fly from tomcat 3.3a. All seems well with 1.3.1, but I'm getting problems with 1.4. It seems that the jsp simply don't get compiled (I get blank screen). Since my error page is also a jsp, where would I see jsp compilation errors (tool too recent or something), or how would I debug this. Thank you, edward -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Edvard, have u checked ur $TOMCAT_HOME/logs directory? thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Why can't put weblogic.jar to classpath when using ant
james writes: I did not put property name=classpath in build.xml, I just set the environmental variableclasspath. there are a lot of jar files including msbase.jar, etc. coz I tested some other examples. James - Original Message - From: David Brown [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 25, 2002 3:55 PM Subject: Re: Why can't put weblogic.jar to classpath when using ant james writes: Hi, I have a question, when I use ant to compile some files, the following error popped up, after tried a few times, I found if I delete weblogic.jar in the classpath, it is OK! Why is that? Thanks in advance James java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/Native2Asc ii, method: createMapper signature: ()Lorg/apache/tools/ant/types/Mapper;) Incom patible type for getting or setting field at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.tools.ant.Project.init(Project.java:163) at org.apache.tools.ant.Main.runBuild(Main.java:387) at org.apache.tools.ant.Main.main(Main.java:149) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, how r u defining property name=classpath in ur build.xml? david -- 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] Hello James, ant build ignores all reference to the environment CLASSPATH content. that's why the classpath property must be defined in the build.xml file properly. the environment CLASSPATH is inherently a problem. that is why ant was developed to circumvent the problems present in building projects in a much more consistent manner. let me suggest u create a small project or better yet begin w/ a fresh install of tc away from ur current work and re-build the tc /exampls and demos to get some more experience w/ ant. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Over-aged Newbie needs some help
mech writes: Have a look for this book (bought it from Amazon, 65 or $60): Professional JSP, 2nd Edition (Simon Brown others), Wrox Press, August 2002 ISBN 1-861004-95-8 Of course it's a little bit huge with 1200 pages, but definitely the last book you'll buy about JSP and servlets... Until next JSP and servlet specs, I guess ;-) mech -Original Message- From: Steve R Burrus [mailto:[EMAIL PROTECTED]] Sent: Sonntag, 24. November 2002 01:05 To: [EMAIL PROTECTED] Subject: Over-aged Newbie needs some help Hi, I need some degree of help/assistance from someone re. just how exactly you go about starting to build or create JSP's or Servlets in the Tomcat container!!! Do you first establish a context or something??! And, then if that's the case, where do you go from there anyway? Incidentally, I am still basking in the afterglow of just being able to install Tomcat!!! __ Do you Yahoo!? Yahoo! Mail Plus Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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] Hello, jsp and servlet books 4 fine but if u r a newbie as u say here u need to: 1) begin to supply better info. on some ml's you'll get yelled at for this transgresssion. example: a) TOMCAT VERSION b) JDK VERSION c) OS, TYPE and VERSION d) ENVIRONMENT e) PLATFORM (hardware etc.) f) NETWORK (routable, non-routable, public, private, firewall's, proxies, etc.) 2) if u downloaded the jakarta-tomacat-x.y.z-src then when u unzip or unjar u will find all the docs and example demos u can handle 4 some time to come. 3) run the http://localhost:8080 first b4 u try to do more. use the accompanied ant builds w/ the demos. if u don't know ant, go back to apache.org and get it... read the docs... learn how to use it. don't expect the ml's to answer all the questions. most of the people that know ur situation probably won't answer ur question(s). hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: apache and tomcat and a webapp
Ron Smits writes: Let me try and be more specific :) First of all, if I get all to work the current setup with JServ will disappear and I am testing this in a test environment (Vmware) So let me see if I can chop my questions up in different parts The application is being developed using tomcat 4.1.12 running standalone. The development is going nice and contacting the application on localhost:8080/application is perfect. Question 1: I want the application to be the root of the tomcat. Meaning that in my test environment when I contact localhost:8080 I get the application and not the standard Tomcat page. I edited the server.xml and changed the Root context to point to the application: Context path= docBase=application debug=0/ I even removed the ROOT directory. When starting this up going to localhost:8080 will give me a No context configured to process this request If I go to localhost:8080/application my application is there. So how do I change this? Because the current server that needs to be replaced is running several domains in a virtual setup (and very nicely too thanks to apache). My idea is to remove the current 1.3 install with JServ and replace it with apache 2.0.43 that will run all the virtual hosts and will talk to tomcat for the web application (see question 1) that will be in a new virtual host. So after I have been able to get question 1 answered (replacing the root context with my application) the next question will be what the best way is of setting mod_jk up to serve up the application when apache gets a request for this application. I hope this is more clearer Ron PS to fullfill the list: OS linux version 2.4.19 TOMCAT 4.1.12 JDK: jsdk1.4.1_1 Hardware never enough but it is a big enough intel box :) Network: running fine, thank you :) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Ron, server.xml is strictly config and removing the ROOT context is not a good idea. just replace the guts of the ROOT context w/ what u want. if u already have a http://localhost/application running then either move it to the ROOT context or just change the ROOT/index.html to index.jsp and use: response.sendRedirect(http://+request.getHeader(host)+request.getContext Path()+/application. better yet build a director servlet at ROOT that automatically re-directs http to the desired /application based on its context. hope this helps, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Applet from servlet
Hello tc-user, has anyone successfully invoked an applet from a servlet using: response.sendRedirect(url) where url=http://localhost/somehtml.html w/ the APPLET/APPLET tag embedded? my efforts so far result in: Exception: java.lang.ClassNotFoundException: com.x.y.MyApplet.class. i have repackaged the applet in different ways to no avail. i am using jakarta-tomcat installed out-of-box and using the same ant build infrastructure as the examples and demos: $TOMCAT_HOME | | /bin /classes /common /conf /lib /logs /server /temp /webapps /work $TOMCAT_HOME | | /webapps | /myapplication | /manager | /ROOT | /examples | /webdav $TOMCAT_HOME | | /webapps | /index.html | /META-INF | /WEB-INF $TOMCAT_HOME | | /webapps | /WEB-INF | /web.xml | /classes $TOMCAT_HOME | | /webapps | /classes | /com | /myapplication | /web /beans i can place any number of servlets in /web and any number of java bean or ordinary class files in /beans and reference their constructors, variables and methods from servlets in /web. however, no amount of packaging or lack of packaging of an applet stored anywhere in this directory tree referenced w/ APPLET/APPLET in the index.html (see above) will work (ClassNotFoundException). TOMCAT VERSION: 4.0.6 JDK: 1.3.1_02 OS: RH7.2 NETWORK: linux box as router ENVIRONMENT: TOMCAT_HOME, JDK_HOME BUILD: ant build.xml i welcome any and all ideas, suggestions, rants etc.. thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how can i get tomcat to take my servlets?
Rotaru Razvan writes: hi, i have tomcat4 and a site with compiled servlets (or jsps). I only have .class files. I created a context but tomcat does not take the index.class file, it just lists my files. How can i do it? kind regards, Razvan __ Do you Yahoo!? Yahoo! Mail Plus Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, index.class file? don't u mean index.html or index.jsp? this could be ur problem. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache-Tomcat Conf
Nitesh Garg writes: I hv downloaded Apache/Tomcat 4.1.12 and have apache 2.0, I want to configure my tomv\cat with apache. As in the given step when I run tomcat(it runs on standalone ) it does not generate mod_jk.conf-auto that i need to put in http.conf. Any suggestion to configure tomcat with apache will be help full thanx in advance Nitesh - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now Hello, if u have not downloaded jakarta-tomcat-4.1.12-src then do so and u will find all docs at: jakart-tomcat-4.1.12-src/webapps/tomcat-docs. david -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: apache and tomcat and a webapp
Ron Smits writes: This might not even be possible but I cannot find a definitive yes or no answer I am developing a webapp based on jsp and servlets. Once this is done I want to deploy it on a server that has several domains on it. Currently this server is running apache with JServ. My idea is to have apache 2.0.X together with tomcat 4.1.12 to take over this work. I have managed to get apache to talk to tomcat using the mod_jk connector. But I can only access my application by using the application path (http://localhost/application/) instead of having served up as the root of the virtual host (http://localhost/). How to go about this? Ron Smits [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, u could use an index.html at: http://localhost that redirects to http://localhost/application or define an alias in httpd.conf. i assume u mean a jakarta-tomcat context application properly defined in web.xml. u really don't want jserv defined in httpd.conf along w/ mod_jk. the ready-to-go tomcat webapps demos r perfect if u r using the ant builds. u really should supply more info w/ such requests (on some ml's u get yelled at 4 requests like this): OS: TOMCAT VERSION: JDK: HARDWARE: ENVIRONENT: NETWORK: thanx, david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: What the problem about tomcat 4.1 or IE? in my computer?
p niemandt writes: Uninstall win2k, install linux, see if your problem persists ... :) naah; seriously: check the logs: see if there is anything funny. Which JDK are you using? Maybe try reinstalling that, see if that helps. On Sat, 2002-11-23 at 15:41, james wrote: Hi, I used Tomcat 4.1 for 2 weeks, and I practiced some samples, it was fine, but today, it didn't work well anymore. I uninstalled it and installer it again and again, the Tomcat Server looks OK, for the info on screen was the same as before. but when I tried : http://localhost:8080/hello/index.jsp or any tested sites I used before. All will take a long long time!! even after I reboot the computer. It was much fast before. The OS is Window 2000, and RAM is enough (327M), I checked and I only run 2 or 3 IEs, nothing else. What might be the problem? Any help will be appreciated. James -- p niemandt [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello, also after u re-install new try just the suggested action: http://localhost:8080 to see if u get the initial tomcat demo screen. david. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JkMount question
Rafael Angarita writes: Hi, Does anybody knows if it's important the order of JkMount directives?, for example: I have two tomcat instances T1 and T2, - The loadbalancer should handle all the requests to the entire site (and do a load balance between T1 and T2) except for /app1 context - T2 should handle all the requests to /app1 context What's the right order of JkMount directives in my .conf file? does it matters? Thanks in advance, -- Rafael Angarita -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Hello Rafael, i don't think the order matters. i don't have 2 loadbalanced servers but i have few domains and it seems the JkMount order in httpd.conf does not matter. httpd.conf is a name/value/properties type of file and not an xml file so the order should not matter. hope this helps ,david -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: i am having trouble using Java Beans with Tomcat 4.1
Jeff Tulley writes: If you are using JVM 1.4.1, this might be a FAQ - that you need to have a package name on the bean. At least it appears that your bean is in the default package. Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., the leading provider of Net business solutions http://www.novell.com [EMAIL PROTECTED] 11/22/02 9:36:31 AM Hi, I am a beginner to Java beans. i am having trouble using Java Beans with Tomcat 4.1 I am attatching the beans file and am copying the exact errors that I get.. Please help me.. Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in the jsp file: /student_survey.jsp Generated servlet error: [javac] Compiling 1 source file C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\student_survey_jsp.java:7: '.' expected import SurveyBean; ^ C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\student_survey_jsp.java:43: cannot resolve symbol symbol : class SurveyBean location: class org.apache.jsp.student_survey_jsp SurveyBean student = null; ^ An error occurred at line: 1 in the jsp file: /student_survey.jsp Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\student_survey_jsp.java:45: cannot resolve symbol symbol : class SurveyBean location: class org.apache.jsp.student_survey_jsp student = (SurveyBean) pageContext.getAttribute(student, PageContext.SESSION_SCOPE); ^ An error occurred at line: 1 in the jsp file: /student_survey.jsp Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\student_survey_jsp.java:48: cannot resolve symbol symbol : class SurveyBean location: class org.apache.jsp.student_survey_jsp student = (SurveyBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), SurveyBean); ^ 4 errors at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at
Unsubscribing?
Does anyone have any idea how to unsubscribe from this group? I have tried emailing [EMAIL PROTECTED] but am still recieving messages. Can anyone PLEASE help??