Problem Connecting between applet and servlet
Hi,
I was trying to connect to a servlet through an applet.I created an html
page with two frame.At the top frame the applet was embedded and in the bottom
frame the servlet was server side included.I used the GET method to
communicate to the servlet.So in the init method of the applet I added the
following code to get a connection to the servlet.And pass information through
the URL.
String
servletLocation="http://172.100.8.213:8080/servlet/serv.HelloWorldServlet1?LastName='Jones'";
try{
testServlet = new URL( servletLocation );
}
catch (MalformedURLException e){
}
try{
servletConnection = testServlet.openConnection();
}
catch(IOException e){
}
///
The code of the servlet is shown below,where I tried to get the information
passed from the applet
public class HelloWorldServlet1 extends HttpServlet {
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out;
res.setContentType("text/html");
out = res.getWriter();
String name=req.getParameter("LastName");
out.println("");
out.println("Hello World");
out.println("");
out.println("LastName="+name+"");
out.println("");
}
}
/
The output is showing a null value for the name.Is it wrong to send the
information to the servlet from the init method.Can you suggest some other
method or simple code for the communication.
regards,
Rakesh.
Get free email and a permanent address at http://www.netaddress.com/?N=1
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Unidentified subject!
>From [EMAIL PROTECTED] Mon May 15
>12:08:03 2000
Received: from scam.xcf.berkeley.edu (scam.XCF.Berkeley.EDU [128.32.43.201]) by
lgs-systems.com (8.8.5) id MAA20836; Mon, 15 May 2000 12:07:59 -0600 (MDT)
Received: (qmail 35662 invoked by alias); 15 May 2000 18:04:13 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 35653 invoked from network); 15 May 2000 18:04:13 -
Received: from nwcst287.netaddress.usa.net (204.68.23.32)
by scam.xcf.berkeley.edu with SMTP; 15 May 2000 18:04:13 -
Received: (qmail 13800 invoked by uid 60001); 15 May 2000 18:04:22 -
Message-ID: <[EMAIL PROTECTED]>
Received: from 204.68.23.32 by nwcst287 for [203.129.246.18] via
web-mailer(34FM1.4.02C) on Mon May 15 18:04:22 GMT 2000
Date: 15 May 00 22:04:22 SMT
From: Rakesh Raveendran <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Problem Connecting between applet and servlet
CC: [EMAIL PROTECTED]
X-Mailer: USANET web-mailer (34FM1.4.02C)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
X-UIDL: bf18ed5e37d8913f79497bc73351b1d2
Hi,
I was trying to connect to a servlet through an applet.I created an htm=
l
page with two frame.At the top frame the applet was embedded and in the b=
ottom
frame the servlet was server side included.I used the GET method to
communicate to the servlet.So in the init method of the applet I added th=
e
following code to get a connection to the servlet.And pass information th=
rough
the URL.
String
servletLocation=3D"http://172.100.8.213:8080/servlet/serv.HelloWorldServl=
et1?LastName=3D'Jones'";
try{
testServlet =3D new URL( servletLocation );
}
catch (MalformedURLException e){
}
try{
servletConnection =3D testServlet.openConnection(); =
}
catch(IOException e){
}
///
The code of the servlet is shown below,where I tried to get the informati=
on
passed from the applet
public class HelloWorldServlet1 extends HttpServlet {
=
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out;
res.setContentType("text/html");
out =3D res.getWriter();
String name=3Dreq.getParameter("LastName");
=
out.println("");
out.println("Hello World");
out.println("");
out.println("LastName=3D"+name+"");
out.println("");
}
}
/
The output is showing a null value for the name.Is it wrong to send the
information to the servlet from the init method.Can you suggest some othe=
r
method or simple code for the communication.
regards,
Rakesh.
Get free email and a permanent address at http://www.netaddress.com/?N=3D=
1
---
To unsubscribe, mail [EMAIL PROTECTED]
To get help, mail [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Java/JNI/System calls
I am working on an app that controls a special hardware card. The card is accessed across the PCI bus and it has several configuration registers, etc., that I need to control. I would like to keep most of the smarts in the Java code (resource usage, etc. coded in the Java classes that model the hardware). I plan to use native threads. We will have a driver (Linux module) installed for our special hardware, that can give access to read/write and other special funcs (via ioctl). I have 2 questions regarding this impl. 1) If I use native threads, does each thread need to perform an "open" before it can call ioctl, or can I cache the fd in the native code? (different processes can't share fd's, can they?) 2) What about mmap? Does each thread need is own call? any other helpful hints or suggestions would be welcome. thanks, [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
native threads w/ JRE1.1.8
Hi, I've compiled a server application under blackdown's JDK 1.1.8 with native threads. But I can't see any libraries for native threads to be run under the JRE. It seems every other version has them for the JRE. What is different about 1.1.8? I don't have the option to move to 1.2 or greater since they caused problems with this code. Thanks for any help, Oscar -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
