Achalveer Singh

Greenhorn
+ Follow
since Sep 22, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Achalveer Singh

hi ,
you can call your another class in run method. simply make object in run method and call method in which you are updating database..
like
Thread t = new Thread();
while(true)
{
t.start();
}
public void run()
{
ClassName obj = new ClassName();
obj.updateDatabase();
try
{
t.sleep(3000);
}catch(Exception e)
{
}
}
you can do in that way easily.
hi all,
can any one please give me healthy application of thread pooling using EDU.oswego.cs.dl.util.concurrent.* package .

thanks in advance.
i think forum is for discussing the problem . please discuss the problem it will be better.
yes i know java 1.5 provides thread pool.
but i want to know how to use it according to my question.
please read question first before answering.
hi all,
please tell me how i should implement thread pooling using jdk1.5 .
by using java.util.concurrent.* package.
what i have to do.

i have to make a class and i have to put for loop that send continuously message . thread pool of size 100 threads. when more then 100 message are coming then there should be queue for message.

please give me code if anyone has for this application.
at stach trace it gives line at 32
but at console(black screen) it gives error at line 22

of Record.java
18 years ago
JSP
line no


e.printStackTrace();
}

}
public void setId(int id) line number 32
{
this.id=id;



but tomcat server shows error line 22:
line 22 is
Class.forName("").....

what can be error
18 years ago
JSP
i have checked again

lines are
int id=Integer.parseInt(request.getParameter("id")); line no 75
Record rr=new Record(); 76
rr.setId(id); 77
ArrayList ar=rr.getAr(); 78
Iterator i=ar.iterator(); 79
while(i.hasNext())



but tomcat also showing java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver but i have included all things

please guide -----
18 years ago
JSP
i have checked my code in generated servlet.
76 line is Record rr=new Record();

i am unable to inderstand what is the error.
18 years ago
JSP
hi all
i am using tomcat server and i am getting these error:
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NullPointerException
emp.Record.<init>(Record.java:32)
org.apache.jsp.WebRoot.showrecord_jsp._jspService(org.apache.jsp.WebRoot.showrecord_jsp:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264


i have three file
code for entrypage.jsp is


code for showrecord is:







code for Record.jsp


please tell me where is the error.
thanks
[ September 29, 2006: Message edited by: Ben Souther ]
18 years ago
JSP
you can add struts capabilties in simple web project in eclipse
18 years ago
Hi
try to do it . hope it will solve problem.

alert('<bean:message key="message.invalidName"/>');

i think it will work...
18 years ago
also see this link...
this is the tour of example in which they uses html with in iterate tag..
hope it will help you
http://struts.application-servers.com/struts-layout/tour.htm
18 years ago
i think you have not given the defination of message.title in MessageResources.properties
18 years ago