Re: Blank page when native DLL used

2009-06-03 Thread Frank W. Zammetti

Hi Chuck,

Nope, I just verified, I made no changes to server.xml at all... in 
fact, the only thing I did do was take all the preinstalled applications 
and remove them from webapps... I'd be surprised to learn it, but could 
that be the problem somehow?


Thanks,
Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
All you could possibly want is here: zammetti.com



Caldarale, Charles R wrote:

From: Frank W. Zammetti [mailto:fzli...@omnytex.com]
Subject: Re: Blank page when native DLL used



  

32-bit, and I re-confirmed I have the right download (which seems
obvious anyway given that Tomcat picks it up and starts running 
with it, but you never know).



You didn't happen to disable the APR listener in server.xml, did you?  That 
might contribute to the observed symptoms.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus signature 
database 4128 (20090603) __

The message was checked by ESET Smart Security.

http://www.eset.com




  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Blank page when native DLL used

2009-06-03 Thread Frank W. Zammetti
That's correct, root too... I tried adding all the webapps back in 
anyway to no avail... the URL I know is correct because without the DLL, 
it gets me my page as expected, but when I drop the DLL in and just hit 
refresh, I get the blank page (I also confirmed there was no trailing 
slash both times to be extra sure).  I can of course hit refresh all day 
long without the DLL (the JSP renders the current time so I know it's 
properly being refreshed).


Well, if I'm the only one that's ever reported this then no big deal, 
I'm perfectly happy assuming it's something on my machine (or me doing 
something stupid that I just can't catch).  This is just for development 
so not a problem at all.  If others see this though, maybe then it might 
be indicative of an actual problem.


Take care,
Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
All you could possibly want is here: zammetti.com



Caldarale, Charles R wrote:

From: Frank W. Zammetti [mailto:fzli...@omnytex.com]
Subject: Re: Blank page when native DLL used



  

the only thing I did do was take all the preinstalled
applications and remove them from webapps...



Including ROOT?  If you don't have a default webapp deployed, you will get a 
blank page back if the URL can't be matched against any of the deployed 
webapps.  (This is true with and without tcnative-1.dll available.)  Note that 
the browser may display an old copy of the Tomcat home page if it has one lying 
around; hitting refresh will get rid of that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus signature 
database 4129 (20090604) __

The message was checked by ESET Smart Security.

http://www.eset.com




  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Blank page when native DLL used

2009-05-26 Thread Frank W. Zammetti

Hi Charles,

JVM info:
java version 1.6.0_11
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)

32-bit, and I re-confirmed I have the right download (which seems 
obvious anyway given that Tomcat picks it up and starts running with it, 
but you never know).


Thanks,
Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
All you could possibly want is here: zammetti.com


Caldarale, Charles R wrote:

From: Frank W. Zammetti [mailto:fzli...@omnytex.com]
Subject: Blank page when native DLL used

Hi folks... I'm running Tomcat 6.0.18 on Windows XP and I'm trying to
use tcnative-1.dll 1.1.16... I drop the DLL in tomcat/bin and it's
picked up at startup as expected... however, trying to access any JSPs
on the server results in a blank page.  If I remove the DLL everything
works fine.



JVM version?  32- vs 64-bit JVM/dll mismatch?

Anything in the logs?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus signature 
database 4107 (20090527) __

The message was checked by ESET Smart Security.

http://www.eset.com




  


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Blank page when native DLL used

2009-05-25 Thread Frank W. Zammetti
Hi folks... I'm running Tomcat 6.0.18 on Windows XP and I'm trying to 
use tcnative-1.dll 1.1.16... I drop the DLL in tomcat/bin and it's 
picked up at startup as expected... however, trying to access any JSPs 
on the server results in a blank page.  If I remove the DLL everything 
works fine.


Is this a known issue, or has anyone else seen this?  It's not the end 
of the world or anything, I'm more curious than anything really.


Thanks,
Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
All you could possibly want is here: zammetti.com


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: What is the difference?

2009-05-14 Thread Frank W. Zammetti

Err, one is correct and one is not :)

-version does what you expect: gives you information on the JVM that is 
executing.  Just putting version however is telling the JVM to load a 
class named version and execute it, which of course it can't find, hence 
the ClassNotFoundException you see.


Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
All you could possibly want is here: zammetti.com


Dave Filchak wrote:

Curious,

What is the difference between java -version and java version?

In the first case I get:

java -version
java version 1.6.0_13
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

In the second, I get:

java version
Exception in thread main java.lang.NoClassDefFoundError: version
Caused by: java.lang.ClassNotFoundException: version
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: version.  Program will exit.


Dave

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus 
signature database 4076 (20090514) __


The message was checked by ESET Smart Security.

http://www.eset.com







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: job announcement - Software Architect

2009-03-21 Thread Frank W. Zammetti
Eh, we've all done rapid iterative design... it usually goes something 
like this...


10:34am: I need the logo to be flaming instead of waving, and it has to 
be done by 11:00am
10:58am: Scratch that, the logo has to fade in and out and it MUST be 
implemented by 11:15am
11:20am: Please change the site's layout from three fluid columns to 
two static by noon's product demo
12:22pm: The demo went well, but they want the logo to be a subtle 
background image, and the layout has to have a header, footer, sidebar 
and the original three fluid columns.  The next demo is at 1:30 so it 
has to be done by then.


By the way, tapid iterative development usually ends in one or more 
suicides, loss of staff to the local Wal-Mart or any version of Windows 
Vista.


Frank

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog


Caldarale, Charles R wrote:
From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] 
Subject: Re: job announcement - Software Architect


P.S. on a very side note, what is test-driven design 
and rapid iterative development ?



I think that means We don't need no stinkin' requirements.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus signature 
database 3953 (20090321) __

The message was checked by ESET Smart Security.

http://www.eset.com




  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: job announcement - Software Architect

2009-03-21 Thread Frank W. Zammetti

Err, that's Rapid or course dunno what tapid is :)

--
Frank W. Zammetti
Author of Practical Ext JS Projects with Gears (coming soon)
 and Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects with Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog



Frank W. Zammetti wrote:
Eh, we've all done rapid iterative design... it usually goes 
something like this...


10:34am: I need the logo to be flaming instead of waving, and it has 
to be done by 11:00am
10:58am: Scratch that, the logo has to fade in and out and it MUST be 
implemented by 11:15am
11:20am: Please change the site's layout from three fluid columns to 
two static by noon's product demo
12:22pm: The demo went well, but they want the logo to be a subtle 
background image, and the layout has to have a header, footer, sidebar 
and the original three fluid columns.  The next demo is at 1:30 so it 
has to be done by then.


By the way, tapid iterative development usually ends in one or more 
suicides, loss of staff to the local Wal-Mart or any version of 
Windows Vista.


Frank





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Record and simulate a web app

2009-02-18 Thread Frank W. Zammetti

+1 to what Christopher said... but, you can save yourself some time:

http://javawebparts.sourceforge.net/

More specifically:

http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/RequestRecorderFilter.html

...and to go along with that:

http://javawebparts.sourceforge.net/javadocs/javawebparts/misc/package-summary.html

I think that'll pretty much do as suggested.

Frank

--
Frank W. Zammetti
Author of Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects With Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog



Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Youssef,

On 2/18/2009 2:02 PM, Youssef Mohammed wrote:
  

Sorry if this not directly related to tomcat itself. I have a swing app that
communicate with backend thru a web app deployed on tomcat. For testing
purposes, we want to be able to record some http responses and later on be
able to simulate the same response when it gets the same request ( aka
simulating the web sever).  All tools we could find only record requests and
simulate the client not the sever. Any help/hint is appreciated. thnx



This sounds like something you could write yourself as a relatively
simple webapp:

1. Write an HTTP recorder filter. Configure it as the first filter that
gets run for any request. Wrap the request object with one that records
the input stream coming in, say, to a file. Wrap the response with one
that records the output to another file. Your request object can link
these two files any way it wants. You probably want to do something like
use Content-Length + SHA1(request) as a key to the request that you
store for later.

2. Run your application through this filter to generate some test data.

3. Write a servlet that does nothing but read requests, hash them, look
up the test response from your database of responses, and dump the
response back to the client.

You'll have to watch out for a few things:

1. The recorded response is not directly playable because it includes
things like the status header, which you can't send twice. So you'll
have to record the status header and set it appropriately instead of
just writing content.

2. Similar to #1, you have to send headers using setHeader() instead of
just writing to the output stream, because the output stream is used
solely for the response body.

3. If your requests include bodies, you might want to pre-process the
requests to account for varying amounts of whitespace, etc.

In thinking about #1 and #2 above, I think a change to the recorder is
in order: you probably want to store the headers, status code, etc.
specially instead of just as text in your recorded file. This will make
it easier to play back the response.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmcfiwACgkQ9CaO5/Lv0PBdqQCgs8PYXOm4U6f2oD+ejQVkHvFQ
QRMAoJJCjhY8XRJX2n9tMDwjIewvtK27
=6R37
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


__ Information from ESET Smart Security, version of virus signature 
database 3865 (20090218) __

The message was checked by ESET Smart Security.

http://www.eset.com




  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Struts vs JSF (poll?)

2008-09-04 Thread Frank W. Zammetti

Tommy Pham wrote:

Johnny, if by chance you manage to find the links to the Tomcat MVC model, 
would you please send it?  I didn't have much success googling it.

  
Not to speak for Johnny, but you're probably having trouble finding 
anything because there's no such thing as Tomcat MVC, there's simply 
MVC.  It's a pattern, not any specific product.  You shouldn't have any 
problem finding that.

Thanks,
Tommy

  

Frank

--
Frank W. Zammetti
Author of Practical Dojo Projects
 and Practical DWR 2 Projects
 and Practical JavaScript, DOM Scripting and Ajax Projects
 and Practical Ajax Projects With Java Technology
 (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ Information from ESET Smart Security, version of virus signature 
database 3416 (20080904) __

The message was checked by ESET Smart Security.

http://www.eset.com



  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts vs JSF (poll?)

2008-08-26 Thread Frank W. Zammetti
On Tue, August 26, 2008 12:33 pm, Christopher Schultz wrote:
 With respect to Frank's comments, S2 specifically encourages you to
 separate your own code from the framework, so that you can even
 implement your logic as framework-agnostic controllers that are simply
 auto-filled by the framework. Unit testing couldn't be easier: you don't
 even need to worry about the servlet API because S2 completely hides it
 from you (even for things like session attributes).

I think that *can* be true... but my observation is that most developers
start getting so many marker interfaces and interceptors into the mix, and
some start to tie you to the servlet API, that all of a sudden you're in
the same mock boat as you are otherwise... I've always thought the S2
claim that Actions are POJOs, while *technically* true (or at least, *can*
be technically true) is a little bit of a red herring.

However, I'll be fair and admit I haven't done a full-scale S2 project in
a real-world environment, so this conclusion is based on a somewhat
limited data set.  I don't think the situation is any worse than any other
framework though.

 I would encourage you guys to take a deeper look into these frameworks
 (I know nothing about JSF... I'm sure there's some great stuff in there,
 too)... I think you'll see that frameworks do actually provide useful
 services and direction, and aren't just useless plumbing and
 configuration.

I'm very familiar with S1, I've been using it for years and have released
a number of extensions to it over that period.  I'm also pretty familiar
with S2 (I did tech review on Ian's Practical book and have put one or
two plugins out there in the wild).  I just find S1 doesn't buy me much
any more, and in fact gets in the way sometimes for the type of
development I do, and I find S2 to be overly complicated in many
situations.

It's just one man's opinion of course, and I too encourage each person to
examine these frameworks on their individual merits and make up your own
mind for your specific situation.  I'm certainly not going to slam anyone
that looks at Struts or JSF and concludes it's right for them... well,
maybe I would in the case of JSF :)

 - -chris

Frank

-- 
Frank W. Zammetti
Author of Practical Dojo Projects
  abd Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts vs JSF (poll?)

2008-08-26 Thread Frank W. Zammetti
On Tue, August 26, 2008 1:09 pm, David Whitehurst wrote:
-snip-
 But, at the same time I think
 development managers and architects need to choose the best framework
 and then tell the newly hired developers that this is what we're
 using.  You, the developer, either accept the choice or not.  We can't
 all be chiefs.

I'm in the architect/manager boat myself these days, so I'd be crazy to
*not* agree :)  I've seen though what happens when you play the ivory
tower game and just come down the hill with the stone tablets that say
this is what we're doing.  Everyone has to have a say IMO... even if
some of those opinions don't carry as much weight as others (having your
opinion carry more weight is one of the perks of moving up the ladder
after all).

But at the end of the day, sure, it's us at the top that have to make the
decisions and be responsible for them however they turn out, and anyone
that doesn't want to be onboard can go disagree with someone elsewhere.

 And, if it's JSF, I'm firing the first one that tells me that Struts
 is better.  I think like the businessman now.  We're all here to write
 software and once the architecture is chosen, debate's over boys!.

I would hope you wouldn't fire them JUST for disagreeing :)  So long as
they can disagree and still abide by the decision I can live with it.

 Struts2 for me.  I had to vote, LOL :-)

Sure... and I have no doubt it does the job nicely for you.

 David Whitehurst

Frank

-- 
Frank W. Zammetti
Author of Practical Dojo Projects
  abd Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog

On Tue, August 26, 2008 1:09 pm, David Whitehurst wrote:
 Frank:

 I'm an AppFuse fan and while Struts 2 and JSF are an option, I've
 recently seen two solid applications using Spring Web Flow.  I haven't
 used Web Flow for anything production yet.  And, while this was the
 this vs. that discussion, I do agree that you should encourage
 developers to make up their own mind.  But, at the same time I think
 development managers and architects need to choose the best framework
 and then tell the newly hired developers that this is what we're
 using.  You, the developer, either accept the choice or not.  We can't
 all be chiefs.

 And, if it's JSF, I'm firing the first one that tells me that Struts
 is better.  I think like the businessman now.  We're all here to write
 software and once the architecture is chosen, debate's over boys!.

 Struts2 for me.  I had to vote, LOL :-)

 David Whitehurst

 On 8/26/08, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 On Tue, August 26, 2008 12:33 pm, Christopher Schultz wrote:
  With respect to Frank's comments, S2 specifically encourages you to
  separate your own code from the framework, so that you can even
  implement your logic as framework-agnostic controllers that are simply
  auto-filled by the framework. Unit testing couldn't be easier: you
 don't
  even need to worry about the servlet API because S2 completely hides
 it
  from you (even for things like session attributes).

 I think that *can* be true... but my observation is that most developers
 start getting so many marker interfaces and interceptors into the mix,
 and
 some start to tie you to the servlet API, that all of a sudden you're in
 the same mock boat as you are otherwise... I've always thought the S2
 claim that Actions are POJOs, while *technically* true (or at least,
 *can*
 be technically true) is a little bit of a red herring.

 However, I'll be fair and admit I haven't done a full-scale S2 project
 in
 a real-world environment, so this conclusion is based on a somewhat
 limited data set.  I don't think the situation is any worse than any
 other
 framework though.

  I would encourage you guys to take a deeper look into these frameworks
  (I know nothing about JSF... I'm sure there's some great stuff in
 there,
  too)... I think you'll see that frameworks do actually provide useful
  services and direction, and aren't just useless plumbing and
  configuration.

 I'm very familiar with S1, I've been using it for years and have
 released
 a number of extensions to it over that period.  I'm also pretty familiar
 with S2 (I did tech review on Ian's Practical book and have put one or
 two plugins out there in the wild).  I just find S1 doesn't buy me much
 any more, and in fact gets in the way sometimes for the type of
 development I do, and I find S2 to be overly complicated in many
 situations.

 It's just one man's opinion of course, and I too encourage each person
 to
 examine these frameworks on their individual merits and make up your own
 mind for your specific situation.  I'm certainly not going to slam
 anyone
 that looks at Struts or JSF and concludes it's right for them... well,
 maybe I would in the case of JSF :)

  - -chris

 Frank

Re: Struts vs JSF (poll?)

2008-08-24 Thread Frank W. Zammetti
Being as most of what I do today is RIA development, I've personally
found that the ideal solution is to use NO framework at all.  I use DWR
and just treat everything as method calls.

The nice thing about that is you wind up with a very clean and plain
structure to your application in the sense that you're thinking in terms
of classes and methods, like you do in general server-side anyway.  It
also makes most of your application highly testable (except where
session comes into play, but we tend to try and minimize that usage
anyway).  You design a proper API, and the fact that you're using it
behind a web-based application isn't really relevant (and in fact you
can truly slap any front-end on you want without much trouble).

I've found that my projects drift towards more of a component-based
model naturally doing this, and away from the classic page/action-based
model of Struts (which is where we were a few years ago).  It becomes
much more about events, small, focused bits of functionality, and how
it's all put together to form a larger whole. The development cycle I
find is much faster, much simpler and the results are far more flexible
and extensible.  It's in some sense a return to a more bare metal
mentality, but it's truly made our lives a whole lot better.  I've had
to mentor some pretty inexperienced teams and I've seen this approach
versus the framework-centric approach with something like Struts, and
I've observed it to be much easier to get their brains wrapped around
this approach, they come up to speed and are effective faster, and they
are more effective than in cases where a full, proper framework was used.

