JSP not using entire string as parameter passed to a stored procedure?

(CAUTION: Java n00b ahead) This is very peculiar. I have an MS SQL Server 2008 SP that returns the top 10 rows of names and addresses where the last name is like the passed parameter; that parameter can be a string/varchar of any length, and in SQL Server it works accurately. When I call it from a JSP page though, it seems as if it is only taking the first letter of the string as a parameter, and consequently always returns the first 10 names starting with that first letter. (For example, when passing “Mor” as the param in SQL Server, I get back the names Moreland through Moreno. In the JSP page though, I only get the name Ma.)

Here’s my code, if someone would kindly review it:

<html>
<head><title>db_sp1.jsp</title></head>
<body>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*,javax.sql.*;" %>
<% 

java.sql.Connection con;
java.sql.Statement s;
java.sql.ResultSet rs;
//java.sql.ResultSet rs_A;
java.sql.PreparedStatement pst;
java.sql.CallableStatement cs;

con=null;
s=null;
pst=null;
rs=null;
cs=null;

// Remember to change the next line with your own environment
String url= 
"jdbc:jtds:sqlserver://1.2.3.4/AdventureWorks2008";
String id= "user";
String pass = "pwd";


if (request.getParameter("LName") == null) {
%>
<form action="db_sp1.jsp" method="post">
<h1>Employee Lookup</h1>
<p>Enter part of an employee last name to retrieve the top 10 employees (alphabetically) with a similar name:
<input type="text" id="LName" name="LName" /></p>
<p><input type="submit" value="Submit" /></p>
</form>
<%
} else {
String LName = request.getParameter("LName");
try{
    Class.forName("net.sourceforge.jtds.jdbc.Driver");
    con = java.sql.DriverManager.getConnection(url, id, pass);
    }catch(ClassNotFoundException cnfex){
    cnfex.printStackTrace();
}

try{
    cs = con.prepareCall("{call getEmpAddr(?)}");
    String theName = LName;
    cs.setString(1,theName);
    rs = cs.executeQuery();
    
    ResultSetMetaData rsmd = rs.getMetaData();
    int numCols = rsmd.getColumnCount();
%>
<p>The persons are:</p>
<table>
<%
    while (rs.next()) {
%>
    <tr>
<%
        for (int i = 1; i <= numCols; i++) {
            if (rs.getString(i) != null) {
%>
            <%= "<td>" + rs.getString(i) + "</td>" %> 
    
<%
            } else {
%>
            <%= "<td>&nbsp;</td>" %>
<%
            }
        }
%>
        </tr> 
<%
}
%>
</table>
<p><a href="javascript:history.go(-1);">< Back</a></p>

<%
}catch(Exception e) {
out.println("exception occured : " + e.toString());
} finally {
    if(con !=null) con.close();
    con= null;
}
}
%>
</body>
</html>

Thanks in advance!