Re: Best way to load up a connection pool?

2001-07-05 Thread Erik Morton
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

Re: Best way to load up a connection pool?

2001-07-05 Thread Erik Morton
-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

Re: About constructor

2001-06-15 Thread erik morton
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

unparseable date

2001-06-06 Thread erik morton
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() + : +

JSP Page threw a non-Exception Throwable

2001-05-31 Thread erik morton
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

Re: Generate a JSP database access bean through table interrogation?

2001-05-25 Thread erik morton
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

Re: Form validation with jsp

2001-05-23 Thread erik morton
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

Re: JAVA Mail Issue

2001-05-23 Thread erik morton
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

Re: JSP and Java script

2001-05-18 Thread erik morton
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

Re: deploy issue

2001-05-17 Thread erik morton
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

Re: getString( ) question

2001-05-11 Thread erik morton
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

Re: getString( ) question

2001-05-10 Thread erik morton
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

Re: getString( ) question

2001-05-10 Thread erik morton
( 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

Re: JSP and XML

2001-05-09 Thread erik morton
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

Re: Application wide data globals

2001-05-04 Thread erik morton
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 =

Re: Application wide data globals

2001-05-04 Thread erik morton
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

Re: DATE FORMAT

2001-05-04 Thread erik morton
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

implementing custom tags

2001-05-03 Thread erik morton
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

Re: Application Runs very slow in netscape

2001-05-02 Thread erik morton
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/ +

Re: Try without catch without try - compile errors

2001-05-01 Thread erik morton
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.*

Re: Session variables

2001-05-01 Thread erik morton
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

Re: How to get URL of the original servlet after forwarding to aJSP page?

2001-04-27 Thread erik morton
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

Re: JSP,Servlets and IIS

2001-04-26 Thread erik morton
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

Re: Developing an N-tier system

2001-04-25 Thread erik morton
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

Re: JSP too slow ...

2001-04-25 Thread erik morton
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

Re: Upload Componenet

2001-04-24 Thread erik morton
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

Re: Upload Componenet

2001-04-24 Thread erik morton
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

Re: Upload Componenet

2001-04-24 Thread erik morton
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

Re: after uploading file from client to server...

2001-04-24 Thread erik morton
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

Re: Developing an N-tier system

2001-04-24 Thread erik morton
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

Re: Developing an N-tier system

2001-04-24 Thread erik morton
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

Re: Developing an N-tier system

2001-04-24 Thread erik morton
? 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

Re: Developing an N-tier system

2001-04-24 Thread erik morton
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

Re: how do I view the end result

2001-04-23 Thread erik morton
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