So, if the question is Struts vs. JSF, I'm in agreement with Johnny to a
large degree: neither is the best answer.  And in fact, I second the no
framework at all opinion.  I suppose if you wanted to consider DWR a
framework then I'd say DWR, but it's really just a mechanism, not a
framework (it could be something else other than DWR, so long as it
presented an RPC view of the world it'd be the same basically).  But as
far as the true frameworks go, as we've come to understand them over
the past few years, my personal opinion is that they serve no purpose
any longer when talking about developing modern RIAs, and in fact tend
to get in the way more than they help in those situations.  I completely
realize this isn't the popular opinion (yet), and many people actually
disagree quite vehemently, but I've had pretty extensive experience
building these types of apps for nearly 10 years now, and that's the
mindset I've come to at this point.

(I tend not to say this often, because it's usually annoying to me when
people do it, but what the hell... I actually blogged about this a
little while back: http://www.zammetti.com/blog)

Frank

-- 
Frank W. Zammetti
Author of Practical Dojo Projects
  abd Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog



Johnny Kewl wrote:

 - Original Message - From: Tommy Pham [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Sunday, August 24, 2008 7:03 AM
 Subject: Struts vs JSF (poll?)


 Hi everyone,

 This maybe out of scope for this list but I wanted to know more about
 Struts vs JSF other this old article [1].  Which are are deployed
 mostly on your TC server(s)/cluster(s)?  If any Java developers are
 on this list, which platform API do you prefer for quick development
 (to meet deadline), performance, security management (user
 authentication and level restriction) etc... since both are based on
 MVC despite their different implementations(?).

 Since there isn't a JSR for Struts, has Struts been around before JCP
 is formed?  And why is there not a JSR for Struts now (just curious)?

 As for JSF, which implementation is used by/for your app(s)?
 Sun/NetBeans? Apache's MyFaces? or Others (please list)?  I'm
 somewhat disappointed Netbeans support for JSF and Struts in that
 Netbeans bundled libs support used older Apache Commons lib version
 (even for the current v6.1), although this could be updated but I
 don't know whether it will break the integration of Netbeans' VWP. 
 Even the tutorial/trails on NetBeans site regarding Struts (although
 this can be compensated at Struts' web site) is very limited perhaps
 because of the (biased?) Struts weak integration to favor or push
 more on JSF/Visual JSF?

 I need to evaluate my options of API and IDE before I dedicate
 several projects since the performance of Netbeans is getting worse
 by every release comparing to Eclipse.  As for server, I've decided
 already ;)

 TIA,
 Tommy

 [1] http://websphere.sys-con.com/node/46516

 Use neither... prefer the plain TC MVC model.

 Struts is really just an implementation of the MVC model in TC
 JSF is more about trying to make web development feel

Re: DWR [Slightly off topic -- Was Struts vs JSF (poll?)]

2008-08-24 Thread Frank W. Zammetti
 to see how you can get to the same basic place in that
paradigm too.  The difference is again that you're essentially putting
an HTTP-specific abstraction in front of your API.  I'm never a fan of
abstractions unless you can show me there's a true benefit to the added
complexity.  Sometimes you can convince me, frequently you can't :) 
Some people are big-time on the REST bandwagon, and that's fine, I just
happen to feel DWR is better, if you're working in the Java space at least.
 Thanks in advance,
 Ken

np,
Frank

-- 
Frank W. Zammetti
Author of Practical Dojo Projects
  abd Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  (For info: apress.com/book/search?searchterm=zammettiact=search)
My look ma, I have a blog too! blog: zammetti.com/blog


 On Aug 24, 2008, at 4:10 PM, Frank W. Zammetti wrote:

 Being as most of what I do today is RIA development, I've personally
 found that the ideal solution is to use NO framework at all.  I use DWR
 and just treat everything as method calls.

 The nice thing about that is you wind up with a very clean and plain
 structure to your application in the sense that you're thinking in terms
 of classes and methods, like you do in general server-side anyway.  It
 also makes most of your application highly testable (except where
 session comes into play, but we tend to try and minimize that usage
 anyway).  You design a proper API, and the fact that you're using it
 behind a web-based application isn't really relevant (and in fact you
 can truly slap any front-end on you want without much trouble).

 I've found that my projects drift towards more of a component-based
 model naturally doing this, and away from the classic page/action-based
 model of Struts (which is where we were a few years ago).  It becomes
 much more about events, small, focused bits of functionality, and how
 it's all put together to form a larger whole. The development cycle I
 find is much faster, much simpler and the results are far more flexible
 and extensible.  It's in some sense a return to a more bare metal
 mentality, but it's truly made our lives a whole lot better.  I've had
 to mentor some pretty inexperienced teams and I've seen this approach
 versus the framework-centric approach with something like Struts, and
 I've observed it to be much easier to get their brains wrapped around
 this approach, they come up to speed and are effective faster, and they
 are more effective than in cases where a full, proper framework was
 used.

 So, if the question is Struts vs. JSF, I'm in agreement with Johnny to a
 large degree: neither is the best answer.  And in fact, I second the no
 framework at all opinion.  I suppose if you wanted to consider DWR a
 framework then I'd say DWR, but it's really just a mechanism, not a
 framework (it could be something else other than DWR, so long as it
 presented an RPC view of the world it'd be the same basically).  But as
 far as the true frameworks go, as we've come to understand them over
 the past few years, my personal opinion is that they serve no purpose
 any longer when talking about developing modern RIAs, and in fact tend
 to get in the way more than they help in those situations.  I completely
 realize this isn't the popular opinion (yet), and many people actually
 disagree quite vehemently, but I've had pretty extensive experience
 building these types of apps for nearly 10 years now, and that's the
 mindset I've come to at this point.

 (I tend not to say this often, because it's usually annoying to me when
 people do it, but what the hell... I actually blogged about this a
 little while back: http://www.zammetti.com/blog)

 Frank

 -- 
 Frank W. Zammetti
 Author of Practical Dojo Projects
  abd Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  (For info: apress.com/book/search?searchterm=zammettiact=search)
 My look ma, I have a blog too! blog: zammetti.com/blog



 Johnny Kewl wrote:

 - Original Message - From: Tommy Pham [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Sunday, August 24, 2008 7:03 AM
 Subject: Struts vs JSF (poll?)


 Hi everyone,

 This maybe out of scope for this list but I wanted to know more about
 Struts vs JSF other this old article [1].  Which are are deployed
 mostly on your TC server(s)/cluster(s)?  If any Java developers are
 on this list, which platform API do you prefer for quick development
 (to meet deadline), performance, security management (user
 authentication and level restriction) etc... since both are based on
 MVC despite their different implementations(?).

 Since there isn't a JSR for Struts, has Struts been around before JCP
 is formed?  And why is there not a JSR for Struts now (just curious)?

 As for JSF, which implementation is used by/for your app(s)?
 Sun/NetBeans? Apache's MyFaces? or Others (please list)?  I'm

Re: Seeking advice as to what platform/framework to use for developing a tourism/tourist attractions web site

2008-05-02 Thread Frank W. Zammetti
I actually agree with Lyallex quite strongly, I found very little value 
in *any* of the frameworks out there today, and in fact I'm starting to 
believe most of them are counterproductive.


However, that's not to say I think plain servlets and JSPs is the 
absolute best answer either... since Ajax is one of the listed 
requirements I would highly suggest looking at DWR.  I've found that 
DWR, plus a good widget library on the client (ExtJS was my choice until 
the recent licensing change) was all you need nowadays.  I tend to use 
bits and pieces of Spring too, mostly Spring JDBC because I believe 
straight JDBC is the right answer and Spring JDBC makes that better, but 
I'll pick and choose other pieces as the needs come up.


But I think DWR is the key.  If you're developing a modern RIA, I don't 
believe there is currently a better option.  The really great thing 
about it is that it leads you quite naturally down a certain 
architectural path: POJOs on the server, a simple RPC-like mid-tier 
design, simple, logical coding on the front-end, etc.


I've been involved in a massively complex project at work the past two 
years, one of the biggest success stories in my company's history 
actually... we started off using Dojo for Ajax and Struts on the 
server-side... that worked reasonably well... however, for the last 6-9 
months we've been developing all the new capabilities in the application 
with DWR replacing both of those, and it's a world of difference.  New 
developers, some of which have little to no experience in Java web 
development, are able to pick it up so much quicker, it's so much easier 
to get things done initially, and troubleshooting is much easier because 
there's simply less moving parts, and it simply *feels* simpler.  We've 
been able to deal with changing requirements quickly and easily.  Being 
able to see the two approaches in the same application really makes it 
obvious which is better and why.


In fact, most of the newest functionality is done in what I consider the 
holy grail of approaches: a single JSP design.  There's no longer this 
page-request-response-new page cycle, it simply isn't necessary.  Yes, 
you have to fully buy into this whole RIA thing, and you have to be 
comfortable doing a lot in Javascript, but if you are I think this is 
nearly a perfect way to do things.


That's just my opinion of course, I know many people don't agree.  All I 
can say is I've got a ton of real-world experience with non-trivial 
enterprise-class applications that support it.


Frank

P.S. - Is that your real name by the way Layallex?  If so, I've never 
heard it before, but it's pretty cool!)


--
Frank W. Zammetti
Author of Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  for info: apress.com/book/search?searchterm=zammettiact=search
Java Web Parts - javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!
My only partially serious blog: zammetti.com/blog

Lyallex wrote:

Greetings

I guess given the lack of replies that most think this is too OT for
this list, well I suppose it is but I couldn't resist answering.

Don't Do It

That is, don't use any framework at all.

Download Tomcat and the relevant J2EE API documentation bundle, then
goto the MySQL site and get the driver
then go http://commons.apache.org/ and get all sorts of stuff. Finally
read http://java.sun.com/blueprints/patterns/catalog.html (maybe this
should be the other way around)

This really is all you need. learning a framework is an overhead you
can do without if you are getting into J2EE.

I used to use Struts and JSF and Castor and lot's of other stuff but I
found I was spending more time learning how to configure the framework
than I was developing. My latest site has most of what you mention and
not a framework in site.

Follow the patterns, write cohesive POJOs and hide the business logic
behind facades. Use the commons stuff, it works, it's free and it's
documented (to a degree). I even used to eschew taglibs but I'm a
convert now so use them where you can.

NEVER put business logic anywhere other than in POJOs (or EJBs if you
must) and never do anything other than rendering in jsp's.

Use css, everywhere, all the time ... IE 6 is broken but most of the
latest browsers are pretty good these days IMHO.
div good, table bad (well not quite).

Stick to this and you will be writing websites and earning money for
the rest of your working life while others struggle to get heir head
around the latest bloated XML nightmare config, docubabble latest
greatest framework.

Madness ? perhaps, but I spend my time learning the Java/J2EE APIs
rather than reading framework documentation and I am never out of
work.

Lights blue touchpaper and retires

Good Luck

Lyallex



On Fri, May 2, 2008 at 11:01 AM, qm westview [EMAIL PROTECTED] wrote:

 *Hi there,* *I am an application programmer (Java, PHP

Re: [OT] RE: Seeking advice as to what platform/framework to use for developing a tourism/tourist attractions web site

2008-05-02 Thread Frank W. Zammetti
Peter's point is valid though... you could certainly build the site in 
PHP for example and just drop in a bunch of pre-existing modules for a 
shopping cart, blog, that sort of thing, then just write some basic PHP 
pages to tie it all together.


For example, my web host has this Fantastico thing on their admin 
interface where I can pick and choose PHP application just like those 
mentioned... it automatically does the MySQL setup, creates the 
directories, does all the required installation, and a minute or so 
later I have myself a blog, a shopping cart, whatever.  That gets 
installed into my main site's directory structure, so all I'd need to do 
then is some write some basic PHP to clump all those modules together 
into some sort of coherent site.


If *that's* what the OP was looking for, then Peter's point is valid, 
there's options besides coding it all from scratch.  It's only if 
someone wants to code it all themselves that your (and my) points come 
into play.


Frank

Frank W. Zammetti
Author of Practical DWR 2 Projects
  and Practical JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  for info: apress.com/book/search?searchterm=zammettiact=search
Java Web Parts - javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!
My look ma, I have a blog too! blog: zammetti.com/blog

Lyallex wrote:

Peter

Never suggested the OP develop carts and such like from scratch really did I.

What I said was he should focus on learning the core APIs, that's a
little different.
Building your own business logic is a requirement whatever framework
you use (or don't use). If you can tell me where to find reusable
business logic then that will certainly save me time, I'd still want
to know how it worked though so black boxes are useless.

If, when you know the core you decide to rot your brain and spend
frustrating days trying to configure some bloody minded framework then
go for it, at least you'll have some idea where to look when it
doesn't work (they NEVER work first time in my experience).

Anyway OP, hope this little discussion has cleared things up for you :-))

Cheers
Lyallex



On Fri, May 2, 2008 at 2:48 PM, Peter Crowther
[EMAIL PROTECTED] wrote:

From: Lyallex [mailto:[EMAIL PROTECTED]

  Subject: Re: Seeking advice as to what platform/framework to
  use for developing a tourism/tourist attractions web site

  Greetings
 
  I guess given the lack of replies that most think this is too OT for
  this list, well I suppose it is but I couldn't resist answering.
 
  Don't Do It
 
  That is, don't use any framework at all.

 Many of the OP's requirements are for existing tools.  Blog, shopping cart and 
the like.  Developing those from scratch is rather like gathering the coal, 
clay and iron ore to make your own oven to smelt your own iron ore to make your 
own axe to cut down your own tree to make your own log cabin.  You *can*, and 
you get a lot of satisfaction from it, but it's a lot easier to spend less time 
working for someone else, then rent a house.  Sure, it might not be quite what 
you'd build yourself... but you get most of what you want a *lot* quicker.

 So, to the OP, I'd say: compare the big systems that you mention.  Take a tour 
of each.  Install a few.  You might spend a couple of weeks, maybe a couple of 
months doing this.  Then pick one and go for it.  You'll have your system 
running - and customers using it - while Lyallex is still building the data 
access layer for the no-framework one.

- Peter



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
Typically when you're generating dynamic content like that, you don't
serve it in the same way as a file on the file system does.  Instead you
usually serve it from memory, or from a database if you had need to store
it somewhere.

If you deploy within an EAR you'll find that writing to the file system
doesn't work as expected, at least within the context of the webapp... you
can do it if you tie your EAR to the environment it's running in, i.e.,
paths and such, but most people will tell you that's a Bad Idea(tm).

My point is that you're probably asking the wrong question... I think the
right question is how can you serve dynamically-generated content that is
transient, i.e., not persisted to the file system.  To answer that we'd
have to know what kind of content it is, how it's generated, etc.

Frank

-- 
Frank W. Zammetti
Author of Practical DWR 2 Projects
  and JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  for info: apress.com/book/search?searchterm=zammettiact=search
Java Web Parts - javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!
My look ma, I have a blog too! blog: zammetti.com/blog

On Wed, April 2, 2008 10:55 am, Guilherme Orioli wrote:
 I'm developing a system that will generate a  file dynamically, and i want
 to make it possible to be downloaded from server after it's created. The
 problem is that when i link the file, the response i get is that it
 doesn't
 exist.
 After a few tests we've figured out that if the file existed previously
 from
 loading tomcat, it's possible to get the file. So, if i reload tomcat, i
 can
 get it... I was wondering if i can refresh the tomcat in the java code.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
What he said :)

FYI, serving PDFs in particular can be a bloody mess because of Acrobat
STILL not being able to get their s**t together when it comes to their
browser plug-in.

I wrote a Wiki entry on the Struts Wiki some time ago that might help:

http://wiki.apache.org/struts/ServingPdfDocuments?highlight=%28pdf%29

It's not really specific to Struts, so should help.

Frank

-- 
Frank W. Zammetti
Author of Practical DWR 2 Projects
  and JavaScript, DOM Scripting and Ajax Projects
  and Practical Ajax Projects With Java Technology
  for info: apress.com/book/search?searchterm=zammettiact=search
Java Web Parts - javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!
My look ma, I have a blog too! blog: zammetti.com/blog

On Wed, April 2, 2008 1:24 pm, Caldarale, Charles R wrote:
 From: Guilherme Orioli [mailto:[EMAIL PROTECTED]
 Subject: Re: How can I refresh tomcat in the java code?

 memoryPDF = new FileOutputStream(test);

 Don't create a FileOutputStream, use ServletResponse.getOutputStream()
 instead.  Make sure you set the content type to application/pdf, of
 course.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IE causes an ORA-00936 error, but not Firefox?

2008-03-28 Thread Frank W. Zammetti
It *might* be enough, if you at least know what parameters are being used,
to look in Firebug or some similar tool to see what's being transmitted
across the wire... if you're lucky it's something obvious and visible
there and you won't have to hunt it down further back on the server.

-- 
Frank W. Zammetti
Author of Practical DWR 2 Projects
 (2008, Apress, ISBN 1-59059-941-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
and Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Fri, March 28, 2008 1:30 pm, Brian Munroe wrote:
 On Fri, Mar 28, 2008 at 10:27 AM, Frank W. Zammetti [EMAIL PROTECTED]
 wrote:

 My first guess (and that's all it is, a guess!) is that you're trying to
  insert something coming from the client into a SQL query and for
 whatever
  reason it's being transmitted differently from IE than FF and is
 somehow

 Thanks Frank, Peter

 Those answers sound logical to me.  Now if I can just get my hands on
 the source

 -- brian

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF problem on IE from JSP

2008-01-18 Thread Frank W. Zammetti

Jonadan wrote:
 BTW, is this problem is specific to Tomcat ONLY? Or also occurs in other
 servers such as JBoss, and so on?

FYI, a while ago I wrote a page on the Struts wiki dealing with serving 
PDFs... while it was meant for Struts, the majority of the information 
is in fact completely generic and applicable here (Tomcat vs. any other 
server doesn't matter, most of my issues... I've had the same issues 
under Tomcat and Websphere).


http://wiki.apache.org/struts/ServingPdfDocuments?highlight=%28pdf%29

Frank

--
Frank W. Zammetti
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
and Practical DWR 2 Projects
 (2008, Apress, ISBN 1-59059-941-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do i compile servlets

2007-12-31 Thread Frank W. Zammetti
Servlets, unlike JSPs, are NOT automatically compiled by the container. 
You will need to compile your servlets yourself and place the .class files
in WEB-INF/classes (or package them into a JAR and put them in
WEB-INF/lib).

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Mon, December 31, 2007 11:24 am, Joly M wrote:
 hello all,

 i'm calling a servlet on my application.
 tomcat seems not finding the servlet (error 404).
 i have noticee that no .class file was created when my web
 application was deployed .
 i have configured web.xml file, but i'm not getting any .class file at
 all.
 what should i do to get my servlet compiled and  running?


 cheers
 joly




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbortException / Broken Pipe?!

2007-08-15 Thread Frank W. Zammetti

Ronald Klop wrote:
ClientAbortException means the user canceled the download (the 'client 
aborted'). There is nothing you can do about that on the server.


Yeah, that's the answer you'll find most frequently if you spend time 
Googling for that exception, but anecdotally you'll find that more times 
than not, there's no evidence of the browser being closed or the client 
aborting (pressing Stop) while a page is loading.  There's definitely 
something else going on in a great many cases, and I'm at least happy to 
know that I'm not alone in not having found the real answer yet :


Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!



Ronald.

On Tue Aug 14 15:57:25 CEST 2007 Tomcat Users List 
users@tomcat.apache.org wrote:


Folks;

still messing around with an error like this: In our system, we offer
customers a service to download files using a servlet. Some weeks ago
(more or less when I considered switching to tomcat 6.0), the following
error frequently started to show up in my log files:

...
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at
java.net.SocketOutputStream.write(SocketOutputStream.java:136) at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at
org.apache.coyote.Response.action(Response.java:183) at
org.apache.coyote.Response.finish(Response.java:305) at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) 


at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) 


at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) 


at java.lang.Thread.run(Thread.java:619) 14.08.2007 15:38:34
org.apache.jk.common.ChannelSocket processConnection WARNUNG:
processCallbacks status 2
...


whereas I see a ClientAbortException caught by my applications
exception handling mechanism. So far, I haven't been able to track this
down, that's why I am kindly asking you for your skilled advice.

What did I do so far trying to get hold of this:

- Tomcat runs on a machine in the LAN, fronted by an apache2 httpd.

- The error does appear both running tomcat 6.0.13 and 5.5.23.

- I initially was using mod_jk 1.2.29 and switched to mod_proxy and
Proxy/ProxyReverse setup just to make sure, and the error appears
no matter whether using mod_jk or mod_proxy.

- Right now, I am using apache2 prefork mpm, played around with
different mpms just to be sure it's not an error related to apache2
itself, but this also didn't really change anything.

- apache2 logging doesn't show any messages whenever such a
ClientAbortException is thrown.
- Customers, however, reported that whenever such a situation happened,
the files downloaded were either 0k sized or corrupted.



And I'm whole-heartedly clueless by now :( Is there anything I
forgot to double-check? Using the latest JDK, no tcnative, running
Ubuntu Linux 6.06.1. Applied pretty much every solution attempt I could
come up with using google, including tweaking the HTTP connector setup
in server.xml, removing tcnative, using mod_proxy instead of mod_jk -
no success. Does anyone around here have any more ideas on how to get
hold of this?

Thanks loads in advance and bye,
Kristian


--
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771
One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality. (Hundertwasser)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.19/953 - Release Date: 8/14/2007 5:19 PM



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbortException / Broken Pipe?!

2007-08-15 Thread Frank W. Zammetti



Kristian Rink wrote:

However, seriously this is a rather bad thing as I am convinced most of
our users to possibly make use of a default web browser on their
system, having no idea what a browser is, at all... On the other side,
having the file transmission terminated / corrupted surely isn't what I
would call no ill effect... ;) Does anyone have a smart idea how to
compensate for this issue?


Your right, I must not have read carefully the first time, I didn't 
realize there was a corrupt download involved here.



Thanks in advance and best regards,
Kristian


Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbortException / Broken Pipe?!

2007-08-15 Thread Frank W. Zammetti
Just as another tidbit in the pot, I get these errors frequently with 
Websphere, both with and without a web server in front of it, and also 
both with and without a proxy involved, so it's definitely not 
Tomcat-specific, nor is it definitively anything involving a proxy 
(although both could somehow be contributing factors in this particular 
case).


One thing we did notice is that the problem was more frequent when we 
started using Dojo... now, I'm not blaming Dojo, but I wonder if maybe 
its something along the lines of the browser opening a connection to see 
if a particular JS file is fresh, then determining the local copy is 
fresh, and instead of properly closing the connection it somehow aborts 
it incorrectly... that wouldn't in the least surprise me with IE... 
although you'd expect to see that error all the time, so I don't know, 
maybe it's the way Dojo's package/import system works.  Just an 
observation though.


Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

Rainer Jung wrote:

Kristian Rink wrote:

Ronald;

[Ronald Klop [EMAIL PROTECTED] @ Wed, 15 Aug 2007 09:56:59
+0200 (CEST)]


ClientAbortException means the user canceled the download (the
'client aborted'). There is nothing you can do about that on the
server.


I thought so. However, there are two things:

(a) I was unsure whether, in a proxied environment, a
ClientAbortException means download canceled by the actual (external)
client or by the proxy server (which is directly accessing the
backend tomcat).


OK, the proxy in your case is a reverse proxy. The exception in the 
tomcat logs could theretically come from a communication failure back to 
the reverse proxy, or from a failure from the reverse proxy back to the 
client=browser. In the latter case, the reverse proxy would not accept 
any more traffic from the tomcat and thus indirectly lead to the same 
exception.


When using mod_jk, it will log problems during sending back data to the 
client=browser. That way you would know, on which part of the net the 
original problem is located.


By logging response times in your Apache access log and redundantly in 
your Tomcat access log (at least until you solved or understood the 
cause of the problem), you can also find out, how long the response took 
from the perspective of Apache and of Tomcat, and if the duration is 
close to some configured timeout interval. The pattern for response 
times if %D, which means microseconds with Apache httpd and 
milliseocond swith Tomcat. From the mod_jk log and the access log 
duration information you might even be able to determine, which requests 
had the problem (this is not easy and if you've got high load, it's 
difficult). I would suggest using mod_jk 1.2.25. It will log millisecond 
timestamps and has a couple further stability improvements. You wrote 
about version 1.2.29 which does not exist, upgrading should be no problem.


JK has a couple of timeouts additionally to the Apache httpd timeout. 
They are described at


http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html


(b) In none of the cases I watched so far, some user consciously /
actively stopped a download in progress - all reported that either the
download finished but ended up with an empty / small / corrupted file
or an error message showed up - or nothing happened at all. :(

I am not really sure who's to blame for that... :/


I would really try to look at the response handling times, the URLs for 
which it is happening, the client IPs and User Agent types to check, if 
there are any obvious patterns.


In case you can finally reproduce the problem with low load, you can 
switch jk log level to debug or even trace. Then the log file will 
include full packet and header dumps. This is not a good idea for high 
traffic production though.


Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbortException / Broken Pipe?!

2007-08-14 Thread Frank W. Zammetti
Have you noticed if this affects IE users and Firefox users equally?  I
ask because there's a known issue (that I've never seen an actual answer
to) where IE causes these exceptions frequently with no ill effect to
anything (other than the overhead of handling the exception in the VM on
the server).  I'd bet a box of donuts that it only happens for IE users.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, August 14, 2007 9:57 am, Kristian Rink wrote:

 Folks;

 still messing around with an error like this: In our system, we offer
 customers a service to download files using a servlet. Some weeks ago
 (more or less when I considered switching to tomcat 6.0), the following
 error frequently started to show up in my log files:

 ...
 java.net.SocketException: Broken pipe
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at
 java.net.SocketOutputStream.write(SocketOutputStream.java:136) at
 org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at
 org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
 at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at
 org.apache.coyote.Response.action(Response.java:183) at
 org.apache.coyote.Response.finish(Response.java:305) at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 at java.lang.Thread.run(Thread.java:619) 14.08.2007 15:38:34
 org.apache.jk.common.ChannelSocket processConnection WARNUNG:
 processCallbacks status 2
 ...


 whereas I see a ClientAbortException caught by my applications
 exception handling mechanism. So far, I haven't been able to track this
 down, that's why I am kindly asking you for your skilled advice.

 What did I do so far trying to get hold of this:

 - Tomcat runs on a machine in the LAN, fronted by an apache2 httpd.

 - The error does appear both running tomcat 6.0.13 and 5.5.23.

 - I initially was using mod_jk 1.2.29 and switched to mod_proxy and
 Proxy/ProxyReverse setup just to make sure, and the error appears
 no matter whether using mod_jk or mod_proxy.

 - Right now, I am using apache2 prefork mpm, played around with
 different mpms just to be sure it's not an error related to apache2
 itself, but this also didn't really change anything.

 - apache2 logging doesn't show any messages whenever such a
 ClientAbortException is thrown.

 - Customers, however, reported that whenever such a situation happened,
 the files downloaded were either 0k sized or corrupted.



 And I'm whole-heartedly clueless by now :( Is there anything I
 forgot to double-check? Using the latest JDK, no tcnative, running
 Ubuntu Linux 6.06.1. Applied pretty much every solution attempt I could
 come up with using google, including tweaking the HTTP connector setup
 in server.xml, removing tcnative, using mod_proxy instead of mod_jk -
 no success.  Does anyone around here have any more ideas on how to get
 hold of this?

 Thanks loads in advance and bye,
 Kristian


 --
 Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
 jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771
 One dreaming alone, it will be only a dream; many dreaming together
 is the beginning of a new reality. (Hundertwasser)

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbortException / Broken Pipe?!

2007-08-14 Thread Frank W. Zammetti
When I used the phrase I'd bet a box of donuts, what I should have
written was ...and if I'm wrong, it won't be the first time

:)

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, August 14, 2007 1:08 pm, Rainer Jung wrote:
 Do I get the box, if I can write a servlet and describe a procedure by
 which a Firefox user can produce the exception when calling my servlet?

 Frank W. Zammetti wrote:
 Have you noticed if this affects IE users and Firefox users equally?  I
 ask because there's a known issue (that I've never seen an actual answer
 to) where IE causes these exceptions frequently with no ill effect to
 anything (other than the overhead of handling the exception in the VM on
 the server).  I'd bet a box of donuts that it only happens for IE users.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hot to access raw POST Data in servlet?

2007-07-17 Thread Frank W. Zammetti
Have a look here:

http://javawebparts.sourceforge.net

...more specifically this:

http://javawebparts.sourceforge.net/javadocs/javawebparts/request/RequestHelpers.html

...the getBodyContent() is, I think, what your looking for.

hth,
Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, July 17, 2007 2:55 pm, Johnny Kewl wrote:

 - Original Message -
 From: Joe Kramer [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, July 17, 2007 2:51 PM
 Subject: Hot to access raw POST Data in servlet?


 Hello,

 I can't find a way to do a simple thing - access raw postdata in
 servlet service()/doPost() method. (The data that goes after the
 headers.)
 In old Servlet API it was possible using
 javax.servlet.http.HttpUtils.parsePostData() which is now deprecated.
 Servlet API only seem to have methods to access request parameters and
 properties in HttpServletRequest, but not the request data itself.

 What is the best/pssible practice to do that?

 Joe, I'm far too young to remember this function, so just slap me around
 if
 I dont get it ;)
 If all that function gave you was a HashTable of parameters then wont
 getParameterNames be good enough?
 Ie you can enumerate through them find the parameters and the values...
 like
 this

 Enumeration paramNames = request.getParameterNames();
 while(paramNames.hasMoreElements()){
 paramName = (String)paramNames.nextElement();
 paramValue = request.getParameter(paramName);
 }

 or you could use getParameterMap if you looking for something close to
 the old HashTable.
 getInputStream... will give you the raw stream.

 Young guys like me, use the Enumeration... its handy when you have more
 than
 one submit button ;)



 Thanks.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session IDs XMLHttpRequests

2007-05-21 Thread Frank W. Zammetti
I can say with 100% certainty that a servlet invoked with XMLHttpRequest
**DOES** have the same access to server-side objects as a non-AJAX
request.  I say this based on two applications in production that do this
all day long, one Struts-based, one not.  I also say it based on a number
of other applications, some using other frameworks, some using plain
servlets, all that do this as well, with no problems.

Now, the two production apps, which are very much AJAX-based, not just
using it here and there, are running on Websphere, so that leaves the
possibility that there's something going on with Tomcat.  However, I
generally develop under Tomcat, including most of those other apps I
mentioned, and never observed this problem.

This isn't to say what your seeing isn't truly an issue, I have no doubt
it is... but, the only difference I can conceive of, based on all this
experience, between an AJAX request and a normal POST/GET, is the session
cookie not being passed in with the AJAX request.  I could believe that
might happen, and I could also believe it may be different from browser to
browser (don't misunderstand, I have no knowledge of this being the case,
but it wouldn't shock me).

As another poster suggested, I would begin by monitoring the requests
going across in Firefox with Firebug, and perhaps TamperData... you should
be able to see every detail of the request and response with those...
compare an AJAX request with a plain form sumission or link click and see
if you notice any difference... I'd bet dollars to donuts you'll find some
header missing, or something along those lines.

But, unless there's some peculiarity to your server setup or environment,
I can tell you for sure there's no fundamental difference to the server
between the two types of requests, and by extension, to the
servlets/filters that execute to service the request.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Mon, May 21, 2007 2:33 pm, Williams, Allen wrote:
 I had posted this question to four different Java fora over four days
 and gotten zero replies, when it occurred to me how stupid not to ask
 the community that wrote Tomcat.  I was just going to post this, which
 is a summary that describes what I've found so far:

 -- QUOTE --
 In the interest of informing the community, I'm publishing the results
 of four days of testing and debugging of XMLHttpRequests and attributes.
 This has led me to the conclusion that servlets invoked with an
 XMLHttpRequest do not have the same access to server-side objects
 (actually, attributes) as those invoked via the normal URL mechanism. I
 don't know why, because if I insert a filter, the filter gets executed,
 albeit the first time with the wrong session ID.

 I began this odyssey when a filter in place to check if a user's session
 had timed out would fail the first time when invoked with an
 XMLHttpRequest, but would work each time thereafter. What I discovered
 there was that there were two JSESSIONID cookies stored and being sent
 in the browser and the jsp and other servlets were requesting the
 correct one. The xml request was not, it was requesting the (old? I
 don't know) invalid JSESSIONID. One would think, OK, I'll just read the
 cookies in my servlet, check each ID with
 request.isRequestedSessionIdValid(), and force the right one. Wrong.
 All of the http session APIs that allow one to manipulate the session ID
 and force a good one are deprecated, according to Sun's web site, so the
 programmer isn't allowed to find  use a good session ID.

 In order to progress while I waited vainly for a reply, I just removed
 the filter from the servlet's path so it didn't invoke it. I want the
 filter to check, but decided to move on in the meantime. That's when I
 discovered that, evidently, the servlet does not get a valid session ID
 either.

 I had the following line in my XMLHttpRequest servlet:

 [code]
 HttpSession sess= req.getSession();
 [/code]

 This seemed to execute and work fine, until I needed to access
 session-scoped attributes I had defined in other pages or servlets. The
 were repeatedly null. When I changed the above line to this:

 [code]
 HttpSession sess= req.getSession(false);
 [/code]

 the reason was apparent: the servlet was generating a brand new session
 for me. So, for some reason, XMLHttpRequests don't get the same
 treatment that normal servlets get. I'm going to have to go and modify a
 lot of code to pass stuff around as query parameters in URLs, which I
 really don't want to do for both aesthetic  security reasons, but see
 no alternative. Hopefully, there really

Re: PLZ Help with java.net.SocketException: Connection reset

2007-04-30 Thread Frank W. Zammetti
This generally means that the client aborted the connection before the
server completed its response.  Most of the time that means a user
clicking Stop as a page loads, but I have seen it other times due to
resource loading issues.  For example, Dojo, at least through 0.3.1, was
notorious for causing these because of its dependency loading mechanism,
and I never did figure out why.  I've seen it at other times with other
libraries, and my own client-side code, as well.

In any case, they are generally not something you need to be overly
concerned with.  Certainly it's true that they consume resources, if for
no other reason than the JVM needing to deal with the exception, but it's
rare that you can do anything to stop these, and if anyone knows
differently I for one would be extremely interested to hear about it :) 
I've never heard of it being a performance issue or anything like that
(except I guess filling up a log file if its happening *that* much).

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
and JavaScript, DOM Scripting and Ajax Projects
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Mon, April 30, 2007 11:46 am, Lorenzo Jiménez wrote:
 Hello.

 I have this error over and over again, but I have no clue about its
 meaning or where to start?
 Can anyone help me? After the error is my web.xml. I am using Tomcat
 5.5.16.

 Thanks very much,
 Regards,

 Lorenzo

 ERROR
 -

 2007-04-30 00:16:26,395 [http-198.64.153.30-80-Processor34] WARN
 org.apache.catalina.core.ContainerBase.[Catalina].[registro.nacion.com] -
 Exception Processing ErrorPage[errorCode=404,
 location=/paginanoexiste.jsp]
 ClientAbortException:  java.net.SocketException: Connection reset
   at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
   at
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:311)
   at
 org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
   at org.apache.catalina.connector.Response.flushBuffer(Response.java:537)
   at
 org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:286)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
 Caused by: java.net.SocketException: Connection reset
   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
   at
 org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:746)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348)
   at
 org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:769)
   at
 org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:125)
   at
 org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:579)
   at org.apache.coyote.Response.doWrite(Response.java:559)
   at
 org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)
   ... 16 more


 WEB.XML
 ---

 ?xml version=1.0 encoding=UTF-8?
 web-app
   version=2.4
   xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 !-- ** --
 !-- Standard Action Servlet Configuration (with debugging) --
 servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet

