invoking servlets from anchor tag
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   meghna_gupta
Posted On:   Tuesday, April 20, 2004 11:28 AM

hello to all, i have a project in which i am using html, java servlets and sqlserver. i have a problem in my html anchor tag. When i call the java class (servlet) file from the action attribute of the tag then it works very well.but when i call the same file from the href attribute of the tag then Internet Explorer shows the error message "bad request".i am using testing servlet engine servletrunner.exe. Tag href as follow: href="http://localhost:8080/servlet/security.currentVisitor?type=resend" i am not able to understand what is wrong,If someone knows then pleassssse help me. th   More>>

hello to all,


i have a project in which i am using html, java servlets and sqlserver.

i have a problem in my html anchor tag. When i call the java class (servlet)
file
from the action attribute of the

tag then it works very well.but when i call the same

file from the href attribute of the tag then Internet Explorer shows the error message

"bad request".i am using testing servlet engine servletrunner.exe.


Tag href as follow:

href="http://localhost:8080/servlet/security.currentVisitor?type=resend"

i am not able to understand what is wrong,If someone knows then pleassssse help me.

thanks

meghna gupta

   <<Less

Re: invoking servlets from anchor tag

Posted By:   Gajanan_Choudhari  
Posted On:   Tuesday, April 20, 2004 10:23 PM

Hi,
first of all I would like to suggest you, find out the ans of the following questions.
1)what method you are using with

2)what method you have overridden in servlet that is doGet()or doPost()?
So if only one is overridden in servlet then override the other too. Because by default as per my knowledge, href uses Get method.
Hope it works.
Regard,
Gajanan
About | Sitemap | Contact