Re: tomcat 4.1 displays a blank page when compiling a JSP with compilation errors
Hi Christos, Quick Question for you. Does your JSP page have an include in it? Example: Login.jsp This page includes another jsp page called LoginForm.jsp. Does your jsp page have this? If so, I've noticed that my pages will show up blank if there is an error, where there is an include. Is this your situation? If so... because you are developing, the easiest way would be to call the include jsp directly (http://localhost/xxx/LoginForm.jsp). This will then give you the error in the browser. I've noticed this in tomcat, as well as Java Web Server when i first used that ages ago... Hope this helps, ...Robin - Original Message - From: Christos Karras [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 18, 2002 1:49 PM Subject: tomcat 4.1 displays a blank page when compiling a JSP with compilation errors On one of our Tomcat 4.1.12 servers, when someone requests a JSP page that has compilation errors, he gets a blank page instead of getting a tomcat generated page showing the compilation error. So we have to look in tomcat's logs to get the error message. That's nice for a production server, but I would like to have errors directly in the browser when developping. How can I enable error messages to be sent to the browser? Is hiding the error pages the normal default behavior? I have some Tomcat 4.1.12 servers (one per machine, development done on NT and production servers on linux) which have always sent jsp compilation error messages to the browser by default, while others only write the messages to logs. I tried the following: - set debug=1 to everything which has a debug parameter in server.xml - set jasper's logVerbosityLevel init-param to DEBUG (and left default values for other parameters) but still no error message shown in browser. Am I missing something in the documentation? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: upgrading to 4.1!
Hello, Seems like i had the same problem before... But I figured out the problem. Have you checked your examples log and see if there are any problems with your code? Sometimes errors will occur, and it won't output to your console. BUT, it will output the error to the examples log. If there isn't any problem with that, email me your source code and i'll see if i can find something wrong with it. ...Robin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 9:58 AM Subject: upgrading to 4.1! hey everyone, I'm been using tomcat 4.0.3 and apache 1.3 connecting with mod_webapp, and it's been working spiffy, except for one problem. every now and again, it will only serve half a jsp page. it will send data, and then just stop before it serves the whole page. the logs show nothing out of the ordinary (no errors). has anyone else had this problem? anyways, I am wishfully thinking that upgrading to tomcat 4.1 will somehow magically fix all my problems, but I'm having some troubles. even though I am waiting for tomcat to start, and then restarting apache, etc, I am still getting the infamous Web application not yet deployed, even though apache claims to have deployed it. here's what apache says at startup: [Thu Sep 12 11:59:56 2002] 17703 (pr_warp.c:62) WARP provider initialized [Thu Sep 12 11:59:56 2002] 17703 (wa_main.c:101) WebApp Library initialized [Thu Sep 12 11:59:56 2002] 17703 (wa_config.c:167) Created connection warpConn ction (Prov: warp Param: web1:8008) [Thu Sep 12 11:59:56 2002] 17703 (wa_config.c:126) Created virtual host web1.d n.com:80 [Thu Sep 12 11:59:56 2002] 17703 (wa_config.c:100) Created application example in path /examples/ [Thu Sep 12 11:59:56 2002] 17703 (wa_main.c:187) Application examples deployed or http://hostname.myserver.com:80/examples/ (Conn: warpConnection) here's the relavant bits from my httpd.conf file: LoadModule webapp_module libexec/mod_webapp.so WebAppConnection warpConnection warp myserver:8008 WebAppDeploy examples warpConnection /examples WebAppDeploy contest warpConnection /contest does anyone have *any* ideas? I'm sort of reaching the end of my rope on this, and am not sure what to do! thanks in advance for your help! --paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: access log file
Hello, I am using Tomcat4, and didn't know if we could do this either. So I just happened to look into it more now, and found out 4.0x does have this capability. I would have to change the word common to combined. Check this link out. http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html Look for AccessLogInterceptor. That will explain the differences in the log format available. In this case, you would do the same thing (server.xml) change common to combined to give you your desired format. ...Robin - Original Message - From: Joël Bruezière [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 9:29 AM Subject: access log file Hi, I search a way to configure Tomcat 3.3.1 for generating a standard access log file with lines like: 62.190.230.16 - - [14/May/2002:20:55:18 +0200] GET / HTTP/1.1 200 32797 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) is it possible? Joel Brueziere networkers interactive sa -- 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]
tomcat log analyzer
Hello List, Does anyone know if there is a log analyzer written in JAVA for tomcat (4 or otherwise)? I know about Weblizer and AWStats, but they aren't written in Java... Thanks, ...Robin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Large pages not completely displayed with IE 5.x and Tomcat 4 .0.x
Hi, I had the same problem as you did... One of my pages would not completely load... Using: Tomcat 4.02, j2sdk1.4. Windows 2K/NT, doesn't matter.. happens on both. At first I thought that it was because it was large. But it wasn't the problem. The page in question returned about 150K of html code. Another page returned 600K and that ALWAYS displayed in its entirety. So, after some checking and testing, i discovered it is because i had too many objects open. (Instantiated objects galore). One thing i did to make it work is to make sure that each object that i instantiate is opened ONCE... (I use a java mapping strategy to get data from the database). Once i did that, the rest of the data would show up with no problem... That is one thing i would check and see if there are too many objects being instantiated (same ones all the time). That's my suggestion. Good luck, If that's not it, then i'm not sure what else it could be. :) ...Robin - Original Message - From: Michael Gerdau [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 7:08 AM Subject: RE: Large pages not completely displayed with IE 5.x and Tomcat 4 .0.x I think an obvious first couple of questions: 1. Is the page competing execution or is it throwing an exception or perhaps hanging up due to deadlock? Not that I'm aware of. I get the effect by simply logging onto the webapp from a different machine immediately after starting tomcat. No concurrent users on Tomcat. This happens both with HTTP/1.1 on port 8080 and HTTP/1.0 on 8082 (both using the default configuration as of server.xml) 2. Are you ever clicking the stop button in IE (perhaps causing the browser to give up before the connection is completed?) No. Hi ! I have the following problem: I'm running Tomcat 4.0.x (x == 1, 2 or 3) standalone on a Win2000 machine. I have a WebApp (written with Struts) that accesses a RDBMS and creates pages which occasionally are 100+ kB in size. This takes some time (between 20-50 seconds). When I run Internet Explorer 5.0 or 5.5 on the machine running Tomcat (e.g. my development environment) everything works fine. When I'm trying to access those pages from another machine within the local network (e.g. the production environment) some of these pages don't display completely. Examining the HTML inside the browser reveals they are indeed incomplete. What could cause this ? What additional info would be needed to debug this ? Any help appreciated, thank you, Michael -- Vote against SPAM - see http://www.politik-digital.de/spam/ Michael Gerdau email: [EMAIL PROTECTED] You mean you think Windows XP **ISN'T** a joke?! PGP-keys available on request or at public keyserver -- 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: [TC4.01] Session Not Established on Mac IE?
Hello, I have had this happen to me as well. The person who is helping me in production with the web site cannot log on via IE on her Mac as well (OS 9 i believe)... She has no problem though using Netscape on her Mac to the web page (it is Tomcat 4.0.1, now 4.0.2)... Her netscape is 6 i believe... I never had a chance to look into it, but at least someone else is experiencing this problem too... I hope someone out there may know how to handle this problem. - Original Message - From: Scott Jones [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, March 06, 2002 2:26 PM Subject: [TC4.01] Session Not Established on Mac IE? Hello, I just got off the phone with the first person using Mac OS to use our website since we upgraded to Tomcat 4.0.1 (from Tomcat 3.3). He was unable to log into our site using Internet Explorer 5 on OS 9. We still had an instance on a development machine that used Tomcat 3.3, on which he experienced no problems. It appears that his session is never getting established at all -- my first thought was that he might have cookies disabled (I do not do URL rewriting currently, although that would probably fix the problem). After having him try our Tomcat 3.3 instance, it was clear that cookies are enabled, so that isn't the problem. My only other thought is that the JSESSIONID is a lot larger on Tomcat 4 -- is it possible that Mac IE5 cannot accept cookies that are longer than a certain amount? Unfortunately, I don't have a Mac here to play with so that I could really help track this down -- has anyone else experienced anything like this? Thanks! -Scott -- 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: integer value
I assume that these fields are coming from a form from a previous page (ie: html/jsp)... And that you are submitting this information to a servlet, or another jsp page. One thing you are missing when testing for null is that, when coming from a previous page, it may not be null, but BLANK (ie: ). You need to test for both ... if (number == null || number.equals()) OR if (name == null || name.equals()) But because it is strictly a number, you need to convert the number field to a pure integer # to test for a number. int iNewNumber = Integer.parseInt(number); Doing it this way allows you to make sure you don't have a null # because Integer.parseInt will convert a string to a 0. The code that has number = 00; cannot happen because it is assumed number is a String, and you can't convert int to String. I hope this helps... You can email me directly if you need more help with this. ...Robin - Original Message - From: Uma Maheswar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, February 25, 2002 9:31 AM Subject: integer value Hi, I have a doubt, I have a form that has name and his phone number, both the fields are optional. I declared name as VARCHAR and number as INTEGER in my SQL database. When the user leaves the fild empty, I get an error with the number field as NumberFormatException. So , What I need to do now is, when the user leaves the field null or blank, I wanted to insert a default value into the database. For eg. If(number == null) { number = 00; } if(name==null) { name=tomcat; } I know the number if statement will give error.But could you please help me with this? Uma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: servlet/jsp executing twice at the same moment
So, by the lack of response, I can assume no one has figured out how to solve this problem?I know there were a few others who had dealt with this problem, but no solution... I hope someone can here can try and help out with this. Thanks to anyone who responds... - Original Message - From: Robin Lee [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 9:37 AM Subject: Re: servlet/jsp executing twice at the same moment Is it just JSP's or Servlets too? My problem is just servlets (although i have yet to see any jsp's run twice)... I'm still looking on solutions myself, but none so far. Anyone? I have noticed though, if i tried it in Netscape (6+), it is ok. Also tried it on the server computer (localhost), and it doesn't do it there either. I figured it might be IE5.5, and it may have to do with the computer speed? (On the server, i used IE5.5 as well)... - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 9:18 AM Subject: RE: servlet/jsp executing twice at the same moment It is not that my code continues to run, but that the ENTIRE jsp runs twice. Spent 3 hours last night on this and still could not find a resolve. I'm not sure if it is a bug or some configuration problem. Some jsp's run once and some run twice. Fortunately for debugging purposes, the same ones run once and the same ones run twice. If anyone has any suggestions or experienced the same behavior, please advise on solutions. I've not noticed that you need to place an explicit return after the forward, but I'll make a mental note. Thanks, kb Cox, Charlie To: Tomcat Users List [EMAIL PROTECTED] ccox@cincom.cc: com Subject: RE: Servlet running twice at the same moment. 01/03/02 04:54 AM Please respond to Tomcat Users List did you put a return; after your forward? If not the jsp will continue running... Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:30 PM To: Tomcat Users List Subject: Re: Servlet running twice at the same moment. Glad someone brought this up. Seems as though some of my jsp pages are being executed twice. It doesn't seem to send information to the browser twice, but it is causing havoc on my logic. I can see System.outs being executed twice and any logic / methods are being executed twice. In my case it seems as though the jsp:forward is in some way causing the behavior. If anyone else has run across this situation, I would definitely like to know what is going on and how to resolve this issue. I'm also using IE 5.x, tomcat 3.2.x and linux. If code is needed, I'll have to send tomorrow. Thanks in advance kb Robin Lee tech_supportTo: Tomcat Users List [EMAIL PROTECTED] @uls.comcc: Subject: Re: Servlet running twice at the same moment. 01/02/02 11:12 AM Please respond to Tomcat Users List Well, that depends on which code you would like to see? The login code is pretty basic... Here's is my validateLoginServlet... I am using a type4 jdbc driver (thinweb.tds driver). import Common.dbfiles.*; import java.io.*; import java.util.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class ValidateLoginServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { String errorCode = ; try { // get a connection Class c = Class.forName(com.thinweb.tds.Driver); Connection dbConn = DriverManager.getConnection(jdbc:twtds:sqlserver://[removed];user =[removed] ;password=[removed];TDS=7.0); // instantiate data objects DBCustomersSet customersSet = new DBCustomersSet(dbConn,Customers); //DBCustomers customers = new DBCustomers(); // Now set the where clause to get the member (using setFilter) customersSet.setFilter(LoginID=' + req.getParameter(LoginID) + '); Vector customersQuery = customersSet.query(); //Create a session. HttpSession session = req.getSession(true); //Now let's see
Re: servlet/jsp executing twice at the same moment
Is it just JSP's or Servlets too? My problem is just servlets (although i have yet to see any jsp's run twice)... I'm still looking on solutions myself, but none so far. Anyone? I have noticed though, if i tried it in Netscape (6+), it is ok. Also tried it on the server computer (localhost), and it doesn't do it there either. I figured it might be IE5.5, and it may have to do with the computer speed? (On the server, i used IE5.5 as well)... - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 9:18 AM Subject: RE: servlet/jsp executing twice at the same moment It is not that my code continues to run, but that the ENTIRE jsp runs twice. Spent 3 hours last night on this and still could not find a resolve. I'm not sure if it is a bug or some configuration problem. Some jsp's run once and some run twice. Fortunately for debugging purposes, the same ones run once and the same ones run twice. If anyone has any suggestions or experienced the same behavior, please advise on solutions. I've not noticed that you need to place an explicit return after the forward, but I'll make a mental note. Thanks, kb Cox, Charlie To: Tomcat Users List [EMAIL PROTECTED] ccox@cincom.cc: com Subject: RE: Servlet running twice at the same moment. 01/03/02 04:54 AM Please respond to Tomcat Users List did you put a return; after your forward? If not the jsp will continue running... Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:30 PM To: Tomcat Users List Subject: Re: Servlet running twice at the same moment. Glad someone brought this up. Seems as though some of my jsp pages are being executed twice. It doesn't seem to send information to the browser twice, but it is causing havoc on my logic. I can see System.outs being executed twice and any logic / methods are being executed twice. In my case it seems as though the jsp:forward is in some way causing the behavior. If anyone else has run across this situation, I would definitely like to know what is going on and how to resolve this issue. I'm also using IE 5.x, tomcat 3.2.x and linux. If code is needed, I'll have to send tomorrow. Thanks in advance kb Robin Lee tech_supportTo: Tomcat Users List [EMAIL PROTECTED] @uls.comcc: Subject: Re: Servlet running twice at the same moment. 01/02/02 11:12 AM Please respond to Tomcat Users List Well, that depends on which code you would like to see? The login code is pretty basic... Here's is my validateLoginServlet... I am using a type4 jdbc driver (thinweb.tds driver). import Common.dbfiles.*; import java.io.*; import java.util.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class ValidateLoginServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { String errorCode = ; try { // get a connection Class c = Class.forName(com.thinweb.tds.Driver); Connection dbConn = DriverManager.getConnection(jdbc:twtds:sqlserver://[removed];user =[removed] ;password=[removed];TDS=7.0); // instantiate data objects DBCustomersSet customersSet = new DBCustomersSet(dbConn,Customers); //DBCustomers customers = new DBCustomers(); // Now set the where clause to get the member (using setFilter) customersSet.setFilter(LoginID=' + req.getParameter(LoginID) + '); Vector customersQuery = customersSet.query(); //Create a session. HttpSession session = req.getSession(true); //Now let's see if any records were returned. if (customersQuery != null !customersQuery.isEmpty()) { customersSet.firstRecord(); //DBCustomers cust = (DBCustomers) custSet.record(); DBCustomers theCustomer = (DBCustomers) customersSet.record(); //DBCustomers theCustomer = (DBCustomers)customersQuery.elementAt(0); //Now we want to check the password. if (theCustomer.getPassword().equals(req.getParameter(Password))) { session.setAttribute(theCustomer,theCustomer); errorCode = 0; System.out.println(UserID: + theCustomer.getLoginID() + has logged
Servlet running twice at the same moment.
Hello, I don't know why this is happening, but... It seems like whenever I run a single servlet, there are times it will run twice. As in, this... I have a login page. The user logs in. In my out log, it will show me that I have logged in twice... But in other instances, it'll show me that I have logged in once. Although this isn't a big deal, this does concern me. I have another servlet that creates a text file, but this text file will sometimes have the same information TWICE. I am running Tomcat 4.0.1, with jdk 1.31_01, running on Windows 2000. I also run the same instance on a Windows NT 4 server. Same in both places. The problem started about two weeks ago. I have no clue where to look or start. Thanks to anyone who might be able to help ... ...Robin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Servlet running twice at the same moment.
Yes, I am using IE.. I've noticed though with NS, especially the older browsers, the pages don't even load. It does load in the newest NS though... - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 11:59 AM Subject: Re: Servlet running twice at the same moment. Are you using IE browser ? I have experienced exactly the same if I use IE - NS is doing fine :-) Robin Lee [EMAIL PROTECTED] on 02.01.2002 20:00:57 Please respond to Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Servlet running twice at the same moment. Hello, I don't know why this is happening, but... It seems like whenever I run a single servlet, there are times it will run twice. As in, this... I have a login page. The user logs in. In my out log, it will show me that I have logged in twice... But in other instances, it'll show me that I have logged in once. Although this isn't a big deal, this does concern me. I have another servlet that creates a text file, but this text file will sometimes have the same information TWICE. I am running Tomcat 4.0.1, with jdk 1.31_01, running on Windows 2000. I also run the same instance on a Windows NT 4 server. Same in both places. The problem started about two weeks ago. I have no clue where to look or start. Thanks to anyone who might be able to help ... ...Robin -- 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: Servlet running twice at the same moment.
Well, that depends on which code you would like to see? The login code is pretty basic... Here's is my validateLoginServlet... I am using a type4 jdbc driver (thinweb.tds driver). import Common.dbfiles.*; import java.io.*; import java.util.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class ValidateLoginServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { String errorCode = ; try { // get a connection Class c = Class.forName(com.thinweb.tds.Driver); Connection dbConn = DriverManager.getConnection(jdbc:twtds:sqlserver://[removed];user=[removed] ;password=[removed];TDS=7.0); // instantiate data objects DBCustomersSet customersSet = new DBCustomersSet(dbConn,Customers); //DBCustomers customers = new DBCustomers(); // Now set the where clause to get the member (using setFilter) customersSet.setFilter(LoginID=' + req.getParameter(LoginID) + '); Vector customersQuery = customersSet.query(); //Create a session. HttpSession session = req.getSession(true); //Now let's see if any records were returned. if (customersQuery != null !customersQuery.isEmpty()) { customersSet.firstRecord(); //DBCustomers cust = (DBCustomers) custSet.record(); DBCustomers theCustomer = (DBCustomers) customersSet.record(); //DBCustomers theCustomer = (DBCustomers)customersQuery.elementAt(0); //Now we want to check the password. if (theCustomer.getPassword().equals(req.getParameter(Password))) { session.setAttribute(theCustomer,theCustomer); errorCode = 0; System.out.println(UserID: + theCustomer.getLoginID() + has logged in.); customersSet.userLoggedIn(); } else { //Wrong password, set the errorCode to 1. errorCode = 1; } } else { //Not found, set the errorCode to 2. errorCode = 2; } session.setAttribute(errorCode,errorCode); //System.out.println(ValidateLoginServlet errorCode: + errorCode); dbConn.close(); } catch (SQLException sqle) { System.out.println(Sql Exception: + sqle); } catch (ClassNotFoundException cnfe) { System.out.println(cnfe); } catch (ArrayIndexOutOfBoundsException aioobe) { System.out.println(aioobe); } } } In this case, it shows userid has logged in. At times it will do it just once, but other times it will do it twice... Did i add something in here that shouldn't be? Thanks. - Original Message - From: Micael Padraig Og mac Grene [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 11:50 AM Subject: Re: Servlet running twice at the same moment. At 12:00 PM 1/2/02 -0700, you wrote: Hello, I don't know why this is happening, but... It seems like whenever I run a single servlet, there are times it will run twice. As in, this... ...Robin Robin, there is no way to have any clue why this is happening without seeing the code. Micael -- 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: Servlet running twice at the same moment.
Ahh, so at least i'm not the only one having this problem... The problem also occurs on my text filestream... How interesting... So, now we know of at least TWO instances that this is happening.. IE5.5 on TC4.0.1 and JDK131_01.. (Windows NT4 2000) IE5.x on TC3.2.x and (which jdk are you using?) (Linux) - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 12:29 PM Subject: Re: Servlet running twice at the same moment. Glad someone brought this up. Seems as though some of my jsp pages are being executed twice. It doesn't seem to send information to the browser twice, but it is causing havoc on my logic. I can see System.outs being executed twice and any logic / methods are being executed twice. In my case it seems as though the jsp:forward is in some way causing the behavior. If anyone else has run across this situation, I would definitely like to know what is going on and how to resolve this issue. I'm also using IE 5.x, tomcat 3.2.x and linux. If code is needed, I'll have to send tomorrow. Thanks in advance kb Robin Lee tech_supportTo: Tomcat Users List [EMAIL PROTECTED] @uls.comcc: Subject: Re: Servlet running twice at the same moment. 01/02/02 11:12 AM Please respond to Tomcat Users List Well, that depends on which code you would like to see? The login code is pretty basic... Here's is my validateLoginServlet... I am using a type4 jdbc driver (thinweb.tds driver). import Common.dbfiles.*; import java.io.*; import java.util.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class ValidateLoginServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { String errorCode = ; try { // get a connection Class c = Class.forName(com.thinweb.tds.Driver); Connection dbConn = DriverManager.getConnection(jdbc:twtds:sqlserver://[removed];user =[removed] ;password=[removed];TDS=7.0); // instantiate data objects DBCustomersSet customersSet = new DBCustomersSet(dbConn,Customers); //DBCustomers customers = new DBCustomers(); // Now set the where clause to get the member (using setFilter) customersSet.setFilter(LoginID=' + req.getParameter(LoginID) + '); Vector customersQuery = customersSet.query(); //Create a session. HttpSession session = req.getSession(true); //Now let's see if any records were returned. if (customersQuery != null !customersQuery.isEmpty()) { customersSet.firstRecord(); //DBCustomers cust = (DBCustomers) custSet.record(); DBCustomers theCustomer = (DBCustomers) customersSet.record(); //DBCustomers theCustomer = (DBCustomers)customersQuery.elementAt(0); //Now we want to check the password. if (theCustomer.getPassword().equals(req.getParameter(Password))) { session.setAttribute(theCustomer,theCustomer); errorCode = 0; System.out.println(UserID: + theCustomer.getLoginID() + has logged in.); customersSet.userLoggedIn(); } else { //Wrong password, set the errorCode to 1. errorCode = 1; } } else { //Not found, set the errorCode to 2. errorCode = 2; } session.setAttribute(errorCode,errorCode); //System.out.println(ValidateLoginServlet errorCode: + errorCode); dbConn.close(); } catch (SQLException sqle) { System.out.println(Sql Exception: + sqle); } catch (ClassNotFoundException cnfe) { System.out.println(cnfe); } catch (ArrayIndexOutOfBoundsException aioobe) { System.out.println(aioobe); } } } In this case, it shows userid has logged in. At times it will do it just once, but other times it will do it twice... Did i add something in here that shouldn't be? Thanks. - Original Message - From: Micael Padraig Og mac Grene [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 11:50 AM Subject: Re: Servlet running twice at the same moment. At 12:00 PM 1/2/02 -0700, you wrote: Hello, I don't know why this is happening, but... It seems like whenever I run a single servlet, there are times it will run twice. As in, this... ...Robin Robin, there is no way to have any clue why this is happening without seeing the code. Micael -- 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
Sharing Session between frame jsp's
Hi, This is how it works. I have a frame page with two frames (left.jsp and main.html). On the left, the user can login on the main frame by clicking on login (from the left.jsp). They can log in just fine. Session is created in the main frame. No problem. Problem is, I want to get the same session on the left frame so i can get their user information. Is there any way to make this possible? I've tried a few ways to share between the two frames, but nothing works in that regards. Does anyone have any ideas? Thanks. ...Robin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Excel Problem
There doesn't seem to be a lot of requests about this problem that I am having with Tomcat. I am running tomcat 4, with jdk1.31_01. I have an Excel file (called ULSExcel in the odbc source) as a default file. I was able to change it so that when i copy the default file to a new file name (LoginID.xls), i can change the file it refers to in the ULSExcel to the new file (ULSExcel;dbq=LoginID.xls). This has worked previously with tomcat 323 as well as JWS. This is the error I get. Here's the set of the data source name: ULSExcel;dbq= + excelFile + ;DriverID=22;READONLY=false Here's another variation i tried... {Microsoft Excel Driver (*.xls)};dbq= + excelFile + ;DriverID=22;READONLY=false And here's the error I get in both cases. [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified If I just use ULSExcel as my data source name, I get no problems whatsoever. It saves it to the default file. Which is not what I wish to do. Considering the fact that this DID work prior to tomcat 4, does anyone have any idea why this happened, or if there is another way to try and get this to work? Thanks to anyone who can help me out. ...Robin Lee [EMAIL PROTECTED]