我有一个对 jsp 页面的 GET 请求。JSP页面的内容如下:
<%@page language="java" import="java.sql.*,java.util.*" %>
<%@page import="javax.servlet.*, java.util.*,java.util.Date, java.text.*"%>
<jsp:useBean id="workM" class="test.concept" scope="page" />
<jsp:useBean id="userM" class="test.learning" scope="page" />
<jsp:useBean id="checkM" class="test.check" scope="session" />
<%
if (checkM.checkUser()) //For auto loading user's most used search engine. Note: Only if the difference between top two is very big
{
String user_id = checkM.getUser();
ResultSet RS6=workM.executeQuery("select top 1 searchEngineUsed,count(*) as number from UserSearchEngineSearch where user_id='"+user_id+"' group by searchEngineUsed order by number desc;");
while (RS6.next())
{
String name = RS6.getString("searchEngineUsed");
if (name.equals("google"))
{
out.print("1");
}
else if (name.equals("yahoo"))
{
out.print("2");
}
else if (name.equals("bing"))
{
out.print("3");
}
else if (name.equals("baidu"))
{
out.print("4");
}
else if (name.equals("yandex"))
{
out.print("5");
}
else if (name.equals("askcom"))
{
out.print("6");
}
else //by default just display google
{
out.print("1");
}
}
}
else //user not login
{
out.print("1");
}
%>
但是,GET 网页的内容是包含 5 行换行,后跟 4(表示选择了“baidu”)。如何删除 5 行新行距?