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

 
 


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

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 Pages:
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
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
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
File Upload is working in FireFox & Chrome but not in IE7 using java & jquery
File Upload is working in FireFox & Chrome but not in IE7 using java... to upload that file.In my jquery I am calling a servlet for upload.The code... but the content is still not there.I checked the file size also.It shows me some
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
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
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
datetimepicker not working in struts2
datetimepicker not working in struts2  Hi, I am using...] PWC1231: Servlet.service() for servlet jsp threw exception...() for servlet jsp threw exception org.apache.tiles.util.TilesIOException
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
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
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
Calendar's native alarm not working in j2me
Calendar's native alarm not working in j2me  Hi friend, I am developing an application to set Reminders in the phones calendar using PIM api... but problem still persists. We tried the example given in this link below: http
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
servlet
servlet  working of daynamic web application with diagram
servlet
servlet  hi sir,this is ashok.i installed tomcat 6.0 and jdk-150.i checked the server it's working but when execute servlet program for the .class file it shows the errors javax.servlet is not exist.what can i do,please tell me
Servlet - JSP-Servlet
and confirm password paremeters, and in the servlet called SignUp.java i... javax.servlet.http.*; public class SignUp extends HttpServlet { public void doGet... successfully signup"); pw.println("Your login id is" +id
Working with Tomcat Server
Working with Tomcat Server   ... Apache Tomcat is a famous Servlet container developed at  Apache... a web application folder (servlet-examples) under tomcat webapps directory. 
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
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
-[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
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
javax.servlet.ServletException - JSP-Servlet
placement problem. But still my file uploading is not working. Im using Tomcat 5.0.... exception javax.servlet.ServletException: javax/servlet/http.../servlet/http/HttpServletRequest
tomcat problem - JSP-Servlet
it stands still at the above path. Previously for all these versions it was working
servlet session - JSP-Servlet
servlet session  hi, im working on a real estate web site.....n... login servlet fromabout us page now i want the servlet to redirect me... that called the servlet: like in JS we can call a previous page
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
Distance learning business management
as everyone wants to continue further study being a working professional. However all... nature is regular or class courses and don't suit for a working professional... learning business management course has been designed for working professionals
Servlet and Timer - JSP-Servlet
Servlet and Timer  Hi EveryOne, I have a servlet application,that is working fine. What i want is that my servlet application should be refreshed for every 10 seconds. How to do that? Please help
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
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
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
servlet Query
servlet Query  i wanna get servlet directory structure. i m creating servlet. i have created directories according to servlet rules i.e. put .war... directory. but still my Tomcat server doesn't execute. directory structure is c
file_exists php not working
file_exists php not working  file_exists php not working. Please give me the simple example
Features of Servlet 2.5
the features of Servlet 2.5. Still most of the popular containers like Tomcat 5.5 and JBoss 4.0 support Servlet 2.4.  The list of the added features is given below... Features of Servlet 2.5      
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
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
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
constructor in servlet
a ServletConfig. That no longer applies, but servlet containers still will only call...constructor in servlet  Can we use the constructor, instead of init(), to initialize servlet?   Yes , of course you can use
background images in css not working
background images in css not working  In the application i'm passing a background image from CSS in the given format ... background-image: url("Image\backgroundImage.GIF"); which is not working. So, please give me an example
calculate working hour
calculate working hour  why echo not come out? <html><body> <form action="<?php $_SERVER['PHP_SELF'];?>" method="post"> Working hour : <input name="workout" type="text"/><input name="submit1
Servlet - JSP - JSP-Servlet
Servlet - JSP  Here is my complete code. all my code is running with out any error. the for loop in servlet is running as many times as my checkboxes... list is not working fine. its not returning the product when i try printing

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.