Savio Mascarenhas

Ranch Hand
+ Follow
since Nov 29, 2000
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 Savio Mascarenhas

Hi Guys,

Experiencing some performance issues. Had been using the oracle8i database with velocity as presentation layer. However, lately have had to move to using oracle 9i. It has been observerd that since then performance has been slower. Any idea why this could be happening with oracle 9???

Kindly Suggest.

Thanks.

- Sam
14 years ago
Hi Guy's !!!
I want to deploy a web appln in Tomcat 4 in the same simple way as is done in Tomcat 3.2.1. In the sence i do not want to create a .war file which is created in Tomcat 4 though the use of the depoyment tool which internally carries out the task of creating the the deployment descriptor file - web.xml. The reason being that the when Tomcat 4 server is used along with the deployment tool it slows the system to a considerable extent.Also, i would like to have the flexibilty to edit the deployment descriptor file anytime without much difficulty. Is it nessacessy to have a .war file ?

Also, in order to make the system perform better & reduce the load of both these programs(Tomcat server & deploy tool) i tried to do away with the deployment tool by trying to use the Manager App. For this i created a dummy appln, the folder & file paths of which were as follows :
c:\jwsdp\webapps\dummyappln\Web-inf\web.xml
c:\jwsdp\webapps\dummyappln\Web-inf\classes\dummyServlet
However, on trying to install this application using the Manager Command
http://localhost:8080/manager/install?path=dummyappln&war=file:/c:\jwsdp\webapps\dummyappln
the appln got install and gave an indication of "running" when the following url was accessed
http://localhost:8080/manager/list. But, finally on running the application it threw a "resource not available" exception. On checking the logs folder ie c:\jwsdp\logs folder i found that it had logged an internal server error : "web.xml not found, defaults set". That is since it was'nt able to find web.xml it was unable to read the "<servlet>" & "<servet-mapping>" tags and thus finally could'nt locate the servlet.
Can someone pls tell me where i am going wrong !!! Does'nt everything seem right ... pls let me know.
Thanks Guys
19 years ago
Thanks Bill !!!
19 years ago
Hi Guys !!!
How is Servlet Requests by multiple users actually handled ?
I've heard of multi-threading taking place. Does this happen on the part of the web server or does the Servlet Container create a separate thread for each request where the run()contains a call to that servlets service(). How does it actually happen ???
Thanks Guys !!!
19 years ago
Hi Guys !!!
Currently planning to undertake the SCJD. I just thought that we could all of here in mumbai get together and share our ideas,thoughts,suggestions and interpretations to arrising problems and work towards SCJD then we can end up doing a even better job and in a even lesser span of time.
So,are any of u guys interested ??? It would be a gr!!! experience for all of us. LETS DO IT !!!
Regards
Sam
<p>
Hi Guy's !!! <p>
Creating an application & needed to ensure that it's performance is good.So,just thought about using XML for the same.But,what should be used that is browser independent .... since i had come across DSO( Data Source Objects ) but later realised that it was only supported by IE & not NN.
<p>
Basically,just need to display records and using paging.<P>
Currently,using ASP .... which takes quite some time to process ... instead plan to use only HTML,JavaScript & XML .
<p>
Pls Suggest.
<p>
Thanks Guy's !!!
<p>
Thanks Bill !!!
Presently workin on a Chat Application.
Bill,the purpose of creating a thread is for "Background Processing" ie. when a servlet is initialized(may be the Login Servlet because it is sure to be initilized) the background processing should begin .
When a user logs into the Chat System his userid,room name & session id are stored in the daatabase.
This "Background Processing" has nothing to do with the current user logging into the system and thus cannot put the code as part doGet()/doPost() which would be called on every request.

