RE: type in twice for basic authentication???

2004-10-02 Thread Mark Thomas
What version of tomcat? 

 -Original Message-
 From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 01, 2004 11:38 PM
 To: Tomcat Users List
 Subject: Re: type in twice for basic authentication???
 
 Yeah, I need some major help on this to figure out what's 
 going on!  We
 have a Windows version and a Linux version of the database.  I just
 changed my DSN over to the Linux one, and now it pops up 4 
 times!!!  No,
 wait...sometimes it still logs you in just after 2 times, and 
 sometimes
 it takes as many as 6!  Also, sometimes when browsing the 
 site, it makes
 you log in again in places where it didn't used to.  
 
 You see, we have a main database that drives our web app, but 
 we've been
 using a MySQL db to authenticate, and we'd like to get rid of 
 that so we
 can just deal with one database.  However, our main database 
 is behaving
 strangely.  Now, when clicking over to some of the other JSPs in the
 site, it will pop up and ask for the username and password in 
 places it
 didn't used to do that (and no, it shouldn't be changing contexts or
 anything like that).
 
 
 
 - Original message -
 From: Stephen Charles Huey [EMAIL PROTECTED]
 To: Tomcat User [EMAIL PROTECTED]
 Date: Fri, 01 Oct 2004 17:10:32 -0500
 Subject: type in twice for basic authentication???
 
 When my web app pops up a basic authentication box, I type in the
 username and password, and then it bounces back with blank text boxes
 asking for it again.  Every time when I type them in a second time it
 then lets me in!  What's going on?  Here's what I have in my 
 server.xml:
 
 
 Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=sun.jdbc.odbc.JdbcOdbcDriver
 connectionURL=jdbc:odbc:dbname
 userTable=users userNameCol=userid userCredCol=password
 userRoleTable=roles roleNameCol=role /
 
 -
 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: RE: type in twice for basic authentication???

2004-10-02 Thread steve
Due to increasing levels of spam, this email address no longer receives email.



To contact us, please go to http://takanomi.com/contact.php.



[If you publish an ezine or newsletter to which we are subscribed, or own an affiliate 
program or service of which we are a member, please visit the above URL and request 
our updated email address.]



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



mod_rewrite pass rewrited URL to mod_jk how ?

2004-10-02 Thread Antony Paul
Hi ,
   I want Apache to rewrite the URL's before passing it to Tomcat. It
is rewriting the URL(from rewrite_log) but when passed to Tomcat it is
sending original URL ?. I want to pass the rewritten URL. How to
achieve this ?.

Using Apache 1.3.29
Tomcat 4.1.30
mo_jk(JK) AJP13 connector.

setting JkOptions +ForwardURICompat or JkOptions
+ForwardURICompatUnparsed  are of no use.

rgds
Antony Paul

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



RE: webdav servlet file path; documentation

2004-10-02 Thread Mark Thomas
From: Garret Wilson [mailto:[EMAIL PROTECTED] 
 
 Something like this:
 
 Context docBase=C:\webapps\mywebapp.war
Parameter name=webdavBase value=C:\data\mywebappdata\/
 /Context

This should be a parameter of the webdav servlet rather than a context one.

 I can't imagine why this wouldn't be a simple change to the Tomcat 
 WebDAV code---probably just five or ten lines. You start with a file 
 system base directory right? Just get it from the context parameter.

Not quite that simple ;)

 I'll gladly take a look at the code---can you tell me where to start?

org.apache.catalina.servlets.WebdavServlet

I'd be happy to look at anything you come up with.

Mark



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



Re: tomcat 5.x windows installer

2004-10-02 Thread Christopher Watson
Shapira, Yoav wrote:
OK I had a fleeting success by re installing jdk1.5.0 and tomcat 5.0.28 
to their default directories. The installer went passed the jvm freeze 
point all the way to completion.

Intoxicated by my success I turned my firewall back on and ran the 
uninstaller. The firewall prompted me to enroll the uinstaller which I 
did and then it failed at the jvm so I had to abandon it. I now cannot 
either remove or reinstall it using the .exe .

