Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending parameter from anchor

Status
Not open for further replies.

daka94

Programmer
Apr 27, 2001
33
US
hai
i am getting the following error.
i am giving code and error below.
the anchor tag is <a href=&quot;SearchDetails.jsp?srchKeyword=<%=rs.getString(&quot;p.Dedc&quot;)%>&quot;>
<%
out.println(rs.getString(&quot;p.Dedc&quot;));
%>
here the results are displaying well.
when i click on displayed result
the url string in location bar is
: MB disc
here the 20 MB disc is the data which i had clicked.so it is taking correctly.
the error is
Bad Request (400)

Your request to the server could not be understood. Please check to ensure that the
request you made is correct.

in my second jsp the code is
String description=request.getParameter(&quot;srchKeyword&quot;);
rs=st.executeQuery(&quot;select * from PRODUCT where Dedc='&quot;+description+&quot;'&quot;);
while(rs.next())
{
out.println(rs.getInt(1));
out.println(rs.getString(2));
out.println(rs.getString(3));
out.println(rs.getString(4));
}
both are in the same directory.
what could be the solution for the error.
please help me
thank u.
 
You better check for the Correct filename (case sensitive) and try again.
 
or

if u pass some value to the next page with spaces then error 400 will come.If it is unable to find the specified file then it will come
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top