Re: PLEASE HELP ME: JNDI ERROR 1
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
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] -- 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: someone....need help!!!!....
Hi 2 Options: 1Search for the Work Folder under tomcat. Check for a folder that has the same name as Tomcat. Delete the .java and JSP file of the page you want to test. 2Open the JSp you want to test, hit enter somewhere in between the lines. This way you can force a re-compile on the JSP. possible silly mistake Make sure that you are changing the right JSP in the right directory.(Especially when you maintain copies, silly mistakes do happen.) later hemant - Original Message - From: ajith kondapalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 11:28 AM Subject: someoneneed help hai, I have just started using tomcat to deploy some webapps...the problem:I create the webapps for the first time and deploy them,it saves the changes and runs properly..but later changes in the JSP i am makin are not reflected in the outputso if i run the program for the first time then it shows the changes but later after i make some changes and run it the second time,it doesnt reflect those changesi dont undertsand what the problem issomeone plz help...!!! thanks ajith __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- 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: java.lang.ClassFormatError out of the Blue
Jason Thanks for the response. The absence of scripts in binary mode clearly justifies the exception. Iam trying to run it in my own Test Environment. And moreover, the .class files are in the repository. Even if I export them, they seem to get exported in corrupted format. Iam trying to export .Java files, delete project from workspace/repository, and import all the java files again. Hoping that would work. Regards hemant - Original Message - From: Jason Koeninger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:56 PM Subject: Re: java.lang.ClassFormatError out of the Blue This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant --- - root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servl et.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void
Re: someone....need help!!!!....
Good POint Sean Yep, I think this could be the case. If Jsp1 is included in Jsp2, then any changes to JSP1 wont be visible if JSP2 is not changed. later hemant - Original Message - From: Sean LeBlanc [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 3:47 PM Subject: RE: someoneneed help I'm not sure, but it sounds like what happens to me when I have one jsp included by another, and the jsp doing the including has not changed. I find that in this case the new included jsp is not used. Try touching the including (parent) jsp file if this is the case. -Original Message- From: ajith kondapalli [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 10:00 AM To: Tomcat Users List Subject: Re: someoneneed help hai, I have tried stoppin the server and restarting it agin..but of no use...i also renamed the file(another name) and compiled the JSP but it didnt work.but when i remove the JSP file in /tomcat/work i get an error sayin that there is no file ajith --- Giorgio Ponza [EMAIL PROTECTED] wrote: Sometimes happens also to me. My solution is to empty the folder /tomcat/work so Tomcat must recompile it. But i think some gurus here have a better solution. Giorgio - Original Message - From: ajith kondapalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 5:28 PM Subject: someoneneed help hai, I have just started using tomcat to deploy some webapps...the problem:I create the webapps for the first time and deploy them,it saves the changes and runs properly..but later changes in the JSP i am makin are not reflected in the outputso if i run the program for the first time then it shows the changes but later after i make some changes and run it the second time,it doesnt reflect those changesi dont undertsand what the problem issomeone plz help...!!! thanks ajith __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- 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] __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- 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] _ 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]
java.lang.ClassFormatError out of the Blue
I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request
Re: java.lang.ClassFormatError out of the Blue
Jay I think I was not clear, I meant Visual Age Repository. Thanks for your response. Regards hemant - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:32 PM Subject: RE: java.lang.ClassFormatError out of the Blue Are you saying that the .class files are in a source control repository? If they are stored in CVS, make sure you check them out with the binary flag set. (-kb) If you don't do this your .class will probably be corrupted. --Jay Gardner -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:07 PM To: Tomcat Users List; Jason Koeninger Subject: Re: java.lang.ClassFormatError out of the Blue Jason Thanks for the response. The absence of scripts in binary mode clearly justifies the exception. Iam trying to run it in my own Test Environment. And moreover, the .class files are in the repository. Even if I export them, they seem to get exported in corrupted format. Iam trying to export .Java files, delete project from workspace/repository, and import all the java files again. Hoping that would work. Regards hemant - Original Message - From: Jason Koeninger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:56 PM Subject: Re: java.lang.ClassFormatError out of the Blue This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant --- - root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm
Re: someone....need help!!!!....
Ok I think its different from jsp inclusion case but let me clarify Here is your case dbquery.jsp -submit on dbquery.jsp addproc.jsp Here is what Sean suggested ((jsp1) jsp2) (here there is no question of one invoking the other.) If JSP1 changes, JSP2 also has to change because jsp2 includes jsp1 . If the above description is correct, then we are talking 2 different scenarios. In the first scenario changes in 2 JSP's can be viewed independent of each other. If you make changes to addproc.jsp and still dont see it, then check the JSP. I wonder if you have some kind of scriptlet/logic tag that has to evaluate to something for your changes to kick off? or could it be that your changes are throwing an exception, you are catching them in the scriptlet and doing nothing with it? If you have an IDE such as Visual Age, switch the JSP debugger on and debug the part where u expect a change. Regards hemant - Original Message - From: ajith kondapalli [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 7:02 PM Subject: Re: someoneneed help hai, This is really the case for me...i have a parent JSP called dbquery.jsp which calls a child jsp addproc.jsp(addproc.jsp is invoked by the submit botton)...so if i run as http://localhost:8080/webapps/work...the changes i am making in addproc.jsp are not being reflectedcan u guys please elaborate on how to rectify this thanking u Ajith --- hemant [EMAIL PROTECTED] wrote: Good POint Sean Yep, I think this could be the case. If Jsp1 is included in Jsp2, then any changes to JSP1 wont be visible if JSP2 is not changed. later hemant - Original Message - From: Sean LeBlanc [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 3:47 PM Subject: RE: someoneneed help I'm not sure, but it sounds like what happens to me when I have one jsp included by another, and the jsp doing the including has not changed. I find that in this case the new included jsp is not used. Try touching the including (parent) jsp file if this is the case. -Original Message- From: ajith kondapalli [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 10:00 AM To: Tomcat Users List Subject: Re: someoneneed help hai, I have tried stoppin the server and restarting it agin..but of no use...i also renamed the file(another name) and compiled the JSP but it didnt work.but when i remove the JSP file in /tomcat/work i get an error sayin that there is no file ajith --- Giorgio Ponza [EMAIL PROTECTED] wrote: Sometimes happens also to me. My solution is to empty the folder /tomcat/work so Tomcat must recompile it. But i think some gurus here have a better solution. Giorgio - Original Message - From: ajith kondapalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 5:28 PM Subject: someoneneed help hai, I have just started using tomcat to deploy some webapps...the problem:I create the webapps for the first time and deploy them,it saves the changes and runs properly..but later changes in the JSP i am makin are not reflected in the outputso if i run the program for the first time then it shows the changes but later after i make some changes and run it the second time,it doesnt reflect those changesi dont undertsand what the problem issomeone plz help...!!! thanks ajith __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- 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] __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- 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
Re: Adobe Acrobat
Use Cocoon for a FOP based solution . If you want to keep things simple, use iText . Although it was not sophisticated/XML/XSL based it did an extremely good job when it generated PDF. It uses java classes to render pdf docs. I have successfully incorporated it in my webapp. http://www.lowagie.com/iText/ Thanks to Bruno Lowagie and Paulo Soares Regards hemant - Original Message - From: Ravindra K. Bhat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 08, 2002 5:39 PM Subject: Adobe Acrobat Hi: How do I render my html pages to pdf for printing. My servelet generated html table is too wide and columns get cut off if I print directly using the print icon on the browser... Thanks -- 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]
help with diretories in servlets
Hi ! I am trying to create a samll web application which will query the database depending upon the input parameters provided, generates XML file from the Result Set, applies XSLT and generates HTML, which in turn I want to display in a frame. I want to organize those files in following way relative to my web application path. Reports ( my root path ) | | - forms ( which will contain forms to accept input parameters ) | - xml ( which will store converted XML file from the Result Set ) | - xslt ( which will contain pre generated XSLT files ) | - html ( which will store transformed HTML file ) I am initializingfollowing variables _xsltFileName = request.getContextPath() + \\xslt\\newCommodities.xslt ; _xmlFileName = request.getContextPath() + \\xml\\newCommodities.xml ; _htmlFileName = request.getContextPath() + \\html\\newCommodities.html ; and using following code to transform and display HTML. transformXML( _xmlFileName, _xsltFileName, _htmlFileName ) ; response.sendRedirect( _htmlFileName ) ; What is wrong with this, as I am not able to create HTML file in /html/ directory, and obviously not able to display the file as it doesn't exist there. Thankyou very much in advance for the help. -Hemant -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
tomcat apache configuration
Hello, I had earlier tomcat 3.2.3 standalone with me running fine where in I could all the application context in server.xml file. now I want to upgrade to Tomcat 3.3 but I find there is no place where I can add the context for the new webapps in th server.xml config file also I am intersted in configuring Apache1.3.22 with Tomcat3.3 Pls let me know step by step procedure for the same Hemant Singal -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: tomcat apache configuration
I am encountering a problem with tomcat 3.2.3 running standalone on windows NT In all jsp I have some gif images and some js files being accessed... now on the Tomcat console window, the below mentioned kind of exception is being displayed though on the browser there is no problem on the page Like on this page I am accessing 2 files date-picker.js and ValidateESRSearch.js 2002-01-09 17:16:44 - Ctx( /testapp ): IOException in: R( /testapp + /Validatelogin.js + null) socket write error (code=10053) 2002-01-09 17:16:44 - Ctx( /testapp ): IOException in: R( /testapp + /scripts/ValidateESR.js + null) socket write error (code=10053) Now the problem is how to suppress theze exception or remove it All the images are in the images sub folder in main folder /testapp All the js scripts are in the scripts sub folder in main folder /testapp I am unable to understand why this socket write error is being displayed -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuring Multiple Tomcat JVMs with Apache - Load Balancing
Hi Tom in my application i want two servers(tomcat 3.2.3) residing on two different machines to cater to requests coming another different machinewhich keeps forwarding the requests to either of the servers.Pls guide how can i achieve the same.I have added two workers in in my workers.properties on the dispatcher machine , but it keeps sending the request to only the first machine. --Hemant - Original Message - From: Tom Drake [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 17, 2001 9:17 PM Subject: Re: Configuring Multiple Tomcat JVMs with Apache - Load Balancing When my work is done, Session Affinity will not be required in order to acheive load balancing. However, we should still want to use session affinity in our load balancing solution(s) for the simple reason that it will perform better. However, the session affinity between Apache and Tomcat 3 locks a user (based on her JSESSIONID) to a single Tomcat instance. Once the distributed session management solution is in place, Apache should 'prefer' NOT 'force' tomcat instance routing. This gives us a real fail-over story. Administrators will be able to bring down Tomcat instances without blowing away 'logged in' users. Tom - Original Message - From: GOMEZ Henri [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Cc: Tomcat Users List (E-Mail) [EMAIL PROTECTED] Sent: Monday, December 17, 2001 12:54 AM Subject: RE: Configuring Multiple Tomcat JVMs with Apache - Load Balancing | there hasn't been done anything on that topic yet ? What's | the status of | loadbalacing, either mod_jk or mod_webapp ? | Is that political due to if loadbalacing is working properly | there won't be | any reason to take (buy) anything else than TC ? | | State of the art is that today only mod_jk could | handle load-balancing and only when connected | to Tomcat 3.2.x or 3.3. | | Tomcat 4.0.x support ajp13 protocol, used in mod_jk | but still miss a subtil feature (jvmroute) to be | able to keep the route to the good JVM in | session mode (SessionAfinity). | | But the current refactory of ajp protocol, | under ajp14 in jakarta-tomcat-connectors, will | fix somedays thanks to Costin and Kevin works :))) | | -- | 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configureing multiple JVMs on Tomcat 3.3
Hi Larry in my application i want two servers(tomcat 3.2.3) residing on two different machines to cater to requests coming another different machinewhich keeps forwarding the requests to either of the servers.Pls guide how can i achieve the same.I have added two workers in in my workers.properties on the dispatcher machine , but it keeps sending the request to only the first machine. --Hemant - Original Message - From: Larry Isaacs [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 17, 2001 6:58 PM Subject: RE: Configureing multiple JVMs on Tomcat 3.3 You would still use two separate server.xml files, such as server1.xml and server2.xml. If you wanted them both to serve the same contexts, you could leave the: ContextXmlReader config=conf/apps.xml / unchanged. If you wanted to serve different contexts, change server1.xml to be: ContextXmlReader config=conf/apps1.xml / and server2.xml to be: ContextXmlReader config=conf/apps2.xml /. The first version reads apps1.xml and all files matching the pattern apps1-*.xml. The second version reads apps2.xml and all files matching the pattern apps2-*.xml. Cheers, Larry -Original Message- From: James Chuang [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 8:32 PM To: Tomcat Users List Subject: Configureing multiple JVMs on Tomcat 3.3 Under Tomcat 3.2.3, I had 2 serverXXX.xml files, and I started 2 instances of Tomcat, each with it's own serverXXX.XML file. This allowed each app to have it's own JVM. Looking at 3.3's documentation, it seems the right way to define contexts is to use app_XXX.XML file in the conf directory, and let tomcat find them directly. Question, does each context have it's own JVM? If not, then how should I create multiple JVMs? It looks like I have to go back to putting the context definition in 2 separate server.XML files, then call them separately, and not use the APP-XXX.XML route, which seems to be the preferred route. Thanks in advance. jchuang -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Configuring Multiple Tomcat JVMs with Apache - Load Balancing
Hi Gomez Can you pls give me some details about thechanges to be incorporated for achieving the load balancing using mod_jk and tomcat 3.2.3 , apache 1.3.12.Pls help as i am badly stuck Thanks in advance Hemant - Original Message - From: GOMEZ Henri [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Cc: Tomcat Users List (E-Mail) [EMAIL PROTECTED] Sent: Monday, December 17, 2001 2:24 PM Subject: RE: Configuring Multiple Tomcat JVMs with Apache - Load Balancing there hasn't been done anything on that topic yet ? What's the status of loadbalacing, either mod_jk or mod_webapp ? Is that political due to if loadbalacing is working properly there won't be any reason to take (buy) anything else than TC ? State of the art is that today only mod_jk could handle load-balancing and only when connected to Tomcat 3.2.x or 3.3. Tomcat 4.0.x support ajp13 protocol, used in mod_jk but still miss a subtil feature (jvmroute) to be able to keep the route to the good JVM in session mode (SessionAfinity). But the current refactory of ajp protocol, under ajp14 in jakarta-tomcat-connectors, will fix somedays thanks to Costin and Kevin works :))) -- 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]
changes in files for supporting multiple tomcats on different machine and one centralized apache
Hi All i have an application using JSP/servlet as the backend tech. and running on tomcat behind apache. Due to the heavy traffic expected for my application (which i am aiming for) , i want one machine to act as dispatcher and remaining three machines to work as servlet response caterers.Pls suggest the changes to be done in different files.to add , i am using apache 1.3.12 and tomcat 3.2.2. its very urgent , so pls guide thanks Hemant
Re: List traffic et al
HI: Heartly agree with yur idea and before this also i keep on getting agree with same kind of ideas but i just dont know who is the moderator of this group and how this can be acheived. Regards Hemant - Original Message - From: Milt Epstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 10:41 PM Subject: Re: List traffic et al On Tue, 3 Jul 2001, Sam Newman wrote: Given the huge amount of traffic this list generates, I can rarely get involved with the discussions that take place. It occurs to me that there sems to be three major discussion themes on the list as a whole: 1.) General servlet/jsp development issues and how tomcat affects them 2.) General tomcat configuration issues 3.) Webserver integration issues I guess as documentation improves (e.g. tomcat book, work by people like Mike Slinn) points 23 will become less of an issue. I'm just wondering if there is any millage in perhaps splitting the list into 2 or 3 lists? Personally, I've got no issues with getting tomcat up and running and so don't care too much about that end of things, however the servlet/jsp development issues is more interesting to me. I don't have too strong an opinion on it, its just that I worry I'm missing some interesting topics because I don't have the time to work though all the posts This idea has come up before, and I think it's one of the best for dealing with the high volume on this list (I guess it's one of the two or three highest volume apache lists). I even volunteered to take the lead in doing this. So I sent a note to the list owner explaining the idea. Unfortunately, I never heard anything back. Without the list owner's cooperation/participation (or someone who can modify the apache/jakarta mailing lists), it won't be possible to do this. So, we could do some work on this (i.e. figuring out what separate lists to have), but unless we know that it's going to come to something, it doesn't make sense to do too much work on it. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
Download via servlet behaviour
Subject: Download using servletHI ALL:My company offers some of it products for download,but we allow only authorized user to access thesedownloads, and for this reason the download is done viaservlets (servlet stream writes the complete file at client end)but i m noting a strange thing in this, when user click on downloadthan a dialog on browser asking them to open or save the file, nowif the user, clicks on cancel than also my servlet executes complete,though the user is infact not downloading the file, It must be becausethat servlet is called as soon as user clicks on download link, BUTthere must be some way out to prevent this,Is there?Is someone else also noted or faced this thing.CheersHemant
Re: multiple resultset
HI : If yu are using more than one resultset at a time than they MUST have there different Statement objects, i.e if yu have created one ResultSet and without closing it yu are creating one more ResultSet n try using previous one also, than this is a problem, So what u do is make different Statement object for them. e.g ResultSet rst1 = stmt1.executeQuery(...); ResultSet rst2 = stmt2.executeQuery(...); And it will work Regards Hemant --- SHASHI PARASHAR [EMAIL PROTECTED] wrote: I am getting problem of opening two resulest. can we open more than 1 resultset in one jsp page. please help me tho solve out this problem __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: How to upload a binary file?
HI Folha: The reason is because yur are using readLine function in your program which can shuffle or make u loose some bytes from the file, This is most likely to occur in binary file, So you need to modify yur program so that yu use read function instead of readLine and it will definetely going to work Regards Hemant --- João_Folha [EMAIL PROTECTED] wrote: Hi there, I am trying to upload a file from the client to the server. But the binary files fail and the text files don´t fail. I use tomcat 3.2.1 with apj12, on NT4.0 The bean and the jsp file i use are in attachment... regards jfolha ATTACHMENT part 2 application/octet-stream name=upload.java ATTACHMENT part 3 application/octet-stream name=doc_entrega_autor.jsp __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Performance of 4b and 3.2.1
HI ALL: tomcat4b is givinga comparatively slower performance than 3.2.1 or NT Server SP5, any suggestion why this is happening Infact there is a lot of difference betwn startup time betwn both and 4b is taking abt 4 times more time for startup than 3.2.1. Regards Hemant
Re: How can I make tomcat to instantiate a class
HI Ghosh: Make a class based on singelton pattern, which handles the all database functionality, place this class in a jar and place it in TOMCAT_HOME/lib Now you all servlets can access this same class file and so using same session, Not sure whether and how jsp can use it, can someone here clear this? Hemant --- Debashis Ghosh [EMAIL PROTECTED] wrote: Hi, Can anyone suggest How can I make tomcat to instantiate a class so that i can access it from my jsp or servlet as an application level variable.Basically i want to instatiate one connection pool class so that i can access it from my servlet to get an connection object out of it. On Wednesday 13 June 2001 06:47 pm, you wrote: Below is good advice. If the login page does not come up (btw, what happens does it just take you direct to the protected resource?) the first place I would look is the tomcat config files. So basically I would double-check server.xml and the web-xml for your app. If you are sure they are correct and you still have a problem you might want to try posting the relevant sections to the list. If you do get JDBCRealm working with tomcat standalone then to integrate with apache you need to add JkMount /examples/jsp/security/login/j_security_check ajp13 (or ajp12 if using mod_jserv) to httpd.conf to tell apache to delegate the handling of this bit of magic to tomcat. andrew On Wed, 13 Jun 2001, you wrote: Mark, I appreciate your help. I have tried to adapt the examples and I believe I have everything in place. However, apache just wont bring the login form when I try to access a protected resource. Would you have any idea where to look at for this problem? You might want to check and see if you can get a JDBCRealm to work with tomcat standalone(i.e. accessing you site as http://localhost:8080/... directly). If this doesn't work get this working first and that's a good place to start from. Once you have JDBCRealm working correctly then you can deal with making sure it works when passed through apache. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Problem in access control of resources
HI Again Pankaj: When it comes to rendering of browser, i will say it all depends on headers that you send it from servlet, if send the right header applicable for word ( i guess "application/doc", if not let me know i will checkout and find the correct one for u), than there is just no reason that why browser will not render it as a doc file, But here you are not only making ur website platform dependent but also browser dependent as in case of IE it is offcourse capable of opening the word file as inprocess because of IE have a plugin for it, But what about Netscape, he will offcourse bring the dialog box asking the user that whether he wishes to download it or not(Whatever) Regards Hemant - Original Message - From: Pankaj Chhaparwal To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 10:25 AM Subject: Re: Problem in access control of resources Hi Hemant,The user should have both the options to view it or download it. The problem with streaming is that it is somewhat slow(since you have to first read it and then write it in a stream).The second issue is that for e.g. if I read a word document in a stream and then write it in a stream , the browser doesnt know that its a word document and just renders it as a txt document. In the case of word docs and xls the output on the browser is all junk. Please let me know what you think on this.Thanks a lot for your help Hemant.Regards,PankajAt 06:43 PM 2/10/2000 +0530, you wrote: HI Pankaj:How you transfer the word documents to the client? I mean you expect user to download it, or view it in there web browser?In both ways what you can do is that instead of redirecting the client to word files, you read those word files in your jsp or servlet and write that file to users stream, And as you jsp or servlet will always have maintained in session(or whatever) that user has logged in or not, so i guess this will solve your problem.Regards,Hemant - Original Message - From: Pankaj Chhaparwal To: [EMAIL PROTECTED] Sent: Sunday, June 10, 2001 7:58 AM Subject: Problem in access control of resources Hi All, Servlet spec 2.2 states I am using Apache and Tomcat to build my website. The adapter is JServ.I have certain word documents which have to be displayed on the browser on demand from the end user. I dont want to end users to view these documents unless they have logged into the system. What happens right now is that user can see the url of word document when the jsp redirects him to word document on receiving the request. He can then access the document from the webserver even if he has not logged into the website. Is there anyway I can prevent this from happening? Ideally I would like Apache to serve all the word documents since they are static files. But I am also considering Tomcat to serve this file. Also I have another question on access control. Servel 2.2 spec states the following Access control for resources: The mechanism by which interactions with resources are limited to collections of users or programs for the purpose of enforcing availability, integrity, or confidentiality. How can we limit interaction with resources to collections of programs? Any help on this would be greatly appreciated. Thanks Regards, Pankaj
Re: Java Question
HI Bran: There is no relation betn static and synchronize If you are synchronizing the static method than it does means you are giving him the class level lock, and not instance level lock. Hope that help Regards Hemant --- Brandon Cruz [EMAIL PROTECTED] wrote: I have looked all over and can't find the answer to this simple question. If you use a static method, do you have to synchronize it in case other people may access it at the same time. For example, I have a static Utility class to do date calculations. The method Utility.getMonth(String date) takes in a full date string, parses it, and returns just the month value. If 5 different people all using the website attempt to use Utility.getMonth(String date) at the same time for different dates, will it return the right results? If not, do I have to synchronize it or something in case multiple users attempt to access it? I know this is not really related to tomcat, but since I am using tomcat, and everyone else using tomcat is also a java developer, I figured this is the best place I can ask. Thanks for any help!!! Brandon __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: setting up Tomcat on win98
HI : place following line at top of your startup.bat set TOMCAT_HOME=d:\Tomcat\jakarta-tomcat-3.2.2 set JAVA_HOME=d:\jdk1.3.1 It should work Regards, Hemant - Original Message - From: gek hua [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 10, 2001 7:22 PM Subject: setting up Tomcat on win98 sorry for this simple question. i am a trying to set up the Tomcat server on a win98 system. But whenever i try to start the server running, i keep getting the: You must set JAVA_HOME to point at your Java Development kit installation error message. MY Jdk is installed at d:\jdk1.3.1 My Tomcat is installed at d:\Tomcat\jakarta-tomcat-3.2.2 In my autoexec.bat, i have set: path =d:\jdk1.3.1\bin In the folder d:\Tomcat\jakarta-tomcat-3.2.2, i have kept a bat file: set TOMCAT_HOME = d:\Tomcat\jakarta-tomcat-3.2.2 set JAVA_HOME = d:\jdk1.3.1 bin\startup The problem is whenever i run the above bat file, the error message will appear. This is maddening and hair-pulling! would appreciate any help. david
Re: Problem connecting to the database
HI Ann: no doubt your problem is offcourse configuration related. Try giving all permission in your java.policy file(Make sure it is java.policy or .java.policy) eg. grant { permission java.security.AllPermission; } Let me know if this also don't work Regards, Hemant - Original Message - From: Ann Tomcat [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 10, 2001 11:25 PM Subject: Problem connecting to the database Hi!guys, I have developed an application using Tomcat 3.1 ,jdk1.3 and Oracle8.1.5 as the database. The application includes servlets,applets and jsp pages. Environment: NT Jdk : 1.3 Oracle : 8.1.5 Tomcat : 3.1 The application runs Ok till the servlet execution ie proper database connection.But when the JApplet tries to connect to the database gives 'Access Denied: java.permission.SocketPermission [server_name] resolve error. Note: 1) The database is on the same machine as the JApplet. 2) I did place .java.policy file in [c:\WINNT\PROFILES\ADMINSTRATION\] which is the home directory as per the java console with proper socket permission. 3) When I try to connect the database using appletviewer in the JDK1.3 the JApplet has no problem with the database connection. Can anybody help me out with this issue ? This is very urgent. Thanks Ann. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Error in Startup Tomcat at Win2000
HI Peter: you are getting the BindException, the most possible reason for this is that box you are trying to run tomcat already running some application which is using port 8080, so you try changing the port from 8080 to someother (In server.xml) and try running it again, Regards Hemant - Original Message - From: Qinhong Pan To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 7:00 AM Subject: Error in Startup Tomcat at Win2000 I am running Tomcat 3.2 and Win2000 Professional.Once startup tomcat, I got the following error message,2001-06-10 04:12:17 - ContextManager: Adding context Ctx( /examples )2001-06-10 04:12:17 - ContextManager: Adding context Ctx( /admin )Starting tomcat. Check logs/tomcat.log for error messages2001-06-10 04:12:17 - ContextManager: Adding context Ctx( )2001-06-10 04:12:17 - ContextManager: Adding context Ctx( /test )2001-06-10 04:12:18 - PoolTcpConnector: Starting HttpConnectionHandler on 8080FATAL:java.net.BindException: Address in use: JVM_Bindjava.net.BindException: Address in use: JVM_Bindat java.net.PlainSocketImpl.socketBind(Native Method)at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397)at java.net.ServerSocket.init(ServerSocket.java:170)at java.net.ServerSocket.init(ServerSocket.java:121)at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239)at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)Your help is greatly appreciated.Peter
Re: Problem in access control of resources
HI Pankaj: How you transfer the word documents to the client? I mean you expect user to download it, or view it in there web browser? In both ways what you can do is that instead ofredirecting the client to word files, you read those word files in your jsp or servlet and write that file to users stream, And as you jsp or servlet will always have maintained in session(or whatever) that user has logged in or not, so i guess this will solve your problem. Regards, Hemant - Original Message - From: Pankaj Chhaparwal To: [EMAIL PROTECTED] Sent: Sunday, June 10, 2001 7:58 AM Subject: Problem in access control of resources Hi All,Servlet spec 2.2 statesI am using Apache and Tomcat to build my website. The adapter is JServ.I have certain word documents which have to be displayed on the browser on demand from the end user. I dont want to end users to view these documents unless they have logged into the system. What happens right now is that user can see the url of word document when the jsp redirects him to word document on receiving the request. He can then access the document from the webserver even if he has not logged into the website. Is there anyway I can prevent this from happening? Ideally I would like Apache to serve all the word documents since they are static files. But I am also considering Tomcat to serve this file.Also I have another question on access control. Servel 2.2 spec states the followingAccess control for resources: The mechanism by which interactions with resources are limitedto collections of users or programs for the purpose of enforcing availability, integrity, orconfidentiality.How can we limit interaction with resources to collections of programs?Any help on this would be greatly appreciated.Thanks Regards,Pankaj
Re: Using include from a servlet
HI Zsolt: Inside your Servlet subclass use following : RequestDispatcher _rd = getServletContext().getRequestDispatcher(/newURLToWhichWeNeedIncludeOrForwa rd); _rd.include(request, response); Regards Hemant - Original Message - From: Zsolt Koppany [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 12:30 PM Subject: Using include from a servlet Hi, I need the same functionality like isp:include from a servlet. How can I do that? Zsolt -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart Tel: +49-711-7221873 Fax: +49-711-7871017
Re: Confugaring Tomcat for Servlets !
Do your contexts web.xml include following http-methodPOST/http-method If not include it first, Regards Hemant - Original Message - From: Shailendra T Kontham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 9:52 PM Subject: Confugaring Tomcat for Servlets ! Hi all, I am trying to run a servlet in Tomcat but when i give the url of the .class file the error i get is that. The POST methods is not allowed. I am sure that i am not doing all the configuration neede to run servlets. Please help me with this, any links to the information available will be greately appreciated. Thanks, - Shailendra T. Kontham Advcancework Inc.,
Re: Load Balancing Performance w/ mod_jk vs. Alternative Methods
HI ALL: YEah i m using mod_jk, and well getting the performance for servlets, jsps same as i get when tomcat runs in standalone mode, Regards Hemant - Original Message - From: Chauhan, Anand [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 9:05 PM Subject: RE: Load Balancing Performance w/ mod_jk vs. Alternative Methods I am working on a production version myself. I also need to find the same info.. Let me know if you get good replies from the list. Thanks a bunch, -Andy -Original Message- From: Michael Percy [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 6:53 PM To: '[EMAIL PROTECTED]' Subject: Load Balancing Performance w/ mod_jk vs. Alternative Methods Hi Tomcatters! I'm trying to find information regarding the performance of mod_jk load balancing as opposed to other hardware or more traditional solutions (ie. Round-Robin DNS, etc.). Specifically, is anyone currently using mod_jk's load balancing features in a production environment? If so, how is the speed? Does it scale well? We are very interested in scalability vs. cost (and obviously, mod_jk scores high points for low cost :). If anyone knows of a study or performance evaluation, as well, a pointer would be greatly appreciated. Thanks so much! Regards, Mike
Re: Automaticaly update the servlets
HI Bill: Which tomcat version are you using? As i m reall confident that tomcat do auto- reloading as i never got this problem, Well offcourse like most servers, tomcat doesn't seems to reload the helper classes used by servlets, Regards Hemant - Original Message - From: Boyle, William (CAP, TIP) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 8:45 PM Subject: RE: Automaticaly update the servlets A little off-topic, but I have found that Tomcat doesnt seem to auto-reload servlets which are invoked through a RequestDispatcher call (servlet-chaining). Would this also be a difficult feature to add? Bill -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 10:26 AM To: [EMAIL PROTECTED] Subject: RE: Automaticaly update the servlets The problem is that the System class loader (the one that loads your CLASSPATH environment variable) is keeping a cache around of the class. This is why Milt (correctly) told you to remove the WEB-INF/classes from your classpath if you want the auto-reloading to work as it is supposed to*. If the System class loader loads your class then its impossible for Tomcat to load it, and if Tomcat doesn't load it in the first place, then it can't unload and reload it. Randy * - Many people have problems with the way that auto-reloading works in Tomcat. A large number have problems like yours, and large numbers also complain that the auto-reloading doesn't work for non-servlet classes (which it doesn't due to complexity of the problem). -Original Message- From: Pablo Morillas [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 10:29 AM To: [EMAIL PROTECTED] Subject: Re: Automaticaly update the servlets Yes, it is in my classpath. But I don't believe that the classpath is the problem becouse when I start Tomcat as a service it runs properly. If I change a .jsp it reload properly. I don't know what is happen but, when I delete the class file from the WEB-INF/classes the servlet run properly (incredible). Then, after I restart the server a error was reported. I compile it another in the WEB-INF/classes without restart Tomcat and it runs ok. I suppose that the servlet file is in any cache of Tomcat, but I can be perfectly wrong. Uses Tomcat any type of GUID to run classes? I don't know what's happen. Please, advice. == Pablo Morillas http://www.sortes.com [EMAIL PROTECTED] == - Original Message - From: Milt Epstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 3:03 PM Subject: Re: Automaticaly update the servlets On Fri, 8 Jun 2001, Pablo Morillas wrote: Hello Filip. I didn't know that but, unfortunately the servlet is in the WEB-INF/classes directory. The scheme is that I start tomcat and I Is WEB-INF/classes in your classpath? Because it shouldn't be if you want reloading to work. get the correct result but, if I change the servlet and compile it the output is the same until I restart Tomcat. I've tried to remove the class file of the servlet that is in the WEB-INF/classes but the page goes up like it would be in a cache. I get the result even the class is removed. If I restart tomcat I get the error page saying that request didn't be found. I've readed several mail and I've sincronized the time between my box and the server with net time /domain /set and I now have the same time, but this isn't the solution. Can anybody help me, becouse I use tomcat like a service in other coumputer with IIS and I dn't want to have restart the server service when I change anything in any servlet. Thaks all. == Pablo Morillas http://www.sortes.com [EMAIL PROTECTED] == - Original Message - From: Filip Hanik [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 2:25 AM Subject: RE: Automaticaly update the servlets as long as your servlet classes are under WEB-INF/classes and not WEB-INF/lib Tomcat will reload servlets. and it always reloads JSP pages Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Pablo Morillas [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 2:21 PM To: [EMAIL PROTECTED] Subject: Automaticaly update the servlets Hello all. I'm starting to use Tomcat and I have seen that I have to restart the server when I update a servlet. Is it true? Is there any way to avoid it? Thanks all
Re: Automaticaly update the servlets
HI Randy and Milt: I strongly believe that issue is not at all related to classpath, As offcourse servlets are loaded by tomcat server, and in case they uses suns classloader i guess it not at all caches the loaded class, Is there any sun guy which can clarify this? Regards, Hemant - Original Message - From: Randy Layman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 7:55 PM Subject: RE: Automaticaly update the servlets The problem is that the System class loader (the one that loads your CLASSPATH environment variable) is keeping a cache around of the class. This is why Milt (correctly) told you to remove the WEB-INF/classes from your classpath if you want the auto-reloading to work as it is supposed to*. If the System class loader loads your class then its impossible for Tomcat to load it, and if Tomcat doesn't load it in the first place, then it can't unload and reload it. Randy * - Many people have problems with the way that auto-reloading works in Tomcat. A large number have problems like yours, and large numbers also complain that the auto-reloading doesn't work for non-servlet classes (which it doesn't due to complexity of the problem). -Original Message- From: Pablo Morillas [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 10:29 AM To: [EMAIL PROTECTED] Subject: Re: Automaticaly update the servlets Yes, it is in my classpath. But I don't believe that the classpath is the problem becouse when I start Tomcat as a service it runs properly. If I change a .jsp it reload properly. I don't know what is happen but, when I delete the class file from the WEB-INF/classes the servlet run properly (incredible). Then, after I restart the server a error was reported. I compile it another in the WEB-INF/classes without restart Tomcat and it runs ok. I suppose that the servlet file is in any cache of Tomcat, but I can be perfectly wrong. Uses Tomcat any type of GUID to run classes? I don't know what's happen. Please, advice. == Pablo Morillas http://www.sortes.com [EMAIL PROTECTED] == - Original Message - From: Milt Epstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 3:03 PM Subject: Re: Automaticaly update the servlets On Fri, 8 Jun 2001, Pablo Morillas wrote: Hello Filip. I didn't know that but, unfortunately the servlet is in the WEB-INF/classes directory. The scheme is that I start tomcat and I Is WEB-INF/classes in your classpath? Because it shouldn't be if you want reloading to work. get the correct result but, if I change the servlet and compile it the output is the same until I restart Tomcat. I've tried to remove the class file of the servlet that is in the WEB-INF/classes but the page goes up like it would be in a cache. I get the result even the class is removed. If I restart tomcat I get the error page saying that request didn't be found. I've readed several mail and I've sincronized the time between my box and the server with net time /domain /set and I now have the same time, but this isn't the solution. Can anybody help me, becouse I use tomcat like a service in other coumputer with IIS and I dn't want to have restart the server service when I change anything in any servlet. Thaks all. == Pablo Morillas http://www.sortes.com [EMAIL PROTECTED] == - Original Message - From: Filip Hanik [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 2:25 AM Subject: RE: Automaticaly update the servlets as long as your servlet classes are under WEB-INF/classes and not WEB-INF/lib Tomcat will reload servlets. and it always reloads JSP pages Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Pablo Morillas [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 2:21 PM To: [EMAIL PROTECTED] Subject: Automaticaly update the servlets Hello all. I'm starting to use Tomcat and I have seen that I have to restart the server when I update a servlet. Is it true? Is there any way to avoid it? Thanks all. == Pablo Morillas http://www.sortes.com [EMAIL PROTECTED] == Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
Re: /lib /WEB-INF/lib
HI: If you have a jar which you are using in more than one web-apps than place it under /tomat/lib so that tomcat do not reload the same jar more than once(I really surprise how internally it works) and if you are using that jar only in one web-app than place than place it under /tomcat/webappps/yourwebapp/web-inf/lib Regards Hemant - Original Message - From: Bo Xu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 7:02 PM Subject: Re: /lib /WEB-INF/lib eric ng wrote: Hi, In tomcat or other servlet engine implements the spec. there are 2 place to put JAR files: 1) d:/tomcat/lib 2) d:/tomcat/webapps/abc/WEB-INF/lib I wonder what's the difference putting JAR in the 2 directory? any performance difference? Should I always put JAR into web apps's own lib? thanks. [...] Hi :-) - the jar files in TOMCAT_HOME/sebapps/myapp/WEB-INFlib are loaded by the classloader of this webapp(myapp), normally they are only used in this webapp(myapp). - the jar files in TOMCAT_HOME/lib are loaded by another classloader (SharedClassloader) which is upper than the classloader of this webapp or that webapp in JAVA2 delegation model, these jar files are shared for all webapp(0) or webapp(1) or webapp(2)... % If you want to share a utility class to all webapp, you can wrap it into a jar file, and put the jar file here. % because sometimes the classloader of one special webapp(for example, myapp) will be destroyed(for example, auto-reloading), so If you don't want a utility class to be load/reload several times, you can wrap it into a jar file, and put the jar file here. Bo June.08, 2001
Re: Tomcat/Apache problem
Go ahead, It will offcourse not going to create any problem, but just remember to change the port of tomcat (in server.xml) But just a suggestion if the box u specified is you production box, than be careful. Regards Hemant - Original Message - From: Priya Gupta [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 6:47 PM Subject: Tomcat/Apache problem Hello I have a very simple problem but its got me stuck! May be someone can take off a little time and help me with this! I have Apache HTTP server 1.3 with JServ 1.1 running on Windows 2000 server and would like to upgrade the system to Tomcat 3.1 Now if I wish to install Tomcat on the same machine but a separate directory and configure it to listen on a different port. Then would it mess up my JServ installation and if not then how do I proceed with it! Any help would be deeply appreciated! Thanks Priya __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Where to Place Bean files
HI ALL: Where do i need to place the JSP bean which i m going to use in JSP files. Cheers __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
RE: Where to Place Bean files
HI Gibb: Well sorry for little ambigous Yeah u got it right Cheers --- Phillip Gibb [EMAIL PROTECTED] wrote: JSP Bean? don't you mean java bean, in that case use the jsp:useBean tag, and you can place it anywhere in the page so long as you insert it before any reference to the bean. It is good design to put it at the top. be sure to place the java bean in the WEB-INF/classes dir of the context that you are working with. If you actually mean JSP Bean, then tell me more, I've never heard of this before. Phill -Original Message- From: Hemant Singh [mailto:[EMAIL PROTECTED]] Sent: 06 June 2001 08:52 To: [EMAIL PROTECTED] Subject: Where to Place Bean files HI ALL: Where do i need to place the JSP bean which i m going to use in JSP files. Cheers __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: startup exceptions
HI Boris: From the exeption trace you sended only meaningfull thing i can see is that probably in any one of the web.xml files present under you webapps is missing web-app element, check your all webapps for the presence of proper web-app element in there web.xml file I tried removing web-app element from one (admin) of the web.xml, but i does n't gived up any startup exception but one i tried accessing that servlet, though it successfully opend up the servlet, i m using tomcat3.2.1 on Win ME. Cheers - Original Message - From: Boris Garbuzov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 10:48 PM Subject: startup exceptions Hello to you, Tomcat experts. I am using tomcat 4. Upon the very start it throws the following. Then it works fine in most of examples. Any suggestions what I should do? Boris. console- Starting service Tomcat-Standalone Apache Tomcat/4.0-b5 PARSE error at line 1 column -1 org.xml.sax.SAXParseException: Element type web-app is not declared. PARSE error at line 1 column -1 org.xml.sax.SAXParseException: Element type web-app is not declared. Starting service Tomcat-Apache Apache Tomcat/4.0-b5 --localhost_log.2001-05-31.txt 2001-05-31 10:08:03 StandardManager[/JRunForum]: Seeding random number generator class java.security.SecureRandom 2001-05-31 10:08:03 StandardManager[/JRunForum]: Seeding of random number generator has been completed 2001-05-31 10:08:03 ContextConfig[/JRunForum] Parse error in application web.xml org.xml.sax.SAXParseException: Element type web-app is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3013) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1308) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499) at org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:317) at javax.xml.parsers.SAXParser.parse(SAXParser.java:108) at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja va:247) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:820) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 217) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3189) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278) at org.apache.catalina.core.StandardService.start(StandardService.java:353) at org.apache.catalina.core.StandardServer.start(StandardServer.java:458) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:647) at org.apache.catalina.startup.Catalina.process(Catalina.java:177) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196) 2001-05-31 10:08:03 ContextConfig[/JRunForum]: Occurred at line 1 column -1 2001-05-31 10:08:03 ContextConfig[/JRunForum]: Marking this application unavailable due to previous error(s) 2001-05-31 10:08:03 StandardWrapper[/JRunForum:default]: Loading container servlet default 2001-05-31 10:08:03 default: init 2001-05-31 10:08:03 StandardWrapper[/JRunForum:invoker]: Loading container servlet invoker 2001-05-31 10:08:03 invoker: init 2001-05-31 10:08:03 StandardWrapper[/JRunForum:jsp]: Using Jasper classloader for servlet jsp 2001-05-31 10:08:04 StandardWrapper[/JRunForum:jsp]: Marking servlet jsp as unavailable 2001-05-31 10:08:04 StandardContext[/JRunForum]: Servlet /JRunForum threw load() exception javax.servlet.ServletException: Error instantiating servlet class org.apache.jasper.servlet.JspServlet at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:817) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3277) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278) at org.apache.catalina.core.StandardService.start(StandardService.java:353) at org.apache.catalina.core.StandardServer.start(StandardServer.java:458) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at
In process conf with apache
HI ALL: I tried conf apache with mod_jk.dll and it worked fine with tomcat But it runs as out process, and what i m looking for is that i do not need to run tomcat as separate program and apache module itself call it, that is in-process. Cheers Hemant __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Evil ? mod_jk.conf-auto
HI Jon: Why u need to say that? IT is not like that, what exactly make u feel that? try include in httpd.conf if u wanna make it work apache Cheers --- Jon Shoberg [EMAIL PROTECTED] wrote: Can anyone exactly state why mod_jk.conf-auto is so evil ? What is so wrong with using it ? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Fw: binary file upload fail
HI Folha: This seems some stream related problem or ... Which Env you are getting the problem? Also Send the file to which your form is submitted from the browser side. Cheers --- João_Folha [EMAIL PROTECTED] wrote: - Original Message - From: João mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 8:06 PM Subject: Fw: binary file upload fail - Original Message - From: João mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 8:06 PM Subject: Fw: binary file upload fail - Original Message - From: João mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 6:17 PM Subject: binary file upload fail Hi there, I am trying to upload a file from the client to the server. But the binary files fail and the text files don´t fail. I use tomcat 3.2.1 with apj12. The bean and the jsp file i use are in attachment... regards jfolha ATTACHMENT part 2 application/octet-stream name=doc_entrega_autor.jsp ATTACHMENT part 3 application/octet-stream name=upload.java __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Java servlet that sends form data to email
HI Use following code import javax.servlet.*; import javax.servlet.http.*; import sun.net.smtp.*; import java.io.*; public class SendMail extends HttpServlet{ String to =[EMAIL PROTECTED]; SmtpClient mailClient; public void init(ServletConfig config){ try{ mailClient = new SmtpClient(12.10.194.226); super.init(config); }catch(Exception e){ System.out.println(e); } } public void doGet(HttpServletRequest req,HttpServletResponse res){ try{ res.setContentType(text/html); String name = req.getParameter(name); String from = req.getParameter(email); String subject = req.getParameter(subject); if(subject ==null || subject.length()1){ subject =(none); } String msg = req.getParameter(msg); send(name,from,to,msg,subject); res.sendRedirect(http://12.10.194.239/mru/Thanks.html;); }catch(Exception e){ System.out.println(e); } } private void send(String name,String from,String to,String msg,String subject){ try{ mailClient.from(from); mailClient.to(to); PrintStream ps = ps = mailClient.startMessage(); ps.println(From: + from ); ps.println(To: + to ); ps.println(Subject: +subject ); ps.print(\r\n); ps.println(); ps.println(msg); ps.println(); ps.flush(); ps.close(); //mailClient.closeServer(); }catch(Exception e){ System.out.println(e); } } } --- Peter Choe [EMAIL PROTECTED] wrote: use the javamail api. Alkmini D. wrote: HI all! Sorry for the newbie question. Can anyone give me any hints on how to make a java servlet that reads form data and sends it to an email address? Thanks ! Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Session Cookie relation
HI Chu : Well i think if the browser is once closed at than restarted should not it generate the new session id, As the browser has started a new session with servlet, but because of old session values i m getting lot o f problem as i m have made Session values primary key, IS there any way to avoid it. Hemant - Original Message - From: Chu J Tan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Hemant Singh [EMAIL PROTECTED] Sent: Monday, June 04, 2001 6:00 AM Subject: Re: Session Cookie relation If your servlet is in a session, and than you shut down and reopen iexplorer, it is normal that you get a new session value from Tomcat. Than, you should use the cookie to reinitialize the new session to be the same as the old one. That's a feature of the cookie, so than you can reestablish session based on the cookie. chu - Original Message - From: Hemant Singh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 01, 2001 11:23 AM Subject: Session Cookie relation HI ALL: I found a strange problem which i later solved after a lot of debugging, If my servlet is setting a cookie than after closing and reopening and giving new hit from browser give me two different session values, that is if i access session without reading cookie than i get different session value than i get when i access session after reading cookie. Is it some feature which i was unaware of that? Thanks all, Hemant Singh NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net
Re: binary file upload fail
HI Folha: the problem can be at place where you taking streams or in jsp which is called on form submit, send the code of "doc_entrega.jsp"? Which OS did u tried the above attached code? Hemant - Original Message - From: João Folha To: [EMAIL PROTECTED] Sent: Monday, June 04, 2001 10:47 PM Subject: binary file upload fail Hi there, I am trying to upload a file from the client to the server. But the binary files fail and the text files don´t fail. I use tomcat 3.2.1 with apj12. The bean and the jsp file i use are in attachment... regards jfolha
Re: Should we do moderation on this mailinglist??
HI Jeff: I agree with your idea When after downloading most of the files are asking how to unsubscribe, duplicate mails, lab, lab it really pains How abt dividing this group into several parts, Like one for tomcat configuration - Servlet prblems, etc --- Jeff Waugh [EMAIL PROTECTED] wrote: Unfortunately, we are dealing with 'people' here. It is a shame that there is not a 'filter' to eliminate 'stupid' people, but as hard as I've tried, I just can't program it. If someone else can, please make it an Opensource project But, then again, we would probably get 'stupid' people contributing, so those filters would be invalidated. Man, it looks like we're screwed. As an example, *I* use a bicycle as my primary means of transportation, and have had similar ideas about 'people' who drive cars. I decided *I* was screwed quite some time ago. Delete is a wonderful thing!!! (If only it was as effective on motorists) (Hmmm, probably 98% of the people reading this are motorists...) (Sorry, but if the shoe (wheel) fits...) -Jeff - Original Message - From: Martin van den Bemt [EMAIL PROTECTED] To: jakarta-tomcat-user [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 4:18 PM Subject: Should we do moderation on this mailinglist?? Hi to everybody who is actually trying to get some information on this mailing list, or to help others, The 2 weeks I've been a member here, just trying to get new ideas and help others out with tomcat issues, I would say, were pretty horrible. about 50% of the mail is actually rubbish (which means double mails, requests for unsuscribing and other SPAM. This can have a couple of couses : irritated mode on - Most people cannot read - Most people cannot think logically - Most people should not be able to subscribe to this list - Most people shouldn't wast other people's time, so they still want to help people. irritated mode off solution mode on - members with no active e-mail address should be deleted right away (who has the rights to do that?), so people don't resend messages again. (I mailed the owner of the mailinglist, but haven't had a reply yet..) - Don't allow misuse of the mailinglist anymore : block those senders immidiately from the mailinglist (that's what they want it seems) == are there any facilities for that. - Don't reply to misuse of the mailinglist - Off topic messages can be nicely redirected to the appropiate area. - Let everyone state clearly what they are using (rh 7.1, windows 2000, which version of tomcat, etc). A lot of replies are pretty useless if they have another version of the product. Also the probability that the correct people (the people actually using tomcat on a rh7.1 box, will reply..) - Send a rules e-mail to subscribers. - Send stuff that's not interesting (like someone suggested in the list today), directly to the sender of the mail. (If I have made a commercial solution for a problem or question, I mail to peoples private e-mail address, as an example..) The common goal should be : Users helping users!! Just trying to get some improvement here.. I think a lot of people are currently giving up on this list and that's not good for tomcat (at least that's what I think) Mvgr, Martin van den Bemt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: crashes whenever 404
HI Chu: I never heard of this kind of problem in tomcat, On which platform are u using it? Cheers Hemant - Original Message - From: Chu J Tan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 03, 2001 9:50 AM Subject: crashes whenever 404 My tomcat server (3.2.2) crashes whenever I try to access non existing files. The server will have infinite output loop and then crashes shortly after that. It must be a common config problem.. Can anyone tell me how to solve this? Thanks Chu NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net
Re: Please help
HI Sangam: When did u get this error, at startup? What is your tomcat ver, and OS? Hemant - Original Message - From: Venkatesh Sangam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 02, 2001 11:41 PM Subject: Please help Can anyone please tell me what does the following error message indicate 2001-06-02 10:59:37 - Ctx( ): Removing duplicate servlet ApplServlet ApplServlet(ApplServlet/null) thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: monitoring using apache-tomcat
HI Aswath: In your scenario you can use any one of following two solutions: - Run a thread in servlet and keep giving to hits to database after particular time period but this is going to increase no. of hits on DB and load on server running servlet, and unnessary network bandwidth consumption. - If your database (Oracle) allow Loading a class file than you can call this class file from a trigger which should get fired when there is any updates in DB, and on update this class file will call servlet and let him know abt changes accordingly Cheers - Original Message - From: aswath satrasala [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 03, 2001 9:13 PM Subject: monitoring using apache-tomcat Hello, I have a scenario, where I have to monitor for new records in the database. Can I use servlets to do this functionality? I wanted to do this, in order to avoid writing my own server Can I use any of apache-tomcat features for this. Basically, I wanted to accomplish two things. 1. find if there are new records in the database. 2. If there are new records in the database, then perform some operations. -Aswath _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Tomcat 3.2 standalone on Solaris 2.7 core dumping
HI Tom: try increasing the memory available to shell in which your tomcat server is running(on popup window in case ur using defaults) It might work Hemant - Original Message - From: Tom Amiro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, June 03, 2001 10:31 PM Subject: Tomcat 3.2 standalone on Solaris 2.7 core dumping Hi, I'm using Tomcat 3.2 in standalone mode on Solaris 2.7 with the JDK 1.3, and it is core dumping with Java Out of Memory. Tomcat is running a servlet that performs XSLT transformations on an XML file that is ~1.4MB big and returns html output to the client browser. It was running fine during development, but once the servlet was made available to the web site's users (www.coolrunning.com), it began crashing. Must be due to the increased load. I don't know how heavy the load is exactly, nor how to determine it, but the site is not an Ebay by any means. I'm assuming Tomcat can handle a single servlet application on a low-traffic web site -- less than 100,000 hits a day. Following suggestions on the web, I've - Increased the memory allocated to Tomcat to 128M (using -Xmx128m switch) - Increased the max_threads to 100 - Increased the file descriptors to 256 - added System.gc(); to the end of the Servlet code These changes have helped; it takes much longer, but it still crashes under normal use. I've been watching the output from the top command. It shows that the Tomcat Java process is starting with about 32MB and over time and load it climbs. It was running at 62M for quite a while, and it even dropped to 55M, and then grew to 169M without crashing. Not sure how high the SIZE (memory) gets to before it crashes; but crash it does with a core dump. With the 'ps' command, I don't see any accumulation of treads. Here's a dump 81= /usr/ucb/ps -auxww | grep thread root 24231 73.0 28.3173016141648 ?R 20:30:02 21:51 /usr/local/j2sdk/ bin/../bin/sparc/native_threads/java -Xmx128m -Dtomcat.home=/usr/local/tomca t or g.apache.tomcat.startup.Tomcat I don't know how to analyze the core dump, except to use strings on it. At least, I can see that it was definitely caused by Tomcat. What would be a reasonable setting on max_threads? Is 100 just to low? I could start Tomcat with more memory, say 256M (system has 512MB), but I don't want to negatively impact the other applications. The system is running Apache without any problems, independent of Tomcat. I've spent months developing this JSP/Servlet application for the Coolrunning Events calendar, and can't go back. Have to make Tomcat work! Any help appreciated. Tom
Re: get/setAttribute and getParameter...
HI Zinger: answer to this question depends on env conditions setAttribute method stores the attribute in JVM itself for every session, while set parameter will pass the attribute as a header information to you new jsp. So it all depends on memory available, cpu speed, and no of pages you are going to use this technique. Cheers Hemant - Original Message - From: Oskar Zinger [EMAIL PROTECTED] To: TomcatDev [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, June 03, 2001 12:15 AM Subject: get/setAttribute and getParameter... Hi, What is more time consuming? JSP1: % request.setAttribute(FLAG, new Boolean(true)); % jsp:include page=JSP2.jsp flush=true/ JSP2: % boolean FLAG = ((Boolean) request.getAttribute(FLAG)).booleanValue(); if (FLAG) { .. ... } % OR?: JSP1: jsp:include page=JSP2.jsp?FLAG=true flush=true/ JSP2: % String FLAG = request.getParameter(FLAG); if (FLAG.equals('true)) { .. .. } % OR?: JSP1: jsp:include page=JSP2.jsp?FLAG=true flush=true/ JSP2: % boolean FLAG = (new Boolean(request.getParameter(FLAG))).booleanValue(); if (FLAG) { .. .. } % AND, which way is it best practiced. Thankss for any help! -- Oskar Zinger
Re: Using Realm
Sorry to be little bit unspecific in my question, I was talking abt MemoryRealm, but i don't want to load it from conf/tomcat-users.xml but from some different flat or xml file. Is that possible ? Hemant - Original Message - From: Pernica, Jan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 4:40 PM Subject: RE: Using Realm Which one? You can use MemoryRealm, which loads user info from conf/tomcat-users.xml or you can use JDBCRealm, which loads user info from database After that you have to define your security constratins in the web.xml Regards Jan On Thursday, May 31, 2001 1:10 PM, Hemant Singh [SMTP:[EMAIL PROTECTED]] wrote: HI ALL: Can any one tell me how to use Realm with tomcat. Cheers HEMANT __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
Session Cookie relation
HI ALL: I found a strange problem which i later solved after a lot of debugging, If my servlet is setting a cookie than after closing and reopening and giving new hit from browser give me two different session values, that is if i access session without reading cookie than i get different session value than i get when i access session after reading cookie. Is it some feature which i was unaware of that? Thanks all, Hemant Singh
Using Realm
HI ALL: Can any one tell me how to use Realm with tomcat. Cheers HEMANT __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/