Is there any way of telling what is happing at the stage where the jvm 
is invoked?

The zip is just fine ! But...
My reason for preferring the installer over the zip is that - when it 
works - I can do a faily painless upgrade by uninstalling leaving the 
webapps etc alone and reinstalling an upgrade version to the same 
directory. This is not so easy using the zip distribution.

Any help would be appreciated.
Thanks
Christopher
Hi,
I just installed 5.0.28.exe on Win2K the other day, using both JDK
1.4.2_04 and 1.5 RC2 (the last beta before the final customer shipment
went out yesterday): in either case it worked fine, no freezing.
Installation, running as a service, running from the command line, and
de-installation all went fine.
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: Christopher Watson [mailto:[EMAIL PROTECTED]
Sent: Friday, October 01, 2004 5:50 AM
To: Tomcat Users List
Subject: tomcat 5.x windows installer
I cannot get the latest windows installer .exe jakarta-tomcat-5.5.2.exe
to install properly
It freezes after writing conf\server.xml and conf\tomcat-users.xml with
the message Using Jvm: C:\jdk1.5\jre\bin\server\jvm.dll where that is
where I've installed the jdk. It make no difference if I choose the
installed jre instead of the jdk.
The most recent one I did get to work was 5.0.19. Both 5.0.27 and
   

5.0.28
 

both freeze in the same way as 5.2.2
Seems to be same situation on win2k pro and win 2003 server.
Any one have any clues as to what the problem is and how I would get
   

the
 

.exe to install properly?
Thanks for any help,
Christopher
PS's ...
BTW I'm on jdk1.4.2_03 on w2k, 1.5 beta on win 2003 server - both seem
to behave the same.
The last few lines from the show details block read as follows
===
server.xml written
Delete file: c:\jakarta-tomcat\conf\tomcat-users.xml
tomcat-users.xml written
Remove folder: C:\DOCUME~1\JERONI~1\LOCALS~1\confinstall
Using Jvm: C:\jdk1.5\jre\bin\server\jvm.dll
=
(the chosen directory names for tomcat and jdk 1.5 are intentional and
correct)


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



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  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: mod_rewrite pass rewrited URL to mod_jk how ?

2004-10-02 Thread Mark Lowe
You can rewrite urls as you would without jk .. JK only cares about 
urls that match the mounts typically /*.jsp, /servlet/*,  /*.do or 
/*.jsf

Mark
On 2 Oct 2004, at 11:36, Antony Paul wrote:
Hi ,
   I want Apache to rewrite the URL's before passing it to Tomcat. It
is rewriting the URL(from rewrite_log) but when passed to Tomcat it is
sending original URL ?. I want to pass the rewritten URL. How to
achieve this ?.
Using Apache 1.3.29
Tomcat 4.1.30
mo_jk(JK) AJP13 connector.
setting JkOptions +ForwardURICompat or JkOptions
+ForwardURICompatUnparsed  are of no use.
rgds
Antony Paul
-
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: mod_rewrite pass rewrited URL to mod_jk how ?

2004-10-02 Thread Antony Paul
Using PT flag only helped me to pass the relevant request to Tomcat. I
found it at
http://helma.org/docs/howtos/mod_jk/.

rgds
Antony Paul


On Sat, 2 Oct 2004 13:57:35 +0200, Mark Lowe [EMAIL PROTECTED] wrote:
 You can rewrite urls as you would without jk .. JK only cares about
 urls that match the mounts typically /*.jsp, /servlet/*,  /*.do or
 /*.jsf
 
 Mark
 
 
 
 On 2 Oct 2004, at 11:36, Antony Paul wrote:
 
  Hi ,
 I want Apache to rewrite the URL's before passing it to Tomcat. It
  is rewriting the URL(from rewrite_log) but when passed to Tomcat it is
  sending original URL ?. I want to pass the rewritten URL. How to
  achieve this ?.
 
  Using Apache 1.3.29
  Tomcat 4.1.30
  mo_jk(JK) AJP13 connector.
 
  setting JkOptions +ForwardURICompat or JkOptions
  +ForwardURICompatUnparsed  are of no use.
 
  rgds
  Antony Paul
 
  -
  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]



How do I configure Tomcat to write to a Serial Port?

2004-10-02 Thread Donald Horrell \(BT\)
I've downloaded and installed the Java Communications API (version 2) and 
Tomcat 5.0.25. The whole lot uses Java 1.4.0.

My servlet is below, but when I invoke it, I get a log and an exception:
Serial port is already in use.
javax.servlet.ServletException
comms.Send.init(Send.java:55)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) 
java.lang.Thread.run(Thread.java:536)At some point, I'm going to need to find a way of limiting the poolsize forthis servlet to 1 only too.CheersDon.Source:package 
comms;import java.io.IOException;import java.io.OutputStream;import java.io.PrintWriter;import java.util.Enumeration;import javax.comm.*;import javax.servlet.ServletException;import 
javax.servlet.SingleThreadModel;import javax.servlet.http.*;public class Send extends HttpServlet implements SingleThreadModel{   /** The output stream which writes to the Com port. */   
PrintWriter out = null;   public void init() throws ServletException   {  // Open the serial port.  Enumeration portList = CommPortIdentifier.getPortIdentifiers();  while 
(portList.hasMoreElements())  { CommPortIdentifier portId = (CommPortIdentifier)portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
//if (portId.getName().equals(/dev/term/a)) {if (portId.getName().equals(COM1)){   SerialPort serialPort = null;   
try   {  serialPort = (SerialPort)(portId.open(SendApplet,2000));  out = new PrintWriter(serialPort.getOutputStream());  
serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,   
  SerialPort.PARITY_NONE);   }   catch (PortInUseException e)   {  System.out.println(Serial port is already 
in use.);  throw(new ServletException());   }   catch (IOException e)   {  System.out.println(Failed to connect to 
output stream.);  throw(new ServletException());   }   catch (UnsupportedCommOperationException e)   {  
System.out.println(Failed to set comms params.);  throw(new ServletException());   }} }  }   }   public void destroy()   {   // 
Release the serial port.   }   public void doGet(HttpServletRequest req, HttpServletResponse resp)   {  System.out.println(doGet.);  doWork(req, resp);   }   public void 
doPost(HttpServletRequest req, HttpServletResponse resp)   {  System.out.println(doPost.);  doWork(req, resp);   }   public void doWork(HttpServletRequest req, 
HttpServletResponse resp)   {  // Take the msg param and send it to COM1.  String msg = req.getParameter(msg);  System.out.println(Sending[+msg+].); 
 if (msg != null)  { out.println(msg);  }   }}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How do I configure Tomcat to write to a Serial Port?

