jsp versus xml syntax

2003-01-13 Thread Jeff Ousley
Hello!

I'm using (learning) tomcat-4.1.18 and I'm trying to
get the following example page to work:





// this is a local "helper" bean for processing the
HTML form
static public class localBean
{
   private String value;
   public String getValue() { return value;}
   public void setValue(String s)   { value = s; }
}



<%-- Every time we create the bean, initialize the
string  --%>



<%-- Whatever HTTP parameters we have,
 try to set an analogous bean property  --%>


HelloWorld w/ JavaBean


Hello


Enter a name to be greeted: 










I think I'm having trouble first of all because much
of the syntax is in xml form not jsp form. Is this
correct? How do I use the xml syntax under tomcat 4?
I'm very new and still learning.

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: jsp versus xml syntax

2003-01-13 Thread Jeff Ousley
So, under tomcat 4.1 am I not able to do this:


// this is a local "helper" bean for processing the
HTML form
static public class localBean
{
   private String value;
   public String getValue() { return value;}
   public void setValue(String s)   { value = s; }
}



but instead have to do this:

<%!
// this is a local "helper" bean for processing the
HTML form
static public class localBean
{
   private String value;
   public String getValue() { return value;}
   public void setValue(String s)   { value = s; }
}
%>


>From everything I can tell/read, the first snippet
(using the xml syntax) should work, but I can't seem
to get it to.

thanks!
-jeff
--- Robert Horton <[EMAIL PROTECTED]>
wrote:
> Hi,
> > 
> > I think I'm having trouble first of all because
> much
> > of the syntax is in xml form not jsp form. Is this
> > correct? How do I use the xml syntax under tomcat
> 4?
> > I'm very new and still learning.
> 
> It goes:
> 
> jsp -> xml (or html) -> rendered by browser
> 
> i.e. the jsp is executed by the server to produce
> the xml (being a
> superset of html) which is then passed to the
> browser.
> 
> Hope that helps,
> R
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how do I reference a bean that's inside my jsp page?

2003-01-13 Thread Jeff Ousley
Hello,

I cannot seem to get this example below to work under
tomcat (I'm using version 4.1.18). I get an error
indicating that the class localBean cannot be found
such as:


java.lang.ClassNotFoundException: localBean
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)




I tried doing an import (which is now commented out)
to no avail. Can I not have a bean in my jsp page? If
I can, how do I reference it or what do I set so that
it can be found?

thanks!



example page



<%-- <%@ page import="localBean" %> --%>

<%!
// this is a local "helper" bean for processing the
HTML form
static public class localBean
{
   private String value;
   public String getValue() { return value;}
   public void setValue(String s)   { value = s; }
}
%>


<%-- Every time we create the bean, initialize the
string  --%>



<%-- Whatever HTTP parameters we have,
 try to set an analogous bean property  --%>


HelloWorld w/ JavaBean


Hello


Enter a name to be greeted:








__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how do I reference a bean that's inside my jsp page?

2003-01-13 Thread Jeff Ousley
Charles,

The bean is actually on the same page in a declaration
block. If I pull the bean out and put it into it's own
class file, I can get it to work. I was just trying to
get the example from the tutorial to work. It seems to
work on the tutorial site, but I'm not sure what
application server they are using.

-jeff

