Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
35% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
1
0 Endorsements
Ranked #2K
~16.4K People Reached
Favorite Tags

29 Posted Topics

Member Avatar for Swapnil Palande

dude you need to declare the global variable in program.cs it would help you to access such variable in every form. try this out if it wont works i will show you an example by retrieving username and usertype which is your need

Member Avatar for Quezo
0
9K
Member Avatar for mith_cool

Hi, I have a scenario where in I had to sort an array, find duplicates and increment one or the other by 1. So, Eg: An array has 22, 23, 21, 21, 24 within it then, an array should be able to find 21 and increment it by 1 i.e. …

Member Avatar for Troy III
0
955
Member Avatar for miragefighter

1. well you can directly connect that page2 textboxes to the datatbase using datareader so that value of the textboxes come from the database on the page_load. 2. Else you can use a simple querystring where you can add value of that textboxes by declaring a string on the Response.Redirect …

Member Avatar for larashaikh
0
3K
Member Avatar for mith_cool

I simply want to forward a request of one servlet to another servlet. Authentication Servlet gets a request from a jsp page and thus authenctication servlet passes the request to another Addtocart servlet. AuthenticationServlet Code: [CODE] RequestDispatcher rd= request.getRequestDispatcher("/Addtocart"); rd.forward(request, response); response.sendRedirect("Addtocart"); [/CODE] Addtocart servlet code: [CODE] String pid = …

Member Avatar for Rameshwar Soni
0
121
Member Avatar for mith_cool

