tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4693] New: - Value of a variable is changing automatically within a page.
Date Wed, 07 Nov 2001 07:10:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4693>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4693

Value of a variable is changing automatically within a page.

           Summary: Value of a variable is changing automatically within a
                    page.
           Product: Tomcat 3
           Version: 3.2.1 Final
          Platform: Sun
        OS/Version: Solaris
            Status: UNCONFIRMED
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: lovkesharora@hotmail.com


My site is running on Apache1.3.20 and Tomcat3.2.1 on Solaris

One of the JSP page is giving the problem. In the following page I am 
retrieving location1 and product from request using request.getParameter().
Value being extracted is right. But when I print this value second time on the 
same page, it's value changes automatically. (This is the prob.). For testing I 
have given various print statements in the following code. I am printing the 
value of location1 5-6 times continuously. All gives me the different values 
like
e.g 
location1  = 32
location1  = 1
location1  = 1
location1  = 1
location1  = 1
location1  = 5
location1  = 32

The variable is not being altered in any other place.
And the same code was working fine on Sun,Solaris,Apache1.3.13,GNUJSP.
And also its working fine on Intel,WIN NT4.0, Apache1.3.20,tomcat3.2.1





<%@ page import = "java.util.*,java.io.*,java.sql.*,com.cl.clf.*" 
errorPage="clf_error.jsp"%>

<jsp:useBean id="clf_schemes" scope="session" 
class="com.cl.clf.CLF_Scheme_Detail"/>

<%! Connection connection;  %>
<%

	MyConnection conn = new MyConnection();
	boolean readFileSuccess = conn.readParameterFile
("erpconnection.properties","online");
	connection = conn.getConnection() ;
	
	clf_schemes.setConnection(connection);
%>
<%
	int locationId1 = 0;
	int productId = 0;
	
	String location = request.getParameter("location1");
	String product = request.getParameter("product");
	
	out.println("This is Location   :" +location);
	
	if(location != null)
	{
		locationId1 = Integer.parseInt(location);
		
	}
	
	if(product != null)
	{
		productId = Integer.parseInt(product);
	}
	
	clf_schemes.setSelectedLocationId(locationId1);
	clf_schemes.setSelectedProductId(productId);
	
	clf_schemes.getActualProductPrice(productId,locationId1);
	
	int productPrice = clf_schemes.getProductPrice();
%>
Case 1 <BR>
location id = <%= locationId1%>
productId = <%= productId%>

Case 1 <BR>
location id = <%= locationId1%>
productId = <%= productId%>
Case 1 <BR>
location id = <%= locationId1%>
productId = <%= productId%>
Case 1 <BR>
location id = <%= locationId1%>
productId = <%= productId%>
Case 1 <BR>
location id = <%= locationId1%>
productId = <%= productId%>
<BR>

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message