The PURPOSE of "Background Processing" is to check whether the session id's stored in the database are valid.These could become invalid in cases such as
a)When the users session is inactive for a period of 15 min.
b)The user has closed the browser ie. without actually logging out of the Chat System.
c)The user has restarted his system.
Thus,the thread needs to check for session validity say every 5 min and if invalid
a)that user needs to be removed from the database also
b)that removal needs to be broadcasted to all the users in the room ie. that particular user needs to be removed from the respective rooms in the front end applet.
Thus,it is in this "Background processing" that an instance of HttpSession is required in order to invoke methods such as lastAccessedTime().
How should it be ???
Thanks a lot Bill !!!
20 years ago
Hi Guy's !!!
The servlet init() start's a thread .The code in the run() accesses the database which stores the users session id.All the session id's stored should be checked for validity.How should this be done ... since to check whether a session id is valid or not methods such as lastAccessedTime() need to be used but ... at this time ie. in the run() an instance of HttpSession cannot be obtained because at this time an instance of HttpServletRequest is not available thus ... req.getSession() cannot be used.
The thread performs this operation ... sleeps for 5 minutes ...wakes up ... and performs the same check once again in a cycle.
What should be done ???
Pls suggest.
Thanks Guys .
[This message has been edited by Savio Mascarenhas (edited September 30, 2001).]
[This message has been edited by Savio Mascarenhas (edited September 30, 2001).]
[This message has been edited by Savio Mascarenhas (edited September 30, 2001).]
20 years ago
Hi Guy's !!!
The original version on the system is JSDK2.0.
Have downloaded the class files for JSDK2.2. from http://java.sun.com/products/servlet/download.html and set the classpath for the same in autoexec.bat file and placed it in the folder c:\jsdk2,0\lib\servlet.jar .That is the in the same sub-folder in which jsdk.jar was originally placed on installation of jsdk2.0.
The servlet file uses methods from servlet 2.2 api which gets compiled.However,on execution it throws a NoSuchMethod error on methods that form part of the servlet 2.2 api .
Which are the additional settings that need to be done ?
Thanks Guy's !!!
20 years ago
Hi Guy's !!!
Wanted to pass formatted text in a Chat Appl.

Have created the following files :

import java.text.*;
import java.io.*;
public class FlashAttributedString extends AttributedString implements Serializable
{
public FlashAttributedString(String text)
{
super(text);
}
}


This class extends the class AttributedString and implements the Serializable interface.This class is then used in the following code :


import java.io.*;
public class SerializationDemo
{
public static void main(String args[])
{
try
{
FlashAttributedString obj = new FlashAttributedString("This is Seriaized");
System.out.println("obj = " + obj);
FileOutputStream fos = new FileOutputStream("serial.txt");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(obj);
oos.flush();
oos.close();
}
catch(Exception e)
{
e.printStackTrace();
}

try
{
FlashAttributedString obj1;
FileInputStream fis = new FileInputStream("serial.txt");
ObjectInputStream ois = new ObjectInputStream(fis);
obj1=(FlashAttributedString)ois.readObject();
ois.close();
System.out.println("obj1 = " + obj1);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}


On executing this file an exception was thrown at the line ois.readObject();
.

The Exception thrown was:

java.io.InvalidClassException:java.text.AttributedString;<init>
How should it be rectified ? Pls Suggest.
Thanks Guy's .
20 years ago
Hi Guy's !!!
Presently workin on swings and thus using the java pluggin .However,noticed that now the message "Loading Java Applet ... " is displayed during applet initialization "ON THE BROWSER".
How should this message be removed ?Pls suggest.
Thanks
20 years ago
Hi Guy's !!!
Have a Map object to which elements are added automatically by using a class that return a Map Object .One of the contents of the Map Object is :
TheMap Key is : FOREGROUND
The Map Value is : java.awt.Color[255,255,255]
Using the Key "FOREGROUND" ...it value can be obtained using
trialmap.get("FOREGROUND");
which returns an object of "Object" type .However,need the object to be converted to an object of class "Color"
which furthur needs to be passed on to another method that expects an object of type "Color" .
How should this conversion or casting be done ?Pls suggest.
Thanks Guy's .
Hi Guys !!!
Workin on an application where the applet needs to invoke the destroy() method through which it passes
values to the servlet.This works as desired when the applet is invoked using the applet tag
However,when the embed tag is used "the destroy() is not invoked when the user closes the
browser".Another thing i realised was that when another browser window was opened by either using file->new->window
or Ctrl ^ N then,now........ if either of the browser windows were closed then...... it would now invoke the destroy() method.
Sorry, i was'nt able to"properly display" the applet & embed tags so i have removed it ...
Guys ... this part is very crucial to the entire appln & i'm very confused as to this happening.Pls give me ur suggestions.
Thanks Guys !!!
20 years ago
Thanks Ben !!!
20 years ago