Hi! i've been recently studying about servlets and jsps. I've been reading this book entitled "mastering jakarta struts" and one of the examples there is the ParameterServlet.java. I've tried previous examples written in the book and they worked perfectly and then this one came - and I cant seem to make it work.
the problem is that when Form.jsp calls for the ParameterServlet, the browser wouldnt run the servlet and instead it tries to download the file saying that i'm trying to open a PARAMETERSERVLET FILE.
Can someone please help me? Below are excerpts from my code.
</BODY> </HTML> ----- here is also a part of my web.xml <servlet> <servlet-name>ParameterServlet</servlet-name> <description> This servlet retrieves the parameters sent to it and returns the parameters and their values back to the client. </description> <servlet-class>chapter2.ParameterServlet</servlet-class> <!-- Load this servlet at server startup time --> <load-on-startup>5</load-on-startup> </servlet>
I've put the files on the right directories since i've got other servlets under the chapter2 folder and they work correctly. Also with the web.xml, i now that i must define all the servlet tags before the servlet-mapping tags so there is no problem there. Now i am completely lost since i dont know why the application does not work
Hope this helps [ June 09, 2005: Message edited by: Scott Enisin ]
The squeaky wheel gets the grease. Well, that or replaced...
Joined: Feb 07, 2005
I'm guessing that the content type setting must also be the problem. I did the code all over again yesterday and it worked - not knowing what could have been the problem. Now that you pointed that one out, I think that it was the problem. I'll be more careful with the content setting next time. Thank you so much Scott! Good day!