Home Discussion Discuss: Questions and Answers Help

  • javaBashdar May 24, 2011 at 7:51 PM

    Thanks for answer me

  • javaBashdar May 24, 2011 at 7:53 PM

    this site is very successfull

  • javaBashdar May 24, 2011 at 7:55 PM

    please for complex code

  • javaVIRENDRA RAI May 30, 2011 at 11:54 PM

    SIR my project is client server based live meeting Sir I Want the powerpoint presentation sharing CODE in java

  • servlet and action listenerDalal August 18, 2011 at 1:09 AM

    Please, could someone help me with how to use action listeners in designing java web interface using servlet , I am creating a web interface with many buttons and these buttons are designed in html and I saved it in jsp file. I will like to know how to apply the action listener to these buttons, please if someone can send me example code thanks

  • java for beginners...Ayesha January 2, 2012 at 2:55 PM

    nice answers...plz send me some more examples about for loop statemets to my website mention in the above.

  • xPoqueuscWMkeqznAli February 23, 2012 at 3:06 AM

    Thank you. I aieapcprte this post!! I have seen so many suggestions to improve my blog that involved editing my HTML code....that was so scary to me that I completely avoided. After reading this post (and bookmarking it!!), I know feel confident enough to make some changes to my code. Thank you! www.learnmemusic.com

  • javaram March 28, 2012 at 12:16 PM

    no comments

  • Combobox event handling in struts2Pooja April 23, 2012 at 3:10 PM

    Hi, we are developing a project in struts2. We are unable to do event handling in struts. We are pasting our code below please help us to resolve..thats really important at this point.. We want on selection of oemnm(item in combobox) other combobox should be populated with corresponding values in database. We are getting the combobox but no values in it. And if second combobox is selected corresponding values from database should get displayed in textboxes. Please help.. JAVA Codes here... JAVA-<pre lang="java"> Editrsm.java package vaannila; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import com.opensymphony.xwork2.ActionSupport; public class Editrsm extends ActionSupport { private static final long serialVersionUID = 1L; String RSMName,RSMMobile,RSMEmail,Coments,oemnm; private ArrayList<String> OEMNM; private ArrayList<String> RSMNM; Connection con; Statement stmt; ResultSet rs,rs1,rs2,rs3,rs4,rs5,rs6; public String getRSMName() { return RSMName; } public void setRSMName(String rSMName) { RSMName = rSMName; } public String getRSMMobile() { return RSMMobile; } public void setRSMMobile(String rSMMobile) { RSMMobile = rSMMobile; } public String getRSMEmail() { return RSMEmail; } public void setRSMEmail(String rSMEmail) { RSMEmail = rSMEmail; } public String getComents() { return Coments; } public void setComents(String coments) { Coments = coments; } public String getOemnm() { return oemnm; } public void setOemnm(String oemnm) { this.oemnm = oemnm; } public ArrayList<String> getOEMNM() { return OEMNM; } public void setOEMNM(ArrayList<String> oEMNM) { OEMNM = oEMNM; } public ArrayList<String> getRSMNM() { return RSMNM; } public void setRSMNM(ArrayList<String> rSMNM) { RSMNM = rSMNM; } public String populate() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException { System.out.println("in populate"); OEMNM = new ArrayList<String>(); RSMNM = new ArrayList<String>(); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); con=DriverManager.getConnection("jdbc:sqlserver://MYPC:1433;databaseName=ECOSYSTEM","ECOSYSTEM","Welcome2SPX"); stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs1=stmt.executeQuery("select OEMName,OEMID from dbo.OEM_Table"); while(rs1.next()) { OEMNM.add(rs1.getString(1)); } rs1.close(); return "populate"; } public String display()throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException { /*System.out.println("in display"); System.out.println("change OEM name "); String s1=(String) oemnm; System.out.println(s1); rs2=stmt.executeQuery("select OEMID from dbo.OEM_Table where OEMName="+"'"+s1+"'"+";"); rs2.first(); int a=rs2.getInt(1); System.out.println(a); rs3=stmt.executeQuery("select RSMName from dbo.RSM_Table where dbo.RSM_Table.OEMID="+a+";"); rs3.first(); while(rs3.next()) { RSMNM.add(rs3.getString(1)); } rs2.close(); rs3.close(); System.out.println("change RSM name "); String s2= RSMName; System.out.println(s2); if (s2 != null) { rs4=stmt.executeQuery("select RSMMobile,RSMEmail,Comments from RSM_Table where RSMName="+"'"+s2+"'"+";"); System.out.println("Printing Row Numbers"); rs4.first(); RSMMobile=rs4.getString(1); RSMEmail=rs4.getString(2); Coments=rs4.getString(3); rs4.close(); } */ return "display"; } public String execute() throws Exception { System.out.println("in execute"); try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); con=DriverManager.getConnection("jdbc:sqlserver://MYPC:1433;databaseName=ECOSYSTEM","ECOSYSTEM","Welcome2SPX"); stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); String s3=oemnm; System.out.println(s3); rs5=stmt.executeQuery("select OEMID,OEMName from dbo.OEM_Table where OEMName="+"'"+s3+"'"+";"); rs5.first(); int b = rs5.getInt(1); rs5.close(); rs6= stmt.executeQuery("select RSMName,RSMMobile,RSMEmail,Comments,Password from RSM_Table where OEMID="+b+";"); rs6.first(); rs6.updateString(1,RSMName); rs6.updateString(2,RSMMobile); rs6.updateString(3,RSMEmail); rs6.updateString(4,Coments); rs6.updateString(5,"Welcome2SPX"); //rs2.updateInt(6,a); rs6.updateRow(); rs6.close(); } catch (Exception e) { e.printStackTrace(); } return "success"; } } </pre> XML-<pre lang="xml"> struts.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="true" /> <package name="default" namespace="/" extends="struts-default"> <action name="*Register" method="{1}" class="vaannila.RegisterAction"> <result name="populate">/register.jsp</result> <result name="input">/register.jsp</result> <result name="success">/success.jsp</result> </action> <action name="*Register1" method="{1}" class="vaannila.Editrsm"> <result name="populate">/trsm.jsp</result> <result name="input">/trsm.jsp</result> <result name="success">/success1.jsp</result> </action> </package> </struts> WEB.XML <?xml version="1.0" encoding="UTF-8"?> <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" id="WebApp_ID" version="2.5"> <display-name>dummy</display-name> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index1.jsp</welcome-file> </welcome-file-list> </web-app> </pre> JSP:-<pre lang="jsp"> trsm.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*,java.util.*;"%> <%@taglib uri="/struts-tags" prefix="s" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <%! private ArrayList<String> RSMNM; Connection con; Statement stmt; ResultSet rs2,rs3; %> <script language="javascript"> function change() { var objComboId = document.getElementById('oemnm'); var comboText = objComboId.options[objComboId.selectedIndex].text; RSMNM = new ArrayList<String>(); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); con=DriverManager.getConnection("jdbc:sqlserver://MYPC:1433;databaseName=ECOSYSTEM","ECOSYSTEM","Welcome2SPX"); stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs2=stmt.executeQuery("select OEMID from dbo.OEM_Table where OEMName="+"'"+comboText+"'"+";"); rs2.first(); int a=rs2.getInt(1); System.out.println(a); rs3=stmt.executeQuery("select RSMName from dbo.RSM_Table where dbo.RSM_Table.OEMID="+a+";"); rs3.first(); while(rs3.next()) { RSMNM.add(rs3.getString(1)); } rs2.close(); rs3.close(); } </script> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <s:form action="Register1"> <s:select name="oemnm" list="OEMNM" onchange="change();" headerKey="0" headerValue="OEM" label="Select a OEM" /> <s:select name="RSMName" list="RSMNM" headerKey="0" headerValue="RSM" label="Select a RSM" /> <s:textfield name="RSMMobile" label="RSM MOBILE" /> <s:textfield name="RSMEmail" label="RSM EMAIL" /> <s:textfield name="Coments" label="Comments" /> <s:submit /> </s:form> </body> </html> </pre>

  • arraysikandar ali April 15, 2012 at 5:24 PM

    how to make an array program to convert in binary no

  • arraysikandar ali April 15, 2012 at 5:27 PM

    how to make an array program to convert in binary no

  • stringsharibabu May 18, 2012 at 2:56 PM

    please send me

  • JavaVivek June 14, 2012 at 9:19 PM

    write a java Program which open an existing file and append text to that file?

  • JSPAsok July 6, 2012 at 1:13 PM

    HI, This is Ashok. I am very strugling with jsp code.. In my design page 3 fields are there. 1.start field. 2.Lease field.. 3. end field. If i gave the start field date,after that in the lease field we will give the years, then end date convert the lease days in months and subtract -1;then end date will display..

  • atm projectpallavi achar July 14, 2012 at 2:06 PM

    atm code on jsp

  • hiJ.sophie sugi July 16, 2012 at 7:09 PM

    online railway reservation project in vb with oracle. how to create this project

  • hiu.susithra July 16, 2012 at 7:12 PM

    how to create a kids wear project in html with ms access and how to prepare a design.

  • swingradhika July 26, 2012 at 1:30 AM

    wanted to do project using swing in java

  • javasoni kaur December 12, 2012 at 8:50 AM

    do a simple java program on application and applet. the program should have name , employee code and salary. the button called calculate must show EPF deduction and net salary. pls pls help me how to do this program.

  • computermansi pandey June 30, 2011 at 2:34 PM

    program to input any ten number and find the sum and count the even&odd number.

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Programming Questions

