java - Displaying the user input on browser using googleappengine -


i trying run web app on browser using googleappengine. codes below. wanna whatever input given through html, should received @ servlet , display on browser again.

public class testserverservlet extends httpservlet {     public void dopost(httpservletrequest req, httpservletresponse resp) throws ioexception {          try{           string name= req.getparameter("name");         string msg = req.getparameter("message");               resp.setcontenttype("text/plain");         resp.getwriter().println("user name is"+name);           }catch(exception e)         {             system.err.println(e);         }       }  } 

index.html:

<html> <head> <meta charset="iso-8859-1"> <title>submission form</title> </head> <body> <from method="post" action ="testserver"> mail id: <input type ="text" name ="name"/><br/> message: <input type ="text" name ="message"/><br> <input type="submit" value="submit" /> </from> </body> </html> 

web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">     <servlet>         <servlet-name>testserver</servlet-name>         <servlet-class>com.example.test.testserverservlet</servlet-class>     </servlet>     <servlet-mapping>         <servlet-name>testserver</servlet-name>         <url-pattern>/testserver</url-pattern>     </servlet-mapping>     <welcome-file-list>         <welcome-file>index.html</welcome-file>     </welcome-file-list> </web-app> 

so, when run on browser http://localhost:8088/index.html , html form shown, unable view output. can please suggest me going wrong?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

mysql - Pass value between different pages (form) with PHP -