Strange bean...??
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Neo_Gigs
Posted On:   Wednesday, March 13, 2002 01:30 AM

Calling Stored Procedure Using JavaBean Hi there, I have this JSP page calling a JavaBean: <%@ page language="java" %> <% String p = request.getParameter("text1"); if (p != null) { int iparam = Integer.parseInt(p); %> The return result using JavaBean is: <%iparam%>"/> <% } else { out.println("No result return..."); } %> and i have this error while execution of JSP: org.apache.jasper.JasperException: Cannot find any information on property 'Input' in a bean of type 'com.mbf.b   More>>
Calling Stored Procedure Using JavaBean

Hi there,


I have this JSP page calling a JavaBean:



			



<%@ page language="java" %>
<%
String p = request.getParameter("text1");
if (p != null) {
int iparam = Integer.parseInt(p);
%>

The return result using JavaBean is:



<%iparam%>"/>

<%
}
else
{ out.println("No result return..."); }
%>




and i have this error while execution of JSP:
			
org.apache.jasper.JasperException: Cannot find any information on property 'Input' in a bean of type 'com.mbf.beans.SpTest'
at org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(Unknown Source)
at org.apache.jasper.compiler.GetPropertyGenerator.generate(Unknown Source)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(Unknown Source)
at org.apache.jasper.compiler.JspParseEventListener.generateAll(Unknown Source)
at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(Unknown Source)
at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.jsp2java(Unknown Source)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(Unknown Source)
at org.apache.tomcat.facade.JspInterceptor.requestMap(Unknown Source)
at org.apache.tomcat.core.ContextManager.processRequest(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)


whats wrong?


my bean code:


			
package com.mbf.beans;

import java.sql.*;
import java.math.*;
import java.io.*;
import oracle.jdbc.driver.*;

public class SpTest
{
private int interString;
private String output;

public String getInput()
{
// First detect class existance
try{
Class myClass = Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (java.lang.ClassNotFoundException e){
System.err.print("Class Not Found error!" + e.getMessage());
}

// Now try to open db connection and do the fetching
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Connection conn = DriverManager.getConnection(url, "tux", "tux");
CallableStatement cs = conn.prepareCall(scall);
cs.registerOutParameter(2, Types.VARCHAR);
cs.setInt(1, interString);
cs.execute();
output = cs.getString(2);
cs.close();
conn.close();
} catch (SQLException e) {
System.err.println("Error: " + e.getMessage());
}
return output;
}

public void setInput(int input)
{
// Here to assign input parameters
interString = input;
}
}


please help

   <<Less

Re: Strange bean...??

Posted By:   Anonymous  
Posted On:   Wednesday, March 13, 2002 01:33 AM

This could be a stupid suggestion: try using "input" instead of "Input".


Regards

About | Sitemap | Contact