But that's the exact number they gave in Jason Hunter's ServletProgramming
Book (FYI : page 16) :-)))
----- Original Message -----
From: Cogley, Jonathan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2000 6:19 PM
Subject: Re: How to Post Data IN JSP
> Veena,
>
> I think the number is actually 255 - I am guessing it has something to do
> with only one byte of storage since we have that all too common 2^8 thing
> happening there! :)
>
> BTW to anyone interested - I got the POST thing working from Java ...
>
> Here is my working code for a POST() method:
>
> Regards,
> Jonathan
>
> ==Snip===================================================================
>
> /**
> * Opens a connection to the given URL using the POST method
> */
> public boolean POST () {
> // clear the contents
> m_strContents = "";
> // creates URL
> URL urlFile = null;
> try {
> urlFile = new URL (m_strURL);
> } catch (MalformedURLException e) {
> urlFile = null;
> System.out.println("Could not create URL. " +
> e.getMessage());
> return false;
> }
> // Open the URL connection
> URLConnection uc;
> try {
> uc = urlFile.openConnection();
> uc.setDoOutput(true);
> uc.setUseCaches(false);
>
> uc.setRequestProperty("content-type","application/x-www-form-urlencoded");
> DataOutputStream dos = new
> DataOutputStream(uc.getOutputStream());
> dos.writeBytes(getPostString());
> dos.flush();
> dos.close();
> m_inpstmFile = null; //
> clear input stream
> m_inpstmFile = uc.getInputStream(); //
> open input stream
> } catch (IOException e) {
> System.out.println("IO error opening
> connection. " + (e.getMessage()));
> return false;
> }
> // read the data from the InputStream
> String strLine = "";
> StringBuffer strbufFileContents = new
> StringBuffer(0); // create empty buffer
> if (m_inpstmFile != null) { // then try and get
the
> file contents
> try {
> // Deprecated
> // DataInputStream buffFile = new
> DataInputStream(m_inpstmFile);
> BufferedReader buffFile = new
> BufferedReader(new InputStreamReader(m_inpstmFile));
> while ( (strLine =
> buffFile.readLine()) != null) {
> strbufFileContents.append
> (strLine); // add each line of the file to buf.
> }
> buffFile.close();
> } catch (IOException e) {
> System.out.println("IO error
reading
> from connection. " + (e.getMessage()));
> strbufFileContents.setLength (0);
//
> empty the buffer
> return false;
> }
> }
> // Save the contents of the buffer.
> m_strContents = strbufFileContents.toString ();
> return true;
> }
>
> ==Snip===================================================================
>
>
> -----Original Message-----
> From: Veena [mailto:[EMAIL PROTECTED]]
> Sent: 15 February, 2000 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to Post Data IN JSP
>
>
> FYI
>
> i have heard that some servers limit the length of the URLS' and Query
> strings to just 240 Characters .
>
>
> ----- Original Message -----
> From: Pratik <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 23, 2000 5:34 PM
> Subject: Re: How to Post Data IN JSP
>
>
> > Yes sumit you are right.
> > But as I am developing a freamework.
> > I don't know how may form elements a entry screen have.
> >
> > If the size of querystring exceeds 1000 char thare is a good chance for
> > misbehaviour.
> > So I can't use query string.
> > Same way this is framework so event I can't use session variables for
each
> > elements in form.
> >
> > any suggestion?
> >
> >
> > Thanks
> > Pratik
> > ----- Original Message -----
> > From: Sumeet Aggarwal , Gurgaon <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 23, 2000 3:50 PM
> > Subject: Re: How to Post Data IN JSP
> >
> >
> > > Hi Pratik,
> > >
> > > The department information u passed to the frames page and not to the
> > > navigation or results page....
> > > While defining your frame in frame.jsp, just write the following code
> > > <frame scr=results.jsp?department="<%=
> request.getParameter("Department")
> > > %>">
> > >
> > > Also, u can try passing the department value using session objects,
and
> > > reinitialise the session object to blank in results.jsp aftegetting
the
> > > value in local variable.
> > >
> > > I hope this would work...
> > >
> > > Regards,
> > > Sumeet Aggarwal
> > >
> > >
> > > -----Original Message-----
> > > From: Pratik [SMTP:[EMAIL PROTECTED]]
> > > Sent: Friday, June 23, 2000 3:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: How to Post Data IN JSP
> > >
> > > Actually My original problem is
> > > I have a page frame.jsp that has two frames
> > > One frame for navigation.jsp and second for result.jsp from
> data.
> > > In user Entry page I ask for Department It will pass
Department
> to
> > > the
> > > frame.jsp.
> > > I want that department Id in result.jsp.
> > >
> > > Now when I use request.getParameter("Department")
> > > How can I do this functionality.
> > >
> > >
> > > Please help
> > >
> > > regards Pratik
> > >
> > >
> > >
> >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body:
"signoff
> > > JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > > http://java.sun.com/products/jsp/faq.html
> > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> > >
> >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > > http://java.sun.com/products/jsp/faq.html
> > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets