Sachin Ramesh Vir

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

Recent posts by Sachin Ramesh Vir


3) RequestDispatcher .forward
No response is send to the browser, the web container internally redirects the request to the other page. Remember , you can redirect only to a page within current servlet context.
Also there are two flavours of RequestDispatcher , one : you get from ServletContext .The pathname must begin with a "/" and is interpreted as relative to the current context root.
Second : you get from ServletRequest. The pathname specified may be relative, although it cannot extend outside the current servlet context. If the path begins with a "/" it is interpreted as relative to the current context root



The above quote has been taken from one of the thread in this forum for that question: "Diff btw response.sendRedirect, jsp:forward and RequestDispatch .forward methods? "

I can't the understand the following lines:



Remember , you can redirect only to a page within current servlet context.





The pathname must begin with a "/" and is interpreted as relative to the current context root.The pathname specified may be relative, although it cannot extend outside the current servlet context.





The pathname specified may be relative, although it cannot extend outside the current servlet context.

19 years ago
Hi Madhav Penubala ,

Thank you very much for your reply. It's very clear explanation. Thanks a lot!!!
19 years ago
Hi,

What is the differences between the 'include' ,'forward' and 'redirect'?
[ September 26, 2005: Message edited by: Sachin Ramesh Vir ]
19 years ago
Hi,

I also want to know the differences detween relative path and absolute path. Please explain with some simple examples to understand the differences. And also why we are using "forward slash"(/). What is impiles if we using it?
19 years ago
Then when we have to use static variables and when to use instance variable. For example: There will be some speical cases in which static variable can be preferred than the Instance var(& vice versa). Is there any speical cases like that?
19 years ago
What will be the differences between using Static and instance variables in the Servlet. When using with servlet, both are seems to be same. Is there any difference?
19 years ago
Where the Reflection API will be useful. Give one real-time example for using reflection API.

First correct me whether I have understood the reflection API.
Reflection API is used to find out the class name, class modifiers, constructors, what inferface the class is implementing, what classes it extends and more...but finding these all at the RUNTIME.

What will be the use of finding those things at runtime?
19 years ago
May be it will useful to u!!

19 years ago
Hi,
What are the uses of having JAR, WAR and EAR (some other is there??)
I know about JAR file. As far my knowledge the JAR file is used when we want to give our application to the cilent, by placing all the class files with one manifest file stating which one has the main method.

Correct me if I am wrong. Please tell about WAR and EAR? Why there are using? Where it is frequently used? How to WAR or EAR? How to retireve the files from WAR and EAR(I don't know whether it has files like JAR)
19 years ago

In the above program, I am using enum for the operating system. The switch case needs to be performed based upon the user input. The return type of readLine() is string. How can we change the String to enum.
19 years ago
Hi,

What is Iterator, Comparator and Enumerator? I am always confused these two things. I really appreciate if someone provide me the coding that explains iterator and comparator and enumerator
19 years ago
Hi,

What is InvokerServlet? Everyone is suggesting don't use it. Why?
19 years ago


The { and } indicate that it is an initializer. All non-staic initializers are executed each time just before the constructor.




Output:
Dog-static initializer
Starting main()
Another Dog1- non-static initializer
Constructor
Another Dog2-non-static initializer
Ending main()

In the above program after executing the constructor only, the non-static initializer get executed. Why?
19 years ago
thanks for your reply,

Can I know what is an attribute? Whether it is differ from the parameters?(though very silly questions, which I can able to understand the concept very well)
19 years ago
Hi,

I don't know whether it is right place to post.
I am learning Servlet, JSP. Whether is there any online database, we can use it, without downloading and install it to the machine. For example I want to add(retireve,update,delete) a record to(from) database using MVC arch.
19 years ago