Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2006, 09:01 PM
Registered User
 
Join Date: Jul 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mcw22
Default Page problem or config file?

I've designed a page in JSP whereby it acts as a search engine that allows searching of keywords on selected online databases / search engines like Google, EIU, etc.

The problem is that for those search engines that employ the GET method (not POST), the search results are not shown on the page. I've traced the logs and the search results are apparently in the logs. Each search engine has its own configuration file in XML format.

Is it got to do with my page or is there a part in the XML file that needs a change of syntax? Here's the config file for the reference.

<?xml version="1.0" encoding="ISO-8859-1"?>

<esam>
    <host address="google" />
    <assign var="$rms$" template="Google" regexp="(.*)" parenthesis="1" subgroup="1" />
    <assign var="$url$" template="http://www.google.com.my" regexp="(.*)" parenthesis="1" subgroup="1" />
    <encode var="$searchwhat$"/>
    <getfile method="GET" path="/search?hl=en&amp;q=$searchwhat$&amp;btnG=Search&am p;meta=" >
        <header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)" />

        <getvar var="$desc$" regexp="&lt;p class=1&gt;&lt;a href=(/[\^$]*/) onmousedown=&quot;([^&quot;]*)&quot;&gt;(.*?)&lt;/a&gt;" parenthesis="3" subgroup="1" />

        <getvar var="$href$" regexp="&lt;p class=1&gt;&lt;a href=(/[\^$]*/) onmousedown=&quot;([^&quot;]*)&quot;&gt;(.*?)&lt;/a&gt;" parenthesis="1" subgroup="1" />

        <getvar var="$total$" regexp="&lt;font size=-1 color=&gt;Results &lt;b&gt;([0-9]*)&lt;/b&gt; - &lt;b&gt;([0-9]*)&lt;/b&gt; of about &lt;b&gt;([^&lt;]*)&lt;/b&gt;" parenthesis="3" subgroup="3" />
        <getvar var="$tmpnext$" regexp="&lt;a href=([^&gt;]*)&gt;&lt;img src=/nav_next.gif width=100 height=26 alt=&quot;&quot; border=0&gt;&lt;br&gt;&lt;span class=b&gt;(.*?)&lt;/span&gt;" parenthesis="2" subgroup="1" />

    </getfile>
    <assign var="$next$" template="$url$$tmpnext$" regexp="(.*)" parenthesis="1" subgroup="1" />
</esam>

Please help. Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in getting the page break in RTF file CsharpHelp Other Programming Languages 1 October 25th, 2009 05:57 AM
C# Config File BasilFawlty C# 8 January 17th, 2005 12:26 PM
Problem with Web.Config file srinivas ADO.NET 3 December 6th, 2004 02:27 PM
web.config file apry BOOK: Beginning ASP.NET 1.0 1 May 27th, 2004 06:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.