getParameter() help
Hi, I have a servlet which dispatches out various jsp's. Some of the jsp's resulting html contain links back to the servlet to fire off another page like this: A HREF="mainservlet?cmd=loadpage=home"HOME/A When I do a request.getParameter("cmd") the string I get is "cmd" which is right. When I do request.getParameter("page") the string I get is "mainservlet?cmd=load" which is not right. Does anyone know if I'm doing something wrong with how I'm writing the link back to the servlet? Thanks! Matt Becker Mythicwave Productions, Inc. 21053 Devonshire, #201 Chatsworth, Ca. 91311 818-700-1998 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: getParameter() help
Hi, Ram! I tried changing the name "page" to "pg" but that didn't change that getParameter() returns other part of the text that's not part of the "pg" variable. I thought maybe I was doing something wrong with the URL in how the parameters were being passed in the GET that's being executed when the URL is clicked on. The first parameter "load" is always correct. The separation between values passed is the "" symbol, right? I'm using Tomcat 3.2.1, JDK 1.3, and IE 5.5 on a Win98 machine. Thanks! Matt At 01:58 PM 1/16/01, you wrote: It looks like the "page" could be a key-word and is pulling "mainservlet?cmd=load",try changing page to something like "pg" and see if u get the same error. Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: getParameter() help Date: Tue, 16 Jan 2001 12:50:28 -0800 Hi, I have a servlet which dispatches out various jsp's. Some of the jsp's resulting html contain links back to the servlet to fire off another page like this: A HREF="mainservlet?cmd=loadpage=home"HOME/A When I do a request.getParameter("cmd") the string I get is "cmd" which is right. When I do request.getParameter("page") the string I get is "mainservlet?cmd=load" which is not right. Does anyone know if I'm doing something wrong with how I'm writing the link back to the servlet? Thanks! Matt Becker Mythicwave Productions, Inc. 21053 Devonshire, #201 Chatsworth, Ca. 91311 818-700-1998 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: getParameter() help
Here's a boiled down version of my code. public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { String cmd = request.getParameter("cmd"); if (cmd == null || cmd.equals("")) { ExportHTML(request, response, filePath + "default.htm"); } else if (cmd.equals("load")) { String pgName = request.getParameter("pg"); if (pgName == null || pgName.equals("")) { System.out.println("page is missing or empty!!!"); } else { System.out.println("Outputing page: " + pgName); ExportHTML(request, response, filePath + pgName + ".htm"); } } else if (cmd.equals("search")) { } } ExportHTML() is a function that reads in a html file and outputs it to the client. Matt At 02:19 PM 1/16/01, you wrote: Matt, You are doing it right.Try restarting the server and close all browser windows that are open(just to make sure that the browser is not dishing out the cached page).Also please post your code so that we can take a look at it. hope this solves your problem Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: getParameter() help Date: Tue, 16 Jan 2001 14:07:56 -0800 Hi, Ram! I tried changing the name "page" to "pg" but that didn't change that getParameter() returns other part of the text that's not part of the "pg" variable. I thought maybe I was doing something wrong with the URL in how the parameters were being passed in the GET that's being executed when the URL is clicked on. The first parameter "load" is always correct. The separation between values passed is the "" symbol, right? I'm using Tomcat 3.2.1, JDK 1.3, and IE 5.5 on a Win98 machine. Thanks! Matt At 01:58 PM 1/16/01, you wrote: It looks like the "page" could be a key-word and is pulling "mainservlet?cmd=load",try changing page to something like "pg" and see if u get the same error. Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: getParameter() help Date: Tue, 16 Jan 2001 12:50:28 -0800 Hi, I have a servlet which dispatches out various jsp's. Some of the jsp's resulting html contain links back to the servlet to fire off another page like this: A HREF="mainservlet?cmd=loadpage=home"HOME/A When I do a request.getParameter("cmd") the string I get is "cmd" which is right. When I do request.getParameter("page") the string I get is "mainservlet?cmd=load" which is not right. Does anyone know if I'm doing something wrong with how I'm writing the link back to the servlet? Thanks! Matt Becker Mythicwave Productions, Inc. 21053 Devonshire, #201 Chatsworth, Ca. 91311 818-700-1998 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: getParameter() help
Hi, Ram. Yes, I just recently tried out what Elijah suggested and I also re-started everything, including re-compiling all my java source and scouring through my html code...and so far I believe it works! There must have been something about using "page" and "home" in my link and probably an error in my overall html writing and then I had to make sure everything was restarted properly. Elijah's recommendation of checking the links at the bottom of the web browser helped a lot. Much appreciation to you guys! Matt At 03:01 PM 1/16/01, you wrote: Matt, Did you try what Elijah suggested.I think elijah is right in pointing out about the "home" word,probably the browser/server is substituting home with the value u r getting. Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: getParameter() help Date: Tue, 16 Jan 2001 14:45:22 -0800 Here's a boiled down version of my code. public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { String cmd = request.getParameter("cmd"); if (cmd == null || cmd.equals("")) { ExportHTML(request, response, filePath + "default.htm"); } else if (cmd.equals("load")) { String pgName = request.getParameter("pg"); if (pgName == null || pgName.equals("")) { System.out.println("page is missing or empty!!!"); } else { System.out.println("Outputing page: " + pgName); ExportHTML(request, response, filePath + pgName + ".htm"); } } else if (cmd.equals("search")) { } } ExportHTML() is a function that reads in a html file and outputs it to the client. Matt At 02:19 PM 1/16/01, you wrote: Matt, You are doing it right.Try restarting the server and close all browser windows that are open(just to make sure that the browser is not dishing out the cached page).Also please post your code so that we can take a look at it. hope this solves your problem Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: getParameter() help Date: Tue, 16 Jan 2001 14:07:56 -0800 Hi, Ram! I tried changing the name "page" to "pg" but that didn't change that getParameter() returns other part of the text that's not part of the "pg" variable. I thought maybe I was doing something wrong with the URL in how the parameters were being passed in the GET that's being executed when the URL is clicked on. The first parameter "load" is always correct. The separation between values passed is the "" symbol, right? I'm using Tomcat 3.2.1, JDK 1.3, and IE 5.5 on a Win98 machine. Thanks! Matt At 01:58 PM 1/16/01, you wrote: It looks like the "page" could be a key-word and is pulling "mainservlet?cmd=load",try changing page to something like "pg" and see if u get the same error. Ram From: Matt Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: getParameter() help Date: Tue, 16 Jan 2001 12:50:28 -0800 Hi, I have a servlet which dispatches out various jsp's. Some of the jsp's resulting html contain links back to the servlet to fire off another page like this: A HREF="mainservlet?cmd=loadpage=home"HOME/A When I do a request.getParameter("cmd") the string I get is "cmd" which is right. When I do request.getParameter("page") the string I get is "mainservlet?cmd=load" which is not right. Does anyone know if I'm doing something wrong with how I'm writing the link back to the servlet? Thanks! Matt Becker Mythicwave Productions, Inc. 21053 Devonshire, #201 Chatsworth, Ca. 91311 818-700-1998 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com --
Class not found on import
Hi. From the Linux version of Tomcat I get an error something like "class test.testbean not found on import." I don't understand how the exact web app, testbean.class, etc. will run on my Windows machine which I'm using for development, but bombs on my Linux sever. The testbean.class resides in the "test" directory within the Web-inf's classes directory, exactly how it's laid out on the win machine. Anyone have an idea why Tomcat Linux wouldn't recognize the bean? Thanks! Matt
RE: Class not found on import
I should be able to take the exact web app from my Windows machine and transfer it over to my Linux machine without compiling the java code, right? Matt At 02:01 PM 12/19/00, you wrote: In your development environment, you probably need to include the WEF-INF path in your CLASSPATH. You shouldn't have this for starting the server but for compiling your code, you do. Phil -Original Message- From: Matt Becker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 19, 2000 3:19 PM To: tomcat mailing list Subject: Class not found on import Hi. From the Linux version of Tomcat I get an error something like class test.testbean not found on import. I don't understand how the exact web app, testbean.class, etc. will run on my Windows machine which I'm using for development, but bombs on my Linux sever. The testbean.class resides in the test directory within the Web-inf's classes directory, exactly how it's laid out on the win machine. Anyone have an idea why Tomcat Linux wouldn't recognize the bean? Thanks! Matt
Ant comile error
Hi. I was trying to set up a simple web application and copied the sample application for a starting point. The Tomcat doc on web applications said to set everything up like so and run a build script which runs ant. I get this error: Exception Thread: java.lang.NoClassDefFoundError: org/apache/tools/ant/main I checked it out in tomcat and it doesn't have a tools/ant/main in it's org/apache directory. Anyone know what gives? And...to start out doing jsp web applications on Tom Cat...is this ant stuff necessary? Thanks Matt
mod_jk help
Hi, everyone. Still banging my brains out on compiling mod_jk! When the compiling process gets to listing a whole bunch of ".o" files it stops on jk_ajp12_worker.o and the line right after it says that the command failed. The parameters to the apx command I'm using is:: apxs -c-I/usr/java/jdk1.3/include -I/usr/java/jdk1.3/include/linux -I/usr/apache/include -I../jk/mod_jk.c ../jk/*.c which I've seen posted here recently. I've also tried using a similar apxs command which is pointed out in a how to doc I read and get the same kind of results. I'm using Red Hat 7.0, Tom Cat 3.2, Apache 1.3.14, and Java SDK 1.3. Thank you for all your help! Matt Matt BeckerMythic Wave Productions, Inc.21053 Devonshire, #201Chatsworth, Ca. 91311[EMAIL PROTECTED]
mod_jk help
Hi, everyone. Still banging my brains out on compiling mod_jk! When the compiling process gets to listing a whole bunch of ".o" files it stops on jk_ajp12_worker.o and the line right after it says that the command failed. The parameters to the apx command I'm using is:: apxs -c-I/usr/java/jdk1.3/include -I/usr/java/jdk1.3/include/linux -I/usr/apache/include -I../jk/mod_jk.c ../jk/*.c which I've seen posted here recently. I've also tried using a similar apxs command which is pointed out in a how to doc I read and get the same kind of results. I'm using Red Hat 7.0, Tom Cat 3.2, Apache 1.3.14, and Java SDK 1.3. Thank you for all your help! Matt Matt BeckerMythic Wave Productions, Inc.21053 Devonshire, #201Chatsworth, Ca. 91311[EMAIL PROTECTED]
Can't find apxs command
Hi, I'm trying to compile mod_jk on a Red Hat 7.0 system with the latest Apache rpm, Tomcat 3.2, etc. but can't find the "apxs" command anywhere. I'm beginning to wonder if the problems I've had trying to get Tomcat and Apache working together come from that the Apache I'm using is preinstalled by Red Hat and maybe I should instead install the Linux without a web server and manually install Apache? Has anyone gotten Apache and Tomcat working on Red Hat 7.0? Thanks! Matt Matt BeckerMythic Wave Productions, Inc.21053 Devonshire, #201Chatsworth, Ca. 91311[EMAIL PROTECTED]
tomcat-apache config.
Hi. I'm new to setting up Tomcat with Apache. The documentation in tomcat-apache-howto.html shows modifying tomcat-apache.conf, however it states that this file will be written over the next time Tomcat starts, which seems to make modifying the file pointless. Would it be a better idea to copy the tomcat-apache.conf file, rename it something else, and include that in Apache's httpd.conf file? Appreciate your help! Thanks! Matt Becker
Tomcat-Apache configuration
Hi. I'm trying to get the latest Tomcat and Apache running together on a Red Hat Linux 7.0 server. Although I have gone over the online documentation plenty of times, I am not sure where to find the mod_jserv.so or the mod_jk.so files that the Tomcat-Apache HOWTO html says I need to get. It says that the files "are available for Linux and Win32 under the bin directory where you obtained the Tomcat distribution file." Does anyone happen to know where either of these files are located? Thanks! Matt Becker