Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Rajni Kumar

Greenhorn
+ Follow
since Mar 05, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajni Kumar

Please check with the
String f = req.getParameter("fName");
whether u are getting or not ?.
19 years ago
Look at errors, it is giving in three java files.
the code u attached is the second one(HelloWorld.java). look at your code. u have not defined varaible 'message'.
look at method, getMessage();
inside u are retruning message as string.
just add one line in ur code as follows:
String message = "HelloWorld";
and try.
All the best
19 years ago
Request will always invoke doGET or doPOST method of servlet.so, if u create instance of your class inside the doGET or doPOST method and call ur method ,then it will surely work.
19 years ago
while running , wht type of problems u are facing ?.
19 years ago
hope u are getting Database connetion through Datasource(Connetion pool).
but ensure that after getting resultset, u are closing the Connection object.
19 years ago
In Home interface, there will be container specific methods will be there.
Fox ex :
create() method .
The implementation of the above method have already written by container.
In Remote interface,
user defined method will be implemented like business methods.
create one javabean which should have set and get methods.
ex: TestBean.java
class TestBean{
int id ;
public void setId(int id){
this.id =id;
}
public int getId(){
return this.id;
}
}
in servlet, create instance of that bean.
TestBean tb = new TestBean();
td.setId(3); // i am setting id as 3 in TestBean.
request.setAttribute("TestBean",tb);
//then forward this servlet to JSP.
in JSP,
after defining page attributes...
don't forget to import ur bean package.
TestBean tb = (TestBean) request.getAttribute("TestBean");
int id = tb.getId();
out.println("id is"+id); // it will print 3 in ur jsp page.
all the best.
19 years ago
u place the servlet (GenerateMenu.java) in classes folder and compile.
19 years ago