This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi All, I am a new learner. Please help. I have a servlet which has to call another servlet either when a button is clicked or when clicked on a link. I have a input item, whose value is to be passed to the servlet being called. Here is my code
What exactly happening is when ckicked on the url the second servlet is started but the parameter when displayed in all cases shows only "val". But when is button is clicked. ?varname=whatever value i have entered for the name gets appended to the current URL but the second servlet is not displayed. I have coded both servlets as doGet. Please Help Thx in advance. Aruna
I think your HTML form is very strange. Typically a HTML form starts with a tag something like <FORM METHOD='POST' ACTION='/servlets/whatever'>, then has a series of <INPUT> tags, then finally a </FORM> tag at th ened to finish it. You seem to have some input elements outside the form, and a form start with no end. Does this work at all?
hi, i think for sevlet chaining you need to administer the javawebserver admin.bat in bin directory. in that servlet alias will be there.u have to give the same name for both servlets in the alias field and "servlet1,servlet2" in the next field. then if you invoke the first one it will redirect to other. if that is not what you want i am sorry.... rayudu
As I understand it, servlet chaining is not really part of the official Servlet API, but was an early kludge. You are supposed to use a RequestDispatcher object to accomplish things like having one servlet call another. That said - the original poster's problem just looks like a matter of getting the HTML form right. Bill