Re: Newbee question on servlet and html - Really frustated with this problem.
thanks everybody. I could solve the problem. There was a typo in my response text. When I changed the following line response.setContentType("test/html"); with response.setContentType("text/html"); It jus worked like a charm. thanks ! On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: > > does anybody know how to fix this problem. > Invocation of servlet prompts a messagebox posing a questions " do you > want to save this ?" instead of executing it and returing the output in the > html document. > :( > > On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: > > > > I wrote my first html and servlet and deployed it on tomcat 5.5. The > > html > > works okay when I call it from the browser. The servlet too works okay > > when > > I call its doget() method by invoking it from the browser. EG:. > > http://localhost:8080/VBeer/BeerSelect > > > > However, when i try to invoke the servlet from an html form I get a > > message > > box - (file download security warning) - Do you want to save this file ? > > It has a > > funny number suffixed to the my servlet name. > > > > > > Not sure what is happening. > > Here is my HTML code snippet. > > > > > > > > Beer selecton Page > > > > > > > > Select Beer Characteristics > > > > Thanks ! > > > >
RE: Newbee question on servlet and html - Really frustated with this problem.
Did you define your servlet in your WEB-INF/web.xml? Mauricio Fernandez -Mensaje original- De: Developer Developer [mailto:[EMAIL PROTECTED] Enviado el: martes, 11 octubre, 2005 5:23 Para: tomcat-user@jakarta.apache.org Asunto: Newbee question on servlet and html - Really frustated with this problem. does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions " do you want to save this ?" instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: > > I wrote my first html and servlet and deployed it on tomcat 5.5. The html > works okay when I call it from the browser. The servlet too works okay > when > I call its doget() method by invoking it from the browser. EG:. > http://localhost:8080/VBeer/BeerSelect > However, when i try to invoke the servlet from an html form I get a > message > box - (file download security warning) - Do you want to save this file ? > It has a > funny number suffixed to the my servlet name. > > > Not sure what is happening. > Here is my HTML code snippet. > > > > Beer selecton Page > > > > Select Beer Characteristics > > Thanks ! > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbee question on servlet and html - Really frustated with this problem.
I think you are getting this error because Tomcat doesn't realize you are trying to activate the servlet. You probably will need to look at your WEB-INF/web.xml of your web application. You'll need a entry that defines BeerSelect and a that ties BeerSelect to its actual url-pattern. (/VBeer/BeerSelect) You can look at the web.xml in the servlet-examples webapp that comes with Tomcat for sample definitions. Glen Developer Developer escribió: does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions " do you want to save this ?" instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: I wrote my first html and servlet and deployed it on tomcat 5.5. The html works okay when I call it from the browser. The servlet too works okay when I call its doget() method by invoking it from the browser. EG:. http://localhost:8080/VBeer/BeerSelect However, when i try to invoke the servlet from an html form I get a message box - (file download security warning) - Do you want to save this file ? It has a funny number suffixed to the my servlet name. Not sure what is happening. Here is my HTML code snippet. Beer selecton Page Select Beer Characteristics Thanks ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbee question on servlet and html - Really frustated with this problem.
Two questions... (1) Does your servlet implement a doPost() method? Since you are POSTing the form, you need to do that. (2) Is there a typo in your form there? I see: That's not proper... my guess is you want: Frank Developer Developer wrote: does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions " do you want to save this ?" instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: I wrote my first html and servlet and deployed it on tomcat 5.5. The html works okay when I call it from the browser. The servlet too works okay when I call its doget() method by invoking it from the browser. EG:. http://localhost:8080/VBeer/BeerSelect However, when i try to invoke the servlet from an html form I get a message box - (file download security warning) - Do you want to save this file ? It has a funny number suffixed to the my servlet name. Not sure what is happening. Here is my HTML code snippet. Beer selecton Page Select Beer Characteristics Thanks ! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbee question on servlet and html - Really frustated with this problem.
does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions " do you want to save this ?" instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: > > I wrote my first html and servlet and deployed it on tomcat 5.5. The html > works okay when I call it from the browser. The servlet too works okay > when > I call its doget() method by invoking it from the browser. EG:. > http://localhost:8080/VBeer/BeerSelect > However, when i try to invoke the servlet from an html form I get a > message > box - (file download security warning) - Do you want to save this file ? > It has a > funny number suffixed to the my servlet name. > > > Not sure what is happening. > Here is my HTML code snippet. > > > > Beer selecton Page > > > > Select Beer Characteristics > > Thanks ! >