Re: Java Web Parts v1.1 Beta 1 released

2007-04-13 Thread Frank W. Zammetti
Hi Anoop,

http://javawebparts.sourceforge.net

Click the Javadocs link, that's the easiest way to see what's available. 
The project is organized as 11 packages, such as javawebparts.filter and
javawebparts.servlet for example, it's usually pretty obvious where things
will be found (and the descriptions on the javadoc summary will usually
point you in the right direction).

hth,
Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Fri, April 13, 2007 10:51 am, Anoop kumar V wrote:
 hey - Where would I find pertinent information about the project. I mean
 suppose I want to look up what all types of filters are available for
 reuse,
 where is that infromations.

 Thanks,
 Anoop

 On 4/8/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

 Hey everyone... just a quick weekend note to those that might be
 interested that Java Web Parts v1.1 beta 1 has been released.  This
 release includes a number of new features as well as a number of bug
 fixes and enhancements to existing functionality (see release notes for
 full list).

 You can download the release, browse documentation, sample apps, etc.,
 at javawebparts.sourceforge.net

 Thanks and take care,
 Frank


 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM/Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Author of Practical Ajax Projects With Java Technology
   (2006, Apress, ISBN 1-59059-695-1)
 Java Web Parts - http://javawebparts.sourceforge.net
   Supplying the wheel, so you don't have to reinvent it!

 -
 To start a new topic, e-mail: [EMAIL PROTECTED]
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java Web Parts v1.1 Beta 1 released

