Or just return a 204 HTTP Status Code and you don't have to go into the
Hidden Frame stuff perhaps.

Paul Copeland, JOT Object Technologies -- http://www.jotobjects.com

>
> Date:    Fri, 23 Aug 2002 22:46:48 -0600
> From:    Walter Meyer <[EMAIL PROTECTED]>
> Subject: Re: jsp & javascript
>
> Not to be an ass, but what if you write and applet but they disable java?
> Does your company have any type of browser rules? There's only so much
> hand holding that you can should be expected to do.
>
> "If you make it idiot proof, someone will make a better idiot."
>
> I'm not sure exactly what you're trying to do. What happens after the
> data is sent to the server? Do you need to send data to the server without
> reloading the page?
>
> One way to send the data to the server would be to store the javascript
> array in a hidden form field and submit the form to the server. If the
> form is in an inline or hidden frame, you can do all of this without
> reloading the page the user sees.
>
> Am I on the right track?
>
> Walt
>
> ---- Sohaila Roberts <[EMAIL PROTECTED]> wrote:
> > This app is local to my department. If they turn off javascript they
> > will
> > come to me asking 'why isnt it working'.
> >
> > I'm just going to use an applet-servlet method now, I was misinformed
> > on
> > how jsp would help me.
> >
> > Thanks
> >
> > On Fri, 23 Aug 2002, techhead4life wrote:
> >
> > > well what if they disable javascript from the browser what do u use
> > then?
> > >
> > > ----- Original Message -----
> > > Wrom: ALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBG
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, August 23, 2002 1:23 PM
> > > Subject: Re: jsp & javascript
> > >
> > >
> > > > You can't execute Java code from an HTML page without going through
> > an
> > > > applet
> > > > to do it.  Java code in a JSP executes on the server side to help
> > create
> > > the
> > > > web page that is sent to the browser.  On the client side, if you
> > don't
> > > use
> > > > an applet, the best you can hope for is to try to make JavaScript
> > > > do what you want, but, as you know, JavaScript isn't Java.
> > > >
> > > > Duane Morse, Eldorado Computing Inc., Phoenix, Arizona
> > > >
> > > >
> > > > -----Original Message-----
> > > > Wrom: JSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZA
> > > > Sent: Friday, August 23, 2002 10:05 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: jsp & javascript
> > > >
> > > >
> > > > Hi, i have a jsp page which includes javascript. in one of my javascript
> > > > functions i want to open a connection to a servlet and send it
> > some data
> > > > that is stored in a javascript Array. I am using the method i used
> > with
> > > > applets to open a URLConnection to my servlet and send the data
> > via an
> > > > objectoutputstream.. my code is as follows..
> > > >
> > > >     function printform()
> > > >     {
> > > >         var servlet = "http://localhost:1000/pr/servlet/pr";
> > > >         if(getData()) {
> > > >             <%@
> > > >                 Serializable formData[] = { data };
> > > >                 URLConnection con = servlet.openConnection();
> > > >                 con.setDoInput(true);
> > > >                 con.setDoOutput(true);
> > > >                 con.setUseCaches(false);
> > > >                 con.setRequestProperty("Content-Type",
> > > > "application/x-www-form-urlencoded");
> > > >                 ObjectOutputStream out = new
> > > > ObjectOutputStream(con.getOutputStream());
> > > >                 int i = formData.length;
> > > >                 for(int x = 0; x < i; x++)
> > > >                 {
> > > >                     out.writeObject(formData[x]);
> > > >                 }
> > > >                 out.flush();
> > > >                 out.close();
> > > >             %>
> > > >
> > > >         }
> > > >
> > > > but when i go to run it i get the following error..
> > > >
> > > > Error: 500
> > > >
> > > > Location: /pr/jsp/pr.jsp
> > > >
> > > > Internal Servlet Error:
> > > >
> > > > org.apache.jasper.compiler.ParseException:
> > > > /usr/local/jakarta-tomcat-3.3.1/webapps/pr/jsp/pr.jsp(30,16) Invalid
> > > > directive
> > > >         at
> > > > org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:186)
> > > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> > > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> > > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> > > >         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
> > > >         at
> > > > org.apache.tomcat.facade.JasperLiaison.jsp2java(JspInterceptor.java:790)
> > > >         at
> > > >
> > > org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:73
> > > > 1)
> > > >         at
> > > >
> > > org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
> > > >         at
> > > >
> > > org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968
> > > > )
> > > >         at
> > > >
> > > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:87
> > > > 5)
> > > >         at
> > > > org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
> > > >         at
> > > >
> > > org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
> > > > nterceptor.java:176)
> > > >         at
> > > > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
> > > >         at
> > > >
> > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> > > > a:516)
> > > >         at java.lang.Thread.run(Thread.java:479)
> > > >
> > > >
> > > >
> > > > I'm very new to jsp. I'm running it via tomcat. Any suggestions
> > on what
> > > i'm
> > > > doing wrong?
> > > >
> > > > Thanks
> > > > Sohaila
> > > >
> > > >

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to