Questions and Answers Help
Questions and Answers Help      ...-example.html Ask Questions | Browse Latest Questions and Answers... latest Questions and Answers here       

Programming Questions

Questions and Answers Help
Questions and Answers Help      ...-example.html Ask Questions | Browse Latest Questions and Answers... latest Questions and Answers here       

Software Services

Outsourcing - Answers to Critism, Outsourcing Answers Critics
Outsourcing - Answers to Criticism, Outsourcing Answers Critics Introduction As the outsourcing juggernaut rolls on, business... that help businesses. However critics raise issues like worker security 

Java Beginners

plz Help me find the correct programs answers
plz Help me find the correct programs answers   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff... INDICA" and "TATA NANO" respectively. Plz mail me your answers 

Programming Questions

Software Questions and Answers
the answers to the questions if you know. Try to help the developer community...Software Questions and Answers       View Software Questions and Answers online Discuss Software 

Java Beginners

oop answers - Java Beginners
can help me...as soon as possible thank you for sharing ur time 

Programming Tutorials

Core Java Interview questions and answers
Core Java Interview questions and answers  ... and answers in one place. These Core Java Interview Questions are supported... the answers. We are constantly trying to provide best Core Java Interview questions. You 

Programming Questions

Software Questions and Answers
to provide the answers to the questions if you know. Try to help the developer...Software Questions and Answers View Software Questions and Answers online Discuss Software development questions, ask your questions and get answers 