2007-04-13 Thread Frank W. Zammetti
Woops, sorry about that folks... I didn't see the Cc list before I clicked
Reply All.  Didn't mean to cross-reply.

Frank


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Fri, April 13, 2007 11:08 am, Frank W. Zammetti wrote:
 Hi Anoop,

 http://javawebparts.sourceforge.net

 Click the Javadocs link, that's the easiest way to see what's available.
 The project is organized as 11 packages, such as javawebparts.filter and
 javawebparts.servlet for example, it's usually pretty obvious where things
 will be found (and the descriptions on the javadoc summary will usually
 point you in the right direction).

 hth,
 Frank

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM/Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Author of Practical Ajax Projects With Java Technology
  (2006, Apress, ISBN 1-59059-695-1)
 Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

 On Fri, April 13, 2007 10:51 am, Anoop kumar V wrote:
 hey - Where would I find pertinent information about the project. I mean
 suppose I want to look up what all types of filters are available for
 reuse,
 where is that infromations.

 Thanks,
 Anoop

 On 4/8/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

 Hey everyone... just a quick weekend note to those that might be
 interested that Java Web Parts v1.1 beta 1 has been released.  This
 release includes a number of new features as well as a number of bug
 fixes and enhancements to existing functionality (see release notes for
 full list).

 You can download the release, browse documentation, sample apps, etc.,
 at javawebparts.sourceforge.net

 Thanks and take care,
 Frank


 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM/Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Author of Practical Ajax Projects With Java Technology
   (2006, Apress, ISBN 1-59059-695-1)
 Java Web Parts - http://javawebparts.sourceforge.net
   Supplying the wheel, so you don't have to reinvent it!

 -
 To start a new topic, e-mail: [EMAIL PROTECTED]
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 -
 To start a new topic, e-mail: [EMAIL PROTECTED]
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ClientAbort error

2007-04-10 Thread Frank W. Zammetti
FYI, this isn't *always* caused by a user event... in fact, I have an 
application now that exhibits this behavior, under Internet Explorer 
only, during LOADING of the application.  I've always observed the 
don't worry about it philosophy too, and with this particular app it 
doesn't seem to have any ill effect, but I can say with 100% certainty 
it has nothing to do with user actions in this case (it seems to have to 
do with Dojo and how it loads resources, but I haven't had time to try 
and hunt it down).  I've seen it elsewhere too... seems to largely be 
limited to IE, if not exclusive to it, and true, I've never seen it 
cause a problem.


Frank

Mark Thomas wrote:

Propes, Barry L wrote:

anybody know what this error would mean?
 
I'm using TC 4.1.3 by the way.


2007-04-10 16:09:19 StandardWrapperValve[default]: Servlet.service() for 
servlet default threw exception
ClientAbortException:  java.net.SocketException: Software caused connection 
abort: socket write error
 
I noticed this on my logs a few times and hadn't really seen it before. Didn't know why it was occurring.


The user clicked stop in their browser or closed their browser before
Tomcat was finished sending the page to them.

Nothing to worry about.

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



.



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Java Web Parts v1.1 Beta 1 released

2007-04-08 Thread Frank W. Zammetti
Hey everyone... just a quick weekend note to those that might be 
interested that Java Web Parts v1.1 beta 1 has been released.  This 
release includes a number of new features as well as a number of bug 
fixes and enhancements to existing functionality (see release notes for 
full list).


You can download the release, browse documentation, sample apps, etc., 
at javawebparts.sourceforge.net


Thanks and take care,
Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-04 Thread Frank W. Zammetti
On Wed, April 4, 2007 11:21 am, Hassan Schroeder wrote:
 FWIW, I just installed 6.0.10 and dumped in a webapp of mine that
 uses a Filter as a front controller, and it works fine.

 I have both JAVA_HOME and JRE_HOME defined for convenience (so I
 can switch as I test/upgrade versions); right now it's Java  1.6.0-b105
 as
 echo $JAVA_HOME
 /usr/local/jdk1.6.0
 echo $JRE_HOME
 /usr/local/jdk1.6.0/jre

 So I'd say it's not a problem intrinsic to /all/ Filters...

Fair to say... I noticed your not under Windows, which is potentially a
big difference... but in any case, if it was a problem with my filter
itself, I wouldn't expect it to be working in 6.0.9 with the same
environment otherwise... also note I didn't recompile it when moving
between 6.0.9 and 6.0.10, so nothing weird going on there.  I just don't
get it.

Ah well, I've burned enough cycles on it... I can happily continue my real
work under 6.0.9, no problem, but if anyone has any other ideas I'm
certainly interested in hearing them... like I said, I don't know if this
is a Tomcat bug or not, but I certainly can't explain it :)

Frank



 --
 Hassan Schroeder  [EMAIL PROTECTED]

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-03 Thread Frank W. Zammetti
I actually do have the JDK installed, my bad for not stating that
clearly... I was just stating the JRE version that would be used by
Tomcat, since the JRE of course comes with the JDK, but I wasn't clear...
you do raise an intersting point though, I wonder if I have to specify
JRE_HOME anyway?  I can tell you that when I start Tomcat, it reports the
JRE directory as c:\java15, exactly as I expect, so I kind of doubt that's
it.

FYI, I am in fact using the directory structure Tomcat had by default,
which is CATALINA_HOME/lib, and servlet-api.jar is in there... I just
tried creating CATALINA_HOME/common/lib because all the documentation I
found online talks about that directory, and while I figured it was just
documentation not having been updated for the latest version, I figured it
was worth a try.

Bottom line: I have it set up as you say, except for the JRE_HOME env var,
which I tend to doubt will do it (will try when I get home tonight
anyway), but I'm still stuck with the same problem.

As another fact mixed in: I tried a simple test: I dropped to a command
prompt and just tried to compile a simple filter on its own... it failed
because none of the servlet API classes were in the classpath.  This is
good because it proves I don't have a servlet.jar floating around in the
system classpath (I was still hoping the FAQ entry about a stray
servlet-api.jar floating around might be right, but that would seem to
indicate pretty strongly it isn't).

Frank


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Tue, April 3, 2007 3:11 am, Rashmi Rubdi wrote:
 On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 Hey folks... I'm having a real pain of a problem here... vital stats:

 JRE 1.6.0-b105 (JDK 6)
 Tomcat 6.0.10


 Since you have installed the JRE and not the JDK, I suppose you must
 set the JRE_HOME environment variable, and remove the JAVA_HOME
 environment variable.

 On my installation of Tomcat 6.0.10 there is no
 CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
 folder which contains servlet-api.jar by default.

 So I recommend using the default folder structure that came with
 Tomcat 6.0.10 fresh install.

 It should be fine if you have servlet-api.jar which contains the
 javax.servlet.Filter class under
 k:\tomcat6010\lib\




 For completeness, environment variables I have:

 CATALINA_HOME=k:\tomcat6010
 JAVA_HOME=c:\java15
 Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
 ...NO classpath defined...

 I don't think there's any other relevant env vars.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem (looks like a possible Tomcat bug)

2007-04-03 Thread Frank W. Zammetti
I've managed to narrow this problem down quite a bit, and long and short 
of it is that the problem is specific to 6.0.10.


I tried a number of versions in the 6.x branch including 6.0.0, 6.0.4, 
6.0.8 and 6.0.9, and in all of them my webapp starts up just fine, no 
complaints about the Filter class, things work as expected.


In 6.0.10 however, I get the complaint about the Filter class not found. 
 I even went and re-downloaded the 6.0.10 bundle (just the plain zip 
version, not the installer) and the problem was present immediately 
after unzipping and copying my webapp over.


Now, this of course may not be a bug... maybe there's simply something 
about 6.0.10 I don't know that I need to do, in fact I'm hoping and even 
expecting that to be the case, but it's certainly a possible bug too... 
can anyone think of anything that would tell us one way or another?  Thanks!


Frank

Rashmi Rubdi wrote:

On 4/2/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10



Since you have installed the JRE and not the JDK, I suppose you must
set the JRE_HOME environment variable, and remove the JAVA_HOME
environment variable.

On my installation of Tomcat 6.0.10 there is no
CATALINA_HOME/common/lib , but there's only a CATALINA_HOME/lib
folder which contains servlet-api.jar by default.

So I recommend using the default folder structure that came with
Tomcat 6.0.10 fresh install.

It should be fine if you have servlet-api.jar which contains the
javax.servlet.Filter class under
k:\tomcat6010\lib\





For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filter class not found problem

2007-04-02 Thread Frank W. Zammetti
Yes I agree, that's what I thought the problem was too, I was just 
working through eliminating any problems on my part (which is probably 
still the cause, but seemingly in a less than obvious way now)... I 
confirmed the Filter class is in servlet-api.jar, and it's in 
javax/servlet... I also moved that JAR to CATALINA_HOME/common/lib and 
noted that now Tomcat won't even start, so clearly it's using that JAR 
when it's in CATALINA_HOME/lib where it was originally.


I'm at a loss on this one... any other ideas out there?  This is my 
first time using the newer JDK and the newer Tomcat... is there anything 
more one has to do nowadays besides put an exploded webapp in 
CATALINA_HOME/webapps?  Could this be some funky classloader issue 
somehow?  Thanks!


Frank

Pulkit Singhal wrote:

Hello Frank,

It seems to me that the error is not so much about the Filter you want to
load but the fact that it can't find the javax/servlet/Filter class 
which is

(I think) supposed to be part of the servlet-api.jar ... I know you said
that its bundled but try moving that jar around. Or at least crack open 
that
jar in winzip or list the files using the jar command to make sure it 
really

does have the javax.servlet.Filter class.

On 4/1/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:


Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10

I have a filter that compiles fine but will not initialize... error that
appears on Tomcat startup:

Apr 2, 2007 1:04:38 AM 
org.apache.catalina.core.StandardContextfilterStart

SEVERE: Exception starting filter MasterControlFilter
java.lang.NoClassDefFoundError: javax/servlet/Filter
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
...and so on...

The filter is contained within a JAR in my webapp's WEB-INF/lib
directory.  I've verified the filter is in the correct package, and that
web.xml specifies the correct class name.

I've spent about an hour Googling, and I've found numerous references to
seemingly similar problems, but no answers... I've verified that there
is no other servlet-api.jar floating around... I did notice a number of
places that said servlet-api.jar should be in CATALINA_HOME/common/lib,
but it's in CATALINA_HOME/lib in my installation (that's how it came out
of the distro)... I assume that's just some old documentation I'm
finding, but maybe not?

For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.  Can anyone point me
in the right direction?  I'm pretty well stuck at the moment until I get
this resolved.  Thanks!

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
(2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Filter class not found problem

2007-04-01 Thread Frank W. Zammetti

Hey folks... I'm having a real pain of a problem here... vital stats:

JRE 1.6.0-b105 (JDK 6)
Tomcat 6.0.10

I have a filter that compiles fine but will not initialize... error that 
appears on Tomcat startup:


Apr 2, 2007 1:04:38 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter MasterControlFilter
java.lang.NoClassDefFoundError: javax/servlet/Filter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
...and so on...

The filter is contained within a JAR in my webapp's WEB-INF/lib 
directory.  I've verified the filter is in the correct package, and that 
web.xml specifies the correct class name.


I've spent about an hour Googling, and I've found numerous references to 
seemingly similar problems, but no answers... I've verified that there 
is no other servlet-api.jar floating around... I did notice a number of 
places that said servlet-api.jar should be in CATALINA_HOME/common/lib, 
but it's in CATALINA_HOME/lib in my installation (that's how it came out 
of the distro)... I assume that's just some old documentation I'm 
finding, but maybe not?


For completeness, environment variables I have:

CATALINA_HOME=k:\tomcat6010
JAVA_HOME=c:\java15
Path=c:\java15\bin;k:\tomcat6010\bin;x:\classes\apache-ant-1.7.0\bin
...NO classpath defined...

I don't think there's any other relevant env vars.  Can anyone point me 
in the right direction?  I'm pretty well stuck at the moment until I get 
this resolved.  Thanks!


Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat5.5/Ajax problem, XmlHttpRequest.status = 0 (statusText = Unknown)

2007-03-11 Thread Frank W. Zammetti
Shouldn't be any issues,  do it all the time with 5.5... have you used 
something like HTTPWatch or even good ole' Firebug to see the request 
going through and the actual response?  Chances are that would be rather 
revealing.


Frank

Mike Broadbear wrote:

Hi,
I'm getting an error when I make Ajax calls with my web app on Tomcat 5.5 
(XmlHttpRequest.status = 0 (statusText = Unknown)). It was working, now it does 
not. I have tried to copy other working code into the web app, but I get the 
same errors. I was just wondering if there we re any known issues with Ajax and 
Tomcat 5.5?
 
Thanks

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Standards Complaint Browser Campaign

2007-01-07 Thread Frank W. Zammetti

Christopher Schultz wrote:

If you stay away from the innerHTML attribute (which only works in
MSIE, so you're probably not using it) and instead use the methods
Document.createElement and node.add and node.insert, then you'll be fine.


This is false.  innerHTML is supported by most current browsers.  Try 
this, just click the button:


htmlheadtitle/title/headbody
div id=divTest/div
input type=button
  onClick=document.getElementById('divTest').innerHTML='It works';
/body/html

Works in IE, FF and Opera at least, I don't have a Mac to try in Safari 
but I'd bet it works just fine.  I can't testify as to what the minimum 
version of each browser that supports it is... I don't think it's 
exactly new for FF or Opera though, I suspect you'd find the above works 
in FF 1.0 though, and Opera back probably a few versions too.


You would be correct to say innerHTML is not a standard (other than de 
facto perhaps), but to say it doesn't work in anything but IE is just 
not correct.



Users of browsers like NN 4, MSIE 4, and some others might be left out
in the cold. My advice on that is to make sure that you are only using
javascript as added flavor, and to ensure that a non-javascript user can
still accomplish everything (even if it is a bit less convenient).


That's true about older browsers being left out in the cold, but at some 
point I think it's perfectly legitimate to stop supporting older 
versions.  I don't think it's an egregiously bad move to not support 4.x 
browsers at this point.  I think it's telling that a Google search for 
browser statistics, and then checking out the results on the first 
page, most of the statistics lists don't even mention anything older 
than 5.x browsers, and those that do show sub-1% usage levels.  So, I 
for one am not losing any sleep by not supporting anything older than 
5.x browsers :)



- -chris


Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Standards Complaint Browser Campaign

2007-01-07 Thread Frank W. Zammetti

Christopher Schultz wrote:

No question. All my apps from the last few years use reasonably recent
standards such as CSS and XHTML. Most old browsers render XHTML just
fine, and sadly CSS isn't perfect across compliant browsers even
today. But if you're using NN 4, it's just time to upgrade, dude ;)


My dad started using a computer I'd say maybe 5 years ago... still 
doesn't do much except surf the web and manipulate photos (he's actually 
gotten really good at that)  He has this annoying habit of only running 
Windows 95 and Netscape *3*!  I just can't convince the man to switch to 
anything else!  Trying to get to anything on his computer is as 
frustrating as can be: 500 error popups, partially rendered pages at 
best, etc. (oh yeah, and after he installs Windows, he has a mental 
checklist of all sort of things to remove... he's always bragging yep, 
I got Windows down to 2Mb, or whatever size it is, I don't really 
remember, but a very small install is the point)


Frank


- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFoRf39CaO5/Lv0PARAoeKAJ4hixOpkRiVRcdd8trbPHoxCaYQmACgrf5c
JPBCunbZAnOr5vdUxl0Dpbo=
=mHn6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [ANN] Java Web Parts 1.0 (GA) is now available

2007-01-02 Thread Frank W. Zammetti
Hi Martin,

We should move to the JWP mailing list for this, and I sent this reply to
there as well... we wouldn't want to be using any Apache lists for
something we shouldn't be (I've been told announcements of JWP releases
are fine, but discussions, unless related to Struts or Tomcat in
particular, probably aren't).  I hope you'll join us on that list if you
aren't already signed up, these are points worth dicussing :)

Frank


On Tue, January 2, 2007 11:34 am, Martin Gainty wrote:
 Good Morning Frank

 3 items for suggestion box
 suggest ant javawebparts/WEB-INF/src/build.xml doesnt seem to include
 dependencies e.g
 target name=make_jars depends=compile
 suggest placing target to build war file target
 suggest bin distro to have some samples.war already packaged much like
 struts

 Also what are the implications for including legacy 1.2 ajax tags (is
 there
 a userguide available)
 is there a reconfiguration necessary?

 Good Stuff!!!

 Martin--

 __
 Disclaimer and confidentiality note
 Everything in this e-mail and any attachments relates to the official
 business of Sender. This transmission is of a confidential nature and
 Sender
 does not endorse distribution to any party other than intended recipient.
 Sender does not necessarily endorse content contained within this
 transmission.

The Java Web Parts (JWP) team is proud to announce that new year's day
 sees
our first GA release, 1.0, unleashed upon the world!

For those of you new to JWP, it is a project that provides small,
 reusable
and largely independant Java components of interest to all web
 application
developers. You can think of this project as being somewhat similar to
 the
Jakarta Commons projects conceptually.

JWP is comprised of a number of packages, each supplied in its own
individual JAR, with little (ideally no) cross-dependency. The packages
currently include:

* AjaxParts - A collection of components for doing AJAX, including the
 very
popular AjaxParts Taglib (APT Taglib)

* Context - A collection of components for dealing with a servlet context
including functionality to calculate the size of the context object

* Filter - A collection of useful servlet filters including a Javascript
compressor, a request recorder, a cross-site scripting filter, a
compression filter and an IP access control filter

* Listener - Context and Session listeners for various occassions
 including
functionality to limit the number of concurrent sessions

* Misc - Things that didn't fit anywhere else, including a very powerful
CoR implementation and a utility to play back recorded sessions created
with the session recorder filter (useful for automated load testing)

* Taglib - Various tag libraries including some UI widgets, string
utilities and a taglib to insert various useful Javascript functions

* Servlet - A collection of servlets to fulfill common needs including
 one
that can render a graphical representation of a string of text using
various font styles

* Request - Classes and functions for dealing with an HTTP request
including functions to get various information about a request easily

* Response - Classes and functions for dealing with an HTTP response
including functionality to encode HTML entities in the response

* Session - Classes and functions... eh, you see the pattern! (includes
 the
ability to calculate the size of session, etc)

Please visit http://javawebparts.sourceforge.net for further info, docs,
downloads, all that jazz.

We now return you to your regularly scheduled mailing list posts and wish
every a happy new year!

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
  (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 _
 The MSN Entertainment Guide to Golden Globes is here.  Get all the scoop.
 http://tv.msn.com/tv/globes2007/


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Java Web Parts 1.0 (GA) is now available

2007-01-01 Thread Frank W. Zammetti
The Java Web Parts (JWP) team is proud to announce that new year's day 
sees our first GA release, 1.0, unleashed upon the world!


For those of you new to JWP, it is a project that provides small, 
reusable and largely independant Java components of interest to all web 
application developers. You can think of this project as being somewhat 
similar to the Jakarta Commons projects conceptually.


JWP is comprised of a number of packages, each supplied in its own 
individual JAR, with little (ideally no) cross-dependency. The packages 
currently include:


* AjaxParts - A collection of components for doing AJAX, including the 
very popular AjaxParts Taglib (APT Taglib)


* Context - A collection of components for dealing with a servlet 
context including functionality to calculate the size of the context object


* Filter - A collection of useful servlet filters including a Javascript 
compressor, a request recorder, a cross-site scripting filter, a 
compression filter and an IP access control filter


* Listener - Context and Session listeners for various occassions 
including functionality to limit the number of concurrent sessions


* Misc - Things that didn't fit anywhere else, including a very powerful 
CoR implementation and a utility to play back recorded sessions created 
with the session recorder filter (useful for automated load testing)


* Taglib - Various tag libraries including some UI widgets, string 
utilities and a taglib to insert various useful Javascript functions


* Servlet - A collection of servlets to fulfill common needs including 
one that can render a graphical representation of a string of text using 
various font styles


* Request - Classes and functions for dealing with an HTTP request 
including functions to get various information about a request easily


* Response - Classes and functions for dealing with an HTTP response 
including functionality to encode HTML entities in the response


* Session - Classes and functions... eh, you see the pattern! (includes 
the ability to calculate the size of session, etc)


Please visit http://javawebparts.sourceforge.net for further info, docs, 
downloads, all that jazz.


We now return you to your regularly scheduled mailing list posts and 
wish every a happy new year!


Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Servlet in a .jar file? AJAX access?

2006-10-14 Thread Frank W. Zammetti
Yes, certainly you can put a servlet in a JAR... after all, Struts is 
based on a servlet, and you generally just drop the Struts JAR into your 
webapp... accessing a servlet via AJAX is, in simplest terms, just a 
plain old HTTP request like any non-AJAX request, so yes, you can do 
that too.


If your servlet is in a JAR, and that JAR is in the classpath, then all 
you need to do is put the appropriate entries in web.xml and your off to 
the races... if you want to call it via AJAX, that works just fine too, 
if you just pass simple name/value pair parameters.


Does that answer your question, or did I misunderstand?

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

Jon Yeargers wrote:
Is it possible to put a servlet in a .jar file and be able to access it 
via AJAX?


I have some support servlets that I want to share via a common library. 
To this point Ive only been putting session beans in there. Its easy to 
point to those using 'jsp:usebean' tags and entries in 'web.xml'. Can I 
do something similar to a servlet such that I can get to it via an 
XMLHttpRequest object?


Jon

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need Help w. Servlets And The JDBC.

2006-09-20 Thread Frank W. Zammetti

Google is your friend... here's a quick hit:

http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/cjvjdbas.htm

...and another (although slightly older, still looks to be valid)...

http://www.cs.bham.ac.uk/~aps/syllabi/2004_2005/issws/h01/jdbc.html

...and yet another...

http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html

This last one might be the best, but all three should do the trick. 
There is no fundamental difference between using JDBC from a servlet vs. 
a straight Java app.


Frank

Steve R Burrus wrote:
Hi all. I am an admitted newbie when it comes to using a database 
connection for a servlet to access. So can someone please tell me the 
basics about how exactly I should go about doing this?? I have been very 
much stumped about how I should do this for quite a long time now! I 
just know that I should use 1 of 3 getConnection( ) methods to start to 
do this and create a Connection object but little else.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to forward user to a page after container manager authntication ?

2006-09-10 Thread Frank W. Zammetti
Container-managed authentication works by intercepting a request for a 
protected (constrained) resource and redirecting to the page with the 
logon form.  Once the user authenticated, the request for the 
constrained resource continues, in effect, the user is forwarded to 
what they requested in the first place.  Therefore, to do what you want, 
the request that results in the logon page being shown should be for 
login_done (JSP? .do?)  Make that the default document in web.xml if 
that's what you need.


Frank

legolas wrote:

Hi
Thank you for reading my post
how i can forward user to an specefic page after he/she successfully
authenticated using form based authentication?
if user fail to provide a wrong user/pass then he/she will be forwarded to
login_error page , what if i need user to be forwarded to login_done after
he/she logged in suggessfully ?

thanks.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: decompiling classes

2006-09-07 Thread Frank W. Zammetti

Umm, the command to decompile Tomcat's classes is this:

http://tomcat.apache.org/svn.html

;)

Frank

Nicholas Irving wrote:
I know the software you mean, it is completely free, but I have a guide 
that

I can sell to you for $19.95 that tells you where to download it from and
contains commonly available documentation convert into a PDF for you to
read.

So you want my PayPal account so that you can deposit the money and then
enjoy the world of decompiling java classes.

NIrving

On 08/09/06, Propes, Barry L [EMAIL PROTECTED] wrote:


what's the command again for decompiling Tomcat's classes? Or was there
special software needed to do so?






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of Practical Ajax Projects With Java Technology
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

2006-07-26 Thread Frank W. Zammetti

Hi everyone,

I've gotten a number of requests for an article on AjaxParts Taglib, and 
I finally got around to writing it :)  You can check it out here:


http://www.omnytex.com/articles

If you have never heard of AjaxParts Taglib before, in brief, AjaxParts 
Taglib, a component of the Java Web Parts Project 
(http://javawebparts.sourceforge.net), is a taglib that allows for easy, 
declarative, event-driven AJAX, allowing a developer to add AJAX 
capabilities to existing or new webapps without the need to write ANY 
JavaScript at all!  This article demonstrates how it works, explains the 
benefits, and goes into some details about the capabilities it offers 
out-of-the-box, as well as the ways in which it can be extended to 
fulfill far more advanced users.


Hope it is helpful, and take care!

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

2006-07-26 Thread Frank W. Zammetti

Thanks Michael, I appreciate you taking the time to look!

Excellent question... the answer is that the code that APT writes into 
the onClick handler for the button will append itself onto whatever is 
there already, it WILL NOT overwrite your existing code.  This wasn't 
always true, but is as of a couple of versions ago :)


FYI, if you were going where I think you might have been going... you 
can't use this to abort the request.  For instance, you might expect that...


if (!shouldAJAXRequestFire())) { return; }

...would stop the request form firing, since the APT code would follow 
this.  But, it doesn't work.  I'm actually a little surprised by that, I 
had to go try it to be sure... I guess the JS interpreter doesn't treat 
what's in onClick like a function, it's instead just a collection of 
statements that it interprets, return not aborting that interpretation.


However, it is already on our to-do list to provide this ability... we 
already have the preProc that gets called before the request, we'll 
probably examine the return from that and if false, abort the request. 
We also were thinking of adding an if child element under the event 
element where you could put a Javascript snippet, and if it returns 
false, that aborts the request.  Not sure which way we'll go yet (maybe 
both)... there is a feature request on the SF site, if anyone has an 
opinion, I'd love to have it recorded :)


Frank

Michael Jouravlev wrote:

On 7/26/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

Hi everyone,

I've gotten a number of requests for an article on AjaxParts Taglib, and
I finally got around to writing it :)  You can check it out here:

http://www.omnytex.com/articles

If you have never heard of AjaxParts Taglib before, in brief, AjaxParts
Taglib, a component of the Java Web Parts Project
(http://javawebparts.sourceforge.net), is a taglib that allows for easy,
declarative, event-driven AJAX, allowing a developer to add AJAX
capabilities to existing or new webapps without the need to write ANY
JavaScript at all!  This article demonstrates how it works, explains the
benefits, and goes into some details about the capabilities it offers
out-of-the-box, as well as the ways in which it can be extended to
fulfill far more advanced users.

Hope it is helpful, and take care!

Frank


Frank,

great stuff! I haven't read the whole article yet :-) so just a quick 
question:


say I have this button:

input type=button value=Click me for AJAXajax:event
ajaxRef=MyFunctions/Button1 /

and I defined the onclick event in ajaxConfig.

What will happen if I define another onclick handler right in the
input element like

input type=button value=Click me for AJAX onclick=return
doMyCustomStuff();ajax:event ajaxRef=MyFunctions/Button1 /

Basically, how do you handle custom Javascript?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Java Web Parts Beta 5

2006-07-03 Thread Frank W. Zammetti
After a few months off, the Java Web Parts (JWP) team is proud to 
announce the release of beta 5!


The most notable change is that the taglib formerly known as AjaxTags is 
now known as the AjaxParts Taglib, or APT for short.  Not only is the 
name different, but the taglib has been essentially rewritten and is now 
easier and yet more powerful than ever...  If a declarative approach to 
AJAX that doesn't require you to know a bit of Javascript (unless you 
want to get into it) sounds good to you, now is a great time to check 
out what APT has to offer!


There are other additions as well, and as always, JWP provides a number 
of useful parts, such as servlets, filters, taglibs, utility classes, 
and so forth.  Things like getting the size of a session object, a 
powerful CoR implementation, filters to limit concurrent sessions, guard 
against XSS exploits and disallow app access during defined time 
windows, a class to make application configuration simple, a servlet to 
dynamically render a text of string as an image, a taglib that renders 
very handy Javascript functions, some GUI widgets... all of this can be 
found in JWP, and plenty more!


If this sounds interesting to you, have a look:

http://javawebparts.sourceforge.net

And for you Maven folks, JWP can now be found in the iBiblio repo! 
(beta4 at this point only though)


Thanks, and have a great day!

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts-config xml file throws a java exception

2006-06-07 Thread Frank W. Zammetti
Olivier, can you post your struts-config.xml file here, or is it too
large?  You also may want to move this over to the Struts @user list,
chances are its more appropriate there.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:06 pm, Olivier Bex wrote:
 Hi everyone,



 When I start Tomcat 5.0.28, it says that I have a parsing error in my
 struts-config.xml, but I think it's not.

 The log file throws a java.lang.NoSuchMethodException : bean has no
 property
 named loginRequired



 Regards,



 Olivier BEX




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: struts-config xml file throws a java exception

2006-06-07 Thread Frank W. Zammetti
Olivier, what version of Struts are you using?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:34 pm, Olivier Bex wrote:
 Hi Frank, thanks for the advice. I have sent a mail to struts users.

 Here is my struts-config.xml :

 - struts-config
 - data-sources
 - data-source
   [...]
   /data-source
   /data-sources
 - form-beans
   [...]
   /form-beans
 - global-forwards
   forward name=login path=/login.jsp /
   /global-forwards
 - action-mappings
 - action path=/Login type=com.eyrolles.LoginAction validate=true
 input=/login.jsp name=loginForm scope=request
   forward name=success path=/EmployeListe.do /
   /action
 - action path=/EmployeListe type=com.eyrolles.EmployeListeAction
 scope=request
   set-property property=loginRequired value=true /
   forward name=success path=/employeliste.jsp /
   /action
 - action path=/Add type=com.eyrolles.AddEmployeAction
 name=employeForm scope=request input=/addemploye.jsp
 validate=true
   set-property property=loginRequired value=true /
   forward name=success path=/EmployeListe.do /
   forward name=error path=/addemploye.jsp /
   /action
 - action path=/Edit type=com.eyrolles.GetEmployeAction
 name=employeForm scope=request validate=false
   set-property property=loginRequired value=true /
   forward name=success path=/editemploye.jsp /
   forward name=error path=/EmployeListe.do /
   /action
 - [...]
   /action-mappings
   message-resources parameter=com.eyrolles.ApplicationResources /
   /struts-config

 -Message d'origine-
 De : Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Envoyé : mercredi 7 juin 2006 18:07
 À : Tomcat Users List
 Cc : users@tomcat.apache.org
 Objet : Re: struts-config xml file throws a java exception

 Olivier, can you post your struts-config.xml file here, or is it too
 large?  You also may want to move this over to the Struts @user list,
 chances are its more appropriate there.

 Frank

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 AIM: fzammetti
 Yahoo: fzammetti
 MSN: [EMAIL PROTECTED]
 Java Web Parts -
 http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Retrieve certain session data inside a servlet

2006-06-02 Thread Frank W. Zammetti
I may be wrong about this, but I thought that it was expressly forbidden 
by the servlet spec to be able to get arbitrary sessions.  That is, even 
if you store the session ID in some table, you wouldn't be able to get 
any session other than that associated with the current request.


Now, that refers to standards-compliant ways to do it... I'm sure most 
app servers give you their own way to pull it off... JMX pops to mind as 
a likely possibility.


(unless I'm wrong-LOL)

Frank

Eric Haszlakiewicz wrote:

On Fri, Jun 02, 2006 at 11:15:03AM +0200, Carlos Alonso Vega wrote:

Bob,

Thanks for the reply. My problem is that the session info I need is not 
of the session that makes the request. I need to check other sessions in 
the same context.  I can use the request because it is in the same 
context, so the manager is the same.


This servlet is called internally from the app, and checks if some 
session exists. It is similar to the case of obtaining all active 
sessions from one context using the manager inside the servlet code 
(findSessions). If someone have this piece of code (or similar), it will 
serve me.


To do something like that you need to do it yourself.  i.e. store a
HashTable in the application context, then add and remove sessions to
it when people login and logout, or at some other convinient time.
Of course, this assumes your app isn't running in a distributed environment.
If it is, then it's impossible to get a session object from a different
JVM.  (well, you could serialize it and transfer the data, but it won't
be the same object and it won't be useful for much other than extracting
some info)

eric

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



.



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: stylesheets giving 404 after a long response time

2006-05-09 Thread Frank W. Zammetti
A 20 minute response time?  Before I worried about why the stylesheet 
gets a 404, I'd solve that :)  Trying to hold an HTTP connection open 
that long is a recipe for all sorts of problem (proxy timeouts, browser 
timeouts, etc).


Is Tomcat serving the stylesheet, i.e., no web server in front of it? 
I'm wondering if session timeout isn't playing role somehow (not sure 
how it would, but with a request time that long, not very much would 
surprise me).


Frank

Vivek Mohan wrote:

Hi People,

I've an application running on tomcat 4.1. In one particular request,
I could find that the server response takes a long time, say around 20
minutes, and when the page comes back all the stylesheets and header
jsps are missing from the page. If I check my access logs, I see a 404
response for all the inclusions into the main jsp.

Can anyone tell me how to solve this issue, or how to go about 
investigating it?


--
Vivek.

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: stylesheets giving 404 after a long response time

2006-05-09 Thread Frank W. Zammetti
I'm not sure, it's just one of those things that seems fishy to me... I 
would *logically* think it has nothing to do with it, or at least if it 
did, I definitely would not expect a 404... but I also know that logic 
frequently has nothing to do with solving problems like this :)


