Win a copy of Head First Android this week in the Android forum!

mark benz

Greenhorn
+ Follow
since Aug 18, 2009
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 mark benz

Welcome Dhanji Prasanna, looking forward to read your book.
Let us see what you have come up with so far
12 years ago
To read a value of a button in Servlet, it has to be of type 'submit' Not 'button'.

To achieve your goal, you can do something like:

hth


Hint: try to use 'code tages' for your code, that way it will be easier for other folks to read.
12 years ago
JSP
The problem seems to be caused by the white spaces you have in your class path to Tomcat.

Try enclose your path in double quotes.
12 years ago

This is a known issue with JSPs, since outPutStream has already been called.

Interestingly it can be done:

however no blank spaces or characters are allowed before or after the scriptlet.
12 years ago

So, Can we conclude like this?

M - pojo
V - JSP
C - Servlets


Yes.

Servlets are used for security, you can't impose security level through JSP


What does security mean in this context ?

can we do every thing with JSP that can be done with servlets


I haven't found a situation where using Servlets over JSPs matter. I assume you can.
12 years ago
JSPs can do virtually anything a Servlet can do, because JSPs turn into Servlets.

however JSPs were designed for the 'View' in an 'MVC' design pattern.
usually a Servlet (Controller) contains the business logic (or communicate with Models) and a JSP renders the view to the end user.

12 years ago
Form action has to be relative, Not absolute.

because in <url-pattern> you said:

12 years ago
JSP

by using sessionId's(created by container to every user)


Session Ids are created for every session Not user.
12 years ago
Servlets run on the server, whatever you write in it become local to that server. As Bear referenced "File I/O has nothing to do with URLs"

btw you can use Commons file upload, and still do your new File() thing
12 years ago
JSP

I want to know exactly what is the purpose of marker interface


A Marker interface is an interface with no methods or fields; it is generally used to "mark" a class for certain behavior.

java.io.Serializable is an example of a marker interface; that said "objects of my implementing class can be serialized, deserialized".

Bear Bibeault wrote:You'd be better served to use one of the common 3rd party libraries like Commons Upload. See the FAQ for more details.


I agree with Bear, why would you choose to do all of the low level work where some external "tested/approved" library is made for just that.
12 years ago
JSP
One pitfall you are most likely will encounter if used "user log off to update status".

What if the user did not log off! user is stuck online ?
12 years ago

Vidya Bhargavi wrote:3)in try block is it possible to throw an exception?


Its more likely you will do it in real applications, for e.g.

Sumukh Deshpande wrote:
Typically how much time one should require to learn Servlets and JSPs?


A key concept I found very useful is to get hands on experience;
study + "read/write lots of code"
12 years ago