--- Charles Baker <[EMAIL PROTECTED]> wrote:
> 
> --- Jeff Ousley <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > I cannot seem to get this example below to work
> > under
> > tomcat (I'm using version 4.1.18). I get an error
> > indicating that the class localBean cannot be
> found
> > such as:
> > 
> > 
> > java.lang.ClassNotFoundException: localBean
> > at
> >
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
> > at
> >
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
> > 
> > 
> > 
> > 
> > I tried doing an import (which is now commented
> out)
> > to no avail. Can I not have a bean in my jsp page?
> > If
> > I can, how do I reference it or what do I set so
> > that
> > it can be found?
> > 
> > thanks!
> > 
> > 
> > 
> > example page
> > 
> > 
> > 
> > <%-- <%@ page import="localBean" %> --%>
> > 
> > <%!
> > // this is a local "helper" bean for processing
> the
> > HTML form
> > static public class localBean
> > {
> >private String value;
> >public String getValue() { return
> value;}
> >public void setValue(String s)   { value = s; }
> > }
> > %>
> > 
> >  > class="localBean" >
> 
> Where is the bean class file? Is it in 
> 
> $CATALINA_HOME/webapps/yourApp/WEB-INF/classes ?
> 
> Is the bean in a package? If so, it needs to be in a
> corresponding directory structure under classes. Is
> you bean in fact named localBean.[java|class] ?
> Convention says Java classes should be named
> LocalBean.java.
> 
> {{SNIP}}
> 
> =
> [EMAIL PROTECTED]
> http://www.charleshbaker.com/~chb/
> If you cannot in the long run tell everyone what you
> have been doing,
> your doing was worthless. -- Edwim Schrodinger
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: how do I reference a bean that's inside my jsp page?

2003-01-13 Thread Jeff Ousley
Denise,

Thanks for the response. I got it to work by pulling
the bean out into it's own class file. I'm just trying
to understand this example from a tutorial I'm going
through. It works on their site. However, I'm not sure
which app server they are using.

-jeff
--- Denise Mangano <[EMAIL PROTECTED]> wrote:
> Jeff,
> 
> My apologies... I just re-read your post, and it
> looks like you actually
> want to define your bean within your JSP page... I
> do not think this is
> possible.  I would imagine not because from what I
> understand the bean is an
> actual class file, which would not be created in
> your scenario.  Then again,
> I could be wrong... However, the scenario I gave
> works.
> 
> HTH
> Denise
> 
> -Original Message-
> From: Denise Mangano
> [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, January 13, 2003 6:54 PM
> To: 'Tomcat Users List'
> Subject: RE: how do I reference a bean that's inside
> my jsp page?
> 
> 
> Jeff,
> 
> I'm not exactly sure what you mean by a bean that is
> "inside your JSP" (then
> again I'm a newbie...), but I am assuming you mean
> have access to a bean
> from within your JSP.
> 
> The way I use my bean, is I created the file
> MyBean.java with all the proper
> methods and compiled it.  These files (the .java and
> .class) are in the
> WEB-INF/classes/com/complusdata/beans directory of
> my webapp.  Now I've
> noticed that I have had to restart Tomcat every time
> I make changes to the
> bean and recompile, but someone on the list may have
> a better solution to
> that...
> 
> In MyBean.java I declare 
> 
> package com.complusdata.beans;  
> 
> To reference the bean from myJSP.jsp that is in my
> webapp directory, I have
> the following:
> 
> <%@page import="com.complusdata.beans"%>
> 
>  class="com.complusdata.beans.MyBean"
> scope="request">
>   
> 
> 
> As I've learned from the list, this will tell the
> JSP to use the bean
> "myBean".  It will first look for an existing
> instance of the bean.  If one
> does not exist it will execute the body of the
>  tag.  If an
> instance does exist it will not execute the body. 
> Then in either case, you
> will have access to the properties of that bean.  
> 
> When I want to access a specific value from the bean
> within my JSP page, I
> use myBean.getPropertyName() - where you substitute
> "PropertyName" for the
> name of your property.  I believe you can also use
> the tag  name="myBean" property="propertyName"/>
> 
> I also have my webapps directory in my Classpath,
> but not sure if that is
> required...
> 
> On a side note, anyone feel free to correct me if I
> am wrong about something
> ;) but Jeff, this is how mine is set up.
> 
> HTH
> Denise
> 
> -Original Message-
> From: Jeff Ousley [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, January 13, 2003 5:38 PM
> To: [EMAIL PROTECTED]
> Subject: how do I reference a bean that's inside my
> jsp page?
> 
> 
> Hello,
> 
> I cannot seem to get this example below to work
> under
> tomcat (I'm using version 4.1.18). I get an error
> indicating that the class localBean cannot be found
> such as:
> 
> 
> java.lang.ClassNotFoundException: localBean
>   at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1428)
>   at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1274)
> 
> 
> 
> 
> I tried doing an import (which is now commented out)
> to no avail. Can I not have a bean in my jsp page?
> If
> I can, how do I reference it or what do I set so
> that
> it can be found?
> 
> thanks!
> 
> 
> 
> example page
> 
> 
> 
> <%-- <%@ page import="localBean" %> --%>
> 
> <%!
> // this is a local "helper" bean for processing the
> HTML form
> static public class localBean
> {
>private String value;
>public String getValue() { return value;}
>public void setValue(String s)   { value = s; }
> }
> %>
> 
>  class="localBean" >
> <%-- Every time we create the bean, initialize the
> string  --%>
>  value="World" />
> 
> 
> <%-- Whatever HTTP parameters we have,
>  try to set an analogous bean property  --%>
>  name="localBean" property="*" />
> 
> HelloWorld w/ JavaBean
> 
> 
> Hello
>  property='value'/>
> 
> Enter a name to be gre

RE: how do I reference a bean that's inside my jsp page?

2003-01-13 Thread Jeff Ousley
Denise & Charles,

I found the tutorial at:

http://www.ibm.com/developerworks

When you get there, on the left, click on "Java
Technology", then click on "Education". In the list
that comes up, you'll see a tutorial titled:

"Introduction to JavaServer Pages technology"

That's the one I was going through. There are a lot of
other neat tutorials there as well. Enjoy!

-jeff

--- Denise Mangano <[EMAIL PROTECTED]> wrote:
> Jeff,
> 
> Is there a website for that tutorial?  I'd be
> curious myself to see if such
> a scenario is possible...
> 
> Thanks :)
> Denise
> 
> -Original Message-
> From: Jeff Ousley [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, January 13, 2003 7:07 PM
> To: Tomcat Users List
> Subject: RE: how do I reference a bean that's inside
> my jsp page?
> 
> 
> Denise,
> 
> Thanks for the response. I got it to work by pulling
> the bean out into it's own class file. I'm just
> trying
> to understand this example from a tutorial I'm going
> through. It works on their site. However, I'm not
> sure
> which app server they are using.
> 
> -jeff
> --- Denise Mangano <[EMAIL PROTECTED]> wrote:
> > Jeff,
> > 
> > My apologies... I just re-read your post, and it
> > looks like you actually
> > want to define your bean within your JSP page... I
> > do not think this is
> > possible.  I would imagine not because from what I
> > understand the bean is an
> > actual class file, which would not be created in
> > your scenario.  Then again,
> > I could be wrong... However, the scenario I gave
> > works.
> > 
> > HTH
> > Denise
> > 
> > -Original Message-
> > From: Denise Mangano
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 13, 2003 6:54 PM
> > To: 'Tomcat Users List'
> > Subject: RE: how do I reference a bean that's
> inside
> > my jsp page?
> > 
> > 
> > Jeff,
> > 
> > I'm not exactly sure what you mean by a bean that
> is
> > "inside your JSP" (then
> > again I'm a newbie...), but I am assuming you mean
> > have access to a bean
> > from within your JSP.
> > 
> > The way I use my bean, is I created the file
> > MyBean.java with all the proper
> > methods and compiled it.  These files (the .java
> and
> > .class) are in the
> > WEB-INF/classes/com/complusdata/beans directory of
> > my webapp.  Now I've
> > noticed that I have had to restart Tomcat every
> time
> > I make changes to the
> > bean and recompile, but someone on the list may
> have
> > a better solution to
> > that...
> > 
> > In MyBean.java I declare
> > 
> > package com.complusdata.beans;
> > 
> > To reference the bean from myJSP.jsp that is in my
> > webapp directory, I have
> > the following:
> > 
> > <%@page import="com.complusdata.beans"%>
> > 
> >  > class="com.complusdata.beans.MyBean"
> > scope="request">
> >   
> 
> > 
> > As I've learned from the list, this will tell the
> > JSP to use the bean
> > "myBean".  It will first look for an existing
> > instance of the bean.  If one
> > does not exist it will execute the body of the
> >  tag.  If an
> > instance does exist it will not execute the body.
> > Then in either case, you
> > will have access to the properties of that bean.  
> > 
> > When I want to access a specific value from the
> bean
> > within my JSP page, I
> > use myBean.getPropertyName() - where you
> substitute "PropertyName" for 
> > the name of your property.  I believe you can also
> use
> > the tag  > name="myBean" property="propertyName"/>
> > 
> > I also have my webapps directory in my Classpath,
> > but not sure if that is
> > required...
> > 
> > On a side note, anyone feel free to correct me if
> I
> > am wrong about something
> > ;) but Jeff, this is how mine is set up.
> > 
> > HTH
> > Denise
> > 
> > -Original Message-
> > From: Jeff Ousley [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 13, 2003 5:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: how do I reference a bean that's inside
> my
> > jsp page?
> > 
> > 
> > Hello,
> > 
> > I cannot seem to get this example below to work
> > under
> > tomcat (I'm using version 4.1.18). I get an er

RE: jsp versus xml syntax

2003-01-13 Thread Jeff Ousley
Greg,

Thanks. Finally a thorough answer that makes sense. I
really appreciate it.

-jeff

--- Greg Trasuk <[EMAIL PROTECTED]> wrote:
>   The first snippet works if and only if your jsp
> file is entirely
> XML-formatted.  Specifically, you need to:
> 
> (1) have an xml declaration at the beginning of the
> file (i.e  version='1.0'?>).
> (2) Enclose the whole thing in a  element
> with the correct
> namespace (see the spec for details)
> (3) Ensure that the whole document is well-formed
> XML (i.e. start tags have
> end tags, tags nest properly, attributes are quoted,
> etc).
> 
>   In (3) lies the rub, especially if you're
> generating HTML.  HTML is not,
> and cannot be well-formed, so you have to enclose
> your HTML portions in a
> CDATA section.  It's a lot of extra work if you're
> editing jsp files by
> hand.  Hence Craig's comment that the XML syntax is
> for tools, not people.
> It's intended for auto-generation, IDE-type editors,
> etc, not for generating
> jsp files manually.
> 
>   To make things a little more confusing, at least
> one container (IBM
> Websphere) seems to accept XML syntax as direct
> subsitution for the JSP
> syntax, but it's in violation of the JSP specs and
> you should stick to the
> spec to ensure portability.  You can get the spec
> at:
>
http://jcp.org/aboutJava/communityprocess/first/jsr053/index.htmlhttp://jcp.
>
org/aboutJava/communityprocess/first/jsr053/index.html
> 
>   Short answer- you can and probably should forget
> about the XML syntax for
> JSP pages.
> 
> Cheers,
> 
> Greg Trasuk, President
> StratusCom Manufacturing Systems Inc. - We use
> information technology to
> solve business problems on your plant floor.
> http://stratuscom.ca
> 
> >-Original Message-
> >From: Jeff Ousley [mailto:[EMAIL PROTECTED]]
> >Sent: January 13, 2003 16:16
> >To: Tomcat Users List
> >Subject: Re: jsp versus xml syntax
> >
> >
> >So, under tomcat 4.1 am I not able to do this:
> >
> >
> >// this is a local "helper" bean for processing the
> >HTML form
> >static public class localBean
> >{
> >   private String value;
> >   public String getValue() { return
> value;}
> >   public void setValue(String s)   { value = s; }
> >}
> >
> >
> >
> >but instead have to do this:
> >
> ><%!
> >// this is a local "helper" bean for processing the
> >HTML form
> >static public class localBean
> >{
> >   private String value;
> >   public String getValue() { return
> value;}
> >   public void setValue(String s)   { value = s; }
> >}
> >%>
> >
> >
> >>From everything I can tell/read, the first snippet
> >(using the xml syntax) should work, but I can't
> seem
> >to get it to.
> >
> >thanks!
> >-jeff
> >--- Robert Horton <[EMAIL PROTECTED]>
> >wrote:
> >> Hi,
> >> >
> >> > I think I'm having trouble first of all because
> >> much
> >> > of the syntax is in xml form not jsp form. Is
> this
> >> > correct? How do I use the xml syntax under
> tomcat
> >> 4?
> >> > I'm very new and still learning.
> >>
> >> It goes:
> >>
> >> jsp -> xml (or html) -> rendered by browser
> >>
> >> i.e. the jsp is executed by the server to produce
> >> the xml (being a
> >> superset of html) which is then passed to the
> >> browser.
> >>
> >> Hope that helps,
> >> R
> >>
> >> --
> >> To unsubscribe, e-mail:
> >>
> <mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail:
> >> <mailto:[EMAIL PROTECTED]>
> >>
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> >http://mailplus.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:
>
><mailto:tomcat-user->[EMAIL PROTECTED]>
> >For
> >additional commands,
> >e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




forcing a jsp page to reload/refresh when backend data changes

2003-01-14 Thread Jeff Ousley
Hello!

Forgive this very newbie-ish question. If someone
could point me in the right direction I would
appreciate it.

Is it possible/feasible to have .jsp page refresh the
data it's displaying when the data on the backend
changes? For example if I have a .jsp page that
queries and displays data from a database, can the
page be coded to monitor the data and when it changes,
refresh what is displayed in the user's browser?

I hope the question makes sense.

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




class files not being found

2003-01-15 Thread Jeff Ousley
All,

I'm using tomcat 4.1 and I'm noticing that unless your
.class file is not part of a package and in the proper
directory structure under the classes directory, it
cannot be found. Is there a way to use .class files
found under WEB-INF/classes that are not part of a
package?

thanks!
-jwff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




empty form fields and jsp:setProperty

2003-01-30 Thread Jeff Ousley
Hello,

I'm trying to do a simple form on a jsp page in
conjunction with a bean. I'm able to set the values on
a form and retrieve them from the bean just fine.
However, I'm using:



and I'm not clearly understanding how to properly
handle empty fields. All my .jsp page does right now
is display the values you submit. But, if I clear a
value, it doesn't get cleared in the bean (I'm
assuming because the set method isn't getting called
for empty fields). What is the normal/proper way to
accomplish the clearing of empty form fileds?

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




System.out.prinln in a bean

2003-01-31 Thread Jeff Ousley
Hello!

If I use System.out.println in a bean, where does the
output go? Can I control where it goes?

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




placement of 3rd party class files

2003-01-31 Thread Jeff Ousley
Hello!

Forgive my ignorance as I try to grasp the concepts
involved in using tomcat. I'm still learning.

My web application uses several beans which use 3rd
party classes bundled in .jar files. Where should I
place these? After reading the class loader doc, I'm
still not clear? They will only be used by this
webapp.

First of all, when I compile my beans, javac needs to
know where these .jar files reside. Secondly, when my
.jsp page runs that uses the beans that use these 3rd
part classes, the .jar files need to be found.

So, what is the proper place to store these .jar files
& how do I set the classpath so they can be found? I
aplogize for the many questions.

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: placement of 3rd party class files

2003-01-31 Thread Jeff Ousley
Is it wise to add directories under the /lib
directory? I'd like to keep the 3rd party classes
seperated from eachother. If I do this, how do I tell
tomcat/catalina where to find the class files? Isn't
the CLASSPATH variable ignored for .jsp pages?

--- Filip Hanik <[EMAIL PROTECTED]> wrote:
> just put them in the 
> 
> /WEB-INF/lib directory.
> 
> your webapp has to have a WEB-INF directory, and
> under WEB-INF you have two directories
> /classes -- used for .class files
> /lib -- used for .jar files
> 
> -Original Message-
> From: Jeff Ousley [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 10:29 AM
> To: [EMAIL PROTECTED]
> Subject: placement of 3rd party class files
> 
> 
> Hello!
> 
> Forgive my ignorance as I try to grasp the concepts
> involved in using tomcat. I'm still learning.
> 
> My web application uses several beans which use 3rd
> party classes bundled in .jar files. Where should I
> place these? After reading the class loader doc, I'm
> still not clear? They will only be used by this
> webapp.
> 
> First of all, when I compile my beans, javac needs
> to
> know where these .jar files reside. Secondly, when
> my
> .jsp page runs that uses the beans that use these
> 3rd
> part classes, the .jar files need to be found.
> 
> So, what is the proper place to store these .jar
> files
> & how do I set the classpath so they can be found? I
> aplogize for the many questions.
> 
> thanks!
> -jeff
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




bean initialization code

2003-01-31 Thread Jeff Ousley
Hello!

Is there a method I can override in a bean that'll get
executed when a bean is first used and not on
subsequent calls? Basically I'm page that uses a bean
such as:



In order to use the termwatch bean some code inside
the bean needs to be executed first. I can create a
method and explicitly call it, but is there a better
way? Do beans have cnstructors? Or should I be
handling this on my page in a jspInit() method?

thanks!
-jeff

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: bean initialization code

2003-02-03 Thread Jeff Ousley
Bill,

Is there a way to make the constructor in the bean
global to all sessions? Is there some other mechanisim
that allows for this? I want to initialize some
objects that will exist for all users of a .jsp page.
How do I go about doing this?

thanks!
-jeff
--- Bill Barker <[EMAIL PROTECTED]> wrote:
> 
> "Jeff Ousley" <[EMAIL PROTECTED]> wrote in message
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello!
> >
> > Is there a method I can override in a bean that'll
> get
> > executed when a bean is first used and not on
> > subsequent calls? Basically I'm page that uses a
> bean
> > such as:
> >
> >  > class="termwatch.TermWatchBean" scope="session"/>
> >
> > In order to use the termwatch bean some code
> inside
> > the bean needs to be executed first. I can create
> a
> > method and explicitly call it, but is there a
> better
> > way? Do beans have cnstructors? Or should I be
> > handling this on my page in a jspInit() method?
> >
> 
> It is perfectly legal to specify a constructor for
> your bean, as long as it
> takes no arguments.
> 
> > thanks!
> > -jeff
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > http://mailplus.yahoo.com
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: forcing a jsp page to reload/refresh when backend data changes

2003-02-04 Thread Jeff Ousley
Nick,

I like this idea. Do you know of any examples that
make use of this concept? What code would I use
(generically) to have the invisible frame force a
resubmit on the viewable frame?

Have you ever worked with pushlets? Are they worth
messing with?

thanks,
-jeff
--- Nick Sophinos <[EMAIL PROTECTED]> wrote:
> Adding to Justin's method, you can make this polling
> a more subtle event
> by placing a polling jsp page in a frameset with
> your jsp page, but have
> the polling page take up no visible space.
> 
> So in effect you divide it into 2 pages: the
> original data diplay page and 
> an invisible "polling" page that only check to see
> it the datasource has
> changed (by getting a rowcount, for example).  
> 
> The polling jsp will poll the data source a a given
> time interval
> and if the data has changed, the polling page can
> use javascript
> to force the data display page to resubmit to ge the
> new data.
> 
> This way you have 2 advantages:
> 
> 1) The polling page just check to see if the data
> has changed and
> does not bring back the entire data set every time
> 
> 2) the data display page only resubmits back to the
> datasource
> only when the datasource has changed. 
> 
> - Nick
> 
> 
> 
> 
> 
> 
> On Tue, 14 Jan 2003, Justin Ruthenbeck wrote:
> 
> > 
> > Hi Jeff --
> > 
> > Once your jsp outputs its data, its job is done
> and
> > there is no opportunity for it to update anything.
> > The only way data can be updated is if the client
> > requests it, which means you'll have to force the
> > client to refresh.  If it's a browser, set the
> > appropriate header or include the correct HTML
> > tag (I don't know the currently "best" way to do
> this,
> > but you specify how often you want to refresh and
> the
> > URL to get -- google for "HTTP-EQUIV=Refresh").
> > This is only an approximation of what you're
> trying to
> > do ... if you want live communication between
> server
> > and client, you'll need something on the client to
> > listen to the socket (and applet would work) and
> act
> > accordingly.
> > 
> > Hope that's enough to get you going... let me know
> if
> > you need more specifics.
> > 
> > justin
> > 
> > 
> > At 11:08 AM 1/14/2003, you wrote:
> > >Hello!
> > >
> > >Forgive this very newbie-ish question. If someone
> > >could point me in the right direction I would
> > >appreciate it.
> > >
> > >Is it possible/feasible to have .jsp page refresh
> the
> > >data it's displaying when the data on the backend
> > >changes? For example if I have a .jsp page that
> > >queries and displays data from a database, can
> the
> > >page be coded to monitor the data and when it
> changes,
> > >refresh what is displayed in the user's browser?
> > >
> > >I hope the question makes sense.
> > >
> > >thanks!
> > >-jeff
> > >
> >
> >__
> > >Do you Yahoo!?
> > >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > >http://mailplus.yahoo.com
> > >
> > >--
> > >To unsubscribe, e-mail:  
> 
> > >For additional commands, e-mail:
> 
> > 
> > 
> > 
> > Justin Ruthenbeck
> > Software Engineer, NextEngine Inc.
> > [EMAIL PROTECTED]
> > Confidential -
> > See
> http://www.nextengine.com/confidentiality.php
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> 
> > For additional commands, e-mail:
> 
> > 
> > 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




java/jsp & dynamic data

2003-02-11 Thread Jeff Ousley
All,

I'm sorry to bring this up again, but I'm just not
seeing clearly and maybe someone here could help.

I need to write an application that displays in a web
browser some data that will change from second to
second. I have to use java in some form. I'm tied to
the jtapi packages.

I thought that jsp would be a good way to go, but I
find that I'm limited in that jsp provides no way to
refresh what is on the screen in a near real-time
fashion. Past answers on this newsgroup have suggested
the meta refresh tag, or using hidden frames and
javascript to do periodic refreshes.

I though maybe an applet would suit my needs, but it
needs to access data on remote hosts. Doesn't the
applet security prevent this?

There has to be a good way to accomplish this using
java and I was hoping I could do I with jsp somehow.
Does anyone have any other ideas or suggestions?

Thanks!

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




documentation for ant tasks

2004-08-20 Thread Jeff Ousley
hello!

is there anyplace where the catalina ant functions/tasks are
documented? i've searched but obviously i'm not looking in the proper
place.

thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jdbc via ResourceLink in context.xml not working in 5.5.4

2004-11-29 Thread Jeff Ousley
Hello,

I am moving from tomcat 5.0.28 to 5.5.4 and I'm having trouble getting
my jdbc driver working in the new tomcat. I have a Resource set up
under GlobalNamingResources in server.xml, just as I did in 5.0.28. I
also have a corresponding conext xml file (named the same as my test
app - jeff.xml) inside conf/Catalina/localhost which has a
ResourceLink to the Resource. I've copied the jdbc .jar files to
common/lib. As far as I can tell, everything is setup the exact same
way it was in 5.0.28 yet I get this error when I try to access my test
page:

javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:845)

Can anyone think of what I'm missing or what I screwed up? It works
just fine under 5.0.28. My next step is to rename my 5.0.28 install
and set it up again from scratch to make sure I'm not missing
something in my setup steps.

Help!!!

thanks,
-jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



basic security tutorial

2004-12-02 Thread Jeff Ousley
hello!

does anyone know if there's a tutorial or reference on how to set up
basic security using tomcat (5.5)? i'd like to get a better
understanding of how to secure particular pages in a webapp.

thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



more logging in tomcat 5.5

2004-12-04 Thread Jeff Ousley
hello!

forgive the rambling nature of this message. my basic question is how
do i get more detailed logging out of tomcat. i'm trying to set up a
JNDIRealm to authenticate to an ldap server. in my realm config i've
got the debug="99" name/value pair. my realm is included inside my
host container. i see no debug output anywhere. where should i see
this output?

i also have an accesslog valve inside the host container like this:




the localhost_access_log... files are being created with very minimal
information in them. is this where the debug output from the realm
should go, or in the catalina.out directory?

i've also followed the steps exactly to try and configure log4j as found here:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

after stopping and restarting tomcat, my log4j settings seem to have
made no difference. they don't seem to be working at all. my log file
as specified in the log4j.properties file is not being created. is
there something further i must do to get this working?

is there anything i can do to get more detailed logging out of tomcat
and especially my realm config?

sorry for the mess of questions. i appreciate any help, direction, or guidance!

-jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]