Request dispatcher:Forward

hi,

I am taking data from user in a jsp page "customer.jsp" and on submitting form in this jsp page it passes the data to a servlet. Servlet then forwards the response to the same jsp page "customer.jsp" with the same values if there is any duplicate id in the database by giving the message userid already exist.

Now the problem occurs when forwarding the response to the jsp page,we r not getting the background properties of the page but we r getting therespnse from servlet and when we submit the same page we r getting the error as

The requested resource (/projectname/servlet/servlet/Customer) is not available

[641 byte] By [msaishivarama] at [2007-11-27 10:55:49]
# 1

Obviously, there's one "/servlet" too many. I don't understand what "background properties" are.

CeciNEstPasUnProgrammeura at 2007-7-29 11:58:58 > top of Java-index,Java Essentials,Java Programming...
# 2

I mean im not getting background image.

when we submit the jsp page to the servlet(addsubcontractor.java) like

http://localhost:8080/Newproject/addsubcontract.jsp

and in the servlet i am inserting the data into the database and then i am forwarding respose to the same jsp page(addsubcontractor.jsp)

we r getting the details in the following url without background image

http://localhost:8080/Newproject/servlet/addsubcontract

and the i am submitting the form by making some changes we r getting the following error.

description The requested resource (/Newproject/servlet/servlet/addsubcontract) is not available.

msaishivarama at 2007-7-29 11:58:58 > top of Java-index,Java Essentials,Java Programming...
# 3

hellooooooooooooooooooo

msaishivarama at 2007-7-29 11:58:58 > top of Java-index,Java Essentials,Java Programming...
# 4

How can u call servlet from jsp ?

That "servet " as u r naming it must be a bean which contains only setter getter methods for jsp page ..

Explain u r problem in brief

AmitChalwade123456a at 2007-7-29 11:58:58 > top of Java-index,Java Essentials,Java Programming...