So many ways.
One way:
Have your connection manager class implement the Singleton design pattern. If your not
familiar with this design pattern, this means that there will only be one instance of
the class per JVM per class loader. You'll have a public getInstance() method that
will
-Original Message-
From: Erik Morton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 2:41 PM
To: [EMAIL PROTECTED]
Subject: Re: Best way to load up a connection pool?
So many ways.
One way:
Have your connection manager class implement the Singleton design pattern
I personally frown upon complex functionality that could throw an exception being
implemented in a constructor.
If a class' constructor can throw an exception I recommend creating the reference
outside of the try/catch block so that the reference has scope outside of the code
block.
MyClass
Hello to all.
Standard MVC design with JRun on NT.
We are using the following code to implement security -
//start
if(session.getAttribute(com.commertech.web.user) == null) {
response.sendRedirect(request.getScheme() + ://
+ request.getServerName()
+ : +
Hello.
I am working with JRun 3.0 on Windows NT with Apache.
While trying to `new' an object I get the following run time exception:
JSP Page threw a non-Exception Throwable
The object that I am creating an instance of has a pretty deep stack and
3 additional classes will be created in the
Hi Keith.
You're talking about implementing a persistence layer - still one of the hottest
topics in OO development. I'll point you in the direction of some of the best work
in this area - http://www.ambysoft.com. Exolab is developing a java based
persistence layer (Castor) that is gaining allot
Check out : http://www.javaworld.com/javaworld/jw-04-2001/jw-0427-forms_p.html
This is a very common issue. HTTP is stateless so it is the job of the programmer
to maintain state. This is what the HttpSession object is for. For each field that
you want to maintain state for, you can set it in
What class are you using to read the Properties file? java.util.Properties will only
read the contents of the file when you call the load() method. You can check
yourself to see if the file has been modified. The properties object does not
continually monitor the conf file for you - that is your
Javascript is no different than HTML to your JSP page.
out.println(script language=\javascript\alert(\Foo\)/script);
Is really no different than this:
out.println(Foo);
The servlet container does not care. It's just a string that is written to the
buffer and flushed to the client as an HTTP
JRun stores the class files for JSPs in servers/yourserver/yourapp/Web-Inf/jsp.
However, I believe that the 1.1 specification requires that the container check the
actual *.jsp file to see if it has been modified since the last *.jsp to *.class
translation and compilation. This means that the
I'm not sure if you went to the spec for this information but it is not correct in
every implementation of the JVM that I have used. If you read the source of the
java.lang.String class you will not find any upper bounds on the size of the
underlying character array.
please correct me if I am
What database driver are you using? Bugs like this are common in some drivers.
Though I can only think of inet.tds right now.
Lenin Lopez wrote:
Hi All,
I am trying to get a varchar(2000) value from my DB using a store prodedure
I know the store procedure works and returns the value I am
( i need one that supports 'multiple
record set' )
and the JDBC-ODBC bridge does'nt
thanks
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of erik morton
Sent: Thursday, May 10, 2001 1:23 PM
To: [EMAIL
Actually Java and XML was written by Brett McLaughlin (http://www.newinstance.com).
He has contributed (along with Jason Hunter) to the JDOM project - an entirely new
approach to working with XML in Java. I highly recommend that you at least give
JDOM a shot, it has a bright future (IMO).
Art
I recommend storing these values in the attributes hash in the ServletContext object.
In JSP this is accessed through the implicit application object:
String thisString = (String)application.getAttribute(myString);
For servlets you would use:
String thisString =
Ok, so web.xml may not be the best place for that :-).
If you can guarantee that one resource (jsp or servlet) will be accessed at least once
before your first
request then you can
add the info to the ServletContext there.
Gerry Scheetz wrote:
It would be a great idea, but I forgot to
I propose that the most off topic posts possible are developers lecturing other
people. Magic Search Engines ??? I think that
comp.patronizing.sarcastic.developers is archived on google now.
If you want to have an advanced discussion - ask an advanced question.
And yes, this post was also off
Hello.
We are implementing the setPageContext method and then later writing to
the output stream in the doStartTag method. When we test for null in the
doStartTag Method we find out that the pageContext is null. What are we
missing here? Any ideas would be great. Thanks.
//
public void
The forward tag expects a url that is relative to the ServletContext root - if you
have a web application that you have named myApp and you access it at
http://www.myHost.com/myApp, then the root of the Context is /.
if Hepek is the root of your ServletContext try
%
String path = /PdfFile/ +
Your brackets were off plus you had one to many closing brackets.
This code compiles but you may need to rearrange the brackets. Just don't add any more
of them :-)
///
HTMLHEADTITLEReport/TITLE/HEADBODY
%@ page language=java import=java.io.*
Let me try to clear some things up first. What do you mean by different browser?
I will assume that you meant that you created another instance of the same browser
type (Netscape for example) from which you made the first request.
The servlet container keeps track of sessions by assigning
Actually I don't think that this will work. Here is why:
The client makes an HTTP request to the servlet which then uses the
RequestDispatcher to Forward the request to the jsp page. Because he is using the
request dispatcher and not response.sendRedirect() there is no response back to the
client
Check out :http://www.netcraft.com/survey/
Apache with 62%
Lenin Lopez wrote:
Just curious, if IIS is the secod most popular web server, which one is the
most popular, again I 'm just curious.
Thanks
-Original Message-
From: A mailing list about Java Server Pages specification and
necessary? Going to an o/r mapping seems labour/time intensive and at the
cost of db performance. Any advice?
Aaron
-Original Message-
From: erik morton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 1:15 PM
To: [EMAIL PROTECTED]
Subject: Re: Developing an N-tier system
Was this the first request to the given JSP page? If the answer is yes, then Tomcat
needs to translate your JSP code into a valid Servlet and then compile the servlet.
The only time this occurs is the first request after the page has been modified - that
is why it may take a while.
Jon Shoberg
Please expand on what you mean by component - loading a class over the network?
uploading a file from the client? calling a method on a remote object?
Prakasan OK wrote:
hi everybody,
Does any one know about any uploading component in JSP?
Thanks inAdvance,
Prakasan
If you want to upload a file I would encourage you to use Jason Hunter's
MultipartRequest class. You can find it at http://www.servlets.com. He's well
respected in the industry and his packages are open.
Prakasan OK wrote:
hi everybody,
Does any one know about any uploading component in
a file from client
erik morton [EMAIL PROTECTED]@java.sun.com on 04/24/2001
06:13:10 PM
Please respond to A mailing list about Java Server Pages specification
and reference [EMAIL PROTECTED]
Sent by: A mailing list about Java Server Pages specification and
reference [EMAIL PROTECTED
user something like:
jsp:forward page=%= request.getHeader(referer) %/
This will use the ServletContext.RequestDispatcher object so that the current
request is passed to the previous page.
or use
response.sendRedirect(request.getHeader(referer));
This will send an HTTP 303 (I think) back to the
In the words of Dr Evil - Pretty standard really. That's not meant to be an
insult either. Many people are using that same architecture now; if implemented
correctly it presents a very nice implementation of MVC. I will direct my words of
caution to your work with the persistence layer. Spend
The biggest advantage that I can see for using JSPs instead of Servlets for the
workflow layer is Rapid App Development - that's it. As a previous reader pointed
out, Servlets are true objects where JSPs are really just a temporary concept that
are translated into actual servlets at
?
Aaron
-Original Message-
From: erik morton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 12:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Developing an N-tier system
The biggest advantage that I can see for using JSPs instead of Servlets for
the
workflow layer is Rapid App
on the license).
Aaron O'Hara wrote:
erik,
What are the major drawbacks to implementing Ambler's methods w/GOF patterns
(besides time of development and skillset)?
Aaron
-Original Message-
From: erik morton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 1:15 PM
Is this a simple class or a JSP?
If it's a class I would either run the project (Run - Run Project) or just right
click on the file in the source browser and choose the Run option.
If it is a JSP the process is the same. Good Luck!
Marshall, Katyann wrote:
Hi All,
I'm new to Java, I made a
34 matches
Mail list logo