I am using the following:

URLConnection uc = url.openConnection();
uc.setDoOutput(true);

I've not had any problems with it using the doPost() method in the servlet.
I think it's probably a matter of the correct connection parameters when I
run the web page which has the applet button on it. This starts up the
applet and from there, I'm not sure what I need to specify for the
connection to work and debug into the servlet running in the VisualCafe
environment. Somehow, I (mentally) can't make the picture work as to how the
connection is made from the applet to the servlet that I have started and
running in the VisualCafe environment in the debug mode, and physically it
doesn't work either. I know on the purely html post page, it is post like
<form action=http://demo:8080/servlet/survey method=POST> and this works
fine.

Does anyone have any ideas on the specific connection info here?

Thanks,

Gary

> -----Original Message-----
> From: Cezar Totth [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 16, 1999 8:28 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Debug servlet from an applet using VisualCafe
>
> On Tue, 16 Mar 1999, Formanek Gary L wrote:
>
> > I don't necessarily need to simultaneously debug an applet and servlet.
> Sorry, my fault...
>
> > However, when I post from the applet, I want to be able to debug/break
> into
> > the servlet that is running in VisualCafe. I need to be able to see the
> > variables, etc. in the servlet. I have been able to post from an html
> form
> > and it successfully breaks into the servlet to debug it. What do I need
> to
> > set up differently in the applet to break into the currently running
> > servlet? It is running locally on my machine within VisualCafe (3.0a).
>
> Nothing  special ... I think.  they should work the same.
>
>  Are you sure the applet uses POST method to call the servlet?
> just try first to call doPost() within servlet's doGet():
>
> public ... doGet(HttpServletRequest req, HttpServletResponse res)
>  throws ...
> {
>   doPost(req,res);
> }
> See if debugger raises the breakpoint.
>
> -----------------------------
> Are you using in your applet:
>
> myConnection = new HttpURLConnection(java.net.URL);
> myConnection.setRequestMethod("POST");
>
> instead of direct java.net.URL.openConnection() calls, wich return
> a 'simpler' java.net.URLConnection instance?
>
> ---------------
> Cezar
> > > >
> > > > On Monday, March 15, 1999 4:27 PM, Formanek Gary L
> > > > [SMTP:[EMAIL PROTECTED]] wrote:
> > > > > I agree, I would think they would be the same. However, I use the
> page
> > > to
> > > > > start my applet (there's a button on the html page) and then I
> can't
> > > see how
> > > > > the connection is made in the applet that starts up to the
> servlet.
> > > The page
> > > > > works but when the post happens from the applet, it does not seem
> to
> > > debug
> > > > > break in the servlet code. How do I get the applet to know about
> the
> > > debug
> > > > > version of the servlet that is running?
> > > > >
> > > > > Also, I've tried several things but the best I can do is get a
> > > security
> > > > > error - netscape.security.AppletSecurityException:
> security.Couldn't
> > > connect
> > > > > to \machinename.com' with origin from '' or
> > > > > netscape.security.AppletSecurityException: security.protocol:
> Cannot
> > > access
> > > > > 'http' from a codebase protocol of 'file'. This is when I run from
> a
> > > local
> > > > > copy of the html file with the local host machine name, etc.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Gary
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Bob Withers [SMTP:[EMAIL PROTECTED]]
> > > > > > Sent: Monday, March 15, 1999 1:35 PM
> > > > > > To:   [EMAIL PROTECTED]
> > > > > > Subject:      Re: Debug servlet from an applet using VisualCafe
> > > > > >
> > > > > > At 01:06 PM 3/15/99 -0600, you wrote:
> > > > > > >Hi,
> > > > > > >
> > > > > > >I have an applet which does communication with a servlet using
> > > HTTP. I
> > > > > > have
> > > > > > >been able to use VisualCafe to debug an HTML form which posts
> to a
> > > > > > servlet.
> > > > > > >Basically you set up the options on the project dialog with the
> > > HTML
> > > > > > form,
> > > > > > >etc. Then hit the F5 to run in the debugger and everything
> works.
> > > > > > >
> > > > > > >However, how do I get an applet which posts to a servlet to
> debug
> > > into
> > > > > > the
> > > > > > >servlet? Has anyone ever done this before? I have several
> entries
> > > into my
> > > > > > >servlet from my applet and aside from always doing logging, I
> would
> > > > > > actually
> > > > > > >like to step into the servlet and debug it.
> > > > > > >
> > > > > >
> > > > > > Why would an applet posting to the servlet be any different than
> a
> > > HTML
> > > > > > form posting to it?  I would think that from the persepctive of
> the
> > > server
> > > > > > they would be indistinguishable.
> > > > > >
> > > > > > Bob
> > >
> > >
> > > Cezar Totth                             email:  [EMAIL PROTECTED]
> > >                                         Fax:    (401) 220 33 95
> > > Genesys Software Romania                Phone:  (401) 638 49 44
> > > Stefan Furtuna 169, sect.6
> > > cod 77171, Bucharest
> > > Romania
> > >
> > >
> __________________________________________________________________________
> > > _
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
> http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
> __________________________________________________________________________
> _
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
>
> Cezar Totth                             email:  [EMAIL PROTECTED]
>                                         Fax:    (401) 220 33 95
> Genesys Software Romania                Phone:  (401) 638 49 44
> Stefan Furtuna 169, sect.6
> cod 77171, Bucharest
> Romania
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to