mahesh shastri

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

Recent posts by mahesh shastri

Hi ,
your web.xml is correct . Just put whatever you want to in the place of ??? . After that while accessing this servlet
your URL should be http://localhost:8080/helloworld/???. (??? represents whatever you want to put there . This time
it will work definitely.
Regards
14 years ago
Hi Sahana,
Can you post your web.xml . so that would be able to tell you exactly what you are missing.
14 years ago
Hi Raj
As per Specifications we have to use double. The double data type is a double-precision 64-bit floating point. in section 4.2.3 of the Java Language Spec. For decimal values, this data type is generally the default choice.
Hi all,
What is the difference between String , SringBuffer and StringBuilder?
Thanks
14 years ago
Hi Raj,
You can use java.util.Date to set date in your pojo
Hey Geet
As young said there must be gaps between folder name. I think it should be c:\Program Files\Apache Software Foundation.
Try to copy path from address bar when you access those folder and paste it while compiling on command promt.
Other thing javac -d classes will create .class file in classes folder. you dont need to copy. Let me know what exactly you are
doing.

Regards
14 years ago
Hey Geet ,
May I know what exactly you are doing ? If I guess you might be adding classpath clause while compiling.
Actually goto to your project dir then to WEB-INF . Now use javac -d classes src\<ClassName.java>. It will create
.class file in classes folder but classes folder should be there under WEB-INF\classes
Hope it will work now
Regards
14 years ago
1. Perhaps that object has a non-serializable member? You left out when and where the exception is generated so I am just guessing.

2. No, don't be silly, it is up to the servlet container to serialize sessions out to disk when it needs to.

Bill

Thanks for the reply William.
As you said that object may have non-serializable member . If so, that is applicable for every role but it doesn't happen.
Anyways I implemented serializable for the object which was generating exception.

Thanks
14 years ago
Hi Geet,
Try this .. right click your MyComputer icon on desktop. Goto -> Advanced Tab. There you will find Environmental variables
click on that you will find all the system variables lis over there.
In UserVariables section you can create environmental variables. Now click on new
1) variable name : classpath

value :<path till lib of insatalled java>e.g(C:\Program Files\Java\jdk1.5.0\lib);.;<path till lib of tomcat> e.g(C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib);<path till jsp-api.jar>;<path till servlet-api.jar>e.g(C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\jsp-api.jar);.;

after writing this all click ok. Your classpath environmental variable will be created which you can see it in the list.
2)variable name : path

value: <path till bin of installed java>;<path till bin of tomcat>
click ok to create this variable.

3)variable name :CATALINA_HOME
value :<path till tomcat base> e.g(C:\Program Files\Apache Software Foundation\Tomcat 6.0)
4)variable name : JAVA_HOME
value : <path till java base> e.g(C:\Program Files\Java\jdk1.5.0)

Now apply these variables and compile your program your program will be compiled
Regards
14 years ago
Hi Guys ,
I got an exception when I was adding an object which is a DTO to session for further reference. I did that many times previously
but this time I got an Exception called java.lang.IllegalArgumentException: setAttribute: Non-serializable . In my project which is
role based I dont get this exception if I login through other role. Both roles are using same method . I am getting exception for one
role and the other role wont. And when I serialized that class I dont get any exception program gets executed.
My Question is
1)Why I am getting exception for one role and not for other when the class is not serialized ?

2)Is it necessary to serialize your class whenever you want to add object to session ?

Thanks and Regards

14 years ago

I am using Hibernate and postgrSQL in my project . I am in a situation where I need to do self-join for a table and I want to use
one- to-many relationship for that. Where my table contains few fields in which one of the field say x field contains the value of
primary key which can be null. Now sometimes I need to fetch records which have identical values in field x.
how do i configure this in hbm.xml ?


Thanks and Regards