Struts Questions

please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers 

HTML Questions

please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers 

Java Interview Questions

Plz give the answers - Java Interview Questions
the console   Hi friend, Code to help in solving the problem 

Interview Questions

Interview Questions and Answers
Interview Questions and Answers   ... such questions, rather than specific answers. Remember, what you say makes only... prepared specific answers to these questions, you are in a great position 

Struts Questions

Java Answers
 

Struts Questions

Java Answers
 

Struts Questions

Java Answers
 

Struts Questions

Java Answers
 

Interview Questions

Common Interview Questions and Their Answers.
Common Interview Questions and Their Answers... assimilate them. Writing down these answers and rehearsing them will help you.... The questions and answers given here should act more as indicators, rather 

JSP Servlet Questions

please help me.
please help me.  How to move the edits.jsp in below link? http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html 

Java Interview Questions

Java interview questions and answers
Java interview questions and answers   what is garbage collection? What is the process that is responsible for doing that in java? Ans.Reclaiming the unused memory by the invalid objects. Garbage collector is responsible 

Swing AWT

need help - Swing AWT
as well. Must read a set of 10 correct answers, using a JOptionPane dislog box... extract each letter from this string and fill an array with 10 letter answers. this is done in a method Load Answers after the above. a message saying 

JSP Servlet Questions

please help me.
please help me.  Please send me the validation of this below link. the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html Thanks Trinath 

JSP Servlet Questions

Please help me.
Please help me.  Hi i am trinath in below there is a url.In that url there is a code of edit a jsp page.I understand that code but only one thing i...://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search 

Java Beginners

help me - Java Beginners
help me  helo guys can you share me a code about Currency Conversion.Money will convert according to the type of currency.would you help me please... to the currencies,) Franc___________ Euro____________(answers must round off 

Development process Questions

help
help   how i can send a pitcture on url in java 

HTML Questions

HELP
HELP  I need this code to open in a new web browser. but no matter what i do it wont please help?? Directive 055 Storage Requirements for the Upstream Petroleum Industry 

Java Beginners

Help me please!!! - Java Beginners
the answers 8Hours from now!!! Kindly help me!! please!!please!!! NOTE...Help me please!!!  im badly needing the complete code for this project in java!!! can you please help me???!!! it is about 1-dimensional array 

Java Beginners

Help!
Help!  thanks for ur code, I'd like to ask a question: after press "c" or "C", timer starts and after every delay ms, it'll print "This line is printed only once." or just print once. I'm writting a timer but it seems to perform 

WebSevices Questions

help
to the user) please tell me how could i design that. Please help me asap Thanks a lot 

Mobile Applications Questions

Help
Help  Hi; Can anyone help me to solve this errors. I use J2ME(wirlesee Toolkit 2.5.2. for CLDC Project "SlideImageMIDlet" loaded Project settings saved Building "SlideImageMIDlet" C:\Documents and Settings\???? ?????\j2mewtk 

JDBC Questions

help!!!!!!!!!!!!!!!!!!
help!!!!!!!!!!!!!!!!!!  import java.awt.; import java.sql.*; import javax.swing.*; import java.awt.event.* public class NewJFrame extends javax.swing.JFrame { JTextField1 

DMCA.com