Vous êtes sur la page 1sur 4

Following area u have to go through(as you known)

1.DOM&html
2.Java script
3.java
4.jsp & servlet
5.jdbc & query

DOM-document Object Model


JSTL-JSP std Tag library
JSON (JavaScript Object Notation)
AJAX-asynchrous java script and xml

1.default menthod in js

parseInt(),parseDate();

2.set body color using dom

document.getElementbyTagName("body").style.color="color";

3.link external css

<link src=""/>

4. get value in js

document.getElementbyId("Id").value;

5.getRequestDispatcher class method

1. getRequestDispatcher.forward(req,res);
2.??
6.httpservletResponse,httpServletRequest(go through)

7.Generic servlet,http servlet

8.hidden filed
<input type="hidden" />

9.session tracking

1.hidden filed
2.url rewriteing
3.cookie
4.session

10.httpSession session=request.getSession(true)//create session in


servlet

11.diff between
httpSession session=request.getSession(true);
httpSession session=request.getSession();

12.u should know how to get,set value in session and cookie

13.<@page>some attribute
1.language,
2.session,
3.errorpage,
4.import...

14
struct header tag
<%@taglib uri="/struts-tags" prefix="s" %>

15.
structs bean tag,ui tag,data tag(go through)

16.some class name of jdbc

17.create xml request in ajax


try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new
ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new
ActiveXObject("Microsoft.XMLHTTP");
}
}

18.create new tag using DOM

document.createElement("A")

19.replace texxt using dom

document.getElementById("Msg").innerText ="asdf";

20.append child

document.appendChild(child);

21.Create text element in dom

document.createTextNode( "type" );
22.DriverManager.getConnction("");

23.change image at run time

document.getElementById(img).src="image path";

24.event in text box


onChange,onclick,onblur

Js: refer w3school see 


how to validate a text box, combo box
getting value of text box, changing bgcolor 
mouse events to call a function like onclick(), onblur(), onchange(), onmouseover(), onkeyup(),
onkeypress()......
how to call CSS style sheet from jsp

Oracle:

code for connecting oracle db from servlet or java :

Connection connection = null;


try {
// Load the JDBC driver
String driverName = "oracle.jdbc.driver.OracleDriver";
Class.forName(driverName);

// Create a connection to the database


String serverName = "127.0.0.1";
String portNumber = "1521";
String sid = "mydatabase";
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" +
sid;
String username = "username";
String password = "password";
connection = DriverManager.getConnection(url, username, password);
//create Statement
Statement st =connection.createStatment();
// ResultSet for getting record in db
ResultSet rs=st.exectuteQuery("select * from table");
String name="":
while(rs.next()){
name=rs.getString("column_name");
}
// how to insert or delete or update
int i=st.exectuteUpdate("insert or delete or update query");
// if the value of i is >0 then query executed successfully
} catch (ClassNotFoundException e) {
// Could not find the database driver
} catch (SQLException e) {
// Could not connect to the database
}
JDBC- java Database Connectivity
ODBC- Open Database Connectivity

package name for using sql in java is import  java.sql.*

By default oracle AutoCommit statement is set to true.


query for selecting table records, find sum of a columns, inserting,deleting,updating row to a
table, find maximum and minimum marks obtained by a student 
Differences between prepared statement , callable statement 
Servlet:

servlet classes- ServletExcetion and UnAvailableExcetion


Struts:

MVC- Model View Control


OGNL- Object Graph Notation Language 
struts configuration file name - struts.xml for struts 2.0 or strutsconfig.xml for struts 1.0

All the best,

SELECT MAX(SALARY)
FROM employee e1
WHERE N = ( SELECT COUNT(DISTINCT(SALARY))
FROM employee e2
WHERE e1.SALARY <= e2.SALARY);

Put the value for the n & you can find any no. of highestsalary.

Vous aimerez peut-être aussi