servlet/jps: servlet is Ok but jsp NoClassDefFoundError
I am working with Tomcat 5.0 In a working webapp \ondemand (with only jsp) I added a servlet. The servlet work correctly but the jsp is not able to find the lib/engine.jar (where the its classes are defined). Without Servlet the JSP works. With servlet I can not have my index.jsp I tried to put the jar related to servlet in common/lib, but is the same, the servlet works, but not the jsp. Any idea? Thanks. Regards. Laura Ferrari Gruppo Telecom Italia - Direzione e coordinamento di Telecom Italia S.p.A. CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please send an e_mail to [EMAIL PROTECTED] Thank you
Tomcat Clustering - Replicated Sessions
According to the Tomcat (5.5.9) documentation after a sessions has reached a certian period of inactivity it expires. However my question is when is this expired session marked by the JVM for garbage collection. The reason I ask is that our application has an interesting problem. If we start up a single server (configured for a cluster) and have the application run memory looks good, CPU is good, response time is good. However when we start up the 2nd clustered instance after a day or two both servers start showing up with OutOfMemory errors. The only new item introduced is that we are now replicating sessions between the applications. We changed the replication mode to asynchronous after having performance problems using pooled. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending custom Date header from servlet?
I'm trying to write a servlet that sends Date and Expires headers that are a few days in the past. (It's the server side of a caching test case.) Adding the old Expires header is trivial: response.setDateHeader(Expires, System.currentTimeMillis() - 3 * ONE_DAY); but if I put in the identical code with Date instead of Expires, nothing seems to happen. I still get a Date header that's set to the actual request time. I've poked around a little bit in the Catalina code, and I can't figure out why this would be happening. There's code in HttpProcessor that adds a Date header right before calling connector.getContainer().invoke(), but since my servlet code runs after that, I think it should override this default value. Does anyone have advice on this, or see anything I'm missing? Thanks! Laura Werner BeVocal, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DBCP - Tomcat 4.0.3
Hi, is it possible to use DBCP with Tomcat 4.0.3? Can you give me some advices? Thanks Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Servlet not working
I typed in my first example servlet today cannot seem to get it working. I made sure all the following were done: 1) Classpath is set CATALINA_HOME=$CATALINA_HOME:/usr/java/jakarta-tomcat-4.0.4 JAVA_HOME=/usr/java/j2sdk1.4.0 PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.0/bin CLASSPATH=$CLASSPATH:/home/lfindle/java:/usr/java/jakarta-tomcat-4.0.4/commo n/lib/servlet.jar:. export CATALINA_HOME export JAVA_HOME export PATH export CLASSPATH 2) Put the servlet in /usr/java/usr/java/jakarta-tomcat-4.0.4/webapps/begjsp-ch01/WEB-INF/classes/ ExampleServlet.java Compiled it from there. Shutdown restarted Tomcat. I went to http://localhost:8080/begjsp-ch01/servlet/ExampleServlet get 404 Error message. Does anyone have any suggestions? Thanks. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ExampleServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out; String title = Servlet Example; response.setContentType(text/html); out = response.getWriter(); out.println(htmlheadtitle); out.println(title); out.println(/title/headbody); out.println(h1This is an example servlet./h1); out.println(/body/html); out.close(); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ doGet(request, response); } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Webalizer or other statistics over Tomcat?
Hi Saphira can you explain better your process? It migth be very interesting. How should you modify your server.xml? Thanks Laura - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 7:01 PM Subject: RE: Webalizer or other statistics over Tomcat? Howdy, Here's what we do (heavily trafficked site, large log files, yet this works well, quickly, and is free): 1) Modify server.xml to use combined pattern for access log. 2) Use mergeLog (http://sourceforge.net/projects/mergelog/) to combine our log files into one big one. We do this once a month or whenever I feel like it. 3) Use http-analyze to chug out the nice graphical reports of various statistics: http://www.netstore.de/Supply/http-analyze/ I know the site for http-analyze isn't all that, and the packaging/marketing of it isn't as polished as some others, but it's fast, reliable, and provides all the information we need. Yoav Shapira Millennium ChemInformatics -Original Message- From: Glenn Parsons [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 12:42 PM To: [EMAIL PROTECTED] Subject: Webalizer or other statistics over Tomcat? Hello All, Does anyone know how to modify configs for the Webalizer or any other webstats programs to work well with Tomcat/Jakarta? TIA, Glenn -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: missing return statement error?!??!
It migth be that you has to inizialize the array Tab: String[] Tab=new String[5]; Laura - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 2:45 PM Subject: missing return statement error?!??! Hi, This is not a tomcat's question. I've made a class with a find method. When I compile it with ANT, I 've a missing return statement error whereas i've specified return type. Here is the code : public String [] find(String mail) { String system= qs44a6005; String collectionName=JC; String Table=T_Client; String[] Tab=null; // Obtenir les paramètres de la requête. Connection connection=null; try{ // Chargement du driver JDBC pour AS/400. DriverManager.registerDriver( new com.ibm.as400.access.AS400JDBCDriver()); // Obtient une connection à la database. connection = DriverManager.getConnection (jdbc:as400:// + system+ / + collectionName,PCS,PCS); Statement lireTable = connection.createStatement (); ResultSet rs1= lireTable.executeQuery(SELECT NOM,CODE,TEL,PORT,PASS FROM +collectionName+.+Table+ WHERE MAIL=' +mail+'); if(rs1.next()){ // on récupére les membres du resultSet Tab[0]=rs1.getString(NOM); Tab[1]=rs1.getString(CODE); Tab[2]=rs1.getString(TEL); Tab[3]=rs1.getString(PORT); Tab[4]=rs1.getString(PSWD); } System.out.println(fin test existe); lireTable.close(); connection.close (); return Tab; } catch(Exception e){ System.out.println (); System.out.println (ERROR: + e.getMessage()); } } Thanks. garsJC -- 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]
Final releaseTomcat 4.1?
Hi all, every day I listen for Tomcat 4.1. But all us know that in a production enviromnet we can't use a alpha quality release. But we know that Tomcat 4.1 ha much more than Tomcat 4.0.x : comìnnection pool, performance and memory efficiency improvements, and so on. So I'd like to know when the final release of Tomcat 4.1 will be announced. Do you know something? Thanks Laura
Tomcat PID: alive or not
Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat PID: alive or not
Which monitoring programs do you advise me? Laura Alle 17:53, martedì 18 giugno 2002, hai scritto: Having the PID doesn't tell you anything about whether or not the process is capable of serving requests. For that, you will have to create a script and run it in a cron job that makes a request to tomcat every so often (every minute?) and checks to see if a valid response was received. If not, restart tomcat using the PID. There are any number of monitoring programs out there, UN*X-based or Windows, that, given a URL, can determine if a valid response was received. I usually create a small servlet that does nothing but output a string that says I'm OK or something similar. Then the monitoring script looks for that text string in the reply, and behaves accordingly. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: Tomcat PID: alive or not Hi all, well with a Perl script I have found the PID Tomcat and I write it in a tomcat.pid file. With this PID how can I know if Tomcat is alive or not in a script? My purpose is to check if Tomcat is alive and if not I restart Tomcat. The problem is that with PID Tomcat I don't know how to check if Tomcat is alive. Can you help me? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Other question
Hi, I have installed your code in my Tomcat (4.0.2 + apache). But it doesn't seem to be correct. It writes in tomcat.pid a PID that doesn't seem to be correct: I have tried to do: kill -9 PID (which is in the tomcat.pid) and the system tells me: bash: kill: (3977) - No such pid Where is the problem? Thanks Laura Alle 18:18, giovedì 13 giugno 2002, hai scritto: Hi, your code seems very interesting, but I haven't understood one thing: you says Then add the following into server.xml --Begin server.xml snippet Listener className=PidLifeCycle / --End server.xml snippet do you want to say conf/server.xml? Can you put Listener... in the server.xml? Where do I have to put it in the server.xml? Thanks Laura Alle 17:07, giovedì 13 giugno 2002, hai scritto: For what its worth - I created (and use) a LifecycleListener that runs on startup which logs the process ID into a file called tomcat.pid. Which is created by a shell script called writepid.sh. Below is all the code to get this to work. This code also assumes your current working directory is $CATALINA_HOME. --Begin code import org.apache.catalina.LifecycleEvent; /** * A helper for getting the PID of java so shutting down tomcat is MUCH * easier. */ public class PidLifeCycle implements org.apache.catalina.LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (start.equals(event.getType())) { try { Runtime.getRuntime().exec(/bin/sh bin/writepid.sh); } catch(Throwable e) { e.printStackTrace(); } } } } --End Code The code above will launch the following shell script. Should be in the bin/ directory of your tomcat installation. --Begin Shell script echo $PPID logs/tomcat.pid --End Shell script Then add the following into server.xml --Begin server.xml snippet Listener className=PidLifeCycle / --End server.xml snippet -Tim Rick Fincher wrote: Hi Laura, Tomcat actually does have a pid. It is a java application. Under Solaris if you do a ps -elf |grep nativ you will see a listing beginning with your JAVA_HOME and ending with ../bin/sparc/nativ_t. That's the pid of the java virtual machine. If you have multiple java apps running each will have a JVM so you may need to sort out which java pid is Tomcat. You can also use top after starting Tomcat. You will see an entry for java in the table along with the pid and memory and cpu usage info. Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Fw: Other question
Hi, can you send me the function too? The perl script can be the solution. Thanks Laura Alle 16:31, venerdì 14 giugno 2002, hai scritto: Hi , excuse me, but the function getppid() ? What is this? Can you send me? Thanks a lot Laura Alle 16:20, venerdì 14 giugno 2002, hai scritto: - Original Message - From: Joel Sather [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 4:05 PM Subject: Re: Other question I tried to run Tim's original sh script under Solaris and it wouldn't give me anything, so I wrote a version in Perl. My script looks like this: --- -- - - #!/usr/local/bin/perl open (PIDFILE, logs/tomcat.pid); print PIDFILE getppid(); close (PIDFILE); --- -- - -- I also had to give fully qualified paths in both the Perl script and in Runtime.getRuntime().exec() to get it to find the correct files. Use the original Java class that Tim wrote and just point it to the Perl script. Also, just call the Perl script--you don't need to call /bin/sh first. Make sure to chmod the script to executable, too. Thanks for the Java code, Tim. It works great now. -Joel Joel Sather email: [EMAIL PROTECTED] phone: 651-917-4719 [EMAIL PROTECTED] 06/14/02 07:26AM Welcome to PID hell! I have this working on HPUX, if you are trying this on another UNIX - I'm not sure what may happen but here are some hints to track things down. 1) Make sure the directory you are starting tomcat you are typing bin/startup.sh. This ensures you will write the the correct log directory. 2) My original version of the script was: #!/bin/sh echo $PPID logs/tomcat.pid This printed out the wrong PID since the first line created an extra shell process for the script to execute in. I wonder if Runtime.getRuntime().exec is creating an extra process which would cause you to get the wrong pid. If that is the case - I can't be of help. A Google search will probably provide a better solution than mine for determining process id of a java program. -Tim Laura wrote: Hi, I have installed your code in my Tomcat (4.0.2 + apache). But it doesn't seem to be correct. It writes in tomcat.pid a PID that doesn't seem to be correct: I have tried to do: kill -9 PID (which is in the tomcat.pid) and the system tells me: bash: kill: (3977) - No such pid Where is the problem? Thanks Laura -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Other question
Well in the stage I have linux, but in the production solaris 8. Is there any difference? Laura Alle 16:40, venerdì 14 giugno 2002, hai scritto: What operating system do you have ? -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 14. Juni 2002 13:59 An: Tomcat Users List Betreff: Re: Other question But it doesn't seem to be correct. It writes in tomcat.pid a PID that doesn't seem to be correct: I have tried to do: kill -9 PID (which is in the tomcat.pid) and the system tells me: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Other question
On linux, ps -ef | grep java | grep myapp | awk '{print $1}' I'm trying it. Laura Alle 17:59, venerdì 14 giugno 2002, hai scritto: Hi, Yepp, you're right ;) Forgot that part. For us on Solaris 2.8 it's ps -ef | grep java | grep myapp | awk '{print $2}' Yoav Shapira Millennium ChemInformatics -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Other question Just for clarification, doing tomcat.pid wouldn't really work, because all you would get is the ps entry for that value. You'd have to use cut or awk and grab the actual PID from the PID column in the listing that resulted from ps -ef | grep java | grep myapp and redirect it to tomcat.pid. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 10:45 AM To: Tomcat Users List Subject: RE: Other question Howdy, A relatively unix-flavor-independent way to do it is to give your process an identifier via the first argument, i.e. the first thing in CATALINA_OPTS, for example -Da=myapp. You would then do ps -ef | grep java | grep myapp tomcat.pid. Yoav Shapira Millennium ChemInformatics -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 10:41 AM To: Tomcat Users List Subject: AW: Other question What operating system do you have ? -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 14. Juni 2002 13:59 An: Tomcat Users List Betreff: Re: Other question But it doesn't seem to be correct. It writes in tomcat.pid a PID that doesn't seem to be correct: I have tried to do: kill -9 PID (which is in the tomcat.pid) and the system tells me: -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- 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]
Security - Attack
Hi all, well I have, in my opinion, a very interesting question. Last week we went in a production enviroment: we have apache + tomcat with an important web application xxx (http.conf has JkMount /xxx worker). Well, this morning I have discovered that somebody has tried to attack my server: in the Apache error log I have found calls as /scripts/..%5c%5c../winnt/system32/cmd.exe, /scripts/., and so on. My question is: is Tomcat secure? How can I do Tomcat secure? Is all my system secure? ( my machine is a solaris 8). Thanks Laura
Other question
Hi all, thanks for your reply (Security - Attack): you are telling me that I shouldn't worry because Apache is secure. (I hope it) I have one other question: If Tomcat shouts down for some cause, how can I know it? For example, Apache has a PID and so you can control if the apache process, with that PID, is alive. But Tomcat doesn't write any PID: how can I know if Tomcat is alive or not? Is there any script for that? Thanks for your help Laura
Re: Security - Attack
Hi all, thanks for your help. What do you suggest me to do? Whe you say :So it makes some sense to change the configuration for apache, what do you mean? Laura - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 3:22 PM Subject: AW: Security - Attack I wouldn't say that they do no harm: - They mess up your statistics If you don't change your configuration it's not possible to distinguish the 404 from the viruses from others that might indicated errors in your site. (I always get nervous if a server has a 'file not found' count 0) - They (sometimes) kill your log file space In high noon of nimda and code red, those viruses produced serveral megabytes on logfiles for each site we are hosting. So it makes some sense to change the configuration for apache. -Ursprüngliche Nachricht- Von: Tim Funk [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 13. Juni 2002 15:04 An: Tomcat Users List Betreff: Re: Security - Attack Warning: this may start flame war - but its my opinion. What is the purpose of detecting and trying to prevent these attacks? If someone code reds (or similar) you - they get a 404 error. Why waste the extra processing power and extra config maintenance on something that does no harm. When the next type of attack comes out - should the config be changed to address that? Its a waste of time. -Tim Jim Urban wrote: create a bunch of mod_rewrite filters (in httpd.conf - for Apache) that redirects all those requests to www.microsoft.com Can you provide an example? Jim -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Other question
Hi, your code seems very interesting, but I haven't understood one thing: you says Then add the following into server.xml --Begin server.xml snippet Listener className=PidLifeCycle / --End server.xml snippet do you want to say conf/server.xml? Can you put Listener... in the server.xml? Where do I have to put it in the server.xml? Thanks Laura Alle 17:07, giovedì 13 giugno 2002, hai scritto: For what its worth - I created (and use) a LifecycleListener that runs on startup which logs the process ID into a file called tomcat.pid. Which is created by a shell script called writepid.sh. Below is all the code to get this to work. This code also assumes your current working directory is $CATALINA_HOME. --Begin code import org.apache.catalina.LifecycleEvent; /** * A helper for getting the PID of java so shutting down tomcat is MUCH * easier. */ public class PidLifeCycle implements org.apache.catalina.LifecycleListener { public void lifecycleEvent(LifecycleEvent event) { if (start.equals(event.getType())) { try { Runtime.getRuntime().exec(/bin/sh bin/writepid.sh); } catch(Throwable e) { e.printStackTrace(); } } } } --End Code The code above will launch the following shell script. Should be in the bin/ directory of your tomcat installation. --Begin Shell script echo $PPID logs/tomcat.pid --End Shell script Then add the following into server.xml --Begin server.xml snippet Listener className=PidLifeCycle / --End server.xml snippet -Tim Rick Fincher wrote: Hi Laura, Tomcat actually does have a pid. It is a java application. Under Solaris if you do a ps -elf |grep nativ you will see a listing beginning with your JAVA_HOME and ending with ../bin/sparc/nativ_t. That's the pid of the java virtual machine. If you have multiple java apps running each will have a JVM so you may need to sort out which java pid is Tomcat. You can also use top after starting Tomcat. You will see an entry for java in the table along with the pid and memory and cpu usage info. Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SSL question
Hi all, I have a question about SSL - HTTPS. I have a system with apache + 2 Tomcat instances with load balancer. Now my web application is over HTTP. Next week we are going to buy a Verisign Certificate and I have to move the web application from HTTP to HTTPS. We have apache compiled for SSL: all the emails I have read till now are about Tomcat as web server with SSL support. Am I rigth? How can I do to configure apache with SSL support telling him that when he finds /sss/eee he has to call the web application /sss in Tomat (JkMount). That is: the client call http://myserver/sss/eee and I want to call in HTTPS my web application under Tomcat (https://myserver/sss/eee) whre SSL is managed by Apache. How can I do? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: SSL question
My tomcat version is 4.0.3 and not 3.x If I reinstall the apache with openssl+mod_ssl and configure Tomcat with SSL support (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html), if in httpd.conf I have JkMount /xx loadbalancer (I have a loadbalancer worker in workers.properties) if a client call https://myserver/xx/pippo is the request passed to Tomcat? How can I tell Apache to redirect http requests to https requests? Thanks Laura - Original Message - From: sonam singh [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 10, 2002 1:32 PM Subject: Re: SSL question --- Laura [EMAIL PROTECTED] wrote: Hi all, I have a question about SSL - HTTPS. I have a system with apache + 2 Tomcat instances with load balancer. Now my web application is over HTTP. Next week we are going to buy a Verisign Certificate and I have to move the web application from HTTP to HTTPS. We have apache compiled for SSL: all the emails I have read till now are about Tomcat as web server with SSL support. Am I rigth? How can I do to configure apache with SSL support telling him that when he finds /sss/eee he has to call the web application /sss in Tomat (JkMount). That is: the client call http://myserver/sss/eee and I want to call in HTTPS my web application under Tomcat (https://myserver/sss/eee) whre SSL is managed by Apache. u have to reinstall the apache with openssl+mod_ssl if u want to know the installation faq www.ccl.net/cca/software/UNIX/apache/solaris-t3.2/README.shtml How can I do? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.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]
Security problem?
Hi all, it might be that I have a security problem and you should tell me if I am right. Well, I have a server with an ecommerce application: an user can buy something a when he has to pay the servlet of the web application executes a redirect to my servlet (in a different server) passing me the sum of money that the user has to pay. Could the user change the sum of money? Is redirect secure? What do you think? If yes how I can solve the problem? Thanks for your help Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Security problem?
Hi all, thanks for your advices. Well, I have never worked with encryption. Well I know what is RSA, but how can I implement it? Do I have to install something? What have I to use to implement ansd use an RSA alghoritm? Thanks Laura Alle 11:33, venerdì 7 giugno 2002, Power-Netz \(Schwarz\) ha scritto: This is one way, there are probably others. By using encryption you can make such a transaction secure. If site X is where they buy the thing and site Y is your site: You could get site X to pass two things: - the amount of money the user is to pay in clear text - the amount of money the user is to pay encrypted with the private key of site X as a digest. IMHO, the first step of a cracked key. If you send the encrypted message as plain text, you give anyone who tries to crack that key a major hint. @Laura: just send the encrypted data, nothing else. Keeps your secret key a secret. If anyone tries to change the amount of money , the decrypter can tell you that. And i suggest to send more encrypted data as you need to send. With this an attacker can't guess which of the cracked decrypted data is correct, which makes it harder to a brute force attack to get throu, even if the key get cracked by random tries :-) M.Schwarz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Urgent send redirect
Hi all, I have a problem and I don't know whre is the cause. My context is /xxx: in this context I have a servlet. This servlet takesas parametr an url in IP form (nn1.nn2.nn3.nn4). At the end of the servlet I do: response.sendRedirect(response.encodeRedirectURL(url + ? + querystring)); If the url parameter,passed to my servlet is nn1.nn2.nn3.nn4, the browser of the user is redirected to http://myserver/xxx/nn1.nn2.nn3.nn4?querystring But I want: http://nn1.nn2.nn3.nn4?querystring Where is my problem? Please help me. Thanks Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat memory problem ?
Hi all, my system is this: I have a solaris machine (2GB RAM) with apache 1.3.19 and two instances of Tomcat 4.0.3 in a load balancer configuration. I started all three days ago: this morning I have found the two Tomcat dead. All my servlets didn't respond and all the system was dead. It's terrible. Did someone ever have this problem? Often I read in the mail list that there is some problem in memory in Tomcat: is it true? Does someone know something? Bye Laura -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: someone plz help
Have you set the type of the form to Multipart? laura Alle 15:40, martedì 7 maggio 2002, hai scritto: here's what I use. public static void upload ( HttpServletRequest request, String uploadFolder ) throws IOException { String cType = request.getContentType(); if (cType != null cType.toLowerCase().startsWith(multipart/form-data)) { MultipartRequest multi = new MultipartRequest(request, uploadFolder); Enumeration files = multi.getFileNames(); if(!files.hasMoreElements()) { throw new IOException(No files upload); } } else { throw new IOException(Invalid Content type: + cType); } } -Original Message- From: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 12:03 AM To: [EMAIL PROTECTED] Subject: someone plz help i have set multipart/form-data tag in my html form. i need to get a form filled in by the visitors and also an attachment on the same form (file upload). i am using oreilly classes. problem is when i try to get data + file on the server using MultipartRequest class of oreilly i get the error content type is not multipart. I am using MultipartRequest class getParameter function to get the data, and the file upload works as usual. Any Ideas why this error is occuring. Plz help. Thanx in advance. = # Lalit Nagpal # __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help me: URGENT!!!
But I dont't want my IP. I presume that .getLocalHost() in my servlet gives me my IP. I want the Ip address of the requesting server (and not my IP or IP cost client = user). Thanks Laura Alle 12:03, venerdì 3 maggio 2002, Anton Schoultz ha scritto: Hi Laura, Have a look at the class java.net.InetAddress, it has a method .getLocalHost() which returns the local host's IP address. Kindest Regards Anton Schoultz Rubico (Pty) Ltd Cell Phone: +27 83 651 7191 Tel: +27 (11) 808 1000 Fax: +27 (11) 808 1101 mailto:[EMAIL PROTECTED] www.Rubico.com The Business Component Company -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Fri 03 May 2002 11:18 To: [EMAIL PROTECTED] Subject: Help me: URGENT!!! Hi all, please help me!! I'll explain you my problem. I have a servlet which has to recognize two ip addresses. If the servlet finds that the request is from the IP1 (server1), it sets a shop login variable to x, else if the request IP is IP2 (server2) it sets the shop login to . The problem is this: the ecommerce page is on a machine 1 while the pay gateway is on the machine2 (my servlets). The user buys something on the machine 1 and when he has to pay he is redirected to my servlet on machine 2. I use this instructions for distinguishing the request IP: String senderIP = request.getRemoteAddr(); BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1 or server2 with two shop login different). How can I know the request ip of my server? Please help me! Thanks for your help Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Help me: URGENT!!!
Hi all, please help me!! I'll explain you my problem. I have a servlet which has to recognize two ip addresses. If the servlet finds that the request is from the IP1 (server1), it sets a shop login variable to x, else if the request IP is IP2 (server2) it sets the shop login to . The problem is this: the ecommerce page is on a machine 1 while the pay gateway is on the machine2 (my servlets). The user buys something on the machine 1 and when he has to pay he is redirected to my servlet on machine 2. I use this instructions for distinguishing the request IP: String senderIP = request.getRemoteAddr(); BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1 or server2 with two shop login different). How can I know the request ip of my server? Please help me! Thanks for your help Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: SV: Help me: URGENT!!!
Hi Mikael, I have two clients (company A and company B): each company use one interface and when the user has to pay, the compnay (A or B) calls my sistem(servlets with tomcat and apache). I'd like to distinguish A or B by IP address but when I call request.getRemoteAddr() in my servlet I take the user IP (browser). How can I take the IP of server to distinguish between A or B? How can I use InetAddress? Thanks Laura Alle 11:28, venerdì 3 maggio 2002, Mikael Helbo Kjær ha scritto: I don't really understand your application (I guess you know that you can get the server ip via InetAddress ). Otherwise you are aware that unless it is a server side forward or include (instead of a send redirect) then the browser is actually your client. More importantly you could add some parameter on server-1 to identify to server-2 what it is. Best regards Mikael please help me!! I'll explain you my problem. I have a servlet which has to recognize two ip addresses. If the servlet finds that the request is from the IP1 (server1), it sets a shop login variable to x, else if the request IP is IP2 (server2) it sets the shop login to . The problem is this: the ecommerce page is on a machine 1 while the pay gateway is on the machine2 (my servlets). The user buys something on the machine 1 and when he has to pay he is redirected to my servlet on machine 2. I use this instructions for distinguishing the request IP: String senderIP = request.getRemoteAddr(); BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1 or server2 with two shop login different). -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Help me: URGENT!!!
Ok, this is a way. But is there a way without any additional parameter, exspecially in the query string? Bye Laura Alle 12:06, venerdì 3 maggio 2002, Øyvind Vestavik ha scritto: I'm no expert, but in the request from the e-commerce server you could set an additional parameter with the IP of this that machine, something like http://server2.com/mypaymentservlet?requestingServer=129.241.345 Then you could retrieve this attribute in the servlet on the payment gateway with String ip = request.getAtttribute(requestingServer); That is if you can modify things on the e-commerce server.. Maybee there is a better way, but I don't see it straight away.. Øyvind Vestavik Øvre Møllenberggt 44b 7014 Trondheim [EMAIL PROTECTED] 41422911 On Fri, 3 May 2002, Laura wrote: Hi all, please help me!! I'll explain you my problem. I have a servlet which has to recognize two ip addresses. If the servlet finds that the request is from the IP1 (server1), it sets a shop login variable to x, else if the request IP is IP2 (server2) it sets the shop login to . The problem is this: the ecommerce page is on a machine 1 while the pay gateway is on the machine2 (my servlets). The user buys something on the machine 1 and when he has to pay he is redirected to my servlet on machine 2. I use this instructions for distinguishing the request IP: String senderIP = request.getRemoteAddr(); BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1 or server2 with two shop login different). How can I know the request ip of my server? Please help me! Thanks for your help Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Fwd: Re: Help me: URGENT!!!
But I dont't want my IP. I presume that .getLocalHost() in my servlet gives me my IP. I want the Ip address of the requesting server (and not my IP or IP cost client = user). Thanks Laura Alle 12:03, venerdì 3 maggio 2002, Anton Schoultz ha scritto: Hi Laura, Have a look at the class java.net.InetAddress, it has a method .getLocalHost() which returns the local host's IP address. Kindest Regards Anton Schoultz Rubico (Pty) Ltd Cell Phone: +27 83 651 7191 Tel: +27 (11) 808 1000 Fax: +27 (11) 808 1101 mailto:[EMAIL PROTECTED] www.Rubico.com The Business Component Company -Original Message- From: Laura [mailto:[EMAIL PROTECTED]] Sent: Fri 03 May 2002 11:18 To: [EMAIL PROTECTED] Subject: Help me: URGENT!!! Hi all, please help me!! I'll explain you my problem. I have a servlet which has to recognize two ip addresses. If the servlet finds that the request is from the IP1 (server1), it sets a shop login variable to x, else if the request IP is IP2 (server2) it sets the shop login to . The problem is this: the ecommerce page is on a machine 1 while the pay gateway is on the machine2 (my servlets). The user buys something on the machine 1 and when he has to pay he is redirected to my servlet on machine 2. I use this instructions for distinguishing the request IP: String senderIP = request.getRemoteAddr(); BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1 or server2 with two shop login different). How can I know the request ip of my server? Please help me! Thanks for your help Laura --- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Help me: URGENT!!!
Hi Michael, I presume that the only way solving my problem is introducing an additional parameter in the query string. sigh, sigh, sigh Bye and thanks everybody Laura Alle 12:28, venerdì 3 maggio 2002, Mikael Helbo Kjær ha scritto: I have two clients (company A and company B): each company use one interface and when the user has to pay, the compnay (A or B) calls my sistem(servlets with tomcat and apache). I'd like to distinguish A or B by IP address but when I call request.getRemoteAddr() in my servlet I take the user IP (browser). How can I take the IP of server to distinguish between A or B? How can I use InetAddress? Then it seems you're in a bit of trouble. How does this redirect happen? Is it their servers redirecting to a user interface on your server or is it more something like their server's calling RequestDispatcher.forward? It is an sendRedirect on their server, then you're in trouble, because then you would have to add some demarcation information onto the request to identify the server. This is needed because a send redirect in HTTP terms means that the user's browser is sent a HTTP header and then goes over to your server with the request. If it is someother way I can't really help you. Mikael -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
SOLVED [PLEASE HELP ME: JNDI ERROR 1]
Hi all, I solved my problem with Oracle 8.1.6 and JNDI. I remember you the problem was that when I tried to execute Connection con = ds.getConnection() (where ds is a DataSource token by JNDI) I receved: Network Adapter could not establish the connection. Well first a couple of considerations: 1) I discovered that this problem is not specific of Oracle 8.1.6 but it can occure with Oracle 8.1.7. 2) The version of driver (classes12.zip) is important but with the correct version of driver the error persist. At least the solution. In the server.xml where you set your JNDI connection, the value of DriverName isn't jdbc:oracle:thin:@HOST:PORT:SID but the correct string is: jdbc:oracle:thin:@(description=(address=(host=HOST)(protocol=tcp)(port=PORT))(connect_data=(sid=SID)(SERVER=DEDICATED))) whre the part SERVER=DEDICATED is very very very important. I hope this can help someone. Thanks everybody who helped me. Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: PLEASE HELP ME: JNDI ERROR 1
Hi all, this morning I have discovered that my oracle version is 8.1.6. Then I have taken the jdbc classes12.zip for 8.1.6 but the result is the same: Errore = java.sql.SQLException: Eccezione IO: The Network Adapter could not establish the connection Eccezione IO: The Network Adapter could not establish the connection I'm without words: is there some JNDI problem for oracle 8.1.6? I have also seen network.log of oracle but it doesn't say anything (there is the connection of tomcat (my IP) but no error, I think). Can someone help me ? Please help Laura Alle 20:43, lunedì 15 aprile 2002, hai scritto: Thats a very good point. Also, look for any other old set of classes which Tomcat is picking up. Which may mean JNDI related classes too. I dont know if this would work but, change the time stamp's of all tomcat related .xml files by making a small change like adding a space, pressing enter etc and see if it makes any difference. regards hemant - Original Message - From: Angel Municio [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 15, 2002 1:00 PM Subject: RE: AW: PLEASE HELP ME: JNDI ERROR 1 If the Oracle database that you are trying to connect to is a different version than the old one, check for updated Oracle jdbc drivers (classes12.zip). I have found that there are many releases of this file, and newer releases are not always backwards compatible. For instance, classes12.zip that work well with 8i do not work well with 9i. angel -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 12:48 PM To: Tomcat Users List Subject: Re: AW: PLEASE HELP ME: JNDI ERROR 1 look in the tnslistener network log to see if tomcat is getting to the machine correctly. If not, it's most likely a typo someplace. If it is, the log will give you more data to debug the problem. peter lin Laura wrote: But I have controlled all. If I try to connect with sql plus, I connect to the db. Any suggestions? Laura Alle 18:30, lunedì 15 aprile 2002, hai scritto: You said that you changed user, password, and url. I would suspect, that you mistyped either the name of the server or the port or that your new database is using different parameters than your old one. -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 15. April 2002 18:26 An: Tomcat Users List Betreff: PLEASE HELP ME: JNDI ERROR 1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
PLEASE HELP ME: JNDI ERROR
Hi all, I have found a very strange error: I have configured a indi connection (with Oracle) and all was ok. Now I have to change db: so I have changed server.xml (the part regarding JNDI connection). I have restarted Tomcat (4.0.2) and it gives me an error, a very strange error: [ERRORE] Error= java.sql.SQLException: Eccezione IO: The Network Adapter could not establish the connection Exception IO: The Network Adapter could not establish the connection I don't know why? I have only changed the db parameter (user,pass, url). Please help me!!! Thanks Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
PLEASE HELP ME: JNDI ERROR 1
Other information because I don't know what to do. The exception is created when I call my function getConnection(). The code is when I execute con = ds.getConnection();. The code is: static { try { Context initCtx = new InitialContext(); System.out.println([DEBUG] Dopo l'InitialContext = + initCtx.toString()); Context envCtx = (Context) initCtx.lookup(java:comp/env); System.out.println([DEBUG] Dopo lookup java:comp/env = + envCtx.toString()); DataSource ds = (DataSource) envCtx.lookup(dbName); System.out.println([DEBUG] Datasource = + ds.toString()); con = ds.getConnection(); if (con == null) System.out.println([ERROR] Connessione nulla); } catch (Exception ex) { System.out.println([ERROR] Errore = + ex.toString() + \n + ex.getMessage()); con = null; } } protected synchronized Connection getConnection() { while (conFree == false) { try { wait(); } catch (InterruptedException e) { System.out.println([ERROR] Eccezione nella getConnection() = + e.toString()); } } conFree = false; System.out.println([DEBUG] Punto 1); notify(); System.out.println([DEBUG] Punto 2); return con; } Please help me. Before this code was ok. Has someone some idea? Help. Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: PLEASE HELP ME: JNDI ERROR 1
But I have controlled all. If I try to connect with sql plus, I connect to the db. Any suggestions? Laura Alle 18:30, lunedì 15 aprile 2002, hai scritto: You said that you changed user, password, and url. I would suspect, that you mistyped either the name of the server or the port or that your new database is using different parameters than your old one. -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 15. April 2002 18:26 An: Tomcat Users List Betreff: PLEASE HELP ME: JNDI ERROR 1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: PLEASE HELP ME: JNDI ERROR 1
Where is nslistener network log ? This log file is on the server (where oracle is installed) or on the client? Can you explain me where it is and what I should have to find? Laura Alle 18:48, lunedì 15 aprile 2002, peter lin ha scritto: look in the tnslistener network log to see if tomcat is getting to the machine correctly. If not, it's most likely a typo someplace. If it is, the log will give you more data to debug the problem. peter lin Laura wrote: But I have controlled all. If I try to connect with sql plus, I connect to the db. Any suggestions? Laura Alle 18:30, lunedì 15 aprile 2002, hai scritto: You said that you changed user, password, and url. I would suspect, that you mistyped either the name of the server or the port or that your new database is using different parameters than your old one. -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 15. April 2002 18:26 An: Tomcat Users List Betreff: PLEASE HELP ME: JNDI ERROR 1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: PLEASE HELP ME: JNDI ERROR 1
I think that the context is ok bacause the log file (catalina.out) tells me: [DEBUG] InitialContext = javax.naming.InitialContext@46110f9b [DEBUG] lookup java:comp/env = org.apache.naming.NamingContext@3700f9b [DEBUG] Datasource = Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. So ds isn't empty: the exception is thrown when I call: Connection con = ds.getConnection(); The Datasource is Tomcat's Datasource ( I have followed jndi tutorial) Laura Alle 18:54, lunedì 15 aprile 2002, hai scritto: Put a break point in between and examine Context and its contents. Also check the spelling/case of datasource lookup name. If you are creating the Datasource yourself, check for any exceptions during its registration. If the DS is on an application server, talk to your Server admin. regards hemant - Original Message - From: Laura [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 15, 2002 12:25 PM Subject: PLEASE HELP ME: JNDI ERROR 1 Other information because I don't know what to do. The exception is created when I call my function getConnection(). The code is when I execute con = ds.getConnection();. The code is: static { try { Context initCtx = new InitialContext(); System.out.println([DEBUG] Dopo l'InitialContext = + initCtx.toString()); Context envCtx = (Context) initCtx.lookup(java:comp/env); System.out.println([DEBUG] Dopo lookup java:comp/env = + envCtx.toString()); DataSource ds = (DataSource) envCtx.lookup(dbName); System.out.println([DEBUG] Datasource = + ds.toString()); con = ds.getConnection(); if (con == null) System.out.println([ERROR] Connessione nulla); } catch (Exception ex) { System.out.println([ERROR] Errore = + ex.toString() + \n + ex.getMessage()); con = null; } } protected synchronized Connection getConnection() { while (conFree == false) { try { wait(); } catch (InterruptedException e) { System.out.println([ERROR] Eccezione nella getConnection() = + e.toString()); } } conFree = false; System.out.println([DEBUG] Punto 1); notify(); System.out.println([DEBUG] Punto 2); return con; } Please help me. Before this code was ok. Has someone some idea? Help. Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: PLEASE HELP ME: JNDI ERROR 1
I use classes12.jar (classes12.zip): well, the database my examples was ok with, was 8i. My new database I don't know what version is: if it was 9i which driver I should use? Laura Alle 19:00, lunedì 15 aprile 2002, hai scritto: If the Oracle database that you are trying to connect to is a different version than the old one, check for updated Oracle jdbc drivers (classes12.zip). I have found that there are many releases of this file, and newer releases are not always backwards compatible. For instance, classes12.zip that work well with 8i do not work well with 9i. angel -Original Message- From: peter lin [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 12:48 PM To: Tomcat Users List Subject: Re: AW: PLEASE HELP ME: JNDI ERROR 1 look in the tnslistener network log to see if tomcat is getting to the machine correctly. If not, it's most likely a typo someplace. If it is, the log will give you more data to debug the problem. peter lin Laura wrote: But I have controlled all. If I try to connect with sql plus, I connect to the db. Any suggestions? Laura Alle 18:30, lunedì 15 aprile 2002, hai scritto: You said that you changed user, password, and url. I would suspect, that you mistyped either the name of the server or the port or that your new database is using different parameters than your old one. -Ursprüngliche Nachricht- Von: Laura [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 15. April 2002 18:26 An: Tomcat Users List Betreff: PLEASE HELP ME: JNDI ERROR 1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
upgrade
Hi all, I have a question regarding how to upgrade tomcat. I think this problem is common to everyone because tomcat is a servlet engine which is in constant evolution. So for example I have apache + tomcat 4.0.2 with my web applications under /webapps: how can I upgrade to tomcat 4.0.3, which solves some bugs, without reinstalling all ( and configure workers.properties, servlet.xml, web.xml, ) ? I think this is an important point because people can be discourage using tomcat if it's difficult to upgrade. Thanks for your help Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IP Enter
Hi all, I have a question. I'm using tomcat 4.0.2 with apache 1.3.23: I'd like to be able to receive requests only from four IPs. Now I 'm doing it in the servlet but it would be better if there is some configuration to set in tomcat. How can I do this with Tomcat? Thanks for your help Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat Nobody
Hi all, I have followed your advice and it seems ok! Tomcat is started (with apache ). In my configuration I have apache + two tomcat (4.0.3) with load balacing (I use mod_jk). I have seen, with top command, all my resources taken by the two tomcat. Is it normal? Must I configure something? Thanks Laura Alle 14:17, venerdì 29 marzo 2002, hai scritto: I have two cosiderations about your Tomcat-nodody advices: 1) There is no tomcat4.conf in conf directory. 2) Your advice is to do - chown nobody:nobody /usr/local/tomcat1 - su -l -c /usr/local/tomcat1/bin/startup.sh There is a big problem with this procedure, in my opinion: the problem is a security problem. We know that Apache runs as nobody, but the directories are root:root. The father process forks child processes which are nobody, so if someone tries to execute a cgi, this has no privilegy. But if you execute chown nobody:nobody /usr/local/tomcat1, all directories are nobody, so anyone can write e do everything. I'd like starting tomcat as apache, with the same security policy. First of all, you need to know what you'll be protecting and from whom. I'd suggest user tomcat and group tomcat. The vital directories should be owned by root:tomcat. The files should be accessable to tomcat user (which should be in group tomcat). chown -R root:tomcat $CATALINA_HOME find $CATALINA_HOME -type f -exec chmod 640 {} \; find $CATALINA_HOME -type d -exec chmod 750 {} \; chmod 750 $CATALINA_HOME/bin/*.sh This way, only members of tomcat group can access those files. They should not be world readable, especially ./conf/, since you could be storing sensitive data there (database connection parameters, passwords, etc.). After this, you should be able to run Tomcat under user tomcat. One word of caution: only root can open ports below TCP:1024. So, setting up a HTPP connector on port 80 will fail. 8080 and WARP should be fine. This idea can be developed further, with virtual hosts placed in separate user accounts, both for Apache and Tomcat. The question of access will arise, of course. Owners of virtual hosts shouldn't be in tomcat group. A directory where they would deploy their web applications should be accessable by Tomcat, but they should be able to upload content to it as well. Nix. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: how to deploy WebApps in apache's UserDir's ?
Hello Daniel, I think the Warp connector has problems with absolute path names try this... - depending on where your tomcat webapps directory is WebAppDeploy /../../../home/laura/www/jsp conn /jsp dingdingding! It works! Thanx for the tip! Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: catalina.policy: file:?
Hello Roshan, first of all thank you very much for your engagement. If you could post your policy file and a decent chunk of your log output, it might help :-) My policy file is the standard-file from the distribution with just two changes: // These Permissions are in the default-grant-section permission java.net.SocketPermission localhost:3306, connect,resolve; permission java.net.SocketPermission 127.0.0.1:3306, connect,resolve; ...and below: grant codeBase file:${doc.root}/- { permission java.io.FilePermission ${doc.root}/-, read, write, delete; }; (as mentioned before) The decent chunk of my logfile I have attached as catalina.out.txt. When you take a look at this file it seems, that the webapp doesn't see my second grand-entry :-((( Thanks for any help! Laura access: access denied (java.io.FilePermission C:\Programme\ApacheGroup\jakarta-tomcat-4.0.1\webapps\jspMyAdmin\logs\parse_time_log write) java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:993) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:261) at java.security.AccessController.checkPermission(AccessController.java:399) at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.SecurityManager.checkWrite(SecurityManager.java:978) at java.io.FileOutputStream.init(FileOutputStream.java:96) at java.io.FileWriter.init(FileWriter.java:52) at com.jspmyadmin.jspMyAdminLogWriter.init(jspMyAdminLogWriter.java:43) at org.apache.jsp.main$jsp._jspService(main$jsp.java:2156) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) 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.access$0(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at java.lang.Thread.run(Thread.java:484) access: domain that failed ProtectionDomain (file:/C:/Programme/ApacheGroup/jakarta-tomcat-4.0.1/webapps/jspMyAdmin/WEB-INF
Re: how to deploy WebApps in apache's UserDir's ?
Hello Dom, I tried WebAppDeploy test/servlet/HelloWorldExample conn /testurl WebAppDeploy /../../../test/WEB-INF/HelloWorldExample conn /testurl but none of them worked. about the second WebAppDeploy: Try to remove the leading Slash. HTH Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: how to deploy WebApps in apache's UserDir's ?
Hello Dom, Where was your class or jar file (absolute path) you mean my JSP-Files!?? /home/laura/www/jsp/ and what your WebAppDeploy looked like? WebAppDeploy ../../../../home/laura/www/jsp conn /jsp HTH Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: catalina.policy: file:?
Hello Roshan, So the grant in the snippet below uses a file URL to give classes from the ${work.dir} read access to all files under ${doc.root} directory and read, write, delete access to files under ${work.dir} directory. The - following the / refers to all files in a directory and all its subdirectories I think I understand that. But why doesn't this work for me: ---snip--- grant codeBase file:${doc.root}/- { permission java.io.FilePermission ${doc.root}/-, read, write, delete; }; /---snip--- Shouldn't this grand _any_ file (Servlet, JSP-File) in the filesystem under ${doc.root} the rights to read, write und delete _any_ file in the filesystem under ${doc.root}??? What I get is: java.security.AccessControlException: access denied (java.io.FilePermission C:\Programme\ApacheGroup\jakarta-tomcat-4.0.1\webapps\jspMyAdmin\logs\parse_time_log write) Helpless... Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Give webapps FilePermissions in catalina.policy
Hello list, I'm using Tomcat4.0.1 with the -security-option. Now I want every webapp to have the read- and write--FilePermission to the files in it's own Doc-Root. I tried the following in catalina.policy: ---snip--- // These permissions are granted by default to all web applications // In addition, a web application will be given a read FilePermission // and JndiPermission for all files and directories in its document // root. grant { [...] // Set FilePermission for Files in own doc-root permission java.io.FilePermission ${doc.root}/-, read, write; }; /---snip--- Unfortunately it doesn't seem to work. For example with jspMyAdmin (http://sourceforge.net/projects/jspmyadmin) I get the following error: ---snip--- java.security.AccessControlException: access denied (java.io.FilePermission C:\Programme\ApacheGroup\jakarta-tomcat-4.0.1\webapps\jspMyAdmin\logs\parse_time_log write) The exception class was : class java.security.AccessControlException /---snip--- The Security-Manager won't let the webapp write the Logfile. Anyone with an idea for me? RTFM wellcome! Ciao Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Give webapps FilePermissions in catalina.policy
Hello Frank, hello list, I believe the syntax is a bit different for web apps as indicated by the example in the file. Here is my spec for AllPermission for myApp. You should be able to modify it for your purposes: grant codeBase file:${catalina.home}/webapps/myApp/- { permission java.security.AllPermission; }; thank you very much for the code! When I modify my catalina.policy to: ---snip--- grant codeBase file:${catalina.home}/webapps/jspMyAdmin/- { permission java.security.AllPermission; }; /---snip--- ...the application works. But giving AllPermission certainly isn't what I want. So I tried this: ---snip--- grant codeBase file:${catalina.home}/webapps/jspMyAdmin/- { permission java.io.FilePermission file:${catalina.home}/webapps/jspMyAdmin/-, read, write, delete; }; /---snip--- Here I get the error again: ---snip--- java.security.AccessControlException: access denied (java.io.FilePermission C:\Programme\ApacheGroup\jakarta-tomcat-4.0.1\webapps\jspMyAdmin\logs\parse_time_log write) ---snip--- Is there any other Permission I have to set to make my applications make writing files? Besides with this approach I have to make an entry for every application. Isn't there a way to say: Give any webapp the FilePermissions read, write und delete for the files in the specific doc-root.? Thanx again Laura -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
tomcat problems with double-byte form data?
Hi. I'm having problems when I try to submit double-byte form elements using "method=post" and using Tomcat 3.2.1 and Win NT 4.0. In earlier versions of our product, we used Jrun as the servlet engine. With Jrun, we ended up having to use the Javascript "escape()" function to encode the double-byte form elements. Once we did that, everything worked fine. If we try to use the Javascript "escape()" function with Tomcat, we get a java.lang.IllegalArgumentException: Decode Error at org.apache.tomcat.util.RequestUtil.unUrlDecode(RequestUtil.java: 353). If we don't use the escape function, the double-byte stuff ends up as the ever-popular ??? garbage. I found a patch for Tomcat 3.2.1 that was supposed to fix a some kind of bug for multi-byte characters, but it didn't help. Any ideas? -- Laura E. Lent [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: ROOT-Servlets not found
I found the following message in the mail archive, but with no reply. As I have exactly the same problem, I would very much like to know what the answer is. Thanks Laura Foster Hello, this is the problem I have: I'm using Tomcat with Apache. All my static-files I put into the path TOMCAT_HOME\webapps\ROOT. The Servlets into this web-inf\classes. The static files should be served by apache. Into the httpd.conf I wrote: ... DocumentRoot "C:/programme/apachgroup/jakarta-tomcat/weapps/ROOT" ... Include ...\mytomcat-apache.conf the mytomcat-apache.conf: ... Location /WEB-INF/ AllowOverride None deny from all /Location LocationMatch /*.jsp SetHandler jserv-servlet /LocationMatch ApJServMount /servlets /ROOT the servlet.xml: ... Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" /Context ... When I'm trying to invoke Servlets in the example-webapp everything works fine. Also the serving of the static-files are working properly, but the servlets I want to open by eg. http://localhost/servlets/IsItWorking a 404-error is coming up. What am I doing wrong? Thanks for every help Maik The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Capital Markets Company. http://www.capco.com ***