| Back to Questions Page |
| |
| Question |
what will happen if we disable cookies in the web page? |
Rank |
Answer Posted By |
|
Question Submitted By :: Kalareddy |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | I we disable cookies then it will bedifficult for the web
container to manage the session with the help of cokkie.So
we need to use the encodeURL() method for appending the
jsessionid with the URL.  |
| Siva |
| |
| |
| Answer | Cookies is used for identify to request.
if we disable the coookies then we cannot identify the
request  |
| Devendra Dubey |
| |
| |
| Answer | It will give the exception saying that: "Illegal for
useBean to use session scope when JSP page declares (via
page directive) that it does not participate in sessions.
If you are not using the bean then it should be OK but most
of the time it will generate the exceptions and container
will not be able to manage the session for the page.  |
| Shailendra Shukla |
| |
| |
|
|
| |
| Answer | if we disable cookies then it cannot help us in the
sessions,so we need to go for any other way,i.e., URL
rewriting.In this URL rewriting we shud specify the
jsessionid in the url itself..this mean we have to do
little more work here,so best way to use cookies  |
| Renuka Reddy |
| |
| |
| Answer | if it cookies are disabled it is hard to find the
requesting users details. so it will be hard to maintain
the session for the requesting user.  |
| Govind Bisht |
| |
| |
| Question |
when we will use the SendRedirect method instead of forward. |
Rank |
Answer Posted By |
|
Question Submitted By :: Ravindra Nhavi |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When there is no need to record/maintain the previous data
of the user.
Like in google we are searching some infom
and after clicking on the searched item, it will forward to
some other server or link, where there is no required to
maintain any previous information of user.
that depends you need to think about the Scenario and use.  |
| Ranjan Satapathy |
| |
| |
| Question |
How To maintain session ..? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | using cookies,url redirecting,  |
| Rajsekhar |
| |
| |
| Answer | Using Seaaion Attribute  |
| Rajesh.c |
| |
| |
| Answer | you can maintain session in 4 ways--
1. hidden form field eg.
<input type=hidden name=button1 value = butvalue>
2. Using cookie
3 . URL Rewriting
4 . Session Attribute - setAttrubute(key, value) and
getAttribute(key)  |
| Amita Dwivedi |
| |
| |
| Question |
How do I set password expire time period? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | In web.xml file, mention session attribute after
servlet-mapping. like this:
<session-config>
<session-timeout>10</session-timeout> //10 mins
</session-config>  |
| Vikas |
| |
| |
| Answer | but the above ans is not suitable for any field like
password.
that is for browser session out.
M i correct?  |
| Amita |
| |
| |
| Answer | yes, u r right.
that is for session expiry.  |
| Vikas |
| |
| |
| Question |
how the jsp file is compiled? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Persistent |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | when container sees the request for .jsp file it loads
the .jsp file &converts into .java then compiles
into .class file and it is servlet all the way(continer
calss its no-arg constuctor,calss jspInit(),_jspservice()&
finally jsp destory)  |
| Siriganesh |
| |
| |
| Answer | By using .jsp,we can compile in java, but it will executed
in servlet  |
| Java Mani |
| |
| |
| Question |
why JSP is bigger choice for software development as
compare to ASP. |
Rank |
Answer Posted By |
|
Question Submitted By :: Vijaypandey |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Jsp's are better choice as jsp can be easily turned to
Servlets where the servlet container understands.
As most of the projects run with java/j2ee, it is very easy
to understand for the servlet engine, rather Asp being in
third party language.  |
| Embarq |
| |
| |
| Answer | Jsp mens Java Server Pages it requires any java enabled web
server for running and as we know that java is a sun
product and Sun always comes with best product and JSp
follows all java properties and it is a Object oriented
base language.
ASP runs on microsoft related server.  |
| Amita Dwivedi [Starnet Tele Services] |
| |
| |
| Question |
hi i m tannu and i m developing one web site as my project
and i have created one chatting application using applet
and socket it run perfactly using netbeans5.5 and
appletviewer but when i run on browser it doent run i put
it class file in jar file then call by jsp when it load in
browser it stop on applet started plz help me soon |
Rank |
Answer Posted By |
|
Question Submitted By :: Tannu |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Hi ur application was hacked by the some programmers..
u better develop one more application  |
| One |
| |
| |
| Answer | Hey Tannu,
Can't u find some better project rather than a 500 year old
chatting application. Some 20lakh-50 lakh Chatting
applications are there on the net.
Start doing something interesting rather than some stupid
old chatting application.  |
| Abhijit Mishra |
| |
| |
| Question |
What is the difference between JSP and Servlet? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ T3-Softwares |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Jsp is better for preparing presentation pages, while
servlet is good for request processing as it's more
difficult to write include, forward a static or dynamic url
with in out.println() ,
Jsp has also all implicit objects, we need not have to
instantiate any which is easier.
error handelling is easy in jsp isErrorPage="true"
errorPage="/page"
we need not have to bother about init(),service(),destroy
(),doGet(),doPost()in jsp.
in servlet for each time changing we have to explicitly
compile it.
Jsp automatically compiled by container when we reload the
page.  |
| Ranjan Satapathy |
| |
| |
| Answer | Servlets are pure java programs.here we can't use HTML.
But in JSP we use HTML,so we can use and modify the data
very easily.
Servlets are faster than JSP.bcoz while running JSP
programs it will be converted into Servlets and then
executed,so it takes more time.  |
| Pratheeka Reddy |
| |
| |
| Answer | Servlets are pure java codes,here we can't used HTML.
But in JSP we can use HTML,so we can modify and also
updated the data.
Another difference In Servlet clientside validation is
possible But in jsp clientside validation is not possible.  |
| Malay |
| |
| |
| Answer | Both servlet and jsp are web components. But servlet is
best suited for request processing, handling the business
logic while jsp is suitable for content generating .Its
easy to include html tag in jsp rather than servlet.Also
jsp is compiled to servlet when first loaded to
webserver.So in many framework servlet act as a controller
while jsp as a view.Also implicit object and action
elements available in jsp but not in servlet.  |
| Satyabrata |
| |
| |
| Answer | Jsp mainly used for the presentation only.It support only
Http. whereas servlet support FTP,Http etc  |
| Vaidegi |
| |
| |
| Answer | 1-The most important difference is that whenever we do some
changes in a servlet we need to build the application
completely but no need to do the same in case of jsp....  |
| Xxxxxx |
| |
| |
| Question |
How does JSP handle run-time exceptions? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ IBM |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | You can use the errorPage attribute of the page directive
to have uncaught runtime exceptions automatically forwarded
to an error processing page.
For example:
redirects the browser to the JSP page error.jsp if an
uncaught exception is encountered during request
processing. Within error.jsp, if you indicate that it is an
error-processing page, via the directive:
the Throwable object describing the exception may be
accessed within the error page via the exception implicit
object.
Note: You must always use a relative URL as the value for
the errorPage attribute.
 |
| Guest |
| |
| |
| Answer | My declarring errorpage attribute in page directive as
<% page errorPage="error.jsp"%>
and when u think that a jsp is supposed be encountered an
error then <% page isErrorPage="true"%>  |
| Mainuddin |
| |
| |
|
| |
|
Back to Questions Page |