2004-10-02 Thread Parsons Technical Services
What OS?


- Original Message - 
From: Donald Horrell (BT) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 02, 2004 9:04 AM
Subject: How do I configure Tomcat to write to a Serial Port?


 I've downloaded and installed the Java Communications API (version 2) and
 Tomcat 5.0.25. The whole lot uses Java 1.4.0.

 My servlet is below, but when I invoke it, I get a log and an exception:
 Serial port is already in use.
 javax.servlet.ServletException
  comms.Send.init(Send.java:55)
  javax.servlet.GenericServlet.init(GenericServlet.java:211)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:702)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:644) java.lang.Thread.run(Thread.java:536)At some point, I'm going to need
to find a way of limiting the poolsize forthis servlet to 1 only
too.CheersDon.Source:package comms;import
java.io.IOException;import java.io.OutputStream;import
java.io.PrintWriter;import java.util.Enumeration;import javax.comm.*;import
javax.servlet.ServletException;import javax.servlet.SingleThreadModel;import
javax.servlet.http.*;public class Send extends HttpServlet implements
SingleThreadModel{   /** The output stream which writes to the Com port. */
PrintWriter out = null;   public void init() throws ServletException
{  // Open the serial port.  Enumeration portList =
CommPortIdentifier.getPortIdentifiers();  while
(portList.hasMoreElements())  { CommPortIdentifier portId =
(CommPortIdentifier)portList.nextElement(); if (portId.getPortType()
== CommPortIdentifier.PORT_SERIAL) {//if
(portId.getName().equals(/dev/term/a)) {if
(portId.getName().equals(COM1)){   SerialPort
serialPort = null;   try   {
serialPort = (SerialPort)(portId.open(SendApplet,2000));
out = new PrintWriter(serialPort.getOutputStream());
serialPort.setSerialPortParams(9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);   }   catch
(PortInUseException e)   {
System.out.println(Serial port is already in use.);
throw(new ServletException());   }   catch
(IOException e)   {  System.out.println(Failed
to connect to output stream.);  throw(new
ServletException());   }   catch
(UnsupportedCommOperationException e)   {
System.out.println(Failed to set comms params.);
throw(new
rvletException());   }} }  }   }
public void destroy()   {   // Release the serial port.   }   public void
doGet(HttpServletRequest req, HttpServletResponse resp)   {
System.out.println(doGet.);  doWork(req, resp);   }   public void
doPost(HttpServletRequest req, HttpServletResponse resp)   {
System.out.println(doPost.);  doWork(req, resp);   }   public void
doWork(HttpServletRequest req, HttpServletResponse resp)   {  // Take
the msg param and send it to COM1.  String msg =
req.getParameter(msg);  System.out.println(Sending[+msg+].);
if (msg != null)  { out.println(msg);  }   }}

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



Tomcat 4 and Tomcat 5 on same machine?

2004-10-02 Thread Rhino




Can anyone tell me:

  If it is possible to have an instance of Tomcat 4.1.x on the same Linux 
  Mandrake server as an instance of Tomcat 5.x?
  How to set things up so that both instances run as services but are 
  independent from one another, i.e. each can be started/stopped separately from 
  the other and potentially use a different Java JDK.
A pointer to any documentation on this subject or to something in the 
mailing list archive would be very useful if you could provide that.

I was going to try to search for this in the archive but couldn't think of 
a common term that would appear in all such posts.

We want the Tomcat 5 instance to be our test environment. We will put our 
Tomcat 4 servlets in Tomcat 5 and verify that they all still work; then we'll 
probably drop the Tomcat 4 instance, unless we can think of a good reason to 
keep it around.

Rhino---rhino1 AT sympatico DOT ca"There are two ways of 
constructing a software design. One way is to make it so simple that there are 
obviously no deficiencies. And the other way is to make it so complicated that 
there are no obvious deficiencies." - C.A.R. Hoare


Re: Tomcat 4 and Tomcat 5 on same machine?

2004-10-02 Thread Hassan Schroeder
Rhino wrote:
   1. If it is possible to have an instance of Tomcat 4.1.x on the same
  Linux Mandrake server as an instance of Tomcat 5.x?
   2. How to set things up so that both instances run as services but
  are independent from one another, i.e. each can be started/stopped
  separately from the other and potentially use a different Java JDK.
Sure, just
1) configure the two versions to use different ports and/or host
   names/IP addresses, and
2) make two versions of the startup script (/etc/rc.d/init.d/tomcat,
   on my RH system at least) with the appropriate CATALINA_HOME and
   JAVA_HOME values.
