Java Developer's Guide to Servlets & JSP

2000-11-10 Thread Sloan Michael

I was just wondering if anyone had this book, and had any comments on it.

Java Developer's Guide to Servlets & JSP
Trade Paperback, 608 Pages, Sybex, Incorporated, October 2000
ISBN: 0782128092
Author: Brogden, William B.



--
Michael Sloan
Associate Programmer/JAVA
Headway Technology Resources

---
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Directories vs. WAR's

2002-08-26 Thread Sloan Michael

I'm looking for some ideas on how to handle our situation.

Background:
WebSphere 3.5.?
VAJ 3.5

Currently we have about 90,000 files (JSP's, HTML's, and images)
under our docroot. This is a little over 4 GB (and growing rapidly).
In another directory, we have about 3 MB of JAR's.
We have multiple instances of WebSphere running on our production
server.
We use symbolic links from several instances to one instance for
the bulk of the JSP's and images(in order to save space).

When we publish to production, we copy the new/changed files to
the production server(either to the docs directory or the
directory for our jars).

We are looking at going to WSAD and WebSphere 4.?

Does it make since (assuming it is possible) to keep this
directory structure and publish process in place, or should we
put everything together in a WAR file.

The pro I see for the WAR file is that it keeps everything together
in one nice file that we can move to whatever server we want.

On the down side, every time we publish (weekly), we have to create
the WAR file and move it to the production server. Even if it is
just a one word change to a JSP file, we'll have to copy the 4 GB
WAR file from one server to the production server.

Also can we maintain the symbolic links from the other instances
to inside the WAR file in the main instance?

TIA,
Michael Sloan

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: HttpClient to Servlet

2003-02-04 Thread Sloan Michael
According to http://java.sun.com/products/servlet/2.3/javadoc/index.html

It looks like getSession() and getSession(true) do the same thing.
getSession(true) does not
create a new session if one already exists.


getSession

 public HttpSession getSession(boolean create)

  Returns the current HttpSession associated with this request or,
if if there is no current session and create is
  true, returns a new session.

  If create is false and the request has no valid HttpSession, this
method returns null.

  To make sure the session is properly maintained, you must call
this method before the response is committed. If
  the container is using cookies to maintain session integrity and
is asked to create a new session when the
  response is committed, an IllegalStateException is thrown.
  Parameters:
   true - to create a new session for this request if
necessary; false to return null if there's no current
   session
  Returns:
   the HttpSession associated with this request or null if
create is false and the request has no valid
   session
  See Also:
   getSession()

--
 getSession

 public HttpSession getSession()

  Returns the current session associated with this request, or if
the request does not have a session, creates one.
  Returns:
   the HttpSession associated with this request
  See Also:
   getSession(boolean)



Michael Sloan




|-+>
| ||
|-+>
  
>--|
  |
  |
  |   To:  
  |
  |   cc:  
  |
  |   Subject: 
  |
  
>--|




Well,

in fact there are three ways to use getSession(), a 'default' one
plus a method that takes a boolean as input indicating whether
to explicitly create a Session or not. Normally, one would use
the default implementation (getSession()). This will either return
a reference to the Session if one already exists, _or_ create a
new one and return a reference to that (lic: Singleton pattern).
In both cases, after calling getSession(), a valid Session instance
should exist. If you pass an additional boolean parameter to
this (overloaded) method, you can control session creation
behavior on your own. So if you just want to check if a request
already belongs to a Session, you pass 'false' and then check
for null being returned (or the other way round). If you want
a new Session to be explicitly created each time, you pass
'true'. You can easily get these details from the API docs,
just to note.

HTH,

-- Chris (SCPJ2)

NB. I said I never tried, but looking for JSESSIONID (still
wonder if this is correct, could be some '_' goes some-
where; but then, I might be mixing this up with form-based
login) would be my first approach for session-enabling
the GUI thing. Thought I made that somewhat clear
before. Didn't I?

> -Original Message-
> From: A mailing list about Java Server Pages specification
> and reference [mailto:[EMAIL PROTECTED]] On Behalf Of
> Evan Wright, iLabs Inc.
> Sent: Tuesday, February 04, 2003 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: HttpClient to Servlet
>
>
> Create a session object the first time the client connects
> (log in) with
> getSession(true) and each subsequent getSession(false) would
> return that
> object. (?)



The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

==