Yogender Butola

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

Recent posts by Yogender Butola

Hi all
My Question is "What is the difference between a servlet session and ejb session?"
AND
How will you call an ejb session from a servlet session and how will maitain a users session using both of them?
I want to control the size of result set. For example my query fetches 1500 hundred records. and I want first 300 records in the resultset. After processing the firs 300 records, I want the next 300 records and so on. How can I do this. Please help.
Please help with some code snippets.

Thanks







Courage is not having the strenth to go on
It's the going on without having the strength.
Can we have an Entity bean without a primary key?
I don't think it is possible, but a few of my friends say it is poosible. I want to be sure on this issue. Please help.
Thanks.
Can we have a scenario where One bean is using programmatic transaction and other is using declarative transaction, considering both the beans are running under the same transaction.
I'm setting cokkies through my servlet. But before doing that, I want to confirm whether cookies are enabled in the browser or not. If cookies are not enabled, I want to display a message in the borwser to enable the cookies first.

How can I check whethere cookies are enabled or disabled by the browser?
20 years ago
I have to refresh my JSP page after every 10 min.
Pls let me know all the ways through which one can achieve this effect.
I want that only 6 instances of my class will be created.
How can I achieve that?
20 years ago
Can we create methods in a JSP page? If yes then how?
20 years ago
JSP
First of all I'm new to all this stuff of servlets and JSP.

I want to Know one thing, that why do we use the dployment descriptor. I know that it is used to tell the container about our web component and services it require from the container. I've used Sun's J2EE 1.4 application server, which automatically generates a deployment descriptor for your component. But,I've also used Tomcat 4.0 and I havn't worked on the "web.xml" file still all my applicaions are working very well. For example, I've a shopping cart application in which I've used servlets for processing requests and JSP's for displaying the information. I've transferred requests, exception, and data from servlets to JSP's, but I haven't set a single mapping property or any thing in the "web.xml" file.

Now I'm confused!!! Is it necessary to work on "web.xml" file. If yes then why my applicaions are working well. If no then why you all people give your answer that relate to the "web.xml" file. Like settings related to mapping servlets when you are forwarding request from one servlet to a JSP page?

Pls Answer

Regards Yogi
"My mind works like lightining, one brilliant flash and it's gone."
20 years ago
A filter can be used for access control, compression and some other tasks. However I can also use a servlet that provides access control and after that forwards the request to the intended servlet. Again a servlet can receive the response from a servlet and can perform the compression before sending the data to the clien. If all that I can do with a servlet, then why do need Filters. I mean what is that a filter can do, that a servlet cannot.
20 years ago
How will I make session variables thread safe in a JSP page?
and How can I create a method in a JSP page. Is it possible? If yes then pls let me know?
20 years ago
I'm creating a database connection in a servlet. In the same servlet I'm retrieving the data from the data base into a ResultSet object say 'rs'. Now, when I try to put this object in he Request object [request.setAttribute("result",rs)] an exception is thrown that is "Attribute has no value". I've successfully used this technique for forwarding the Exception object to the error page in the catch block of the same servlet. I don't why it's giving the error. When I try to display the values of the ResultSet object "rs" it displays all the values, which indicates that the resultset is not empty. pls ans asap.
Thanks.




I'm using RequestDispatcher object to
20 years ago