Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Servlet signup still not working satisfactorialy
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


AmanDeep
Servlet signup still not working satisfactorialy
1 Answer(s)      5 years and 11 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

October 25, 2008 at 3:11 PM


Hi friend,


Code for Servlet "SignUp.java" replace this code with old code.


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class SignUp extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)throws IOException, ServletException
{
res.setContentType("plain");
PrintWriter pw = res.getWriter();

String name="";
String id="";
String pwd="";
String pwd1="";

if(req.getParameter("name")!=null && req.getParameter("id")!=null)
{
name = req.getParameter("name").toString();
id = req.getParameter("id").toString();
pwd = req.getParameter("pwd").toString();
pwd1 = req.getParameter("pwd1").toString();
}


if(!name.equals("") || !id.equals(""))
{

pw.println("Congratulations" + name +" yow have successfully signup");
pw.println("Your login id is" +id);
}
else
{
pw.println("One of the Mandatary field is empty");
}
}

public void doPost(HttpServletRequest req, HttpServletResponse res)throws IOException, ServletException
{
doGet(req,res);
}

}

Thanks


Related Tutorials/Questions & Answers:
Servlet signup still not working satisfactorialy - JSP-Servlet
Servlet signup still not working satisfactorialy  Hello sir thanks... signup /SignUp   Hi friend, Code for Servlet..., it still prints the same output: One of the Mandatary field is empty. What
Servlet signup - JSP-Servlet
Servlet signup  Hi, thanks for your reply, I tried your logic code... javax.servlet.*; import javax.servlet.http.*; public class SignUp extends... successfully signup"); pw.println("Your login id is" +id); } else { pw.println("One
Advertisements
Servlet signup same output - JSP-Servlet
Servlet signup same output  Ok i solved the problem of content type by res.setContentType("text/plain"), but the output is same it always prints the else value(i.e. One of the mandatary field is empty) so please help, thanks
My Servlet code not working - Development process
My Servlet code not working  HHi, After executing servlet am getting blank screen. Am using weblogic server and Eclipse editor. But jsp is working fine. Steps(what i did ) 1)Created servlet (In eclipse) and export it (saved
SaveAs Dialogue box is not working on button click in servlet
SaveAs Dialogue box is not working on button click in servlet  Hii Sir, i added response.setHeader into my servlet code to export the data into excel file but this is not working on button click ...plz give me
still error
still error   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
still error
still error  st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
still error
still error  public NewJFrame() { initComponents(); try { Class.forName("java.sql.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","admin"); } catch
still error
still error  public NewJFrame() { initComponents(); try { Class.forName("java.sql.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","admin"); } catch(Exception e
Mutiple part is ot working - JSP-Servlet
Mutiple part is ot working  Hi, I have 2 systems and i m using IE7. But in one system when i use enctype="mutlipart" its working but in other system its not working. Is this a problem with the browser or nything else
why jsp pages are not working on linux but java application is working in windows - JSP-Servlet
why jsp pages are not working on linux but java application is working in windows  java web application jsp pages are not showing the fileds corectly on linux server but same application is working on windows.why
servlet not working properly ...pls help me out....its really urgent
servlet not working properly ...pls help me out....its really urgent  ... as the user click submit button he will reach to updation.java servlet through WEB.XML 2)**WEB.XML** <web-app> <servlet> <servlet
Still getting the http 404 error - Java Beginners
Still getting the http 404 error  Dear experts, I refer... is userid? Anyway, whatever I do, I still receive the http 404 error...saying... couldn't find the servlet. There is a problem in path. It is better to put the servlet
Datagrid not working
Datagrid not working  The code here is working fine, apart from the fact that that I'm using netbeans 6.5 and the servlet v2.5 and struts 1.1.... working. please help me out
UITapgesturerecognizer not working
UITapgesturerecognizer not working  uitapgesturerecognizer not working
Registration timer expired, but client is still registering!
Registration timer expired, but client is still registering!  Registration timer expired, but client is still registering
-[UIPopoverController dealloc] reached while popover is still visible.
-[UIPopoverController dealloc] reached while popover is still visible.  Hi, I am getting following error in my application: -[UIPopoverController dealloc] reached while popover is still visible. How to solver this? Thanks
htpasswd working
htpasswd working   hii, What does htpasswd do?   hello, htpasswd creates a new user in a specified group, and asks to specify a password for that user
Why this is not working...?
Why this is not working...?  import java.util.*; public class Family { int size_of_family=0; public Person[] members=new Person[size_of_family]; Person d = new Person(); public Family (int size_of_family){ members = new
hello .. still doesn't run - Java Beginners
hello .. still doesn't run  Iam still having a prblem in running this problem errors are: can not resolve symbol import.util.Scanner class Scanner another error is can not resolve symbol method setname(java.lang.String
Struts application not working in LINUX - Struts
Struts application not working in LINUX  Hi ALL, I have a struts... in LINUX prodution system. The application is not recoginsed the web server is Tomcat5. I tryed with a sample servlet on linux tomcat its also not working
Comparing arrays not working correctly?
Comparing arrays not working correctly?  Comparing arrays not working correctly
Update not working in hibernate.
Update not working in hibernate.  Update not working in hibernate
Focus method not working in firefox
Focus method not working in firefox  object.focus() is not working in firefox and chrome the element is not focused what was the problem
html dropdown not working firefox
html dropdown not working firefox  I am writing a Dropdown code in HTML which is not working in firefox. What could be the reason as it's perfectly working in IE and Crome. Thanks
calender working in struts - Struts
calender working in struts  when i execute the following code ,that is working properly if i convert to struts html tags that code is not working please help me to rectify the problem
file_exists php not working
file_exists php not working  file_exists php not working. Please give me the simple example
Dynamic-update not working in Hibernate.
Dynamic-update not working in Hibernate.  Why is dynamic update not working in hibernate?   Dynamic-update is not working. It means when you are running your update, new data is added in your table in place
Working of POS Terminal
Working of POS Terminal  Hi there, thanks for this post. Just curious how actual POS terminal will interact with PHP. PHP doesn't provide hardware interaction. Thanks for reply. Regards
UIWebView zoom not working
UIWebView zoom not working  Hi, I don't know why UIWebView zoom not working? Tell the solution. Thanks   Hi, Open the .xib file and set scalesPageToFit to YES. Thanks
defined actions in struts config still getting a HTTP 404 - Struts
defined actions in struts config still getting a HTTP 404  Hi guys, I am getting an Invalid Path requested error. Heres the code snippet from... exist and so do the Action classes. Still whenever I pass the .do action
Advertisements
 

 

 

DMCA.com