Hi,
I know the GET method is not good, but I am using it
so I can see what values are being sublitted in the
URL.
What exactly do you mean by
> the first time you invoke the url, wouldn't it call
> the doGet and cause your
> method to insert data?
I only invoke the URL once, when I click on
submit!
<form method="get" action="servlet/InsertModelInfo"
onSubmit="validateForm(); return false;"
name="insertmodelinfoForm">
and in the validateForm() I use
document.insertmodelinfoForm.submit();
after some validation. Does this invoke the servlet
TWICE?
Thanks,
Ravi.
--- Vinay Menon <[EMAIL PROTECTED]> wrote:
> if you are using a doGet method to insert data
> [which is really not good],
> the first time you invoke the url, wouldn't it call
> the doGet and cause your
> method to insert data?
>
> is you form method POST or GET?
>
> ----- Original Message -----
> From: "Ravi Shankar Jagarapu"
> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 28, 2001 3:54 AM
> Subject: Tricky error!
>
>
> > Hi,
> >
> > I am trying to save a form ( get method) into the
> > oracle database.
> >
> > I have the first column (varchar) as primary key.
> >
> > Now when I submit the form, I get a html page
> > outputted by the servlet showing the data is
> commited.
> >
> > When I see the source code of the page, though, I
> get
> > ---------- SQLException caught ----------
> > Error Message: ORA-00001: unique constraint
> > (SCOTT.MODULES_PK) violated
> >
> > SQLState: 23000
> > Vendor: 1
> >
> > However, this happens, though I give a unique
> value
> > for the primary column.
> >
> > What I don't understand is, why is the source code
> > showing the SQLException?
> >
> > I have queried the database and it shows, the data
> I
> > had submitted through the form.
> >
> > -- Ravi.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> >
>
___________________________________________________________________________
> > 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
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
___________________________________________________________________________
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