I hope i am asking the right question...but is there
something like a server side cache for servlet which
are already loaded...thats the only way i am being to
relate to my problem
..someone please shed some light...
I have AdminServlet where i have
...
....
else if(request.getParameter("compadd")!=null)
{
String
labname=request.getParameter("labname");
System.out.println(labname);
addComputerGrid(out,labname);
Here, addComputerGrid querys the database to get the
Lab specifications, then queries the inventory and
then displays the computers in the grid, the location
they are located in and creates an InventoryBean with
the data for every computer in that particular lab
that i am quering for.
I have put
out.println("<td>"+"<a
href=\"../servlet/addupdate?id="+ib.getId()+"&gridx="+i+"&gridy="+j+"\">"+
ib.getId()+"</a></td>");
....
...
...
if(found==false)
out.println("<td>"+"<a
href=\"../servlet/addupdate?labname="+labname+"&gridx="+i+"&gridy="+j+"\">"+
"Empty"+"</a></td>");
so that user can add/update/delete computers from the
grid.
this calls AddUpdateServlet where I do
response.sendRedirect("/labapp/addcomputer.jsp?gridx="+i+"&gridy="+j);
according to the add or update request.
the JSP page has
<form name="form1" method="post"
action="/labapp/servlet/addupdate">
which then has
if(request.getParameter("addcomputer")!=null)
{
System.out.println("in hereadd");
addComputer(request);
System.out.println("i am here");
response.sendRedirect("../servlet/admin?compadd=Go&labname="+labname);
System.out.println("i am here");
}
This calls the AdminServlet which makes the databsase
query and displays the grid.
But this is where things go wrong....the database
query is made the grid is displayed but the query
doesnt find the new value inserted.....the very first
time i do an insert it doesnt find the new record...I
do a refresh then it finds it again... when i am doing
an update or delete...sometimes the changes are
getting reflected and other times they are not...
where the problem.....
any help appreciated..
manish
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html