Wrox Programmer Forums
|
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 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 May 17th, 2006, 04:05 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default AutoSuggestControl in JSP ?

Hi all,

I am very interesting in implementing the AutoSuggest control.
The sample provided works fine on PHP, but I need to make this run in JSP environment.

Though I know how to convert most of the code, in suggestions.php
there is the following code :
Quote:
quote:
    //get the data that was posted
    $oData = $oJSON->decode($HTTP_RAW_POST_DATA);
    $aSuggestions = array();

    //make sure there's text
    if (strlen($oData->text) > 0) {

Is there a JSP equivalent for PHP's $HTTP_RAW_POST_DATA ?

Cheers
 
Old May 17th, 2006, 08:06 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I believe you can get an input stream from the request object, then wrap a reader around it (sorry, haven't done JSP in over a year). Something like:

Code:
InputStream stream = request.getInputStream();
InputStreamReader reader= new InputStreamReader(stream);
Reader in = new BufferedReader(reader);
Then, use the buffered reader to read in the contents. At least, that's my suspicion.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
jsp jamalpv JSP Basics 1 May 14th, 2007 10:21 AM
JSP dhanu798 Pro JSP 1 July 1st, 2006 07:41 PM
Please Help. mr_newreq.jsp:78: jsp:useBean can't f batken JSP Basics 0 February 22nd, 2006 09:56 PM
jsp chinna1234 Java Basics 1 January 20th, 2006 08:05 AM
jsp edwrd04 Wrox Book Feedback 1 May 15th, 2004 11:56 PM





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