If the timeouts are far longer than 20 minutes though (Infinite?  Didn't 
know you could do that actually), then it wouldn't think that's the 
problem.  Even still, 20 minutes for a request, I'd *still* be inclined 
to think that's the root cause of the problem somehow.


Frank

Vivek Mohan wrote:

Yes, its Tomcat which is serving the resources. And I've made the
timeouts to be infinity for my application so I don't think timeouts
would be occurring. But in any case how does a timeout affect the
fishing out of stylesheets?

--
Vivek.

On 5/10/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:

A 20 minute response time?  Before I worried about why the stylesheet
gets a 404, I'd solve that :)  Trying to hold an HTTP connection open
that long is a recipe for all sorts of problem (proxy timeouts, browser
timeouts, etc).

Is Tomcat serving the stylesheet, i.e., no web server in front of it?
I'm wondering if session timeout isn't playing role somehow (not sure
how it would, but with a request time that long, not very much would
surprise me).

Frank

Vivek Mohan wrote:
 Hi People,

 I've an application running on tomcat 4.1. In one particular request,
 I could find that the server response takes a long time, say around 20
 minutes, and when the page comes back all the stylesheets and header
 jsps are missing from the page. If I check my access logs, I see a 404
 response for all the inclusions into the main jsp.

 Can anyone tell me how to solve this issue, or how to go about
 investigating it?

 --
 Vivek.

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





--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: How i can exclude a url pattern for a filter ?

2006-04-29 Thread Frank W. Zammetti

Take a peak at the code for some of the filters in Java Web Parts:

http://javawebparts.sourceforge.net

All of our filters implement a mechanism by which you can include or 
exclude paths, and you can also define multiple paths (a simple 
comma-separated list).  The matching and configuration is externalized 
in a FilterHelpers class that you are of course welcome to use for your 
own filters.


Of course, this will only help if you are talking about your own filters 
that you can modify.


Frank

Legolas Woodland wrote:

Hi
Thank you for reading my post
I have defined a filter in my web.xml and for some of my pages it should 
be applied but not for all of them.
for example i should exclude a subdirectory like : webroot/s/ from this 
filter

but filter should be applied for  other subdirectory and files .

can some one tell me how i should configure it ?


