applet to servlet communication
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bhuwan_Mittal
Posted On:   Sunday, July 13, 2003 04:29 AM

I have an applet form on the client machine. When client presses submit button on the applet when he should be connected to internet and i want that on clicking a servlet should be dispalyed on the new browser window with the data entered in the applet form. I have done this with this code String URLvar = "http://localhost:8100/servlet/SubmitOnline?PCode="+PCode+"&TCode="+TCode +"&ECode="+ECode+"&DECode="+DECode+"&FVCode="+FVCode+"&MineCode="+MineCode+"&MineName=" +MineName+"&FECode="+FECode+"&PECode="+PECode+"&UName="+UName; try { URL url = new URL(URLvar);    More>>

I have an applet form on the client machine. When client presses submit button on the applet when he should be connected to internet and i want that on clicking a servlet should be dispalyed on the new browser window with the data entered in the applet form.

I have done this with this code

String URLvar = "http://localhost:8100/servlet/SubmitOnline?PCode="+PCode+"&TCode="+TCode
+"&ECode="+ECode+"&DECode="+DECode+"&FVCode="+FVCode+"&MineCode="+MineCode+"&MineName="
+MineName+"&FECode="+FECode+"&PECode="+PECode+"&UName="+UName;

try
{
URL url = new URL(URLvar);
getAppletContext().showDocument(url, "a");
}
catch(MalformedURLException e)
{
}

but the bug in this code is that "maximum URL length is 2083 characters...."

in my case i am transferring several variables. So this concept has been failed in my case.

can anyone help me....will be more beneficial if someone can expalin by taking a example...

i want to open a seperate window for servlet on clicking submit button in applet.Because i have to do a lot of checking and have to connect several other JSP and servlets code with this servlet before submitting the data in the database.

Thanks in advance........

bhuwan mittal (bhuwan_m@yahoo.com)

   <<Less

Re: applet to servlet communication

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, July 13, 2003 08:54 AM

maximum URL length is 2083 characters


That is why you should use POST instead of GET, where the parameters are not part of the URL string.

About | Sitemap | Contact