Thursday, 19 September 2013

Google Search Api Couldn't get Result More Than 4?

Google Search Api Couldn't get Result More Than 4?

Here is my code that Search Result From Google.somewhere is written that i
have to set 'start' to '0' but as i'm a very Newbee in java i really don't
khow what should i do.so any help will appreciate.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.demo.GoogleSearch"%>
<%@page import="java.util.List"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%@include file="SearchGoogle.jsp" %>
<%
String word=request.getParameter("searchWord");
List<String>urls=GoogleSearch.searchWord(word);
%>
<table>
<%
int b = urls.size();
for(int i=0;i<b;i++){
//if (i < b)
%>
<tr><td><%=urls.get(i) %></td></tr>
<%} %>
</table>
</body>
</html>
And Here is the page for Sesrch:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form action="SearchResults.jsp">
<table>
<tr><td>
Enter Search Word:</td><td>
<input type="text" name="searchWord"/></td></tr>
<tr><td colspan="2">
<input type="submit" value="search">
</td></tr>
</table>
</form>
</body>
</html>

No comments:

Post a Comment