HTH,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Security Constraint - Tomcat 5.0

2004-10-02 Thread Omar Adobati
Goodmorning all,

Can I set a security constraint saying that i need to protect all except a directory 
or a certain file?
My folder tree is quite like this one:
  myApp
   |
   + - - /images/
  |
  + - - /WEB-INF/
  |
  + -- *.jsp files

Well, what I need is to protect all, but to not protect the images folder. 
How can I do it?

Thisi is what i have in my web.xml file.

  security-constraint
[...]
web-resource-collection
  web-resource-nameBanner Manager/web-resource-name
  url-pattern/*/url-pattern

  http-methodDELETE/http-method
  http-methodGET/http-method
  http-methodPOST/http-method
  http-methodPUT/http-method
 /web-resource-collection   
  /security-constraint

regards,

Omar

Re: Reducing network traffic for rollover images

2004-10-02 Thread Robert Hunt
After some analysis and trial  error, I've found** that the correct JS 
syntax in this application is:

   {HTMLElement}.style.backgroundImage  =  'url( ' + img1.src + ')';
where {HTMLElement} would be this as in:
   a href=xxx onmouseover=this.style.backgroundImage = 'url(' + 
img1.src + ')'; ...

or some other js variable obtained by, like say, document.getElementById().

Watching the Tomcat access log and using permutations of CSS and the 
FrankZ/jscript-caching-strategy to achieve the rollover effects, I've found 
that the background image is requested:

   IExplore 6.0Netscape 7.2
CSSeach mouseover   once per page
JS   each mouseover   once per page
So, as has been 99% of my experience, NS does it right, IE leaves a bit to 
be desired.  heavy sigh  It appears that when .style.backgroundImage is 
modified in IE, another HTTP GET request is triggered.  I'm going to see if 
I can do a swap with a hidden element that (already) has the desired style 
and see if I can fake out IE.

-- BUT --
Through all of this, my original question remains; Is there a way to provide 
suggestions/hints/minor-coercion to an HTTP client (via headers or other 
response codes/messages) that would coax IE (and perhaps other browser 
implementations) to cache the image at least once per page load?

Thanks!
-- RH
** Googling for style.backgroundImage led me to 
http://www.dreamstart.nl/sitedata/www.dreamstart.nl/js/menu.js.cfm


- Original Message - 
From: Robert Hunt
To: [EMAIL PROTECTED]
Sent: Friday, October 01, 2004 6:32 PM
Subject: Re: Reducing network traffic for rollover images

Frank,
Thanks for the code snippet.  However, I'm having a bit of trouble mapping
your jscript to the CSS that currently creates the rollover/hover  effect:
   a.glink:hover {   background-image:
url(../images/glblnav_selected.gif);   }
I've tried several permutations for the anchor that has the effect
  a ... onmouseover=this.style.backgroundImage = img1
  a ... onmouseover=this.style.backgroundImage.src = img1.src
and on and on and none work -- no js exceptions are triggered, but there's 
no effect. 

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


Re: Reducing network traffic for rollover images

2004-10-02 Thread Robert Hunt
To clarify:
Watching the Tomcat access log and using permutations of CSS and the
FrankZ/jscript-caching-strategy to achieve the rollover effects, I've found
that the background image is requested:
   IExplore 6.0Netscape 7.2
  -  --
CSSeach mouseover   once per page(1)
JS   once per page(2)  once per page(2)
  each mouseover
(1) upon first hover/mouseover
(2) when the jscript executes

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


Re: Reducing network traffic for rollover images

2004-10-02 Thread Robert Koberg
Robert Hunt wrote:
To clarify:
Watching the Tomcat access log and using permutations of CSS and the
FrankZ/jscript-caching-strategy to achieve the rollover effects, I've found
that the background image is requested:
   IExplore 6.0Netscape 7.2
  -  --
CSSeach mouseover   once per page(1)
JS   once per page(2)  once per page(2)
  each mouseover
(1) upon first hover/mouseover
(2) when the jscript executes

I have been hoping someone would offer some innovative solution, but 
there really isn't one...

You have to perform some ugly hack. Check http://alistapart.com for some 
solutions.

For example, you could provide the image with both (3?) states and 
adjust the margin to show the correct state:

a
  href=boo
  class=hoverLink normal
  onmouseover=this.className='hoverLink hover'
  onmouseout=this.className='hoverLink normal'boo/a
With the image looking like:
-
|  normal state | 30px in ht
-
|  hover state  | 30px in ht
-
.hoverLink {
background: url(images/states.gif);
}
.normal {
margin-top: 0px;
}
.hover {
margin-top: -30px;
}
something like that... :(
best,
-Rob
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reducing network traffic for rollover images

2004-10-02 Thread Frank W. Zammetti
Yep, turns out this is a known issue with IE.  I guess that's the reason 
CSS-based mouseovers aren't used much more often.

You may want to take a different approach here... Consider doing what is 
probably the more common approach, which is to have two versions of your 
menu items, a normal state and a hover state version, and switch them 
via Javascript (using the pre-loading I mentioned).

There does some to be some ways around the CSS problems though having to 
do with layers on top of each other and hiding one or the other.  I 
played for a few minutes to get such an approach to work and I got about 
95% of the way there (still had a problem with the actual content being 
placed properly over the background).

I'd personally just go with the first approach.  Like I said, I think 
it's the more common approach, and even though the CSS approach might be 
more appealing, the other way will probably be more cross-browser (if 
you consider this constant loading of issues in IE, and in Opera and 
some others from what I read, to be a cross-browser concern as I would).

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Robert Hunt wrote:
To clarify:
Watching the Tomcat access log and using permutations of CSS and the
FrankZ/jscript-caching-strategy to achieve the rollover effects, I've found
that the background image is requested:
   IExplore 6.0Netscape 7.2
  -  --
CSSeach mouseover   once per page(1)
JS   once per page(2)  once per page(2)
  each mouseover
(1) upon first hover/mouseover
(2) when the jscript executes

-
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: Reducing network traffic for rollover images

2004-10-02 Thread Frank W. Zammetti
I really think this is a case where we might be trying to hard to be 
innovative... Just do the typical two versions of an image and some 
scripting approach.  Sure, slightly less maintainable, and yes, not 
quite as elegant code-wise, but it's a proven method that works across 
just about any browser (with JS enabled of course, but it degrades 
nicely to just the single normal state image, so no harm there).

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Robert Koberg wrote:
Robert Hunt wrote:
To clarify:
Watching the Tomcat access log and using permutations of CSS and the
FrankZ/jscript-caching-strategy to achieve the rollover effects, I've 
found
that the background image is requested:

   IExplore 6.0Netscape 7.2
  -  --
CSSeach mouseover   once per page(1)
JS   once per page(2)  once per page(2)
  each mouseover
(1) upon first hover/mouseover
(2) when the jscript executes

I have been hoping someone would offer some innovative solution, but 
there really isn't one...

You have to perform some ugly hack. Check http://alistapart.com for some 
solutions.

For example, you could provide the image with both (3?) states and 
adjust the margin to show the correct state:

a
  href=boo
  class=hoverLink normal
  onmouseover=this.className='hoverLink hover'
  onmouseout=this.className='hoverLink normal'boo/a
With the image looking like:
-
|  normal state | 30px in ht
-
|  hover state  | 30px in ht
-
.hoverLink {
background: url(images/states.gif);
}
.normal {
margin-top: 0px;
}
.hover {
margin-top: -30px;
}
something like that... :(
best,
-Rob
-
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: newbie questions

2004-10-02 Thread Cameron Roe
Thanks QM! 

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: October 1, 2004 4:05 PM
To: Tomcat Users List
Subject: Re: newbie questions

On Fri, Oct 01, 2004 at 03:42:09PM -0600, Cameron Roe wrote:
: Ok so here goes. I want a have a version of the JavaDoc for the Java
Servlet
: API on my local machine. I can then link in my IDE and get mouse-over
: javadoc for the Servlet API. Where do I get it?

java.sun.com, there should be a downloadable version.  It's buried in the
docs for J2EE; IIRC the servlet API isn't special enough to get its own doc
package. ;)


: Second question.

Please, one question per post.  That will make it easier for people to
respond to your question, and simplify archive searches.


: install-dir/webapps/ROOT then the url for the servlet would be default
to
: http://xxx.xxx.xxx:8080/servlet/myservlet. This makes it easy to write
: simple servlets to try things out without having to modify the web.xml
each
: time. 

I _really_ wish authors wouldn't rely on the Invoker servlet (or its
equivalent in other containers).  It's commented out by default in Tomcat 5
and, by the way, you'll want to get into the habit of creating explicit
servlet mappings in web.xml anyhow.  That's more portable, and makes your
URLs more resistant to unrelated changes.


: Finally for the stupid question of the day. I notice alot of information
re:
: merging apache and tomcat. My question is why? I'm assuming the Apache is
: better at serving web pages that Tomcat but is that the only reason? It
: would seem that for a small website, just having Tomcat would be fine. Any
: thoughts?

Please search the archives for details.  Long story short: some people
prefer to serve static content with Apache, even though Tomcat does that
quite well.  Another reason to use a web server in front would be to
load-balance between several Tomcat machines on the backend.

This last one isn't really an Apache httpd/Tomcat question; it's standard
n-tier app architecture.  Several books and websites will give you a much
more detailed explanation that I will in a forum post...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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]



AW: newbie questions

2004-10-02 Thread Steffen Heil
Hi

 Finally for the stupid question of the day. I notice alot of information
re: merging apache and tomcat. My question is why? I'm assuming the Apache
is better at serving web pages that Tomcat but is that the only reason? It
would seem that for a small website, just having Tomcat would be fine. Any
thoughts?

Most webmasters started with apache and somewhen decided to do dynamic stuff
with tomcat. So they didn't want to break with apache and use tomcat as
add-on, as they did with php. And people tend not to change running systems.
Moreover older tomcat versions, exspecially older java vms were slower then
apache was.

Nowadays, java vms are faster and tomcat is faster as well. And there are
really big sites, which use tomcat without apache or another web server. [1]
So, YES, it IS fine just having Tomcat for a small website, as well as for
larger sites.

The only scenario in that I would use apache as webserver in front of tomcat
if the site also requires php or another scripting language additionally to
java. Tomcat has it's CGI servlets, but it is far from beating apaches
mod_php in speed (up to now...).
 
Regards,
  Steffen

[1] I was very impressed finding jake2, which is an java implementation of
quake2. I always thought java would be fast for servlets and such but leaked
speed in graphics and video compared to non-vm languages, but jake2 reaches
about 99% of the frame rate of quake2 on the same hardware...


smime.p7s
Description: S/MIME cryptographic signature


Re: Search engine friendly URLs

2004-10-02 Thread Dov Rosenberg
Use URL Rewriting with Apache. That will do what you are looking for.



On 10/2/04 11:53 AM, Ben [EMAIL PROTECTED] wrote:

 Hi
 
 Is it possible to make the URLs on my site search engine friendly? I
 am using Tomcat and Struts.
 
 I would like to turn:
 
 http://localhost/site.do?section=bookssubsection=architecture
 
 into this:
 
 http://localhost/do/site/books/architecture
 
 Regards,
 Ben
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Dov Rosenberg
Conviveon Corporation
370 Centerpointe Circle, suite 1178
Altamonte Springs, FL 32701
http://www.conviveon.com
[EMAIL PROTECTED]
AOL IM: dovrosenberg
(407) 339-1177 x102
(407) 339-6704 (fax)
(800) 475-9890
(407) 310-8316 (cell)


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



Re: Search engine friendly URLs

2004-10-02 Thread Ben
I would like to use Tomcat alone


On Sat, 02 Oct 2004 19:37:35 -0400, Dov Rosenberg
[EMAIL PROTECTED] wrote:
 Use URL Rewriting with Apache. That will do what you are looking for.
 
 
 
 
 On 10/2/04 11:53 AM, Ben [EMAIL PROTECTED] wrote:
 
  Hi
 
  Is it possible to make the URLs on my site search engine friendly? I
  am using Tomcat and Struts.
 
  I would like to turn:
 
  http://localhost/site.do?section=bookssubsection=architecture
 
  into this:
 
  http://localhost/do/site/books/architecture
 
  Regards,
  Ben
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 --
 Dov Rosenberg
 Conviveon Corporation
 370 Centerpointe Circle, suite 1178
 Altamonte Springs, FL 32701
 http://www.conviveon.com
 [EMAIL PROTECTED]
 AOL IM: dovrosenberg
 (407) 339-1177 x102
 (407) 339-6704 (fax)
 (800) 475-9890
 (407) 310-8316 (cell)
 
 -
 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]