My current filter mapping :

   filter
   filter-nameChecker/filter-name
   filter-class
   com.leg.checker
   /filter-class
   /filter

   filter-mapping
   filter-nameChecker/filter-name
   url-pattern/*/url-pattern
   /filter-mapping


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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: j_security_check is there a way to force users to renew password

2006-04-26 Thread Frank W. Zammetti

Hi Ferindo,

No, there is not.  j_security_check implements simple container-managed 
authentication (sometimes called J2EE security), and that does not 
include password management of any sort.  At work for instance, we have 
built a whole security framework on top of J2EE security to deal with 
just the kinds of things you are talking about.  I'm afraid you'll have 
to do the same, or look around for a project that already has (I'm not 
aware of any off-hand).


Frank

Ferindo Middleton wrote:

Is there a way to force users to renew their password or enforce password
rules using the native j_security_check authentication mechanisms of tomcat?

Ferindo



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: using digester from within a servlet

2006-04-24 Thread Frank W. Zammetti

Christopher Piggott wrote:

Frank W. Zammetti [mailto:[EMAIL PROTECTED] writes ...

It looks to me like your ObjectCreate rule is incorrect...
I believe the class you reference must be the fully-qualified name.


That set me on the right track - thank you.  My ObjectCreate rule was actually 
OK because I specified the Class itself, not the name of the class as a String:

digester.addObjectCreate(config/xdb-config, XdbConfig.class);


Ah cool, I wasn't aware of that version of it.  Nice, I like that 
better.  I guess we both learned something :)  Thanks!


Frank

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



Re: is there a possibility to define the startup order for webapps?

2006-04-24 Thread Frank W. Zammetti
One could envision a rather complex and somewhat funky solution to 
this... I'm not so sure I'd recommend it, but in the interest of 
creative thinking...


(1) Add a context parameter isAppRunning to the webapp, initially set to 
false.


(2) Create a filter that is mapped to handle all requests.  It checks 
the value of isAppRunning, and redirects to some page if the value is 
false.


(3) Create a ContextListener that fires off a daemon thread.

(4) The daemon thread makes a simple request to some predefined URL of 
the other webapp.  If it does not get the response it expects, it sleeps 
for a second or two and then tries again.


(5) When the daemon thread gets the reply it expects, it sets 
isAppRunning to true and dies.


Now, add this all to the master webapp, that is, the one that depends 
on the other.  All requests should be blocked and redirected to the page 
of your choice until the webapp it depends on returns that OK reply.  I 
could envision this being done with a number of webapps, forming a 
dependency chain not unlike depends in Ant.


Will it work?  I think so, but I just made it up, so who knows :)

Frank

SOA Work wrote:

argh. annoying.
ok. thx anyway.


-Ursprüngliche Nachricht-
Von: Tomcat Users List users@tomcat.apache.org
Gesendet: 24.04.06 17:57:49
An: Tomcat Users List users@tomcat.apache.org
Betreff: Re: is there a possibility to define the startup order for webapps?




A couple of other ideas:

Use a small shared class (in shared/lib) to keep track of whether the
database is running. The first webapp notifies this class when it's
ready, and the second webapp checks if the database is ready before
using it.

Or, just accept that database errors will occur during startup. This
is not a bad solution. From a user's point of view, when the server is
down all requests will return some kind of error, until the server is
back up and running. The only thing you can hope to gain is a better
error message for a few seconds during startup.
--
Len


On 4/24/06, David Smith [EMAIL PROTECTED] wrote:

This question comes up every so often and the answer is always no. The
webapp load order cannot be relied upon. In your case, might I suggest
the database webapp be run on a separate instance of tomcat?  Can the
connection be done via TCP/IP?

 --David

SOA Work wrote:

Hi there,

I'm currenttly using tomcat 5.x for running my webapps. Now I have the 
following problem:

I'm using an database system which runs as webapplication inside tomcat.
Another webapplication needs the database connection for startup.
Everytime I restart tomcat the server doesn't get up, because the second webapp 
ist started before the database webapp.

Is there a way to define the startup order of the webapplications deployed on a 
server?
With wich system does tomcat choose the apps while startup? Could it be a 
possibility to rename the folder of the webapps?

thx
Dominik
___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


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




--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
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]




___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: using digester from within a servlet

2006-04-23 Thread Frank W. Zammetti
It looks to me like your ObjectCreate rule is incorrect... I believe the 
class you reference must be the fully-qualified name.  For instance, 
look at this source as an example:


http://cvs.sourceforge.net/viewcvs.py/javawebparts/javawebparts/WEB-INF/src/javawebparts/taglib/ajaxtags/AjaxInit.java?view=markup

Here you see lines like:

digester.addObjectCreate(ajaxConfig/handler,
  javawebparts.taglib.ajaxtags.config.AjaxHandler);

Although I can't find anyplace in the documentation where it's 
explicitly stated (I'm betting I'm just missing it though), looking at 
the Digester Javadoc here:


http://jakarta.apache.org/commons/digester/commons-digester-1.7/docs/api/

The example code also shows fully-qualified names.  The same looks to be 
true of setNext by the way, and I suspect anywhere a class name is 
required.


Give that a try and see if it solves your problem.  I can tell you wish 
certainty that I've used Digester in a servlet under Tomcat and not had 
any problems.


Frank

Marc Farrow wrote:

I have no knowledge of digesters, but if you are wanting Tomcat (the engine
itself) to use a class, then it has to be in the common/lib folder and not
deployed with the webapp.   Not sure if this is the direction you want to go
or not.

hth


On 4/23/06, Christopher Piggott [EMAIL PROTECTED] wrote:


Hi,

My goal is to use digester within a servlet, to parse a configuration
file.
When running within the servlet context digester is unable to find the
classes specified by my rules.  For example, I have this set of rules to
process an element xdb-config which occurs within a config element:

  digester.addObjectCreate(config/xdb-config, XdbConfig.class);
  digester.addSetProperties(config/xdb-config, database-name,
databaseName);
  digester.addSetNext(config/xdb-config, addXdbConfig, XdbConfig);

What I get is this:

Apr 23, 2006 10:21:29 PM org.apache.commons.digester.CallMethodRule
setDigester
SEVERE: (CallMethodRule) Cannot load class XdbConfig
java.lang.ClassNotFoundException: XdbConfig


I get this other places as well.  One of the things I find odd is that
this
error occurs after the above one in the error log:

Apr 23, 2006 10:21:29 PM org.apache.commons.digester.CallMethodRule
setDigester
SEVERE: (CallMethodRule) Cannot load class Config
java.lang.ClassNotFoundException: Config


Basically, the class loader seems to be able to load my classes from
within
my own classes, but NOT from the digester.  What I don't understand is how
that's possible when the required classes are clearly within the
classpath;
I upload them to tomcat as a .war and they are all exploded into
WEB-INF/classes.  I can't see how this could not be in the classpath and
therefore not found by the digester.

--Chris



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





--
Marc Farrow


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: Container-Managed Password Expiration/Strength enforcing?

2006-04-07 Thread Frank W. Zammetti

Hi Renny,

I'm relatively sure Tomcat does not offer anything like this.  I know at 
work, we faced the same issues and developed a whole Security Framework 
to sit on top of J2EE security.  We're actually a Websphere shop, but 
Websphere doesn't offer those capabilities either.  That doesn't 
automatically mean Tomcat doesn't of course, but I'm fairly sure it doesn't.


Frank

[EMAIL PROTECTED] wrote:

I am running Tomcat 5.5.12. I Use the sever's container-managed authentication 
mechanisms to require authentication for my web application users' credentials 
via forms. The users' ids and passwords
are stored on an MySQL database.

My question is, is there a way of configuring the server to require users to 
change their passwords every now and then enforce rules to require users to 
make their passwords strong? This doesn't seem to be
documented in anywhere. I know that the source code is available but I don't 
know anything about the inside of Tomcat and wouldn't know where to begin for 
coding this myself.

Renny

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



.



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Re: connection pool

2006-03-29 Thread Frank W. Zammetti
I don't believe such a driver exists... I'd be interested myself if I'm 
wrong.  I believe you'll have to use the jdbc:odbc bridge driver.


Frank

red phoenix wrote:

Where can I get JDBC driver for Microsoft Access2000?

Thanks


On 3/30/06, Farrow, Marc [EMAIL PROTECTED] wrote:

same as everything else.  You will need a JDBC driver for Microsoft
Access2000 and point your connection pooling in the server.xml to that
driver.  How you obtain the driver is another bear.

-Original Message-
From: red phoenix [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 29, 2006 10:43 PM
To: users@tomcat.apache.org
Subject: connection pool


I know Tomcat5 supply some connection pool for oracle,sql and so on.Now  I
want to use Microsoft Access2000 Database,I don't know how to do it
through
tomcat connection pool. Any body can give me a example code for Microsoft
Access2000 Database configure under Tomcat5 connection pool?
Thanks in advance!

Best regards,
Edward


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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



Somewhat OT: Multiple auth methods in one webapp?

2006-03-16 Thread Frank W. Zammetti
Hello... I marked this Somewhat OT because what I'm trying to accomplish
would ultimately be running in Websphere.  However, I would like to
develop it under Tomcat as I've always done, and it's also a general
webapp question...

I have an existing webapp that uses form-based authentication.  Now I'm
being asked to expose some Web Services from it, and I'm thinking of using
AXIS.  However, one of our requirements is that HTTP be secured with basic
auth.

Ideally I would like to add AXIS to my existing webapp, but it doesn't
seem possible to use both auth forms in a single webapp.  In a perfect
world I could continue to secure the user-accessible app with form-based
auth, but secure just the path to the AXIS-based services via basic auth. 
I'm thinking the only way is to have a second webapp, but can anyone think
of another solution?  Thanks!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



RE: Somewhat OT: Multiple auth methods in one webapp?

2006-03-16 Thread Frank W. Zammetti
On Thu, March 16, 2006 12:48 pm, Jay Burgess said:
 I pursued a very similar exercise last week. I have a webapp using BASIC
 authentication and wanted to add in an RSS interface that used DIGEST
 authentication.  Unfortunately, I never could figure out how to do this in
 a
 single webapp.  I figured I'd chime in, though, as I think it'd be a nice
 feature if it's not already possible.

Thanks Jay, I appreciate knowing at least that I'm not alone :)

Do you know, or does anyone else know, where the server looks for the
credentials when the challenge box has been submitted?  In other words,
does the entered username and password get passed as a specific header or
a request parameter?  Obviously 5 minutes of Googling would find me the
answer, but since we're already here... :)

I'm thinking that it shouldn't be at all difficult to write a
BasicAuthFilter (assuming one doesn't already exist) for doing this, which
would allow both of us to do what we want.  Should be a simple matter of
(a) sending back a 401 if no credentials are supplied, or (b) calling on
the security provider to authenticate if they are.  I would add such a
filter to Java Web Parts, and with the expanded mapping capabilities we
provide with those filters, it should do the trick nicely.

 Jay

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!


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



RE: Somewhat OT: Multiple auth methods in one webapp?

2006-03-16 Thread Frank W. Zammetti
On Thu, March 16, 2006 2:26 pm, Caldarale, Charles R said:
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 Subject: RE: Somewhat OT: Multiple auth methods in one webapp?

 Do you know, or does anyone else know, where the server
 looks for the credentials when the challenge box has
 been submitted?

 See section 12.5 of the Servlet spec (you probably have that memorized
 by now) and RFC 2617, which covers both Basic and Digest authentication
 for HTTP.

Thanks Chuck, saves me the time to find it.

But no, I'm not the guy that memorizes specs, that is very clearly Craig
McClanahan's title :)  The man's instant recall of spec is astounding!

  - Chuck

Frank

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



Re: Disappointed

2006-03-09 Thread Frank W. Zammetti
The Tomcat mailing list, like Tomcat itself, and like most open-source 
projects in general, are volunteer efforts.  People will answer what 
they feel they can, when they can.  You should start by having no 
expectation of getting an answer because you in fact may not, because no 
one knows the answer, because no one has the time to answer, or yes, 
because your question was silly (I don't know what your question was, so 
I cannot judge) or just because no one felt like answering.  If people 
deem your question to be something you should be able to answer yourself 
without much trouble, you may not get an answer (or you may get a simple 
RTFM answer).


As a volunteer endeavor, all of these are perfectly valid response, or 
non-responses, as the case may be.


One thing to keep in mind is that the open-source community is sometimes 
not the friendliest place.  Being nice is not valued as much as 
technical prowess is.  Between you and me, it personally took me a good 
deal of time to come to this understanding too.  I value people being 
cordial and helpful with each other, and I personally strive to bring 
those qualities to any post I make (sometimes I succeed and sometimes I 
don't!) but that is not a primary driver of a mailing list like this, 
technical discussion is.


I think the de facto standard to go by is codified here:

http://www.catb.org/~esr/faqs/smart-questions.html

Read this and you will understand the community-driven projects like 
Tomcat a lot better I think and be able to interact better with them 
with the proper expectations.


Frank

Mike Sabroff wrote:
I have read and sometimes participated in these postings and answers in 
hopes of either finding answers to problems I am having or might have in 
the future and found it a well organized and contained group.
I am disappointed though, in that I have posted a question in hopes of 
help with a problem I am experiencing and notta zilch zap. No response 
of any kind. So I posted it again and whappo,  forget you. No answer. Is 
it common to have to post several times before getting a response? Is 
there a time delay because of the numerous amounts of threads? Is it 
something I did?
I see a lot of really dumb things going through the postings and most of 
the time I try to remember that I once new nothing of Tomcat too, and 
that I still don't know very much and that no question is too dumb. Is 
my question too dumb?
Have I been Black-Listed because I had a cruel response on one of those 
days that I just couldn't hold it back anymore?


WASSUP???

Mike



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



Re: Disappointed

2006-03-09 Thread Frank W. Zammetti

Hehe, thanks for boiling my response down to a single line Leon! :) LOL

Frank

Leon Rosenberg wrote:

http://www.catb.org/~esr/faqs/smart-questions.html

:-)
Leon

On 3/9/06, Mike Sabroff [EMAIL PROTECTED] wrote:

I have read and sometimes participated in these postings and answers in
hopes of either finding answers to problems I am having or might have in
the future and found it a well organized and contained group.
I am disappointed though, in that I have posted a question in hopes of
help with a problem I am experiencing and notta zilch zap. No response
of any kind. So I posted it again and whappo,  forget you. No answer. Is
it common to have to post several times before getting a response? Is
there a time delay because of the numerous amounts of threads? Is it
something I did?
I see a lot of really dumb things going through the postings and most of
the time I try to remember that I once new nothing of Tomcat too, and
that I still don't know very much and that no question is too dumb. Is
my question too dumb?
Have I been Black-Listed because I had a cruel response on one of those
days that I just couldn't hold it back anymore?

WASSUP???

Mike

--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


-
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]






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



Re: Help with detecting session timeout

2006-02-18 Thread Frank W. Zammetti
From an applet?  There probably is no easy answer... any solution would 
involve either polling the server from the servlet, or pushing the 
status out to the servlet... the later should be doable from a 
SessionListener... record the remote IP when the session is created, and 
send a ping to it when the session expires.  The problem with that 
though is when NAT and other address translation techniques get 
involved, there's a good chance it won't work.  That's why polling is 
the more usual solution in situations like this.


Frank

Klotz Jr, Dennis wrote:

Is there an easy way to detect that a session has timed out from within
an applet?

Regards,

-Dennis

-
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]



RE: [Friday] - finding the Mavens in the Java world

2006-02-03 Thread Frank W. Zammetti
If one were being sarcastic and jaded (although a bit realistic at the
same time unfortunately):

select count(first_name) as c from [postings on tomcat.apache.org] where
unemployed='T' and not_married='T' and no_kids='T'

Since most of us with regular jobs don't generally have time to play with
all the things we'd like to.

(P.S., never do a count on *, it's less efficient :) )

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Fri, February 3, 2006 1:18 pm, Daniel Blumenthal said:
 - select count(*) as c from [postings on tomcat.apache.org] group by
 email
 order by c desc, and then figure out which are the clued-in, and which
 are
 the clueless
 - repeat, with other listservs


 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 12:59 PM
 To: tomcat-user@jakarta.apache.org
 Subject: [Friday] - finding the Mavens in the Java world

 Hi all;



 For those of you that have read The
 http://www.amazon.com/gp/product/0316346624/sr=1-1/qid=113858
 9404/ref=pd_bb
 s_1/002-3569767-9990453?%5Fencoding=UTF8  Tipping Point,
 this will make sense (I think). For those that haven't, a
 maven is a person that trys just about every interesting
 program they see, and then tells others what they think about
 it. They're the ones the rest of us depend on to tell us what
 is worth trying and what new programs we should just skip.



 We want to give a free copy of Windward
 http://www.windwardreports.com/ Reports to all mavens in
 the Java (and .NET) programming world (value $1,134.00). No
 conditions or requirements or anything like that. A free
 regular copy with no limitations except that they cannot resell it.



 Why?



 We figure if we give them a copy, they might use it. And if
 they use it, we figure they'll probably post or write about
 it. So we're not asking them to do anything - but we figure
 our odds are pretty good they will. (Yes, we believe that
 much in our reporting engine.)



 So. Any ideas on how to find these people and make the offer to them?



 Thanks - dave





 David Thielen

  http://www.windwardreports.com www.windwardreports.com

 303-499-2544









 -
 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]



Re: Servlet filter on j_security_check

2006-02-02 Thread Frank W. Zammetti
Yes, it is generically possible... I have the following mapping in one of
my apps:

  filter-mapping
filter-nameInitialLoginFilter/filter-name
url-pattern/j_security_check/url-pattern
  /filter-mapping

This runs on Websphere though, so maybe there is some limitation with
Tomcat.  In general though, it appears it is possible.

One suggestion: change to a servlet mapping for the filter.  IIRC,
j_security_check is just a servlet that is set up by the container, so
that might work.  I kind of doubt it, but for the 30 seconds it'll take to
try, worth a shot.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Thu, February 2, 2006 2:51 pm, Martin Dubuc said:
  I am using form based authentication in my  application. I would like to
 know if it is possible to install a  Servlet filter on j_security_check.

   I have tried to install one, but it never gets invoked. Here is my
 filter definition in application web.xml:

   filter
   filter-nameLoginFilter/filter-name
   filter-classLoginFilter/filter-class
   descriptionPerforms pre-login and post-login
 operation/description
   /filter

   filter-mapping
   filter-nameLoginFilter/filter-name
   url-pattern/j_security_check/url-pattern
   /filter-mapping

   I have some logs in the doFilter function. It seems like doFilter never
 gets called. However, if I set the url-pattern property to /*, doFilter
 gets called while rendering pages, but doesn't seem to be invoked from
 j_security_check.

   Comments? Suggestions?

   Martin



 -
 Bring words and photos together (easily) with
  PhotoMail  - it's free and works with Yahoo! Mail.


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



Re: Servlet filter on j_security_check

2006-02-02 Thread Frank W. Zammetti
Well, there you go Martin :)

Tim, is this something peculiar to Tomcat that doesn't allow it?  As I
mentioned in my previous post, I in fact do this in an app running on
Websphere.  Or, maybe its a case of Websphere letting me do something it
really shouldn't?

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Thu, February 2, 2006 2:53 pm, Tim Funk said:
 You can't install a filter on j_security_check

 -Tim

 Martin Dubuc wrote:

  I am using form based authentication in my  application. I would like
 to know if it is possible to install a  Servlet filter on
 j_security_check.

   I have tried to install one, but it never gets invoked. Here is my
 filter definition in application web.xml:

   filter
   filter-nameLoginFilter/filter-name
   filter-classLoginFilter/filter-class
   descriptionPerforms pre-login and post-login
 operation/description
   /filter

   filter-mapping
   filter-nameLoginFilter/filter-name
   url-pattern/j_security_check/url-pattern
   /filter-mapping

   I have some logs in the doFilter function. It seems like doFilter
 never  gets called. However, if I set the url-pattern property to /*,
 doFilter  gets called while rendering pages, but doesn't seem to be
 invoked from  j_security_check.


 -
 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]



Re: Servlet filter on j_security_check

2006-02-02 Thread Frank W. Zammetti
Interesting.  Thanks for that info!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Thu, February 2, 2006 3:04 pm, Tim Funk said:
 If you want to be spec compliant. There is a bugzilla entry with respect
 to
 this and confirmation by the expert group that Tomcat's behavior is
 correct.

 -Tim

 Frank W. Zammetti wrote:

 Well, there you go Martin :)

 Tim, is this something peculiar to Tomcat that doesn't allow it?  As I
 mentioned in my previous post, I in fact do this in an app running on
 Websphere.  Or, maybe its a case of Websphere letting me do something it
 really shouldn't?


 -
 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]



Re: From Java to C#, ASP.NET [Off Topic]

2006-01-29 Thread Frank W. Zammetti



Martin Gainty wrote:

we just inherited some vb code that accomplishes a cryptography algorithm
just to get this to run under windoze took me 4 hours..the lack of VB 
doc was the blocking factor

or maybe its probably because Im not a VB guy and never will be
btw that same functionality can be accomplished with java libraries in 
under 1 hour


Doesn't sound like a fair comparison to me... give me someone who's not 
a Java guy, like your not a VB guy, and ask them to do the same 
thing... it may well take the same amount of time.  Your right in that 
the functionality is easier in Java, but would someone who isn't versed 
in Java know that, or be able to figure it out quite as fast?  I doubt it.



why?
there are opensource sites located world-wide in other words
A little digging and some hard work on anyone's part will always get you 
an answer

I cannot say the same thing for VB


Are you talking VB or VB.Net?  If your talking VB, you aren't looking in 
the right places.  There is *plenty* of readily-available knowledge out 
there about VB.


VB.Net is a different story... it's newer, and the resources haven't had 
time to build up to the same level (true in general for .Net).  Give it 
another year or two and see what's out there.  I think it'll be comparable.


BTW: (VB).Net is an example of market forces pushing a company MS to 
develop a product (.NET) that meets marketplace need

I for one welcome MS into the OOA/OOD world


I agree.  And, this is one of the rare times that MS got it closer to 
right than wrong the very first time.  It's not perfect, I don't think 
anyone is claiming it is (no one worth listening to anyway), but 1.0 
wasn't bad at all, and 2.0 improves things from everything I've heard 
(I'm only a casual .Net user myself).


Frank

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



Re: From Java to C#, ASP.NET [Off Topic]

2006-01-29 Thread Frank W. Zammetti

Martin Gainty wrote:
On the subject of doc ..I find any specifics about VB quite difficult to 
locate and blogs are not nearly as numerous as java


Interesting.  Although I don't consider blogs a source of worthwild 
information on anything (and yes, that includes my own!), I've always 
found a wealth of VB knowledge on the web.  Probably not quite as much 
as Java, but still.


I would strongly encourage every academic institution to replace their 
VB offerings with .NET to prepare their students for current as well as 
future markets (in general)

and the OOD world (specifically)


I'd agree with that.  Although, considering the difficulty we are 
currently having at my company finding VB experts (I long since ceased 
being an expert myself), perhaps colleges *are* preparing their students 
for the work world ;)  I know a COBOL programmer that just landed 
himself a job making more than I am!  I wouldn't be surprised if VB is 
the next COBOL in that regard :)

Frank


Thanks Frank,
M-

- Original Message - From: Frank W. Zammetti 
[EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, January 29, 2006 12:09 PM
Subject: Re: From Java to C#, ASP.NET [Off Topic]





Martin Gainty wrote:
we just inherited some vb code that accomplishes a cryptography 
algorithm
just to get this to run under windoze took me 4 hours..the lack of VB 
doc was the blocking factor

or maybe its probably because Im not a VB guy and never will be
btw that same functionality can be accomplished with java libraries 
in under 1 hour


Doesn't sound like a fair comparison to me... give me someone who's 
not a Java guy, like your not a VB guy, and ask them to do the same 
thing... it may well take the same amount of time.  Your right in that 
the functionality is easier in Java, but would someone who isn't 
versed in Java know that, or be able to figure it out quite as fast?  
I doubt it.



why?
there are opensource sites located world-wide in other words
A little digging and some hard work on anyone's part will always get 
you an answer

I cannot say the same thing for VB


Are you talking VB or VB.Net?  If your talking VB, you aren't looking 
in the right places.  There is *plenty* of readily-available knowledge 
out there about VB.


VB.Net is a different story... it's newer, and the resources haven't 
had time to build up to the same level (true in general for .Net).  
Give it another year or two and see what's out there.  I think it'll 
be comparable.


BTW: (VB).Net is an example of market forces pushing a company MS to 
develop a product (.NET) that meets marketplace need

I for one welcome MS into the OOA/OOD world


I agree.  And, this is one of the rare times that MS got it closer to 
right than wrong the very first time.  It's not perfect, I don't think 
anyone is claiming it is (no one worth listening to anyway), but 1.0 
wasn't bad at all, and 2.0 improves things from everything I've heard 
(I'm only a casual .Net user myself).


Frank

-
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]







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: From Java to C#, ASP.NET [Off Topic]

2006-01-27 Thread Frank W. Zammetti
On Fri, January 27, 2006 8:11 am, David Smith said:
 I will say I have used their products to develop solutions in the past
 and it's ... well ... interesting.  The stuff works well when you know
 how to use it.  Unfortunately I found their docs no where near the
 quality of Tomcat or Java which prolonged development on something that
 should have been extremely simple.

Wow, I've had just the opposite experience with their stuff.  Especially
in terms of documentation, I've always found MSDN to be some of the best
documentation around, generally far superior to most open-source
documentation (my guess is they have some generally non-technical editors
looking it over... I can't imagine that quality of writing came from
techies!)  I will say though that they do tend to be a little short on
examples, something open-source tends to have a lot more of.

I think it's a difference in culture behind it... MS is coming from a more
professional, business-like approach, and in that mindset writing
documentation takes on more importance.  In the open-source world, there's
much more of the here's an example, go look at it and learn kind of
mentality.  I'm not making a judgment on which is better, I think they
both have their pluses and minuses, just pointing out what I see as a
difference.

 Also the whole C#/aspx design is
 centered around events just like Windows itself which I find just a
 little disconcerting.  Not a problem if you're already familiar with
 programming in Access.  I would prefer a cleaner, more visible flow.

I'm not sure where the Access analogy comes in, but I do agree in that if
you haven't done much with the event-driven model before then it can be a
little disconcerting.  I think we're seeing the same thing in the Java
space with JSF right now... it's a basically event-driven model (they call
it component-oriented, but it's in many ways the same thing), and this is
somewhat new to many... ASP.Net is like bringing Windows programming to
the web, whereas JSF is like bringing Swing to the web... imperfect
analogies I suppose, but close enough :)

Frank

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



Re: Do idle servlets get unloaded/reloaded?

2006-01-24 Thread Frank W. Zammetti
Hi Blair,

On Tue, January 24, 2006 2:41 pm, Blair Cooper said:
 I have a servlet running on Tomcat 5.5. If it sits idle for a while and
 then
 I hit it, the init() method gets called again. autoDeploy is set to
 false.
 Is this expected behavior?

As per the servlet spec, the container can unload and reload a servlet as
needed.  It is an expected *potential* behavior.  My own personal
experience would indicate it's rare, but you have to design for it.

 If this is expected, shouldn't destroy() get called at some point prior to
 the init()?

I would expect destroy() to get called at some point before init() does a
second time, but I'm not sure if that is a guarantee of the spec.  Seems
like it probably would be though.

 The problem I'm having is that the init() method ends up try to recreate
 objects that where created by a previous call to init(). My destroy()
 method
 would have cleaned up the earlier instances if it had been called. I have
 logging in the destroy() method so I know that it didn't get called.


Implement some sort of check in init() to determine if it has fired
already or not.  A simple static boolean field on the servlet should do
the trick.  So, maybe you have:

private static boolean isInitialized;

Then in init(), you do:

synchronized (isInitialized) {
  if (!isInitialized) {
// Do initialization tasks.
isInitialized = true;
  }
}

 Thanks,

 Blair

Frank

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



[OT-ANN] Java Web Parts v1.0 beta3

2006-01-23 Thread Frank W. Zammetti
Hi all... I haven't been posting JWP release announcements here lately, 
and generally I will refrain from doing so, but the team just put out a 
new release last night and I think it has some features that might be of 
interest to many of you...


* AjaxTags now has some new capabilities, including the ability to have 
multiple config files, the ability to have static parameters on the 
target URLs, a built-in debugging facility and an implicit passing in of 
the ajaxRef with each request, so now you can always determine which 
element fired the event.


* The Chain implementation now supports loading config files from JAR 
files, and there is now a SimpleCommand that you can extend (instead of 
implementing Command) that has default implementations of all three 
Command methods (init(), execute() and destroy()), so you can only worry 
about the ones that interest you.


* A new popup calendar widget has been added to the UIWidgets taglib.

* JSDigester was added to the JSTags taglib.  JSDigester, as you may be 
able to guess, is a client-side implementation of our beloved Commons 
Digester.  It is not as full-featured as it's big brother, but it can 
come in *very* handy, just like the full-fledged Digester.


Take care!

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: data file access for servlet

2006-01-18 Thread Frank W. Zammetti
Hi Neha,

You can basically put it wherever you want because your servlet can get
direct file system access (I'm not sure this is true if deployed in an
EAR, but I guess that's not an option here anyway).

Where it *makes sense* to put it is up to you... if it's something
specific to the webapp then it probably makes sense to put it somewhere in
the webapp's directory structure, but if it's more a shared data type
thing, it might make sense outside the webapp.

Take a look here:

http://cvs.sourceforge.net/viewcvs.py/javawebparts/javawebparts/WEB-INF/src/javawebparts/servlet/TextReturnerServlet.java?view=markup

Scroll down to the init() method and see how it gets an InputStream to the
itemsFile.  This is how you can do it context-relative.  If you want to go
to something outside the webapp, take a look at
ServletContest.getRealPath().

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Wed, January 18, 2006 12:40 pm, Neha Narkhede said:
 Hi..
I am running a servlet which requires some data files.
 But I dont know where to paste those data files so that the servlet can
 find it.
 I have a servlet Indexer and so a folder 'Indexer in webapps.

 Please help..

 Thank you.

 -
 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]



Re: Size of session bean

2006-01-14 Thread Frank W. Zammetti
That's an interesting question... looking at the code I wrote in Java 
Web Parts for the getSessionSize() method, I'm only taking into 
consideration the fields of the objects in session.  I think this is OK 
because IIRC, when an object is serialized, only the non-transient 
values are considered.  The methods don't factor into it because you 
aren't serializing the class definition, just the state of the object. 
If anyone knows differently I'd like to hear about it, but I believe how 
that method works yields an accurate result.


If you want to see how I've done it, check out:

http://javawebparts.sourceforge.net

If you look at the javadocs, in the session package, there is a class 
called SessionSize that is used to get the size of a session object. 
You can grab the code and see how it's done, or just use it if that's 
your ultimate goal :)


Frank

Robert Palmer wrote:
When calculating the size of a session bean to determine memory usage, 
what should be included and how is this done? Do the number of methods 
matter? The size of the code? Just the variables? I've read much about 
limiting the size of the session information but not how to do it. I 
have some fairly large classes in session context but they don't store 
very much.


Thanks.

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: Spawning a thread

2006-01-14 Thread Frank W. Zammetti
Most of the time people will tell you don't do it, but don't get any 
more specific than that.  Generally-speaking, spawning a thread to 
process a request is somewhat of a bad idea because the container is not 
responsible for managing the thread and therefore you run some extra 
risks.  But, if you have something like a background process that isn't 
tied to a request, with the caveat the other poster made about daemon 
status in mind, I've never had a problem, and I've done it quite a bit.


I think the prudent advice is be careful.  And, if you can do what you 
need to without spawning a thread, you might be saving yourself some 
trouble down the road.  But, if you are careful and do it smartly, there 
isn't any definitive rule (that I am aware of) that says you can't do it.


Thom Hehl wrote:

Isn't there a caveat about spawning a new thread inside of a servlet?

Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: Spawning a thread

2006-01-14 Thread Frank W. Zammetti
Just to clarify, George wasn't talking about a context listener 
thread.  I suppose there *technically* is such a thing, but what he was 
referring to is spawning a thread *from* a context listener.  Subtle 
semantic difference, but it completely changes the meaning :)


Frank

Thom Hehl wrote:
Can you point me to some documentation about context listener threads? I 
have no idea what you're talking about.


Thanks.

George Sexton wrote:

 

 


-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Saturday, 
January 14, 2006 1:20 PM

To: Tomcat Users List
Subject: Re: Spawning a thread
  


 

risks.  But, if you have something like a background process that 
isn't tied to a request, with the caveat the other poster made about 
daemon   


A good way of starting threads not tied to a request is to have a context
listener class start the threads and handle any required shutdown.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


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


 




Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: Image Scaling Code

2006-01-12 Thread Frank W. Zammetti

D'oh!  Now *THAT* rings a bell :)

Mark Hagger wrote:

You need to have:

-Djava.awt.headless=true

in your java start up args, this will prevent it from trying to talk to an X 
server.  Obviously some image related stuff has to talk to an X server, but 
just ImageIO stuff is fine.


Mark


On Thursday 12 January 2006 19:31, Frank W. Zammetti wrote:


I don't quite see how this is Tomcat-related, but...

Your code can't connect to your X server, which is necessary for many
Java graphics-related functions to work on a *nix system.  I dealt with
this at one point when getting DataVision working on Linux, and I recall
the solution being something to do with an environment variable, but the
exact answer eludes me.

Actually, it looks like you *have* defined the environment variable
(DISPLAY in the stack trace rings a bell).  Is X running?  I believe it
has to be for this to work.

Frank

Justin Jaynes wrote:


Hello all,

I've written a java class to scale jpeg images.  But I can't seem to get
it to work.  Can anyone point me in the right direction?

Here is my code:


package com.everybuddystree;

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class ImageScaler {

public ImageScaler() {
}

public boolean scaleImageByWidth(String fileName, int newWidth) {

 File originalImage = new File(fileName);
 try {
  BufferedImage workingBufferedImage = ImageIO.read(originalImage);
  int width = workingBufferedImage.getWidth();
  int height = workingBufferedImage.getHeight();
  Image workingImage = workingBufferedImage;
  workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
  BufferedImage finalImage = (BufferedImage)workingImage;
  ImageIO.write(finalImage, jpg, originalImage);

  return true;

 } catch (IOException ex){

  return false;

 }

}

}

When I run the pass an image to the class using a jsp I get the
following errors from Tomcat:


HTTP Status 500 -
-
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request. exception
javax.servlet.ServletException: Can't connect to X11 window server using
':0.0' as the value of the DISPLAY variable. 
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageConte
xtImpl.java:848) 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContext
Impl.java:781) 
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
a:322) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause

java.lang.InternalError: Can't connect to X11 window server using ':0.0'
as the value of the DISPLAY variable. 
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142) 
java.security.AccessController.doPrivileged(Native Method) 
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:131) 
java.lang.Class.forName0(Native Method) 
java.lang.Class.forName(Class.java:164) 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironm
ent.java:68)  sun.awt.X11.XToolkit.clinit(XToolkit.java:96) 
java.lang.Class.forName0(Native Method) 
java.lang.Class.forName(Class.java:164) 
java.awt.Toolkit$2.run(Toolkit.java:821) 
java.security.AccessController.doPrivileged(Native Method) 
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) 
java.awt.Image.getScaledInstance(Image.java:158)
com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21) 
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
a:322) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The

full stack trace of the root cause is available in the Apache
Tomcat/5.5.12 logs.

-
Apache Tomcat/5.5.12






-
Yahoo! Photos – Showcase holiday pictures in hardcover
Photo Books. You design it and we’ll bind it!



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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM

Re: login

2006-01-07 Thread Frank W. Zammetti
What you describe is referred to as container-managed security, or J2EE 
Security.  Here is a link I think may help you:


http://www.onjava.com/pub/a/onjava/2002/06/12/form.html

The actual configuration of the security constraints is J2EE-standard 
and pretty easy.  The configuration of roles and groups and such is 
container-specific and while not usually difficult in any way, will vary 
from container to container.  That link discusses Tomcat specifically 
though, so it should get you heading in the right direction.


Frank

Claudio Veas wrote:

Hello group!! I wanted to make an authentication page for my web site and
after some attemps I read that there was a way to configure the server so it
could take care of it automaticaly so I want it to ask you if you could tell
me how this is done because I havent being able to find any information
about it. Thanks a lot

Claudio Veas


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: ServletContextListener - how to detect http path of web application?

2005-12-22 Thread Frank W. Zammetti

[EMAIL PROTECTED] wrote:
One reason a filter would be better is you can fully 
construct the URL dynamically, including the method and all 
that.  Could you possibly map it to just the initial entry 
point of your app so that it doesn't fire with each request?



Yeah I thought about that... unfortunately I can't be sure that the
users will enter from the homepage or any other particular point.


Yeah, I thought you might say that :)

Another even more hack-ey solution might be to have a servlet 
that runs on startup, and from it fire off a request to a 
specific URL that goes through your filter.  Your filter then 
calculates the app's URL and sticks it in application scope.  
The servlet is no longer needed, nor is the filter, and 
shouldn't affect anything after that.


Seems like a lot of trouble for what your after though :)



Although, how would the startup servlet know what the magic URL is? I
guess it would have to start with the full URL of the app. Which is
where we came in :)


The startup servlet wouldn't, the filter would.  The servlet just
requests a resource in your webapp, and the filter calculates the URL
and sticks it in application scope.


Doesn't matter anyhow, it's working ok... Thanks a lot for your help.


Your right, and I'm glad its working.  The other suggestion is just a
curiosity at this point :)  Take care!


Iain


Frank


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



Re: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Frank W. Zammetti
Tim is right, you can't do it directly.  You *might* be able to construct
it in a roundabout way though...

Let's assumg you know the method, http vs. https, and its always one or
the other.  Let's also assume that the display-name element in web.xml
names the application context (i.e., if the URL is http://myserver/myapp,
then display-namemyappdisplay-name.  I believe the following (without
actually trying it) would work...

String s = http://;;
s += new InetAddress.getHostName();
s += / + servletContext.getServletContextName();

Kind of hack solution, but it might be OK for your application (assuming
it actually works!)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Wed, December 21, 2005 6:22 am, Tim Funk said:
 There is no way to detect the contextPath on servletInit. It can only be
 done
 after the first request. (Using HttpServletRequest.getContextPath())


 -Tim

 [EMAIL PROTECTED] wrote:
 Hi,

 Apols for a newbie question, I didn't have much luck with the archives
 or in Google.

 In my ServletContextListener.contextInitialized method, I need to detect
 the public http path of my web app.
 i.e. http://servername/approot/

 How can I do this?
 event.getServletContext().getResource(/) gives me jndi:/localhost/,
 not very helpful.


 -
 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]



Re: making a singleton servlet

2005-12-06 Thread Frank W. Zammetti
The problem you are trying to solve is not propely solved by trying to 
limit the container to a single servlet instance (which you probably 
cannot control anyway, unless your container allows some sort of 
proprietary setting).


The way you should be thinking to solve this problem is a connection pool.

Your servlet needs to be written in a thread-safe manner anyway, and 
that allows the same servlet instance to handle multiple requests at the 
same time.  Having a connection pool underneath that will allow you to 
share your database connections efficiently.


There are numerous options for connection pooling... the first thing 
you'll probably want to look into is what your container itself offers 
in this area.  Most containers have some sort of pooling facility 
available.  Another option is to build on top of a persistance framework 
like Hibernate or iBATIS, both of which offer some degree of pooling 
support.  There are libraries for doing it as well, DBCP (a Jakarta 
Commons package) for instance.  You could always write your own, it 
isn't too tough, but for something that has been done to death you are 
definitely better off not bothering.


Of course, since your posting to the Tomcat list, I can tell you that 
Tomcat offers such support:


http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

Frank


James Black wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Caldarale, Charles R wrote:

From: James Black [mailto:[EMAIL PROTECTED] 
Subject: re: making a singleton servlet


I am going to make my servlet be static, with the hope that 
it will only have one instance running, regardless of how 
many clients connect to it.



What do you mean by servlet be static?  What syntactical construct are
you employing?

If you mean using static fields in your servlet class, then you will
have to make use of synchronization clauses to insure concurrent
requests are serialized.  It's my understanding that the container
(Tomcat or whatever) is free to process as many requests in parallel as
needed, as well as create multiple servlet instances - see the servlet
spec.

What problem are you trying to solve?



  My plan is to try:
public static class SomeServlet extends HttpServlet {  ... }

  That way there should only be one servlet.

  I am writing a servlet to save grades to a database, but,
unfortunately, instructors will procrastinate like students do. So, I
expect that 2000+ instructors will submit their grades in the last hour
or so, before the deadline.  If each instructor had their own db
connection then the system will be useless, as students won't be able to
get connections, since all the connections will be used up.

  For the first test I want to limit them to only one connection that
will read from an input queue, and just process all the grades. Later it
may be bumped up to 20-50 connections, to speed it up.

  That is the basic problem I am trying to solve.

  I am actually using XmlHttpRequest to connect to the servlet so it
doesn't lock up the browser.

- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.]
Tacitus from Annals III, 116AD
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDlkneJ/zyYkX46joRAlfpAJ0cdiTxXrSSdLfZ3znd63dSJesvJACgiFes
PfU+fddjZNUPTT1gq0Ft69g=
=tKjO
-END PGP SIGNATURE-

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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: advice on auto logout servlet

2005-11-16 Thread Frank W. Zammetti
You can do this strictly client-side, if requiring Javascript isn't a 
problem (which of course an AJAX-based solution does anyway).  Just 
start a timer from the onLoad event on each page.  When 20 minutes has 
elapsed, you can either pop an alert which is followed by a redirect to 
some appropriate page, or just do the redirect straight away, whatever 
you prefer.


The down-side is that a user could disable Javascript after the timer 
has begun but before the timeout occurs.  But, of course the session 
will still expire on the server, so it's probably not a big problem. 
And you'll need to keep your session timeout and client-side timeout 
values in sync, but that's pretty minor.


Frank

Jon Wingfield wrote:

I did an AJAX version of this a couple of months ago.
The slight gotcha is that the AJAX request prolongs the life of the 
session (you can't, it seems, override the cookie for AJAX requests) so 
the interval has to be slightly longer than the expiry time for the 
session.


Reynir Hubner wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
I would suggest that you do this by using somethinglike JSON or AJAX.
See jasonspec: http://www.crockford.com/JSON/index.html

You could make the client query your server, in some interval and check
the session state.

hope it helps
- -reynir



Mark wrote:

Is there any way to allow servlets to auto-logout a user when the 
timeout

has been reached. Right now, I have tomcat configured for a 20 minute
session timeout. When the session times out, the user gets no 
notification
of this event. Is there any way to show the user that they have 
logged out?


Thank you.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDeeqn19KgIQihNwgRAqT8AJ9ijf9kZZlldgjRTcAEtua+89enKQCgnqjm
iuCZACbq4A/JkmtB5yiIc8M=
=HSCq
-END PGP SIGNATURE-

-
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]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: JSP processing other than .jsp?

2005-11-16 Thread Frank W. Zammetti
FYI, I had a case once where I needed to make my CSS files JSP's because 
I was using HTC's and for some reason I couldn't get the path mappings 
to work right unless I used request.getContextPath() to prefix the HTC 
names... more than likely just my mistake somewhere, but making it a JSP 
(as Yaakov says, just renaming it to .jsp) did the trick.


I would personally prefer that approach because should you ever need to 
move to another app server, or even a hosted environment like I moved to 
a few months back, this way you won't have to mess with server settings, 
or getting some grumpy old admin to do it :)


Frank

Yaakov Chaikin wrote:

I assume you need this because you want to place some JSP code inside
your stylesheet

Two approaches:
1) If you know that ALL of your .css files will need to include JSP
code in them, then go to tomcat_dir/conf/web.xml and add another
servlet-mapping like so:
servlet-mapping
  servlet-namejsp/servlet-name
   url-pattern*.css/url-pattern
/servlet-mapping

2) If you need to place JSP code in just one or two .css files, I
would not start messing with server specific configurations and just
rename those .css files to have extension of .jsp. So, now you will
have a stylesheet file with .jsp. It seems weird and unusual, but
really doesn't make any difference as far as your HTML/JSP page is
concerned. Just point the link to the .jsp page instead in your
HTML/JSP page:
link href=styles/myStyle.jsp rel=stylesheet type=text/css

Hope that helps.

Yaakov.

On 11/16/05, Marten Lehmann [EMAIL PROTECTED] wrote:


Hello,

how can I define, that e.g. the extension .css shall be processed by
tomcat same as a .jsp-file?

Regards
Marten

-
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]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Re: disabling sessions in certain parts of a webapp

2005-11-09 Thread Frank W. Zammetti
That's weird... I actually had a part in my reply at the end that said
something like this should work until some code after the filter tries to
access session :)

Yep, absolutely, if there's a possibility of that then the wrapper is
definitely the way to go.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Wed, November 9, 2005 2:24 pm, Brian Moseley said:
 Frank W. Zammetti wrote:
 I can't think of any drawbacks to the filter, and tha's what I would
 have
 suggested.  Although, it probably doesn't even have to be as complicated
 as a wrapper... simply check for an existing session for the paths you
 do
 want a session created for, and if none is present go ahead and create
 it.
  I *think* that would do the trick.

 well, i'm concerned about code executing further down the filter chain
 that calls request.getSession(). i don't own all of the code that i'm
 running :)

 that's why i thought of the wrapper. i can intercept calls to
 getSession() and always return null for the requests that should never
 get sessions, letting the calls through for the requests to the html ui.

 thanks for the feedback!

 -
 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]



Re: Can a return statement cause a problem?

2005-11-04 Thread Frank W. Zammetti
It might be interesting to look at the class file generated from your
JSP... many times things like this become fairly obvious when you see the
code that is actually being executed.

Also, if your using a JSP 2.0 container, you may be interested in playing
with tag files:

http://today.java.net/pub/a/today/2003/11/14/tagfiles.html

Kind of a good first step for playing with custom tags without quite as
much work.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Fri, November 4, 2005 3:00 pm, Dola Woolfe said:


 --- Bob Bateman [EMAIL PROTECTED] wrote:

 On Fri, 4 Nov 2005 11:14:19 -0800 (PST)
   Dola Woolfe [EMAIL PROTECTED] wrote:
  Hi,
 
  In one of my JSP pages (ErrorPage.jsp) I have the
  following code.
 
  %
  if (display-nothing-only-forward) {
   out.println(META to forward to another page in
 0
  seconds);
   // return;
  }
 
  //Lot's more code
  %
 
  It works, but prints out unnecessary html before
 it
  forwards. But if I uncomment return it stops
  working. I get
  HTTP 500 - Internal server error
 
  What could that be? In the tomcat console window,
 I
  get no indication that something is not right.

 I would postulate that you are executing unnecessary
 code.

 *Disclaimer: The following is NOT compliant with MVC
 best
 practices...

 In your JSP page, you *probably* want your if
 (display-nothing-only-forward) statement to execute
 if
 there is nothing to do.  If that is true, then after
 your
 closing brace with the META info in it, you probably
 want
 to use an 'else' clause and enclose the rest of your
 code
 in a set of braces.

 In effect, what you've done is to tell the system to
 put
 the META statement out ONLY when there is nothing
 else to
 do - but the rest of your code runs all the time.

 If you have sufficient experience, I would suggest
 removing all of the java code from your JSP page and

 putting the code into a Tag.  Tags are really easy
 to use
 and keep your business logic seperate from your JSP
 presentation.  Of course, you'll still have to
 generate
 HTML in the Tag, but that's partly what tags are
 for.

 Bob

 Hi Bob,

 I have not used Tags and plan to take a look at them
 soon.

 Concerning the rest of your suggestion, having a big
 else clause is precisely something I'm trying to
 avoid. I always prefer

 if (short_clause) {
   //...
   return;
 }

 //rest of code

 to

 if (short_clause) {
   //...
   return;
 }
 else {
 //rest of code
 }

 Also, what I'm curious about is this; what I do may
 not be a good coding practice, but what is causing the
 error?

 Thanks!

 Dola



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






 __
 Yahoo! FareChase: Search multiple travel sites in one click.
 http://farechase.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]



Re: Problems with web.xml generated from RAD and from Ecplise.

2005-10-19 Thread Frank W. Zammetti
A bug in RAD?!?  Surely you jest!

Ahem.

ComicBookGuyRAD... Worst... IDE... EVER!/ComicBookGuy

(Unfortunately, I may have no choice but to use it soon... it's the
standard at my company, but I've been able to resist thus far.  I can
only hope my luck continues that way).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Wed, October 19, 2005 1:51 am, Wendy Smoak said:
 From: Richard Mixon [EMAIL PROTECTED]

 I'm pretty familiar with Tomcat, but have no idea what RAD is and how
 its
 Tomcat related. If you explain that someone might be able to better
 help.

 Rational Application Developer, I assume.

 The problem seems to be here:

 web-app id=WebApp_ID version=2.2
 ...
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

 The first line says version 2.2 but then it goes on to use the 2.4 schema.
 No idea how to convince it to do otherwise, though... seems like a bug to
 me.  If it's going to generate web.xml for you, it ought to know better
 than
 to mix and match versions.

 --
 Wendy Smoak



 -
 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]