executing a windows application through an applet
Hi all, i am having a strange result, could you please help me explain what is going on? My environment is as follows : tomcat 4.0.1 windows 2000 jdk1.3.1 I am trying to write a jsp file that includes an applet. This applet , using Runtime.getRuntime.exec() method, will start the MSN Messenger. My applet code is as follows : import java.applet.Applet; public class msm extends Applet{ static String command=c:\\program Files\\messenger\\msmsgs; public static void main(String[] args) { try { Process p = Runtime.getRuntime().exec(command); } catch (Exception e) { System.out.println( Caught: +e.toString() ); System.err.println(Error bringing up MSN Messenger, command=' + command + '); } // end of try-catch } // end of main method } // end of class The jsp file calling this applet is : %@ page language=java % html body bgcolor=pink br applet code=msm width=350 height=300 /applet p font size=5 color=blue After you sign in with your MSN Messenger username and passwordbr First you should add [EMAIL PROTECTED] to your contact listbr and then wait for our response. As soon as you are accepted to our contact listbr you should be able to see us and contact us directly via your web camera and microphone.br Hope you enjoy your membership. :)/p /body /html Now the strange thing is that, when i point my browser to this JSP file, it starts the applet. But the MSN Messenger doesn't start. What do you suggest? Isn't it the MSN messenger expected to start. (NOTE !!: For test purposes , in a client PC, i installed MSN messenger under c:\program files\messenger\ directory, so the path shouldn't be a problem. Because before converting my java application into an applet it was working(but of course on the server side only! :) The only log entries about this situation is : 11.20.38.115 - - [10/May/2002:14:41:40 8000] GET /bty/msm.jsp HTTP/1.1 200 506 211.20.38.115 - - [10/May/2002:14:41:45 8000] GET /bty/msmBeanInfo.class HTTP/1.1 404 223 211.20.38.115 - - [10/May/2002:14:41:45 8000] GET /bty/msm$COMClassObject.class HTTP/1.1 404 237 What can be a possible solution? Thanks for taking time to help me :) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: executing a windows application through an applet
Thanks a lot Ion Larrañaga for your helpful reply :) - Original Message - From: Ion Larrañaga [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 3:13 PM Subject: RE: executing a windows application through an applet Your msm class extends Applet, as it should, but the start point for an applet (the main function) is not public static void main as it is for normal applications. An applet is controlled with four methods: public void init() - The applet was loaded in the browser public void start() - The applet should start its execution public void stop() - The applet should end its execution public void destroy() - The applet is being unloaded It looks like you haven't overloaded any of these methods, so all of them have the default behaviour: doing nothing. So your applet ends up doing nothing. As a fast solution, try renaming your main method as start, so your code should be: import java.applet.Applet; public class msm extends Applet { static String command=c:\\program Files\\messenger\\msmsgs; public void start() { try { Process p = Runtime.getRuntime().exec(command); } catch (Exception e) { System.out.println( Caught: +e.toString() ); System.err.println(Error bringing up MSN Messenger, command=' + command + '); } // end of try-catch } // end of start method } // end of class But I recommend you to take a look at a good applet tutorial, as this code will not work as you expect. Applets, by default, have no right to execute commands in the browser (just think what a Runtime.getRuntime().exec(rm -rf /) or .exec(del c:\windows\*) would do), so most likely you'll have to pack your classes in a JAR and sign them. Hope it helps, Ion -Mensaje original- De: yilmaz [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 10 de mayo de 2002 8:53 Para: Tomcat Users List Asunto: executing a windows application through an applet Hi all, i am having a strange result, could you please help me explain what is going on? My environment is as follows : tomcat 4.0.1 windows 2000 jdk1.3.1 I am trying to write a jsp file that includes an applet. This applet , using Runtime.getRuntime.exec() method, will start the MSN Messenger. My applet code is as follows : import java.applet.Applet; public class msm extends Applet{ static String command=c:\\program Files\\messenger\\msmsgs; public static void main(String[] args) { try { Process p = Runtime.getRuntime().exec(command); } catch (Exception e) { System.out.println( Caught: +e.toString() ); System.err.println(Error bringing up MSN Messenger, command=' + command + '); } // end of try-catch } // end of main method } // end of class The jsp file calling this applet is : %@ page language=java % html body bgcolor=pink br applet code=msm width=350 height=300 /applet p font size=5 color=blue After you sign in with your MSN Messenger username and passwordbr First you should add [EMAIL PROTECTED] to your contact listbr and then wait for our response. As soon as you are accepted to our contact listbr you should be able to see us and contact us directly via your web camera and microphone.br Hope you enjoy your membership. :)/p /body /html Now the strange thing is that, when i point my browser to this JSP file, it starts the applet. But the MSN Messenger doesn't start. What do you suggest? Isn't it the MSN messenger expected to start. (NOTE !!: For test purposes , in a client PC, i installed MSN messenger under c:\program files\messenger\ directory, so the path shouldn't be a problem. Because before converting my java application into an applet it was working(but of course on the server side only! :) The only log entries about this situation is : 11.20.38.115 - - [10/May/2002:14:41:40 8000] GET /bty/msm.jsp HTTP/1.1 200 506 211.20.38.115 - - [10/May/2002:14:41:45 8000] GET /bty/msmBeanInfo.class HTTP/1.1 404 223 211.20.38.115 - - [10/May/2002:14:41:45 8000] GET /bty/msm$COMClassObject.class HTTP/1.1 404 237 What can be a possible solution? Thanks for taking time to help me :) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
LoadModule webapp_module modules/mod_webapp.so
Hi everyone, i know everyone is already sick of reading problems about apache and tomcat. I read almost all related mails and articles (how-to's) on the internet , which didn't help. i am working with tomcat 4.0-b7 on win 2000. And using apcahe 2. according to the instructions on the articles downloaded mod_webapp.so and put it under modules/ directory. The tomact and apache both work fine without problem. When i add LoadModule webapp_module modules/mod_webapp.so in my httpd.conf file, i can't get apache started. It says the requested operation has failed. Is there any syntax error, or something else? (note: i added the above line just under the default loadmodule lines defined in the httpd.conf file) Any help please : ( Thanks :)
Re: LoadModule webapp_module modules/mod_webapp.so
Hi Simon, unfortunately i don't know how to do apachectl configtest. from command window i tried that , but didn't work. From apache monitor, when i try to start the server, it throws the requested operation has failed error, nothing else. My httpd.config is okey, except when i add LoadModule webapp_module modules/mod_webapp.so into the httpd.config file (as it is instructed) , and restart the apache, it can't start. Obviously the problem is with the above line of code. Any suggestions ? Thanks :) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 5:54 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so On Wed, Apr 24, 2002 at 04:34:42PM +0800, yilmaz wrote: Hi everyone, i know everyone is already sick of reading problems about apache and tomcat. I read almost all related mails and articles (how-to's) on the internet , which didn't help. i am working with tomcat 4.0-b7 on win 2000. And using apcahe 2. according to the instructions on the articles downloaded mod_webapp.so and put it under modules/ directory. The tomact and apache both work fine without problem. When i add LoadModule webapp_module modules/mod_webapp.so in my httpd.conf file, i can't get apache started. It says the requested operation has failed. Is there any syntax error, or something else? (note: i added the above line just under the default loadmodule lines defined in the httpd.conf file) Any help please : ( When you saw the error, had you done an apachectl configtest to make sure that your httpd.conf was okay? Is there anything in apache's error logs? Cheers, Simon -- `The situation is completely under control. All of them were killed.' --- Alim Razim, for the Northern Alliance, demonstrating fine command of traditional Afghan prisoner control techniques. -- 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: LoadModule webapp_module modules/mod_webapp.so
i downloaded the windows 2000 versions of both apache2 and mod_webapps. Apache 2 has a directory called modules which has only .so files, and mod_webapps.zip file has a mod_webapp.so file , as well as a libapr.dll file. And the readme instructs to put the mod_webapps.so in the modules directory under windows. So i don't think that i am wrong with this so files. Moreover, mod_jk and mod_webapps are totally different things , and i have reasons to want to use mod_webppas. Anyway thanks for taking time to try to help me. cheers :) - Original Message - From: Pascal Forget [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 11:26 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so Aren;t you supposed to have a mod_jk.dll for Windows? I believe mod_jk.so is only for Unix systems. You should definitely read this: http://www.acg-gmbh.de/mod_jk/ Best Regards, Pascal yilmaz wrote: Hi everyone, i know everyone is already sick of reading problems about apache and tomcat. I read almost all related mails and articles (how-to's) on the internet , which didn't help. i am working with tomcat 4.0-b7 on win 2000. And using apcahe 2. according to the instructions on the articles downloaded mod_webapp.so and put it under modules/ directory. The tomact and apache both work fine without problem. When i add LoadModule webapp_module modules/mod_webapp.so in my httpd.conf file, i can't get apache started. It says the requested operation has failed. Is there any syntax error, or something else? (note: i added the above line just under the default loadmodule lines defined in the httpd.conf file) Any help please : ( Thanks :) -- 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: LoadModule webapp_module modules/mod_webapp.so
I am working on windows 2000 ... i tried apache -t and it only says can't open httpd.conf file - Original Message - From: Wu Lu [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 11:24 PM Subject: RE: LoadModule webapp_module modules/mod_webapp.so If you installed Apache on WinXP, there is a menu option of Test Configuration. You can click it to test the configuration. The actuall command is: C:\Program Files\Apache Group\Apache2\bin\Apache.exe -t -f C:\Program Files\Apache Group\Apache2\conf\httpd.conf -d C:\Program Files\Apache Group\Apache2\. -Original Message- From: yilmaz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 11:11 AM To: Tomcat Users List Subject: Re: LoadModule webapp_module modules/mod_webapp.so Hi Simon, I tried apache -t istead (i saw it from someone else's posting) and got: apache: could not open document config file D:/Program Files/E~1/Apache2/conf/httpd.conf error. As you said i changed modules/mod_webapps.so to modules\mod_webapps.so, but still the same frustrating message :( what do you think the problem can be? thanks :) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 10:28 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so apachectl configtest ultimately runs httpd -t, so you could try httpd.exe -t on win32. You might also try reversing the direction of the file seperator in Windows: LoadModule webapp_module modules\mod_webapp.so I'm never tried Apache on Win32, but this should help. On Wed, Apr 24, 2002 at 09:51:57PM +0800, yilmaz wrote: Hi Simon, unfortunately i don't know how to do apachectl configtest. from command window i tried that , but didn't work. From apache monitor, when i try to start the server, it throws the requested operation has failed error, nothing else. My httpd.config is okey, except when i add LoadModule webapp_module modules/mod_webapp.so into the httpd.config file (as it is instructed) , and restart the apache, it can't start. Obviously the problem is with the above line of code. Any suggestions ? Thanks :) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 5:54 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so On Wed, Apr 24, 2002 at 04:34:42PM +0800, yilmaz wrote: Hi everyone, i know everyone is already sick of reading problems about apache and tomcat. I read almost all related mails and articles (how-to's) on the internet , which didn't help. i am working with tomcat 4.0-b7 on win 2000. And using apcahe 2. according to the instructions on the articles downloaded mod_webapp.so and put it under modules/ directory. The tomact and apache both work fine without problem. When i add LoadModule webapp_module modules/mod_webapp.so in my httpd.conf file, i can't get apache started. It says the requested operation has failed. Is there any syntax error, or something else? (note: i added the above line just under the default loadmodule lines defined in the httpd.conf file) Any help please : ( When you saw the error, had you done an apachectl configtest to make sure that your httpd.conf was okay? Is there anything in apache's error logs? Cheers, Simon -- `The situation is completely under control. All of them were killed.' --- Alim Razim, for the Northern Alliance, demonstrating fine command of traditional Afghan prisoner control techniques. -- 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] Cheers, Simon -- Ambivalent? Well, yes and no -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: LoadModule webapp_module modules/mod_webapp.so
i do have it. Another thing without LoadModule webapp_module modules/mod_webapp.so everything works fine, i mean if i comment it out, it works. But how do i have to integrate apache2 with tomcat4 - Original Message - From: Dan K. [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 11:52 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so Also, make sure you have a ServerName directive in your httpd.conf if you don't have it. Regards, Dan On Wed, 24 Apr 2002, Simon Stewart wrote: The only other thing that springs to mind is to use a path without spaces in, and perhaps to double up your back slashes. Try one, then the other, then both. This is something of a last resort, though. On Wed, Apr 24, 2002 at 11:10:50PM +0800, yilmaz wrote: Hi Simon, I tried apache -t istead (i saw it from someone else's posting) and got: apache: could not open document config file D:/Program Files/E~1/Apache2/conf/httpd.conf error. As you said i changed modules/mod_webapps.so to modules\mod_webapps.so, but still the same frustrating message :( what do you think the problem can be? thanks :) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 10:28 PM Subject: Re: LoadModule webapp_module modules/mod_webapp.so apachectl configtest ultimately runs httpd -t, so you could try httpd.exe -t on win32. You might also try reversing the direction of the file seperator in Windows: LoadModule webapp_module modules\mod_webapp.so I'm never tried Apache on Win32, but this should help. On Wed, Apr 24, 2002 at 09:51:57PM +0800, yilmaz wrote: Hi Simon, unfortunately i don't know how to do apachectl configtest. from command window i tried that , but didn't work. From apache monitor, when i try to start the server, it throws the requested operation has failed error, nothing else. My httpd.config is okey, except when i add LoadModule webapp_module modules/mod_webapp.so into the httpd.config file (as it is instructed) , and restart the apache, it can't start. Obviously the problem is with the above line of code. Any suggestions ? Thanks :) Cheers, Simon -- What happens if a big asteroid hits the Earth? Judging from realistic simulations involving a sledge hammer and a common laboratory frog, we can assume it will be pretty bad. - Dave Barry -- 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: LoadModule webapp_module modules/mod_webapp.so
okey, Here is my httpd.conf file, can someone please help me find out , where the problem is? Thanks :) (though a little bit dangerous, it seems that there is no other way to be able to solve the problem) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 12:07 AM Subject: Re: LoadModule webapp_module modules/mod_webapp.so Above any WebApp* directives. In apache 2, also include the port number. I've got: ServerName localhost:80 in my httpd.conf On Wed, Apr 24, 2002 at 11:52:45AM -0400, Dan K. wrote: Also, make sure you have a ServerName directive in your httpd.conf if you don't have it. Regards, Dan Cheers, Simon -- Even had to open up the case and gaze upon the hallowed peace that graced the helpdesk that day. -- Megahal (trained on asr), 1998-11-06 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See URL:http://httpd.apache.org/docs-2.0/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with / (or drive:/ for Win32), the # server will use that explicit path. If the filenames do *not* begin # with /, the value of ServerRoot is prepended -- so logs/foo.log # with ServerRoot set to /usr/local/apache will be interpreted by the # server as /usr/local/apache/logs/foo.log. # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., c:/apache instead of c:\apache). # If a drive letter is omitted, the drive on which Apache.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths, however, to avoid # confusion. # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at URL:http://httpd.apache.org/docs-2.0/mod/core.html#lockfile); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot D:/Program Files/Apache Group/Apache2 # # ScoreBoardFile: File used to store internal server process information. # If unspecified (the default), the scoreboard will be stored in an # anonymous shared memory segment, and will be unavailable to third-party # applications. # If specified, ensure that no two invocations of Apache share the same # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK. # #ScoreBoardFile logs/apache_runtime_status # # PidFile: The file in which the server should record its process # identification number when it starts. # PidFile logs/httpd.pid # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to Off to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 ## ## Server-Pool Size Regulation (MPM specific) ## # WinNT MPM # ThreadsPerChild: constant number of worker threads in the server process # MaxRequestsPerChild: maximum number of requests a server process serves
Re: LoadModule webapp_module modules/mod_webapp.so
Thanks John, but what i don't understand is , Those lines are all commented out (with a # sign in front of them) except the LoadModule... directive. I want to uncomment them one by one till everything works fine once the first one (LoadModule ) works. So for now There are no WebAppConnections defined (they are canceled , uncommented), but still apache can't be get started. - Original Message - From: John Burgess [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 12:44 AM Subject: RE: LoadModule webapp_module modules/mod_webapp.so One thing I've noticed is that you have two WebAppConnection lines, both defining the same name of connection -- either remove one or give its connection a name other than warpConnection. (See at end, and just before the virtualhost section (40 lnes up maybe?) ) Also you don't do AddModule Best Wishes John Burgess [EMAIL PROTECTED] Tel: 01865 718666 Fax: 01865 718600 -Original Message- From: yilmaz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 5:25 PM To: Tomcat Users List Subject: Re: LoadModule webapp_module modules/mod_webapp.so okey, Here is my httpd.conf file, can someone please help me find out , where the problem is? Thanks :) (though a little bit dangerous, it seems that there is no other way to be able to solve the problem) - Original Message - From: Simon Stewart [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 12:07 AM Subject: Re: LoadModule webapp_module modules/mod_webapp.so Above any WebApp* directives. In apache 2, also include the port number. I've got: ServerName localhost:80 in my httpd.conf On Wed, Apr 24, 2002 at 11:52:45AM -0400, Dan K. wrote: Also, make sure you have a ServerName directive in your httpd.conf if you don't have it. Regards, Dan Cheers, Simon -- Even had to open up the case and gaze upon the hallowed peace that graced the helpdesk that day. -- Megahal (trained on asr), 1998-11-06 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/02 -- 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]
Problem with shopping cart JSP :( Help :(
Hi everyone, hope i can find a solution from you Gurus. I wrote a simple shopping cart JSP file that makes use of session attributes and Hastables to store temporary user data. Don't know why, it insists on not to working properly, throwing classCastException : java.util.Vector at org.apache.jsp._0002fs_0002dcart_0002fshpcart_jsp._jspService(_0002fs_0002dcart_0002fshpcart_jsp.java:71) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) .. ... I am sure many of you , too, had faced damn this problem. Although i am not using vectors in my code, i am having exception regarding to Vectors. Can somebody please tell me what is wrong with this before i got crazy , whole afternoon i have been working on this, trying to figure out what the hell problem is. Here are some hints for those willing to help me: win 2000 tomcat 4.0.1 my code : %@ page language=java import=java.util.* % %@ page contentType=text/html; charset=Big5 % html head meta http-equiv=content-type content=text/html;charset=Big5 titleShopping cart/title /head % Hashtable Pnames,Prices,Quantity; Enumeration items=null; Integer price=null; int pr=0; Integer qnt=null; int quant=1; int total=0; Integer prodno=null; String pname=; Pnames=(Hashtable)session.getAttribute(cart.items); if (Pnames==null) { Pnames = new Hashtable(); Prices=new Hashtable(); Quantity=new Hashtable(); } else { Prices=(Hashtable)session.getAttribute(cart.prices); Quantity=(Hashtable)session.getAttribute(cart.quantity); } if (request.getParameter(pname)!=null) { Pnames.put(new Integer(Integer.parseInt(request.getParameter(prodno))),request.getParameter(pname)); Prices.put(new Integer(Integer.parseInt(request.getParameter(prodno))), new Integer(Integer.parseInt(request.getParameter(price; Quantity.put(new Integer(Integer.parseInt(request.getParameter(prodno))), new Integer(Integer.parseInt(request.getParameter(qnt; } session.setAttribute(cart.items,Pnames); session.setAttribute(cart.prices,Prices); session.setAttribute(cart.quantity,Quantity); % body background=images/bg.jpg p/p centerh1 The items in your Shopping cart: /h1 p/p table border=1 cellpadding=0 cellspacing=2 width=466 tr th div align=center bitemno/b/div /th th div align=center bitem /b/div /th thbunitpricebr (NT)/b /th th div align=center bquantity /b/div /th th div align=center btotalpricebr (NT)/b/div /th th div align=center bremove/b/div /th /tr % if ( Pnames.keys()==null){ % There are no items in your shopping cart % } else { items= Pnames.keys(); while (items.hasMoreElements()) { prodno=(Integer)items.nextElement(); pname=(String)Pnames.get(prodno); price=(Integer)Prices.get(prodno); pr=price.intValue(); qnt=(Integer)Quantity.get(prodno); quant=qnt.intValue(); total+=pr*quant; % tr tdi%=prodno.intValue()%/i/td tdi%=pname%/i/td tdi%=pr%/i/td tdi%=qnt%/i/td tdi%=quant*pr%/i/td td a href=remove.jsp?prodno=%=prodno%irem/i/a /td /tr % } // end of while loop% /table pbTotal price :/b i%=total%/i p% }//end of if loop %/p table border=1 cellpadding=0 cellspacing=2 width=302 tr tha href=checkout.jspCheck Out/a/th tha href=javascript:history.go(-1)Go to Previous Page/a/th tha href=remove.jspEmpty Shopping Cart/a/th /tr /table p/p /center /body /html
Re: Problem with shopping cart JSP :( Help :(
Thanks for your advice, but this one i had already done without success. I opened it with dreamweaver, the line 71 is blank, so i don't know how to look for the real line 71, do you have any hint? thanks :) - Original Message - From: Manuel Mall [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, April 12, 2002 3:46 PM Subject: RE: Problem with shopping cart JSP :( Help :( Without looking at your code I suggest you open the file _0002fs_0002dcart_0002fshpcart_jsp.java:71 and look at line 71 to see what line of Java code is causing the problem. You should find that file in the Tomcat work directory for the corresponding context. If it is not there set the isWorkDirPersistent=true attribute in the Context ... tag of your server.xml file. Manuel -Original Message- ... classCastException : java.util.Vector at org.apache.jsp._0002fs_0002dcart_0002fshpcart_jsp._jspService(_0002fs_0002dc art_0002fshpcart_jsp.java:71) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) .. ... -- 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: Problem with shopping cart JSP :( Help :(
Thanks Neale, Actually i was using the same Jsp a few months ago without any problem, today i just wanted to make another shopping cart application, and wanted to make use of the previous shopping cart jsp, surprisingly i couldn't make it work ?? :( I am still trying .. Cheers :) - Original Message - From: Neale Rudd [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 5:05 PM Subject: Re: Problem with shopping cart JSP :( Help :( I have been able to run your jsp successfully on our own server, and added products to the list with URL's such as: testjsp.jsp?prodno=1price=2qnt=3pname=hello testjsp.jsp?prodno=2price=2qnt=3pname=hello2 So your error seems to be caused by another JSP that is putting something other than a Hashtable into the session. Hope that helps, Neale -Original Message- From: yilmaz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Date: Friday, 12 April 2002 18:05 Subject: Re: Problem with shopping cart JSP :( Help :( Thanks for your advice, but this one i had already done without success. I opened it with dreamweaver, the line 71 is blank, so i don't know how to look for the real line 71, do you have any hint? thanks :) - Original Message - From: Manuel Mall [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, April 12, 2002 3:46 PM Subject: RE: Problem with shopping cart JSP :( Help :( Without looking at your code I suggest you open the file _0002fs_0002dcart_0002fshpcart_jsp.java:71 and look at line 71 to see what line of Java code is causing the problem. You should find that file in the Tomcat work directory for the corresponding context. If it is not there set the isWorkDirPersistent=true attribute in the Context ... tag of your server.xml file. Manuel -Original Message- ... classCastException : java.util.Vector at org.apache.jsp._0002fs_0002dcart_0002fshpcart_jsp._jspService(_0002fs _0002dc art_0002fshpcart_jsp.java:71) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) .. ... -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie question
Hi Javier, don't be so undeterminant, There are a lot of Gurus here which can help you. But you shouldn't be like the guy a few days ago. then you will be alone. For your problem, i guess you didn't restart your tomcat after moving your helloworld class to Root/web-inf/classes directory. Am i right ? Cheers :) - Original Message - From: Javier [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 5:32 PM Subject: Re: Newbie question On 11/04/2002 at 20:16 yilmaz wrote: Hi Javier, I am not very sure what mistake are you doing, but to find out if your tomcat is up and installation is okey, try using default examples servlets http://localhost:8080/examples/ try any of them, and if they are okey, tell me if you can access Well, I'm close to scream against Tomcat like some guy did a few days ago !!! I've deleted all my XP box and installed a clean W2K (for more reasons than Tomcat). I've installed a clean Tomcat on c:\tomcat. Then I tried to access: http://localhost:8080 - OK http://localhost:8080/examples/servlet/HelloWorldExample - OK Well, I decide to copy HelloWorldExample.class from c:\tomcat\webapps\examples\WEB-INF\classes to c:\tomcat\webapps\ROOT\WEB-INF\classes Then I tried to access: http://localhost:8080/HelloWorldExample - Fail, 404 Error http://localhost:8080/servlet/HelloWorldExample - Fail 500 Error with the following code java.util.MissingResourceException: Can't find bundle for base name LocalStrings, locale es at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:8 04) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:694) at java.util.ResourceBundle.getBundle(ResourceBundle.java:538) at HelloWorldExample.doGet(HelloWorldExample.java:25) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1012) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 ) at java.lang.Thread.run(Thread.java:536) If I found so much problems with a little example page I don't want to know which will be the problem with a real application !! Could someone help me ? Thanks in advance jl -- 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: TC hidding console
Hi Raymond, Can you kindly tell us which line did you change in catalina.bat or startup.bat? Because i tried to replace java with javaw in catalina.bat, tomcat couldn't startup. Thnaks :) - Original Message - From: RAYMOND Romain [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 9:02 PM Subject: Re: TC hidding console yeah, thanks javaw was my good gift of the afternoon. Peter Romianowski a écrit : or simply use javaw instead of java (you would have to look into catalina.bat or .sh in order to change that) -Original Message- From: Andy Eastham [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 2:09 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: TC hidding console There is a /b option in the start command that prevents a new window being created. You could try hacking the startup scripts to use this. I haven't tried this though. Andy -Original Message- From: RAYMOND Romain [mailto:[EMAIL PROTECTED]] Sent: 12 April 2002 12:50 To: Tomcat Users List Subject: Re: TC hidding console Because it is to give a demo embended on a CD and I would not like to make all my debugs appear ... Barney Hamish a écrit : Why don't you just run Tomcat as a service. Then you'll never see the console. -Original Message- From: RAYMOND Romain [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:45 PM To: Tomcat Users List Subject: TC hidding console Hello, is there a way under Windows2000 to hide TC console when starting up ? thanks. -- 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] -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie question
Hi Javier, I am not very sure what mistake are you doing, but to find out if your tomcat is up and installation is okey, try using default examples servlets http://localhost:8080/examples/ try any of them, and if they are okey, tell me if you can access http://localhost:8080/index.html if both these are working fine, then try to put your tomcat under a directory that doesn't contain spaces , like d:\tomcat I suspect the directory where you put Tomcat program files is causing problems, since it includes a space, just guessing cheers :) - Original Message - From: Javier A. Leyba [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 1:09 AM Subject: Re: Newbie question On 11/04/2002 at 0:18 yilmaz wrote: Hi Javier! Servlets should be under webapps/yourcontext/WEB-INF/classes/ directory. yourcontext can be anyone like, ROOT, examples,etc. One more thing do not forget to append /servlet/ to your url. Just to be more helpful for a new comer : say you put your HelloWorld servlet under tomcathome/webapps/ROOT/WEB-INF/classes/ your url should be like this: http://localhost:8080/servlet/HelloWorld Hope this helps :) I've tried but it didn't work. I've made a new directory called classes under /Program Files/Apache Tomcat 4.0/webapps/ROOT/WEB-INF and I copied my HelloWorldExample.class to this directory. From my browser I tried and I received a The requested resource (/servlet/HelloWorldExample) is not available. message. Need I to define a new context ? jl _ 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: tomcat 4.0 url authentication
it works for me - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat-User [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 2:40 AM Subject: tomcat 4.0 url authentication Does TC4.X support http://username:[EMAIL PROTECTED]:8080/manager/list ? I want to authenticate to the realm this way, but it does not seem to work. --Jay Gardner -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Content-Encoding - URGENT Please
Marhaba Ibrahim, I am not sure if someone else has already answered your question If you are using JSP 1.2 or servlet 2.3 (if you use tomcat 4 ) then you can use response.setCharacterEncoding(UTF-8); method. I think this will work. Cheers :) - Original Message - From: Mohammed Ibrahim [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 8:09 AM Subject: Re: Content-Encoding - URGENT Please Hi Randy, Thanks for the quick response. I tried using response.setContentType() method but it works the same way as %@ page % tag and tried to convert the page content to UTF. since the content is already in UTF it gets messed up. Is there a way we can set the default encoding header sent by the server to the browser to utf-8? Thanks Gulshan - Original Message - From: randy melder [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 08, 2002 5:15 PM Subject: RE: Content-Encoding - URGENT Please Look at the servlet API. There is a set content type function. I'm sorry, I don't have it in front of me. But the answer is using a Servlet API function. Good Luck, .randy /*** * Cheery Lynn Interactive, LLC * http://www.cheerylynn.com/ * tel://602 279 0135 * Web Applications-- ***/ -Original Message- From: Mohammed Ibrahim [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 4:53 PM To: [EMAIL PROTECTED] Subject: Content-Encoding - URGENT Please Hi, I am having trouble setting the page content type and encoding on my JSP pages. The content on the JSP page is already in UTF-8 format and so we cannot use %@ page % tag to set content type and have to use HTML META TAG to set these headers. But tomcat alwasys sets the page encoding to western european ISO and browser is ignoring the META tag. The sam page works fine with Weblogic. Please help me resolve this problem. Thanks Gulshan -- 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: repost an unanswered question.
I have the same problem with tomcat 4.0.1 running on win2000. But hte problem is not persistent, namely , sometimes happens sometimes not. I couldn't find out the reason, so i couldn't give any explanation to our client other than saying just refresh and the problem will go away. Any one has a better explanation thanks .. - Original Message - From: todd tredeau [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 5:38 AM Subject: Re: repost an unanswered question. Ok... I'll bite... I've seen this error (or lack of it), when I get errors with an incompatbile jndirealm and enabling jmx beans are you getting any kind of errors at tomcat startup, or in your log files I understand you say basically reload after and it works. I also ran into this when I began testing Chiki, it seems that when I updated to Tomcat 4.0.X the problem went away... So I didn't really try to fix it, but upgraded past the issue...I hope this helps.. from a non-technical perspective.. todd http://www.wiserlabz.com collaborative effort to promote Novell and Open Source solutions Alvin Wang wrote: I'm not complaining. But I read someone said that they always can get positive responses for their postings. Maybe my question is naive, but I try again. -Original Message- From: Alvin Wang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:18 PM To: Tomcat Users List Cc: SERVLET-INTEREST Subject: JDBCRealm problem (EMPTY page after login) Hi! I am using JDBCRealm in Tomcat to setup the user authentication. For example if the user want to access abc.html, Tomcat will first display the login.jsp page. However, after the user logs in, it shows an BLANK page. The user has to refresh the browser to see the content of abc.html Can any guru tell me how to fix this? Thanks! Alvin -- 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: Newbie question
Hi Javier! Servlets should be under webapps/yourcontext/WEB-INF/classes/ directory. yourcontext can be anyone like, ROOT, examples,etc. One more thing do not forget to append /servlet/ to your url. Just to be more helpful for a new comer : say you put your HelloWorld servlet under tomcathome/webapps/ROOT/WEB-INF/classes/ your url should be like this: http://localhost:8080/servlet/HelloWorld Hope this helps :) - Original Message - From: Javier A. Leyba [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 11:19 PM Subject: Newbie question Hi I'm trying to do my first servlet. I've compiled a simple HelloWorld class. Now, where is the root Tomcat directory where may I put it ? How could I define a new one for my tests ? Thanks in advance jl _ 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP and MYSQL: Connection Sample??
Hi subceero, Obviously you need to establish your own mysql database and table, here is a simple sample jsp file to give you some hints to get you started. Change the connection parameters in connect.jsp file, and create a sample table according to sample jsp (test.jsp) parameters. Hope it helps . Cheers :) (note: put test.jsp and connect.jsp in the same directory) - Original Message - From: subceero [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 03, 2002 5:47 AM Subject: JSP and MYSQL: Connection Sample?? Hi everyone, Does anyone of you have a sample SMALL code of a mysql-connection from jsp? just to check if the connection can be established. Thanks in advance Subceero connect.jsp Description: Binary data test.jsp Description: Binary data -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat configuration question
Merhaba Ibrahim, By default HTTP runs on port 80, so if you set port number for tomcat to 80, you won't need to add port number to the URL. The browser will automatically assume it's port number 80. Hope it helps Regards :) - Original Message - From: Ibrahim Beyazit [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 29, 2002 4:38 AM Subject: Re: Tomcat configuration question Mine was already 8080 when installed. I still have to put 8080 on URL. (www.company.com:8080) to get to the home page. How can I configure it so I don't need to put that 8080 on the URL. Maybe this one is clearer. Thanks. - Original Message - From: Dominic Parry [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 11:56 PM Subject: Re: Tomcat configuration question Hi find the following section in server.xml and change the port: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ to - Connector className=org.apache.catalina.connector.http.HttpConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ hope this helps. Server.xml should be in your conf directory in tomcat home. cheers Dominic Parry B.Sc (Information Systems, Computer Science) B.Sc (Hons) Computer Science Rhodes University - Original Message - From: Rohit Agarwal [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 9:53 AM Subject: Re: Tomcat configuration question I have the same question, if somebody can help, that would be great. Thanks. Rohit - Original Message - From: Ibrahim Beyazit [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 6:47 PM Subject: Tomcat configuration question How would I configure Tomcat so that the default URL can be www.company.com instead of localhost:8080? I got the domain part covered. (i.e I got www.company.com:8080 working. But I am having problems with getting rid of 8080. Any help will be appreciated -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: bill caricature
looking at the tone of his writing , one can easily understand what hell it contains. - Original Message - From: Stephan Mülhaus [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 3:16 PM Subject: Re: bill caricature Be careful this Mail contains a Virus! At 09:11 26.03.2002 +0200, you wrote: -- Virus Warning Message (on raq4b.nwu.de) Found virus WORM_MYLIFE.B in file cari.scr The uncleanable file cari.scr is moved to /etc/iscan/virus/virsnOfKl. - Hi How are yo? look to bill caricature it's vvvery vey unny :-) :-) i promise you will love it? ok buy No Viruse Found MCAFEE.COM -- Virus Warning Message (on raq4b.nwu.de) cari.scr is removed from here because it contains a virus. --- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- -- Stephan Mülhaus [EMAIL PROTECTED] NWU Gesellschaft fuer Netzwerk und Kommunikation mbH Phone: +49-231-986510 - 0 FAX: +49-231-986522 - 2 -- -- 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: Can somebody help me!!! Plzz... (Oracle9i and Tomcat4.03)
hi Wiwi! Apperantly your oracle 9 's http service which is using tomcat is running, sop obviuoosly you can't run another tomcat without stopping the previous one. If you need to run tomct standalone, then go to control panel - services and then stop the oracle http service, then you can run your own tomcat. hope it helps cheers :) - Original Message - From: Wiwi Wiwi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 23, 2002 3:15 PM Subject: Can somebody help me!!! Plzz... (Oracle9i and Tomcat4.03) dear all, currently, I've installed Oracle 9i and Tomcat4.03, as well as JSDK1.4.0. However, I've found that after installing Oracle 9i, Tomcat 4.03 (start.sh) seems couldn't run. Is Oracle 9i JVM has overwritten the existing JVM? On the other hands, as I stop the Oracle service in admin. tools(note that I'm using WindowsXP), Tomcat is able to start but can't access to Oracle Database that I've created. Following is the error that returned to me as I attempt to start Tomcat (Notice that Oracle database services are started): Catalina.start: LifecycleException: null.open: java.net.BindException: Address already in use: JVM_Bind:8080 LifecycleException: null.open: java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.catalina.connector.http.HttpConnector.initializeHttpConnector.ja va:1130 and I've set the environment as followed: CATALINA_HOME = E:\Apache Tomcat 4.0 CLASSPATH = .;E:\oracle\ora90\jdbc\lib\classes12.zip JAVA_HOME = C:\j2sdk1.4.0 Path = E:\oracle\ora90\bin;E:\oracle\ora90\Apache\Perl\5.00503\bin\mswin32-x86;C:\P rogram Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\S ystem32\Wbem Your help is much appreciated...:) Pls help... it's urgent. Thanks in advance. regards, Wiwi. _ Chat with friends online, try MSN Messenger: http://messenger.msn.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]
Re: image manipulating via servlets on tomcat4
Thanks to all who answered my question. My problem is , when i load an image via Toolkit class like : Image img=Toolkit.getDefaultToolkit().getImage(imageURL); Then create a BufferedImage object to write on it. BufferedImage bi=new BufferedImage(... Graphics g=bi.createGraphics(); Then I call g.drawImage(img,0,0,null); then i call g.drawString(mystring, int, int) ; where int is an integer It seems that i can't call g.drawImage and g.drawString methods at the same time. for testing i commented out the g.drawImage , and i was able to see the text sent to the output as a jpg file. Anyway , at last in Jason hunter's java servlet programming book on page 182, i found a similar example. I will first have a look at it. If i still have problems i will post it to here. Thanks everyone Best Wishes :) - Original Message - From: Ralph Einfeldt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 11:23 PM Subject: AW: image manipulating via servlets on tomcat4 - Use AWT as for any gui. Have a look at: java.awt.Toolkit.getImage(); java.awt.Image.getGraphics(); java.awt.Graphics.drawString(); If you did it already this way, what was your problem? -Ursprüngliche Nachricht- Von: yilmaz [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 12. März 2002 15:54 An: Tomcat Users List Betreff: image manipulating via servlets on tomcat4 snip/ I tried almost every way, in vain :( snip/ -- 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: image manipulating via servlets on tomcat4
That is what i am trying to do, writing on the older image, and then send out the new version to the browser. I know the caching problem, but just to make sure everytime , i renewed my servlet, i cleaned up all the temperary internet files, restarted tomcat, still having the same problem. Seems that g.drawImage(imageobject,0,0,null) and g.drawString(anystring,10,10) (where g is a Graphics object) methods don't work at the same time. - Original Message - From: Mark [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 11:59 PM Subject: Re: image manipulating via servlets on tomcat4 Is the problem that the 'old' vs. newly generated image displays (with the same .gif/.jpg name)? If that's the case then it's likely a problem with browser image caching. The only way I found to get around that was to generate unique image file names each time the new images were generated, guaranteeing the browser would load the desired image each time. Hope this helps, if I understand the problem that is... Mark At 10:54 PM 3/12/02 +0800, you wrote: Hi everybody, I am using tomcat4 on win 2000. I have searched all the archives and almost all websites related with java, to no avail. My problem is manupulating images via servlets on Tomcat. In fact , there are tons of examples on the internet and on the archives which shows how to load an image from a local file and send to the browser, or dynamically generate a gif , or jpg image and send it to the user. Up to here , everything is allright. But , it seems that there is no way to load an image from a file (at server), write some text on it or edit that image on hand, finally send it to hte browser as a new image. I tried almost every way, in vain :( I hope, someone overthere, an expert, be nice enough to answer my question, though my question might sound a little bit offtopic. Looking forward to your help hopefully. Cheers :) -- 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: web.xml Question
i think in the same way... there should be a necessary reason to do so, that we are missing, otherwise it seems illogical - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, January 22, 2002 3:56 PM Subject: Re: web.xml Question Usually the web.xml file of a web application starts with the following: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; This URL referst to the dtd file on SUN's server. I think most XML parsers like SAX need to read the dtd file to be able to parse the XML file. That would be a big problem. I'm no expert on the mnatter, but since web-app DTD is something no Servlet container can work without, couldn't the the container provide it to the parser? That URL is just an identifier, saying yes, I'm build upon Sun's public DTD for web.xml. So, the container could tell the parser look, here is that DTD, don't go fetching it. Maybe it's naive of me, but that's how I would do it. I've been using Tomcat for some time now and it never complained on web.xml. I'm behind a firewall and Tomcat is not even aware of that. Nix. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: a problem with in integrating tomcat4 with apache
Okey, no one replied my previous question. so assume for now there is no way to do this. I thought of a simple workaround, but i don't know how to do that. since we can't get apache handle playing media files, then can we force the browser to directly download those files, instead of trying to play it? this way users won't think that there is a problem with this site. thank you very much cheers :) - Original Message - From: yilmaz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, January 21, 2002 10:08 AM Subject: a problem with in integrating tomcat4 with apache Hi everybody, we are havoing trouble in adjusting apache and tomcat configuration so that all the static files such as mp3,avi, swf, etc will be served by apache and jsp,servlets and class files will be served by tomcat. So far may seem very familiar for most of you. However, our problem is that we are using form based authentication. that is we also have to pass the jsessionid to tomcat. This causes all the requests pass to tomcat. In other words , if we configure form based authentication, all the files passes to tomcat, on the other side if we force apache to serve static files , then we are losing form based authentication. Briefly we are in trouble. Can someone out there please help us? WE are on linux redhat 6.2 and tomcat 4. In a more clearer way, our problem is we can't get our server (apache+tomcat) play media files, while it tries to connect , it throws a pile of error messages and disconnects. ** 2002-01-20 10:33:05 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.io.IOException: Connection reset by peer at java.net.SocketOutputStream.socketWrite(Native Method) at java.net.SocketOutputStream.write(SocketOutputStream.java:83) at org.apache.ajp.Ajp13.send(Ajp13.java:959) at org.apache.ajp.Ajp13.doWrite(Ajp13.java:832) at ** but when i download those files, it works okey. what i am trying to do is just get the server play those media files properly. any one knows any solution or workarounds for this problem? for (int i=0; i 1 billion; i ++) {Thanks ; } I wish everyone a nice monday :) -- 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]
a problem with in integrating tomcat4 with apache
Hi everybody, we are havoing trouble in adjusting apache and tomcat configuration so that all the static files such as mp3,avi, swf, etc will be served by apache and jsp,servlets and class files will be served by tomcat. So far may seem very familiar for most of you. However, our problem is that we are using form based authentication. that is we also have to pass the jsessionid to tomcat. This causes all the requests pass to tomcat. In other words , if we configure form based authentication, all the files passes to tomcat, on the other side if we force apache to serve static files , then we are losing form based authentication. Briefly we are in trouble. Can someone out there please help us? WE are on linux redhat 6.2 and tomcat 4. In a more clearer way, our problem is we can't get our server (apache+tomcat) play media files, while it tries to connect , it throws a pile of error messages and disconnects. ** 2002-01-20 10:33:05 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.io.IOException: Connection reset by peer at java.net.SocketOutputStream.socketWrite(Native Method) at java.net.SocketOutputStream.write(SocketOutputStream.java:83) at org.apache.ajp.Ajp13.send(Ajp13.java:959) at org.apache.ajp.Ajp13.doWrite(Ajp13.java:832) at ** but when i download those files, it works okey. what i am trying to do is just get the server play those media files properly. any one knows any solution or workarounds for this problem? for (int i=0; i 1 billion; i ++) {Thanks ; } I wish everyone a nice monday :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.01, IIS and JSPs
Hi Daniel, i am interested, please can you send me a copy of your script? Thanks in advance cheers :) - Original Message - From: Daniel Parnell [EMAIL PROTECTED] To: Tomcat-Users [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 10:18 AM Subject: Tomcat 4.01, IIS and JSPs G'day All, I've written a little program that allows Tomcat 4.01 to be used with IIS. If anybody is interrested I can post it somewhere. Daniel -- 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]
[Ajp13] bad read: -103 error
Hi everybody, does someone know what does [Ajp13] bad read: -103 error mean? thanks :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
developing a newsletter program on tomcat 4
Hi all, i want to design a newsletter program either with servlets or JSP, can someone give me some suggestions? or do you know some urls about this? i would appreciate if someone show me a piece of code, or program. if you know any company gives source code free of charge or for trial could you please show me ? thanks for your advises in advance . Cheers :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: the order of the tags in web.xml file
Thank you Craig, i knew that it should be in DTD, but somewhat i couldn't find, may be that time i didn't know how to read :). However, i found it now, thanks for your help. Cheers :) - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 27, 2001 2:55 AM Subject: Re: the order of the tags in web.xml file On Wed, 26 Dec 2001, yilmaz wrote: Date: Wed, 26 Dec 2001 11:18:29 +0800 From: yilmaz [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: the order of the tags in web.xml file Hi all, can anyone tell me where i can find a piece of doc about the order of the tags in a web.xml file. For a while i have been trying to use different combinations of those tags but still i couldn't figure out the right order. I searched archives, FAQs , even http://java.sun.com/dtd/web-app_2_3.dtd but couldn't find anything about that. how are we supposed to know the correct order of those tags? Without that, i can't get my tomcat 4 server worked. Let me make my problem more clear: i want to set some security constraints on my directories,so i need to set security-constraints tags, but whenever i try i am having parsing exceptions due to inproper ordering of those tags. In a more straightforward saying, where should security-constraints tags be put, before -or -after mime types, sesion-config,login config, etc. Please help me as soon as possible. Best Regards :) The DTD *does* tell you exactly what the required order is ... but you do have to know how to read it :-) Near the top of the DTD, you will see the following definition for the web-app element: !ELEMENT web-app (icon?, display-name?, description?, ... which defines exactly the required order, as well as whether an element is optional (? suffix) or can occur zero or more times (* suffix). The same is true for elements with nested sub-elements like servlet. For those that are interested, the detailed syntax and semantics of an XML DTD are defined in the XML Specification at http://www.w3c.org. Craig McClanahan -- 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]
the order of the tags in web.xml file
Hi all, can anyone tell me where i can find a piece of doc about the order of the tags in a web.xml file. For a while i have been trying to use different combinations of those tags but still i couldn't figure out the right order. I searched archives, FAQs , even http://java.sun.com/dtd/web-app_2_3.dtd but couldn't find anything about that. how are we supposed to know the correct order of those tags? Without that, i can't get my tomcat 4 server worked. Let me make my problem more clear: i want to set some security constraints on my directories,so i need to set security-constraints tags, but whenever i try i am having parsing exceptions due to inproper ordering of those tags. In a more straightforward saying, where should security-constraints tags be put, before -or -after mime types, sesion-config,login config, etc. Please help me as soon as possible. Best Regards :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Any one knows a good Web hosting service?
Hi all, The subject may sound a trivial subject for you, please be patient with me. if you are providing this kind of service or would like to suggest me a good JSP ISP please do continue reading: You can reply to my private email address : [EMAIL PROTECTED] Our company is located in taipei/taiwan We have already finished an application program written in JSP 1.2 using tomcat 4 and Mysql 3.23 on win 2000. for a week i have been looking for a reasonable web hosting service on the internet but all my efforts are in vain. i have searched the archives , the list of the JSP ISPs in servlets.com and adrenalin.com, i found a few reasonable and suitable companies.However, i wrote to those adresses four times but couldn't get any reply, it seems that they already have enough customers, and don't need (want ?) new ones. As a result i decided to bring the issue up here, hoping that one of yours' companies wants to offer an inexpensive web hosting for us. Our requirements : 0) Inexpensive (around 10 to 20 USD /month including all the features below) 1) Isp should be supporting at least JSP 1.1 (JSP 1.2 is preferable) 2) Any servlet engine compatible with tomcat 4 (tomcat 4 is preferable) our application is bundled as a war file, the ISP servlet engine should be able to automatically open and deploy this war file at their sites 3) Any OS, but windows is preferable. 4) a suitable administration interface through web (e.g a control panel) for both Jsp files and the database. 5) 50 M space for java server , 50 M for the web server We need to put media files (mp3 or mpg) on the web server (either apache or IIS) 6) we already have two registered domain names, we need hosting for both in a single space. 7) ISP should be supporting MySQL database version 3.23 or higher. 8) We need a trial period, at least one day. First we want to upload and install our program and database on the server, try and test everything. If everything works well we will purchase one year service. 9) one month money back guarantee. 10) at least two ftp accounts , if on unix a telnet account. thank you very much for bearing me. best regards :) yilmaz -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Any one knows a good Web hosting service?
hi keith, thanks for your suggestion, but i already wrote email to them twice, but they didn't even reply to me . Cheers :) - Original Message - From: Keith Morgan [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 9:59 PM Subject: RE: Any one knows a good Web hosting service? check out kgbinternet.com. Servlet support, mysql, very low rates made even lower by being in Canadian $. I've been using it for several months with no complaints. -Original Message- From: yilmaz [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 5:33 AM To: Tomcat Users List Subject: Any one knows a good Web hosting service? Hi all, The subject may sound a trivial subject for you, please be patient with me. if you are providing this kind of service or would like to suggest me a good JSP ISP please do continue reading: You can reply to my private email address : [EMAIL PROTECTED] Our company is located in taipei/taiwan We have already finished an application program written in JSP 1.2 using tomcat 4 and Mysql 3.23 on win 2000. for a week i have been looking for a reasonable web hosting service on the internet but all my efforts are in vain. i have searched the archives , the list of the JSP ISPs in servlets.com and adrenalin.com, i found a few reasonable and suitable companies.However, i wrote to those adresses four times but couldn't get any reply, it seems that they already have enough customers, and don't need (want ?) new ones. As a result i decided to bring the issue up here, hoping that one of yours' companies wants to offer an inexpensive web hosting for us. Our requirements : 0) Inexpensive (around 10 to 20 USD /month including all the features below) 1) Isp should be supporting at least JSP 1.1 (JSP 1.2 is preferable) 2) Any servlet engine compatible with tomcat 4 (tomcat 4 is preferable) our application is bundled as a war file, the ISP servlet engine should be able to automatically open and deploy this war file at their sites 3) Any OS, but windows is preferable. 4) a suitable administration interface through web (e.g a control panel) for both Jsp files and the database. 5) 50 M space for java server , 50 M for the web server We need to put media files (mp3 or mpg) on the web server (either apache or IIS) 6) we already have two registered domain names, we need hosting for both in a single space. 7) ISP should be supporting MySQL database version 3.23 or higher. 8) We need a trial period, at least one day. First we want to upload and install our program and database on the server, try and test everything. If everything works well we will purchase one year service. 9) one month money back guarantee. 10) at least two ftp accounts , if on unix a telnet account. thank you very much for bearing me. best regards :) yilmaz -- 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: charset problem in java beans
wow! that is great, i should have known that long before spending a lot of time by trial and error methods. :) Anyway, it is not too late. thanks a lot Craig Best wishes - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 10:51 AM Subject: Re: charset problem in java beans In Tomcat4, you can use the new Servlet 2.3 call request.setCharacterEncoding(). If you do this before calling any of the request.getParameter() type calls, Tomcat will do the translation for you. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: charset problem in java beans
thanks Craig, Craig wrote : It sounds like you might be working too hard :-). how did you understand? :) Internally, Java keeps all String values in Unicode. When you actually write the response, it will be converted according to the character encoding you specify on the page. theoretically you are right, but unfortunately in real applications , it seems it is not like that. If you're using JSP you would put this at the top of your page: %@ page contentType=text/html;charset=Big5 % it is already at the top of my every single jsp page. and then write out the values something like this: %= sb.getItemname(itemid) % i already have this too in my code,too. From a servlet, the important issue is to set the content type and character encoding *before* you get the PrintWriter: response.setContentType(text/html;charset=Big5); PrintWriter writer = response.getWriter(); ... writer.print(sb.getItemname(itemid)); In either case, Java will perform the Unicode-Big5 conversion for you. then why am i keeping on getting garbled symbols instead of traditional chinese chars? by the way, other than the strings retreived from the bean, other big5 chars are displyed correctly. it seems that the problem occurs when the data is stored in the hahtable or when it is retreived. thanks again for your help. best regards :) Craig McClanahan -- 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: charset problem in java beans
Okey,Craig you were right that before adding the item into the hashtable it was garbled. when i trace back to the origin of that parameter, i see that it comes from an html form filled by a user from another jsp page. then the problem became like this: how or what should i do to be able to receive meaningful big5 chars from an html form? As i previously faced the same problem, i knew how to solve it. (using jason hunter's ParameterParser class) As a result my porgram works correctly, now. thanks a lot. I appreciate your help with this problem. best regards :) - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 2:20 AM Subject: Re: charset problem in java beans It's most likely an issue of where you got the data to load into your hashtable in the first place. For example, if it's loaded from a database, you must ensure that your database understands that it should use Big5 for those characters as well. Craig On Wed, 12 Dec 2001, yilmaz wrote: Date: Wed, 12 Dec 2001 19:23:33 +0800 From: yilmaz [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: charset problem in java beans thanks Craig, Craig wrote : It sounds like you might be working too hard :-). how did you understand? :) Internally, Java keeps all String values in Unicode. When you actually write the response, it will be converted according to the character encoding you specify on the page. theoretically you are right, but unfortunately in real applications , it seems it is not like that. If you're using JSP you would put this at the top of your page: %@ page contentType=text/html;charset=Big5 % it is already at the top of my every single jsp page. and then write out the values something like this: %= sb.getItemname(itemid) % i already have this too in my code,too. From a servlet, the important issue is to set the content type and character encoding *before* you get the PrintWriter: response.setContentType(text/html;charset=Big5); PrintWriter writer = response.getWriter(); ... writer.print(sb.getItemname(itemid)); In either case, Java will perform the Unicode-Big5 conversion for you. then why am i keeping on getting garbled symbols instead of traditional chinese chars? by the way, other than the strings retreived from the bean, other big5 chars are displyed correctly. it seems that the problem occurs when the data is stored in the hahtable or when it is retreived. thanks again for your help. best regards :) Craig McClanahan -- 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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
charset problem in java beans
hi everybody, i have posted a few emails a while ago about the big5 charset support in JSP pages. Fortunately the problem is solved, i appreciae those who helped me. Now, i have a new version of this problem , and it seems it is a little bit more complicated than the previous one. The problem is: i am using a java bean in my jsp page to hold current items list of customers in their shopping cart. i am using hashtables in my java bean. Now i faced the same charset problem here. except the item names (in big5) which are retreived from the java bean, everything works fine. the chinese item names are displayed garbled. Any one out there faced and solved the problem, or would like to suggest a solution for this trouble? by the way, i am using tomcat 4, jdk 1.3.1 on win 2000. below is a snippet from my code : items=sb.getItems(); // sb is the java bean , and getItems method returns the keys of the hashtable while (items.hasMoreElements()) { itemid=(String)items.nextElement(); // itemid is the key value // getItemname(itemid) returns the correspondent value (itemname) product=new String(sb.getItemname(itemid).toString().getBytes(),big5); // itemid is the key value used to // retreive the value from the hashtable i am loking forward to your help with smart solutions :) thanks for taking time cheers yilmaz -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RE2: Jsp compile option for Big5 encoding / encoding question
hi Gabriel, i was having a similar proble a few months ago with big5 characters now it works properly and perfectly. first of all, my experience is that it depends on OS's default charset. my configuration is like this: at the top of the page i set charset with: %@ page contentType=text/html; charset=Big5% and also a the header part of the html code i have this: meta http-equiv=Content-Type content=text/html; charset=big5 these two together sets the charset correctly, one for the dynamic characters, and the other for the static html characters. hope this helps cheers :) - Original Message - From: Ing. Gabriel Gajdos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 4:02 PM Subject: RE: RE2: Jsp compile option for Big5 encoding / encoding question Thanx Craig, but I affraid, this was not the problem. | | JSP (start file): | % |String contentType = text/html;charset=windows-1250; |response.setContentType(contentType); | % | | | The setting windows-1250 is not a valid character encoding name in Java. | Try Big5 instead for Traditional Chinese. Valid character encoding | names are listed in the Internationalization documentation of the JDK: | | http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html | | Craig windows-1250 IS WORKING : I mean, in servlets and in JSP too (when set as %@ %). The above mentioned code does NOT change the Content Type correctly to ANY encoding. Anyway, I tried to change my encoding to Cp1250 which is listed in sun's encoding.doc.html. BTW, windows-1250 is Windows Eastern European, not Chinese, but this is not important at the moment... ;-) Cp1250 causes the same wrong result. Anyway, I also tried (just for fun) to change the Content Type to text/html;charset=Big5. The result is the same, without any chinese signs... So what will be the next try? :-)) Thanx again. Gabriel -- 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]
Tomcat hangs if i click on refresh button
Hi guys, Did any one expereince the following problem? first let me tell my environment i use tomcat4-b7, on win2000, my jvm is jdk1.3 i have a simple jsp file which simply dynamically displays images the name of the images are dynamically created. when first time i acess my jsp file, it compiles and displays the images correctly without any problem, but for the second time it can't display whether i refresh the page or come back from another web address it jsut displays a white blank page without any error. Any idea about what is happening here, any logical expalantion? or is it a kinda metaphysical phenomena :) (joking) thanks for helping me have a trouble -free weekend :) yilmaz - Original Message - From: Matt Egyhazy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, December 02, 2001 1:56 AM Subject: Re: Known Memory clean-up issues? have you tuned the jvm settings? i had out of memory errors with 3.2.3 version of tomcat after periods of heavy load until i tuned the jvm. matt - Original Message - From: Randy Layman [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 3:25 PM Subject: RE: Known Memory clean-up issues? The best thing you can do is to find out where YOU are leaking memory. Tools like OptimizeIt are very useful for this type of issue. Here are a few hints that might help you: * Sessions stick around for some time after the user leaves. If you have large amounts of data in the session, you might want to make your timeout smaller * Servlet instances stay around for very long amounts of time. Storing anything in static and/or instance variables of the servlet can consume memory for very long amounts of time * Static fields stay around for very long amounts of time, even if there are no more references to the classes Another tip, if you reduce the Heap size of your JVM then you can get the problem to happen quicker (since there's less memory available to leak). From the JavaDoc on java.lang.OutOfMemoryError: Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector. Something is holding onto lots of memory. If your servlet is holding memory and a request comes it, its possible that the servlet is holding enough memory that Tomcat can't get the memory that it needs to service the request. Randy -Original Message- From: Denis Balazuc [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 3:42 PM To: Tomcat Users List Subject: Re: Known Memory clean-up issues? Hi all Where would you recommend to use System.gc() in the context of JSP pages ? I guess it would be useless to intercept every single request and hint the system for garbage collection on each request ? (Now I quote) Also, before an OutOfMemory is thrown, the Garbage collector is guarenteed to run, meaning that you really are using all of your memory. I would look at what you are doing in your code - I have servlets that run for weeks without eating up any significant portion of memory I do have many times OutOfMemory exceptions thrown, although we're not doing *that* much It happens quite randomly so it's very difficult to isolate the problem. Moreover, it even happens when fetching HTML pages from Tomcat, without using much JSP... I'd like to find a place to catch that error to take action (like restarting Tomcat) but the only way we have found is to monitor the server and automatically restart it when it fails to respond. Any guidance to solve the problem would be appreciated ;-) Thanks Denis Balazuc - Original Message - From: Yoav Shapira [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 03:07 PM Subject: Re: Known Memory clean-up issues? Howdy, Any harm in forcing garbage collection to run? You cannot force garbage collection to run, only suggest it to the JVM via methods like System.gc(). If you're having difficulty tracking down memory usage, try a profiler like OptimizeIt that has entire memory trees. In addition, you can use parameters like hprof and verbosegc on the java command line to assist you in monitoring garbage collection. Yoav Shapira -- 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
form authentication
hi everybody, can anyone please tell me how form authentication in tomcat 4 b7 works? so far i was using basic auth. without a problem. for some reasons i must use custom form auth. , so i decided to configure my tomcat for form auth type. however i am having problems, and i can't find any docs about this. let me make my situation more clear: in tomcat/conf/web.xml i defined form type auth. as follows: login-config auth-methodform/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config where login.jsp is located under root directory. in tomcat/conf/tomcat-users.xml i added a user 'any' for anonymus access with a role 'any' as follows: tomcat-users user name=yilmaz password=ay roles=sman / user name=yilmazay password=ay roles=admn,memb / user name=member password=member roles=memb / user name=any password=any roles=any / /tomcat-users i am using jdbc realm for authentication with a mysql at the backend. i don't think there is a problem with mysql, because it was working perfectly till now for basic type auth. in addition i defined form type authen. in root/web-inf/web.xml, too. i checked my logs, here is the related part: WebappLoader[]: Deploying class repositories to work directory D:\tomcat\work\localhost\_ 2001-11-28 11:38:19 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2001-11-28 11:38:19 StandardManager[]: Seeding of random number generator has been completed 2001-11-28 11:38:19 ContextConfig[]: Cannot configure an authenticator for method Form 2001-11-28 11:38:19 ContextConfig[]: Marking this application unavailable due to previous error(s) 2001-11-28 11:38:19 StandardContext[]: Error initializing naming context for context 2001-11-28 11:38:19 StandardContext[]: Context startup failed due to previous errors what else should i do, please help me with this?because i can't find any satisfactory expanation anywhere. thanks for your help best regards :) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
multiple charset support problem
hi everybody, i am reposting this since i couldn't get an answer yet, however i am sure there is a solution for this problem, i can't think of that tomcat4 can't support utf-8 charset. by the way i already tried jsp interest mailing list ,but didn't help.it seems that tomcat user list community is more helpful, i bring the problem to this platform My situation is: i am working with tomcat 4 b7 on win 2000 and jdk 1.3 my jsp pages should support both japanese and chinese characters as well as latin chars.Thus, i want to set my Jsp pages' charset to UTF-8 as follows: %@ page language=java % %@ page import=java.util.Date,java.sql.*,java.lang.Math contentType=text/html; charset=UTF-8 % However, when i do so i am having the below exception: org.apache.jasper.compiler.ParseException: Cannot read file: ze file at org.apache.jasper.compiler.JspReader.pushFile2(JspReader.java:275) at org.apache.jasper.compiler.JspReader.(JspReader.java:316) at org.apache.jasper.compiler.Parser.(Parser.java:137) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213) and it goes on.. can any one tell me what does this mean and how can be solved? Thanks in advance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: form authentication
Well, i answer my own question, after a long a fierce struggle i defeated the problem. I would never think about it , if i hadn't tried it, so sometimes trial error method works better than all other methods. The only mistake was the Form should have been written as FORM in capital letters. Who could think of this? I hope this way i helped those who have similar troubles. Wish everyone a trouble-free day :) - Original Message - From: yilmaz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, November 28, 2001 11:43 AM Subject: form authentication hi everybody, can anyone please tell me how form authentication in tomcat 4 b7 works? so far i was using basic auth. without a problem. for some reasons i must use custom form auth. , so i decided to configure my tomcat for form auth type. however i am having problems, and i can't find any docs about this. let me make my situation more clear: in tomcat/conf/web.xml i defined form type auth. as follows: login-config auth-methodform/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config where login.jsp is located under root directory. in tomcat/conf/tomcat-users.xml i added a user 'any' for anonymus access with a role 'any' as follows: tomcat-users user name=yilmaz password=ay roles=sman / user name=yilmazay password=ay roles=admn,memb / user name=member password=member roles=memb / user name=any password=any roles=any / /tomcat-users i am using jdbc realm for authentication with a mysql at the backend. i don't think there is a problem with mysql, because it was working perfectly till now for basic type auth. in addition i defined form type authen. in root/web-inf/web.xml, too. i checked my logs, here is the related part: WebappLoader[]: Deploying class repositories to work directory D:\tomcat\work\localhost\_ 2001-11-28 11:38:19 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2001-11-28 11:38:19 StandardManager[]: Seeding of random number generator has been completed 2001-11-28 11:38:19 ContextConfig[]: Cannot configure an authenticator for method Form 2001-11-28 11:38:19 ContextConfig[]: Marking this application unavailable due to previous error(s) 2001-11-28 11:38:19 StandardContext[]: Error initializing naming context for context 2001-11-28 11:38:19 StandardContext[]: Context startup failed due to previous errors what else should i do, please help me with this?because i can't find any satisfactory expanation anywhere. thanks for your help best regards :) -- 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]
Cannot read file: ze file
hi everybody, i am working with tomcat 4 b7 on win 2000 and jdk 1.3 my jsp pages should support both japanese and chinese characters as well as latin chars.Thus, i want to set my Jsp pages' charset to UTF-8. However, when i do so i am having the below exception: org.apache.jasper.compiler.ParseException: Cannot read file: ze file at org.apache.jasper.compiler.JspReader.pushFile2(JspReader.java:275) at org.apache.jasper.compiler.JspReader.(JspReader.java:316) at org.apache.jasper.compiler.Parser.(Parser.java:137) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213) and it goes on.. can any one tell me what does this mean and how can be solved? Thanks in advance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: to be a bit more specific: using POST with SSL (was: mod_jk required for apache/tomcat/SSL?)
Hi Amthauer! it seems that you didn't use doPost(Httpreq,res) method in your servlet, am i right ? cheers :) - Original Message - From: Amthauer, Heiner [EMAIL PROTECTED] To: 'tomcat' [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 3:24 PM Subject: to be a bit more specific: using POST with SSL (was: mod_jk required for apache/tomcat/SSL?) Hi again, sorry, my last question did not really explain my situation. I'll try it again: I did install Apache 1.3.20, Tomcat 3.2.3, openssl 0.9.6, mm 1.1.3 and mod_ssl 2.8.4. I installed it according to a install-log of our company (which is actually the same as yours, Jan :) and it all works fine with one exception: I CAN access servlets using the GET-method, however, I CANNOT access servlets using the POST-method. When using the POST-method I geht some cryptical charaters in the access-log togheter with a '501' and I get a 'Invalid method in request' in the error-log. Unfortunatelly I _haveto_ use the POST-method, because we are sending objects to our servlets. Now, the question is: What exactly do I need for sending objects to serlvets via SSL using the POST-method? Is mod_jserv enough? Is it a configuration problem? Any hints and help is greatly appreciated. regards Heiner Dipl. Ing. Heiner Amthauer Entwicklungsingenieur T-Systems debis Systemhaus Ulm GEI GmbH Tel.: 0731 / 93 44 44 22 Fax.: 0731 / 93 44 44 09 Mobil.: 0178 / 42 69 33 5 mailto:[EMAIL PROTECTED]
Re: Possible Problem with UTF-8 encoded HTTP Requests
as far as i see this is a common problem yesterday there was a discussion about this issue. as a summary , you can use ParameterParser.class to retreive request parameters correctly instead of using the simple method. namely : param= req.getParameter(myParam); param=new String( param.getBytes(), charset ) ; (in your case charset is UTF-8 ) sometimes this simple method doesn't work . then use ParameterParser.class (written by Jason Hunter ) My impression is that tomcat has a problem with retreiving parameters from different charsets. I must be a bug. cheers : ) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 4:05 PM Subject: Possible Problem with UTF-8 encoded HTTP Requests Hi, I have a problem with UTF-8 encoded HTTP Requests. Tomcat 3.2.2 treats them as ISO-8859-1 encoded. Because this problem ocuurs with IE 5, IE 6, Netscape 4 and Netscape 6.1 it seems to be a problem with Tomcat. Or has anyone an idea what is going on. Regards Thomas
Re: classpath problem
hi peter ! your classpath seems wrong it should at least include tomcat_home\lib\servlet.jar; regards :) - Original Message - From: peter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 8:23 PM Subject: classpath problem hi there I'm new to tomcat. I've just downlaoded, installed and set up tomcat for win98 using the user guide provided. However, when i try to run tomcat in the dos window i get several out of environment space lines and a message saying... Unable to set classpath dynamically To set the CLASSPATH dynamically on winx systems only DOS 8.3 names may be used in TOMCAT_HOME setting classpath statically more out of environment space lines Using CLASSPATH: c:\tomcat\classes Out of environment space Starting tomcat in new window Bad command or file name I've made the following settings in my autoexec.bat file: set TOMCAT_HOME=c:\tomcat set JAVA_HOME=c:\jdk1.3 Can anyone tell me what I'm doing wrong? Thanks Peter
Re: charset problem
hi Giannis i had the same problem no matter what i did, didn't help. at last the ParameterParser.class (which is bundled with oreilly package and can be downloaded from www.servlets.com) solved my problem. First try the straightforward method as below: String yourparameter=req.getPrameter("parametername"); yourparameter=new String(yourparameter.getBytes("ISO-8859-1", "ISO-8859-7"); if it doesn't help, use the ParameterParser.class to solve your problem. hope it helps a guy from your neighbour country (Turkey):) - Original Message - From: "Giannis" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 7:45 PM Subject: charset problem I make some JSP pages on Jacarta tomcat. I have problem with the character set. I use content type ISO-8859-7 but the server doesnt appear the characters (it appear ?) even if I use a META tag or a page directive for the contentType. The problem is especially on request.getParameter when I submit a form. Please help
Re: isapi_redirect.dll
hi Shengjun, have you also already made the necessary modifications on workers.properties and uriworker.properties files which are under hte conf directory? After you finish all these , be sure to restart tomcat to make it see the new changes. hope it helps cheers :) - Original Message - From: Shen Shengjun [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 2:09 AM Subject: isapi_redirect.dll Hi, Guys, This question may not be fully related to Tomcat, but I believe this is the best place to seek for valuable helps. I configured TC3.2.2 with PWS on Win98and get 404 not Found error. Finally I think that my isapi_redirect.dll file might not be registered correctly. When I run Regsvr32, a message, as I expected, said that the dll file is loaded, but the DllRegistryServer is not able to find the entry point. This was done after PWS unloaded, ie, run pws /stop in dos shell and using PView to check. I got the dll file from http dlownload using both IE and Netscape in case the problem described in How-to is the cause. I tried put isapi_redirect.dll in either TCHome/bin/ or TCHome/bin/win32/i386/ with necessary changes on PWS virtual folder and registry vlaues according. Any one has some hints on this? Thanks a lot! Shen __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: a simple ( irritating) classpath problem
Hi everyone, i had two problems related with this thread for the classpath problem the solution i found by chance :) is : setting the environmental variables through the command window as : set CLASSPATH=c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7 \ mon\lib\servlet.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\common\lib\cos.jar; as you see :) i removed all the unnecessary ones , servlet.jar is necessary for the tomcat itself and cos.jar is for my utility classes such as PArametrParser , and these are enough. by setting the env variables through the command window avoids the need for logging out windows or restrating :) i spent a lot of time , but i thing it worthed :) my second problem was inserting chinese characters into the SQL server if you have nothing to do with chinese chars you can simply ignore the rest of this message. after trying all possible methods to force my servlet to insert chinese chars correctly, and using trial and error method Thanks God, at last i found the solution and my servlet works perfectly, though it was not so easy here i just wanted to share my experience so that the others may save time and solve their problems. the only solution that worked for me to insert chinese chars into a database (at least SQL 2000 and MS Acces 2000 ) is using the ParameterParser class which is bundled with oreilly package (and can be downloaded from www.servlets.com) . The following is the generally used method and is not working for tomcat(3.2.2 - 4) with big5 charset. String formVariable=req.getParameter(formVariable); String myVariable=new String(formVariable.getBytes(iso-8859-1),big5); the following method works (from Jason's book): ParameterParser parser=new ParameterParser (req); parser.setCharacterEncoding(big5); String myVariable=parser.getStringParameter(formVariable); hope it helps for those who are having the similar problems cheers :) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 24, 2001 10:25 PM Subject: Re: a simple ( irritating) classpath problem Just for the record, can you post what you did with ParameterParser (future archive searchers will appreciate it)? Thanks, Noel HI ALL, first of all thanks for everybody for your help those garbled chars you see on your email are chinese characters(big5) but i already translated it for those who may not be able to see (understand)them it says ParameterParser is not on the right classpath Any way guys , finally after a lot of trial and error methods i managed to make my Tomcat to recognize ParameterParser However, i am stil confused and didn't understand the logic behind the classpath setting because it seems to me that previously i had already done the same settings, but it ididn't work now it works. So i think the best idea is (as Craig said) One suggestion is to set up your development environment to use Ant 1.3, and let it take care of class path problems for you i will try this method, otherwise handling classpath problems is really wasting time it takes longer time to set the classpath than developing the real application THANKS AGAIN TO EVRYBODY CHEERS =) - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 24, 2001 8:16 AM Subject: Re: a simple ( irritating) classpath problem On Thu, 23 Aug 2001, yilmaz wrote: D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java gs.java:37: 銝??ParameterParser ????辣嚗?\ParameterParser.class ??辣?急?嚗om.oreilly.servlet.ParameterParser ??餅??&靽∪冽迤蝖桃?classpath????銝? ParameterParser parser= new ParameterParser(req); ^ 1 ??? What are all those weird characters? Not sure if they are doing anything weird... other than that - I'm out of ideas cheers dim Nrj~jyj}jjz}}zvz~jjjrrsuyizqjʕz ji
Re: a simple ( irritating) classpath problem
here is the related part of my code: import java.io.*; import java.sql.*; import java.text.DateFormat; import java.util.*; import java.lang.Math; import javax.servlet.*; import javax.servlet.http.*; import com.oreilly.servlet.*; public class gs extends HttpServlet { . try { ParameterParser parser= new ParameterParser(req); parser.setCharacterEncoding(big5); subject=parser.getStringParameter(subject); .. and the compiler gives me the following error: D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java gs.java:37: 不能??ParameterParser 坏的?文件:.\ParameterParser.class ?文件含有??的?:com.oreilly.servlet.ParameterParser ?去掉或确信它出?在正确的classpath的子目?中. ParameterParser parser= new ParameterParser(req); ^ 1 ??? simply it says that com.oreilly.servlet.ParameterParser is not on the classpath Strange, ISN'T it? cheers :) - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 2:24 PM Subject: Re: a simple ( irritating) classpath problem On Thu, 23 Aug 2001, yilmaz wrote: but all those efforts are in vain, i don't understand it. when i reference this ParameterParser file with fulll path it works like: com.oreilly.servlet.ParameterParser parser=new com.oreilly.servlet.ParameterParser ; this works, if that works then its not a classpath problem, but an import problem. Are you sure you haven't got a simple typo or something? post your code and we'll have a look (o: cheers dim
Re: a simple ( irritating) classpath problem
Scott Coleman wrote : - Original Message - From: Scott Coleman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 4:33 PM Subject: RE: a simple ( irritating) classpath problem and what is your classpath set to ??? CLASSPATH=.;C:\Aligo\M-1\jakarta-tomcat-3.2.2\lib\servlet.jar;C:\Aligo\M-1\j akar ta-tomcat-3.2.2\lib\cos.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtim e20; c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\webapps\R OOT\ WEB-INF\lib\cos.jar; does the order make any difference ?
Re: a simple ( irritating) classpath problem
hi all, i am sorry to bother you with my simple questions please bear with me a few more seconds the Problem is whenever i change the classpath or add something to it, i have to log out windows 2000 to make those changes take effect which is taking too much time and is irritating too. Is there any simpler or faster way for that? (restarting tomcat doesn't work) thanks everybody :) - Original Message - From: yilmaz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 5:01 PM Subject: Re: a simple ( irritating) classpath problem Scott Coleman wrote : - Original Message - From: Scott Coleman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 4:33 PM Subject: RE: a simple ( irritating) classpath problem and what is your classpath set to ??? CLASSPATH=.;C:\Aligo\M-1\jakarta-tomcat-3.2.2\lib\servlet.jar;C:\Aligo\M-1\j akar ta-tomcat-3.2.2\lib\cos.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtim e20; c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\webapps\R OOT\ WEB-INF\lib\cos.jar; does the order make any difference ?
Re: a simple ( irritating) classpath problem
HI ALL, first of all thanks for everybody for your help those garbled chars you see on your email are chinese characters(big5) but i already translated it for those who may not be able to see (understand)them it says ParameterParser is not on the right classpath Any way guys , finally after a lot of trial and error methods i managed to make my Tomcat to recognize ParameterParser However, i am stil confused and didn't understand the logic behind the classpath setting because it seems to me that previously i had already done the same settings, but it ididn't work now it works. So i think the best idea is (as Craig said) One suggestion is to set up your development environment to use Ant 1.3, and let it take care of class path problems for you i will try this method, otherwise handling classpath problems is really wasting time it takes longer time to set the classpath than developing the real application THANKS AGAIN TO EVRYBODY CHEERS =) - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 24, 2001 8:16 AM Subject: Re: a simple ( irritating) classpath problem On Thu, 23 Aug 2001, yilmaz wrote: D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java gs.java:37: ä¸è½??ParameterParser ?ç???件ï¼?\ParameterParser.class ??件?«æ?ï¼com.oreilly.servlet.ParameterParser ??»æ??确信å¨æ£ç¡®ç?classpath?å???ä¸? ParameterParser parser= new ParameterParser(req); ^ 1 ??? What are all those weird characters? Not sure if they are doing anything weird... other than that - I'm out of ideas cheers dim
test
test
a simple ( irritating) classpath problem
hi all, i have been using servlets and tomcat for a long time but till now i couldn't figure out how to set the classpath exactly Can some one please explain this briefly and clearly? you might ask how did you use tomcat without setting the classpath each time i used trial and error method, because the descriptions in docs never seems to work correctly. But at last i decided to solve this problem radically, becasue i am already sick of classpath problems first let me explain what my problem is: I developed a message board using servlets it works fine , but only with the default charset. namely, when users enters local charset (e.g: big5 chinese), my servlet can't recognize these chars, so only some question marks are stored into the database. i tried to solve this problem with all kinds of methods available, but none of them worked. i tried servlet interest group, it didn't work either. At last I used the ParameterParser class of the oreilly package as described in Jason's book(java servlet programming) it worked, but i had a lot of trouble with the classpath settings But still i don't know how to set it up, beacause it started not to work again. Simply when i compile my servlet it doesn't recognize parameterparser class, saying that it is not on classpath IT IS VERY IRRITATING because i put all the package (com.oreilly.servlet.*) in the same directory with the servlet (under web-inf/classes/ com/servlet/ directory) i tried putting the cos.jar file in the web-inf/lib directory, it didn't work in put these files directly under the web-inf/classes/ directory , it didn't work either according to docs, all the classes are in the classpath by default, so the compiler supposed to find these classes, but it can't then i added the full path tomcat_home/lib/cos.jar, to the classpath, didn't work either. well, i gave up, i just wanted to learn the LOGICAL way to set the classpath up. PLEASE help me by the i am using tomcat 4 ( already switched from tomcat 3.2.2), my OS is win 2000, JDK is 1.3 i am sick of seraching the docs every time when i have the same problem i am looking forward to your help as soon as possible THANK YOU FOR YOUR KINDNESS IN ADVANCE BEST REGARDS
Re: a simple ( irritating) classpath problem
thanks Dimitri but that is what i exactly did, and (of course) i imported oreily package at the beginning with ( import com.oreilly.servlet.*; ) but all those efforts are in vain, i don't understand it. when i reference this ParameterParser file with fulll path it works like: com.oreilly.servlet.ParameterParser parser=new com.oreilly.servlet.ParameterParser ; this works, but why don't the others work. i put this packet under both tomcat_home/lib/cos.jar, tomcathomewebapps/root/web-inf/classes/com/oreilly/servlet/ and as well as tomcathomewebapps/root/web-inf/lib/ but still Doesn't work, simply i can't compile becasue it keeps telling me ParameterParser is not on the classpath any ideas please ( i used tomcat 4 and tomcat 3.2.2 ) they both behave the same way thanks for your help - Original Message - From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 12:33 PM Subject: Re: a simple ( irritating) classpath problem hi, There are three basic areas that classes can be put in tomcat: WEB-INF/classes - contains all the classes that form the web application WEB-INF/lib - contains jars that the web application uses TOMCAT_HOME/lib - contains jars that are available to _all_ applications using tomcat because i put all the package (com.oreilly.servlet.*) in the same directory with the servlet (under web-inf/classes/ com/servlet/ directory) if it is the package com.oreilly.servlet then it should go in WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as a jar, just put the jar in WEB-INF/lib . If it is a zip, then rename it to a jar. i tried putting the cos.jar file in the web-inf/lib directory, it didn't work what do you mean it didn't work? try jar -tf cos.jar to check that the classes are in the jar. I assume you are importing the required classes and that they exist in the jar. in put these files directly under the web-inf/classes/ directory , it didn't work either again, should be according to package then i added the full path tomcat_home/lib/cos.jar, to the classpath, didn't work either. I'm not sure why that didn't work - although if you put cos.jar in the classpath it _should_ be available to all web applications. well, i gave up, i just wanted to learn the LOGICAL way to set the classpath up. you dont need to set the classpath yourself. just put your jars in WEB-INF/lib and your classes in WEB-INF/classes hth, cheers dim
Charset question
Hi, I am using tomcat 3.2.2 as a standalone server, although i set the content type of the page with %@page contentType = text/html; charset=ISO-8859-9% or %@page contentType = text/html; windows-1254% some Turkish characters are not displayed correctly when i try to print an error message using out.println method. Is there a solution to this? Btw i am not sure it is a Tomcat related issue but, how can i tell javascript to print turkish characters And how can i configure Tomcat to disable directory listings in applications deployed under webapps? Any help would be appreciated, thanks. PS: does anyone have a comment to my last post on multipart/form-data problem :( __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: multipart/form-datatomcat 3.2.2 problem
I am sending the source files , all processing instructions are removed from the files. I will be grateful for any help. thanks Firstly the file selector part name : upload.jsp HTML HEAD /HEAD BODY form name=upload method=post action=/java/1.jsp enctype=multipart/form-data BRBR Select a file: INPUT TYPE=FILE NAME=file1 INPUT TYPE=SUBMIT Name=Submit Value=Submit /BODY /HTML Now the handler part name : 1.jsp HTML HEAD /HEAD BODY FORM name=upload method=post action=upload.jsp INPUT TYPE=HIDDEN Name=strdirname value=\ INPUT TYPE=HIDDEN Name=strbasedir value=\ INPUT TYPE=HIDDEN Name=strsorttype value=name /FORM /BODY /HTML --- Simon Brooke [EMAIL PROTECTED] wrote: On Friday 29 June 2001 22:03, ahmet yilmaz wrote: First of all i must apologize for the delay in the response .. i must have forgotten to mention that tomcat is run as a standalone server. I have removed everything from the part that handles the uploded file except the html tags but the error remains. I have also forced IE not to use http 1.1; unfortunately i get the same error. What else should i do? Mail me your source? -- [EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/ -- mens vacua in medio vacuo -- __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
multipart/form-datatomcat 3.2.2 problem
Hello, I have written a page to upload files.The problem is although some files are uploaded correctly, some files end up with getting Cannot find server, The page can not be displayed error in Internet Explorer. Firstly i thought this was due to my bad coding practice, but I deleted the part that handles the upload. Now the file just posts the request, and the part recieving the multipart/form-data justs prints out the headers to stderr, and builds a basic page. But I still get the same errors? what may be the cause of this? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: multipart/form-datatomcat 3.2.2 problem
I am sorry i forgot to mention that tomcat is used as a standalone server(on win98 and unix). For testing i removed all instructions except html tags and i still get the same error. I configured IE not to use http 1.1 unfortunately same error. What can i do ? thanks --- Simon Brooke [EMAIL PROTECTED] wrote: On Friday 29 June 2001 15:12, Andrea wrote: At 01:12 PM 6/29/2001 +0100, you wrote: On Friday 29 June 2001 11:01, you wrote: Hello, I have written a page to upload files.The problem is although some files are uploaded correctly, some files end up with getting Cannot find server, The page can not be displayed error in Internet Explorer. Firstly i thought this was due to my bad coding practice, but I deleted the part that handles the upload. Now the file just posts the request, and the part recieving the multipart/form-data justs prints out the headers to stderr, and builds a basic page. What components are you using to handle file upload? Without wishing to blow my own trumpet to loud, you might find that my MaybeUpload package URL:http://www.weft.co.uk/library/maybeupload/ would help. I had the same problem. Someone told me to use mod_jserv instead of mod_jk and it works fine We use mod_jk with Tomcat and Apache on a number of servers and have never seen this problem. I honestly don't believe mod_jk has anything to do with it. -- [EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/ -- mens vacua in medio vacuo -- __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: multipart/form-datatomcat 3.2.2 problem
First of all i must apologize for the delay in the response .. i must have forgotten to mention that tomcat is run as a standalone server. I have removed everything from the part that handles the uploded file except the html tags but the error remains. I have also forced IE not to use http 1.1; unfortunately i get the same error. What else should i do? thanks --- Simon Brooke [EMAIL PROTECTED] wrote: On Friday 29 June 2001 15:12, Andrea wrote: At 01:12 PM 6/29/2001 +0100, you wrote: On Friday 29 June 2001 11:01, you wrote: Hello, I have written a page to upload files.The problem is although some files are uploaded correctly, some files end up with getting Cannot find server, The page can not be displayed error in Internet Explorer. Firstly i thought this was due to my bad coding practice, but I deleted the part that handles the upload. Now the file just posts the request, and the part recieving the multipart/form-data justs prints out the headers to stderr, and builds a basic page. What components are you using to handle file upload? Without wishing to blow my own trumpet to loud, you might find that my MaybeUpload package URL:http://www.weft.co.uk/library/maybeupload/ would help. I had the same problem. Someone told me to use mod_jserv instead of mod_jk and it works fine We use mod_jk with Tomcat and Apache on a number of servers and have never seen this problem. I honestly don't believe mod_jk has anything to do with it. -- [EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/ -- mens vacua in medio vacuo -- __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Tomcat starting problem
Hi Luba, dbs[160] startup.sh was not part of the error message it is the command i used to start the tomcat. the following Using classpath: /user/staff/wapteam/tomcat=/lib/*:/user/staff/wapteam/tomcat/./tomcat.sh: usr/java1.2=/bin/java: not found is the error message. any help ? thanks - Original Message - From: Luba Powell To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 12:34 AM Subject: Re: Tomcat starting problem dbs[160] startup.sh This an OS error, not tomcat. Unix admin should be able to help you - Original Message - From: yilmaz To: [EMAIL PROTECTED] Sent: Friday, June 15, 2001 11:58 AM Subject: Tomcat starting problem hi everyone at first it looks as it is a very basic question though not so.. i have installed tomcat nearly one month ago, on unix OS everything went fine, it was working smoothly. however, today when i tried to access the files i put in hte webapps directory previously , i couldn't. the server dosen't work anymore. the reason is that when the http server of our campus restarted, all the environment variables set by users have been cancelled, so i tried to set again according to the instructions on hte tomcat docs as follows: setenv TOMCAT_HOME /user/staff/wapteam/tomcat setenv JAVA_HOME /usr/java1.2/ setenv CLASSPATH user/staff/wapteam/tomcat/bin where tomcat is the directory that tomcat files reside when i try to start the server by : 'startup.sh' command it gives the following error: dbs[160] startup.shUsing classpath: /user/staff/wapteam/tomcat=/lib/*:/user/staff/wapteam/tomcat/./tomcat.sh: usr/java1.2=/bin/java: not found what is wrong ? can someone help me , please? thanks in advance :) cheers
Tomcat starting problem
hi everyone at first it looks as it is a very basic question though not so.. i have installed tomcat nearly one month ago, on unix OS everything went fine, it was working smoothly. however, today when i tried to access the files i put in hte webapps directory previously , i couldn't. the server dosen't work anymore. the reason is that when the http server of our campus restarted, all the environment variables set by users have been cancelled, so i tried to set again according to the instructions on hte tomcat docs as follows: setenv TOMCAT_HOME /user/staff/wapteam/tomcat setenv JAVA_HOME /usr/java1.2/ setenv CLASSPATH user/staff/wapteam/tomcat/bin where tomcat is the directory that tomcat files reside when i try to start the server by : 'startup.sh' command it gives the following error: dbs[160] startup.shUsing classpath: /user/staff/wapteam/tomcat=/lib/*:/user/staff/wapteam/tomcat/./tomcat.sh: usr/java1.2=/bin/java: not found what is wrong ? can someone help me , please? thanks in advance :) cheers