Instance variable does mean you will get new value with every new object created of particular class rite? I tried it myself eg: [CODE]class simpleinstcheck { static int i; void incr() { System.out.println(i++); } public static void main(String args[]) { simpleinstcheck sc= new simpleinstcheck(); sc.incr(); simpleinstcheck sc1= new simpleinstcheck(); sc1.incr(); …

Member Avatar for JamesCherrill
0
177
Member Avatar for mith_cool

Exception in inserting date into database [CODE] String Fname= request.getParameter("txtfname"); String Lname= request.getParameter("txtlname"); String Uname=request.getParameter("txtuname"); String Pass=request.getParameter("txtpass"); String Email=request.getParameter("txtemail"); String Gender=request.getParameter("group1"); String Add=request.getParameter("txtadd"); java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); //out.println(""+Fname+Lname+Uname+Pass+Email+Gender+Add); Connection con= null; //if(Fname != null && Lname != null && Uname != null && Pass != null && Email …

0
85
Member Avatar for mith_cool

I only wanted to print the value in the string variable fname but somehow am not able to use the jsp tags effectively. [CODE] <%@page language="java" import="java.util.*" %> <% Cookie[] c= request.getCookies(); if(c==null) { response.sendRedirect("index.jsp"); } else { for (int i=0; i<c.length; i++) { if(c[i].getName().equals("Cuname")) { try{ Connection con=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); …

Member Avatar for masijade
0
117
Member Avatar for skiabox

Yes obviously it is possible....instead of asking you should have tried yourself atleast once

Member Avatar for mith_cool
0
64
Member Avatar for SkyCool
Member Avatar for mith_cool
0
80
Member Avatar for mith_cool

There is some problem when i check username and validate it against password from my database.After checking password from request.getParamter() it should say "You have been successfully login"... Perhaps I am getting my own else block message"Incorrect Password..." which means there is some problem with the password thing. Here is …

0
65
Member Avatar for mith_cool

I am facing problem in storing an image file into sql server. Following is my jsp page form tag which calls a servlet which has the storage code.. [CODE] <form name="form" action="NewServlet" method="POST" enctype="multipart/form-date"> <input type="file" name="file" size="20"> <input type="submit"> </form> [/CODE] here is my servelt code for the same …

Member Avatar for mith_cool
0
219
Member Avatar for mith_cool

I have been assigned a task to develop an online store.I am facing a problem at the time of insertion of records into SQL Database. I am using Type4 driver. The name of the DNS is SQL. here is my servlet code [CODE] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws …

Member Avatar for mith_cool
0
131
Member Avatar for mith_cool

I got a jsp page which forwards request of two textfields txtname and txtpass to a servlet and the servlet then inserts the data into sql db and the name of the db is online_store. The db has two columns. When i checked the values are passing to the servlet …

Member Avatar for mith_cool
0
196
Member Avatar for mith_cool

hi, am working on a project called online store using java. For the navigation menu bar i used javascript in a jsp page. The problem is am unable to see the image in navigation bar. Since i have no thorough knowledge of javascript please rectify me.Here is my code [CODE] …

Member Avatar for skald89
0
127
Member Avatar for mith_cool

I have created a jsp page with some credentials of the user and this time i dont want it to pass to the validation form servlet through doGet() but through doPost(). I am facing some problem while doing this validation of none of the field could be left blank. [CODE] …

Member Avatar for mith_cool
0
510
Member Avatar for kdcorp87

OleDbDataAdapter o = new OleDbDataAdapter("select * from tblExam1", conn); DataSet ds = new DataSet("tblExam1"); o.Fill(ds, "tblExam1"); DataRow r = ds.Tables["tblExam1"].NewRow(); r["exam1ID"]=324; r["patID"] = patid; r["ypsos"] = 32; ds.Tables["tblExam1"].Rows.Add(r); r.Update(ds, "tblExam1"); ds.AcceptChanges(); You just forgot the update statement & if possible give name to the dataset as i did....

Member Avatar for crishjeny
0
119
Member Avatar for nikita.chandra
Member Avatar for Stefano Mtangoo
0
73
Member Avatar for mith_cool

I have uploaded some flash content into my html website but when i upload it on the server am unable to see it. I have registered the website of mine but unable to find a way for this problem. heres my code [CODE] <td colspan="6"><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','932','height','359','src','Building','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Building' ); //end …

Member Avatar for mith_cool
0
107
Member Avatar for mith_cool

I wrote a program to get first 100 no. which are divisible by 3. Heres the code [CODE] import java.io.*; class app { public static void main (String args[]) { for(int i=0; i<=100; i++) { int x; try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter your no."); x= Integer.parseInt(br.readLine()); if(x%3==0) { System.out.println("The …

Member Avatar for javaAddict
0
123
Member Avatar for mith_cool

I have designed a jsp which has the following code : [CODE] <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Form Cookie</title> </head> <body> <form action="http://localhost:8080/FormCookie/AddValue"> Name : <input type="text" name="name"><br> Age : <input type="text" name="age"> <input type="submit" value="submit"> </form> </body> …

Member Avatar for mith_cool
0
93
Member Avatar for mith_cool

What is the use of requestdispatcher in java? I know it is used to forward requests to servlets. But somebody could give me example or i mean to say a scenario which will prove effective in understanding this concept....

0
63
Member Avatar for mith_cool

I am a beginner to advance java and since am learning servlet am getting some weird error in my servlet. I am trying to get the method name and this is the code which i wrote down [CODE] import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class NewServlet extends …

Member Avatar for ~s.o.s~
0
236
Member Avatar for srikar38

i think it is easy to find out user created databases as they are four in numbers namely model, master, Tempdb, msdb and Distribution database in created while sql server instance is configured as a distribution for replication. and i think there is no such query for aforesaid question

Member Avatar for kvprajapati
0
140
Member Avatar for mith_cool

protected void Button1_Click(object sender, EventArgs e) { MailMessage message = new MailMessage(); message.From = new MailAddress(YourEmail.Text.ToString()); message.To.Add(new MailAddress("purohit.mith@gmail.com")); message.Subject = "Message via mith from " + YourName.Text.ToString(); message.Body = Comments.Text.ToString(); SmtpClient client = new SmtpClient(); client.Host = "203.92.50.112"; client.Send(message); } // this is what i used to send the email …

Member Avatar for virang_21
0
195
Member Avatar for mith_cool

I am currently storing the values retrieved from the user form including image supplied by the user to sql database. The image is stored in the database but at the time when am trying to retrieve that image am getting the following exception Parameterized Query '(@name varchar(8000))select firstname,image from register …

Member Avatar for mith_cool
0
257
Member Avatar for kanuri1
Member Avatar for madmital
0
82
Member Avatar for dhanasekaran16

//The name od DropDownList is ddl1 switch(ddl1.SelectedItem.ToString()) { case "abc": TextBox1.text="first content"; break: case "xyz": TextBox1.text="second content"; break: case "any other content": TextBox1.text="third content"; break: } //and so on try this out & write this code on DropDownList click event

Member Avatar for mith_cool
0
96
Member Avatar for ashab27

[code] cmd.ExecuteNonQuery should be replaced by cmd.ExecuteReader(); [/code] i just have an example hope you understand this [code] cn.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from register", cn); SqlCommandBuilder cmd = new SqlCommandBuilder(da); DataSet ds = new DataSet("register"); da.Fill(ds,"register"); DataRow dr = ds.Tables["register"].NewRow(); dr["firstname"] = txtfname.Text; dr["lastname"] = txtlname.Text; dr["loginname"] …

Member Avatar for mith_cool
0
136
Member Avatar for ajijacobm

have you tried <connection string> method in web.config? if yes i will show you another but in case you can deal with the same method which we use in ADO.Net if you are using Gridview control Gridview1.DataSource = ds; //Dataset object Gridview1.DataBind(); //Establishes mapping between the data column //in dataset …

Member Avatar for ajijacobm
0
158

The End.