I'm just a beginner here, but I think one obvious
benefit of having one servlet assigned multiple
tasks with some sort of 'command' parameter is that
you don't end up with a proliferation of classes, and
.java source files, which can be a big hassle if you're
only working off a telnet shell.  That's the way I'm
doing it right now.

--Monte Glenn Gardner


On Fri, 27 Jul 2001, Patrick Fong wrote:

> Hi
>
> I have two questions.
>
> 1) I was wondering if it was more effective to have one servlet that
> handles all the requests eg. http://localhost/index.jsp?instruct=02 for
> adding requests, index.jsp?instruct=03 for editting database entries.
>
> String instruct= request.getParameter("request");
>
> if (instruct.compareTo("01")!=-1) {
>
>
> } //do something
>
> else if (same as above) {
>
> if request.getParameter(Parameters for inserting database requests) {
>
> }// do the DB thing
>
> }
>
> and so on...  I find alot of big web-sites are doing that now. What are
> benefits of this? I am trying to prevent the user from finding out too much
> about the operations of the web-sites. I think that any individual can
> figure out how a database works and how the website works by looking atthe
> form elements and the links within the page. What is the best way of
> hidding these sort of information. (I want the users to use the web-site
> and not try to hack into the database etc etc).
>
> 2) I have also come across websites where by clicking on the link it brings
> you to http://localhost/index.jsp# and it brings up windows/goes away and
> does something. How would someone program that in a  servlet/jsp? The
> benefits of this may be what I am looking for in 1).
>
> Patrick
>
> Comments appreciated.
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to