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
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..
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.
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
program paradigmgowthami.m July 10, 2011 at 7:53 PM
it is very useful
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?
Java Please help me programVivek June 14, 2012 at 9:22 PM
Write a java program to create Menu Bars and pull down menus?
Java Please help me ProgramVivek June 14, 2012 at 9:23 PM
Write a java program to draw several shapes in the created windows?
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
html, css, java, php, msql etcdevendra singh September 19, 2012 at 4:34 PM
your website is very good service proviods Thankyou madam/sir
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