NareshA WaswaniA

Greenhorn
+ Follow
since Feb 26, 2007
Merit badge: grant badges
For More
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 NareshA WaswaniA

And what if the cookie is not supported. In that case will your application not work.

And more over in the case of cookies, you never know the way the cookies are sent : in which order. So even if the end cookies in the hasmap are not missing, quiet possible that they are going in the starting of the sequence. So you never know the exact sequence.

+91-9986461501
16 years ago
in internet explorer, you can have at the max 20 cookies from one host.

that is he main reason. i think the cookies are getting more than 20.

+91-9986461501
16 years ago
ok its like this...

first of all, there should not be any business logic checks in the servlet. for instance the field checks and others.

the add and edit methods are not static. they are instance methods. in the servlet, you can create one object of the model class (which contains add and edit methods) in the servlet and then call the functions.

or you can also follow the singelton design pattern for your model class as it does not make any sense to have more than one objects of the model class. but yes make sure that they are thread safe else you would be in trouble because the server side programmig is multithreaded.
16 years ago
due to securith issues, the java and sun should not be used as the package names. That is the not the starting word in the package.

for ex java.xyz ----- error

xyz.java or xyz.abc.sun ------- it's ok
16 years ago
don't use the pakage name as java. use something else.

+91-9986461501
16 years ago
First of all, you should not have any business logic things in the servlet. have a different class, put the add and edit functions over there and depeneding on the action from the client, call the apprpriate method. It's very simple. Na dit does not make any sene that you chould have any other class or servlet for the edit action.

since both of them are doing logically the same process of manageing the managers actions....

So its good to have the 2 actions of add and edit in the same class but not inm the servlet.

+91-9986461501
16 years ago
hi pallavi, use client side scripting language and check if the image id that the user is trying to access...is he allowed for that. if yes allow him to send the request otherwise block the request.

For this once the user session starts you need to pass the valid ids that he can work with on the client side.

+91-9986461501
16 years ago
ServletCongig object is per servlet or jsp which contains specifiv information about that servlet or jsp. you can pass this information in the web.xml file's <init-param> tag of the <servlet-tag>.

ServletContext object for the application per JVM. You can pass input to this object from the web.xml file using the <context-param> in the <web-app> tag. This object can be accessed by all the web components as it is one per JVM.

ServletConfig object of one servlet or jsp can not be accessed by other web component.

Any more doubts.
+91-9986461501
16 years ago
For buttons, you get only that button which actually has been clicked and more over why do you want to all the names on the server side.

do one one thing, let the names of all the 4 buttons be name but give different values to them.

when someone clicks on the button, that value is passed to you which you can get on the server side by calling request.getParameter("button_name");

now since all the buttins have the name and one time you can click only one, you can make it work like this.

Any querries, shoot it back.
17 years ago