How to handle client session information if client has sessions disabled?

2004-06-25 Thread Ben Bookey
Dear list,

What is the normal way of persisting session type information if the
client has sessions/cookies disabled. 

I guess if he's got sessions switched off, then session.getId() will
return null ?

The userID must therefore be invented somehow on the server, and passed
between the server and client. Objects normally stored in a session,
could be stored inside the application object ? or persisted to disk ? with
this userID.

Would appreciate any advice,

regards
Ben




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



Re: How to handle client session information if client has sessions disabled?

2004-06-25 Thread Mike Fowler
Ben-
You need to encode your URLs so that the session ID becomes part of the 
URL. Use the second line for redirects.

httpServletResponse.encodeURL(/myapp/page2)
httpServletResponse.encodeRedirectURL(/myapp/page2)
-Mike Fowler
I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it
Ben Bookey wrote:
Dear list,
What is the normal way of persisting session type information if the
client has sessions/cookies disabled. 

I guess if he's got sessions switched off, then session.getId() will
return null ?
The userID must therefore be invented somehow on the server, and passed
between the server and client. Objects normally stored in a session,
could be stored inside the application object ? or persisted to disk ? with
this userID.
Would appreciate any advice,
regards
Ben

-
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: How to handle client session information if client has sessions disabled?

2004-06-25 Thread Ben Bookey

Hi Mike

Thanks for the reply.  I think I have missed something here. I believe if we
store an object in the session
its still stored on the server, but is specific to the active user-session.
I cant imagine any java objects been sent across the network to the client
... In addition,  i am suprised that storing objects in the session object
works, when the client has sessions switched off hence app.setAttribute() ??

Help !!!


regards,

Ben

- Original Message -
From: Mike Fowler [EMAIL PROTECTED]
To: Ben Bookey [EMAIL PROTECTED]
Sent: Friday, June 25, 2004 5:41 PM
Subject: Re: How to handle client session information if client has sessions
disabled?


 Ben-

 Once you encode the URL, the subsequent request to Tomcat will cause
 tomcat to pull the JSESSIONID from the URL (in the referer header) so
 session.getId() will work just the same as before.

 As for your second question, I'd store everything in the session.
 Something like:

 session.setAttribute(key,value);

 This eliminates all serverside processing of the user (save finding the
 session ID) and off-loads the memory required to store your objects to
 the client.

 Hope this helps!

 -Mike Fowler
 I could be a genius if I just put my mind to it, and I,
 I could do anything, if only I could get 'round to it


 Ben Bookey wrote:
  Thanks for the reply.
 
  O.k so I can store the session userid, which is very useful, for a
  stateless exchange between
  client and server. Can i still use session.getId() to get the id, or
  must I do something special, when the id is stored in
  the url ?
 
  Where would you recommend storing all my objects, particular to a user
  ? inside the application object,  something like ?
 
  application.setAttribute(userid  myObject ,myObject);
 
  I would really appreciate your help
 
  regards
 
  Ben



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



Re: How to handle client session information if client has sessions disabled?

2004-06-25 Thread Filip Hanik - Dev
whether there is a session on the server or not, has nothing to do with the client 
having cookies turned off.
you can run sessions from the client using url rewriting, when cookies are turned off.
response.encodeURL() is how you do it
this appends a ;JSESSIONID= in your URL, and the client can maintain a session 
that way
Filip

- Original Message - 
From: Ben Bookey [EMAIL PROTECTED]
To: Mike Fowler [EMAIL PROTECTED]
Cc: Tomcat User List [EMAIL PROTECTED]
Sent: Friday, June 25, 2004 11:12 AM
Subject: Re: How to handle client session information if client has sessions disabled?


 
 Hi Mike
 
 Thanks for the reply.  I think I have missed something here. I believe if we
 store an object in the session
 its still stored on the server, but is specific to the active user-session.
 I cant imagine any java objects been sent across the network to the client
 ... In addition,  i am suprised that storing objects in the session object
 works, when the client has sessions switched off hence app.setAttribute() ??
 
 Help !!!
 
 
 regards,
 
 Ben
 
 - Original Message -
 From: Mike Fowler [EMAIL PROTECTED]
 To: Ben Bookey [EMAIL PROTECTED]
 Sent: Friday, June 25, 2004 5:41 PM
 Subject: Re: How to handle client session information if client has sessions
 disabled?
 
 
  Ben-
 
  Once you encode the URL, the subsequent request to Tomcat will cause
  tomcat to pull the JSESSIONID from the URL (in the referer header) so
  session.getId() will work just the same as before.
 
  As for your second question, I'd store everything in the session.
  Something like:
 
  session.setAttribute(key,value);
 
  This eliminates all serverside processing of the user (save finding the
  session ID) and off-loads the memory required to store your objects to
  the client.
 
  Hope this helps!
 
  -Mike Fowler
  I could be a genius if I just put my mind to it, and I,
  I could do anything, if only I could get 'round to it
 
 
  Ben Bookey wrote:
   Thanks for the reply.
  
   O.k so I can store the session userid, which is very useful, for a
   stateless exchange between
   client and server. Can i still use session.getId() to get the id, or
   must I do something special, when the id is stored in
   the url ?
  
   Where would you recommend storing all my objects, particular to a user
   ? inside the application object,  something like ?
  
   application.setAttribute(userid  myObject ,myObject);
  
   I would really appreciate your help
  
   regards
  
   Ben
 
 
 
 -
 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: How to handle client session information if client has sessions disabled?

2004-06-25 Thread Mike Fowler
Sorry, you're quite right it does remain on the server, I'm just being 
silly. The session.setAttribute() works because the server is 
remembering the session by the JSESSIONID which is now in the URL of the 
request rather than in a cookie header being sent by the request.

-Mike Fowler
I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it
Ben Bookey wrote:
Hi Mike
Thanks for the reply.  I think I have missed something here. I believe if we
store an object in the session
its still stored on the server, but is specific to the active user-session.
I cant imagine any java objects been sent across the network to the client
... In addition,  i am suprised that storing objects in the session object
works, when the client has sessions switched off hence app.setAttribute() ??
Help !!!
regards,
Ben
- Original Message -
From: Mike Fowler [EMAIL PROTECTED]
To: Ben Bookey [EMAIL PROTECTED]
Sent: Friday, June 25, 2004 5:41 PM
Subject: Re: How to handle client session information if client has sessions
disabled?

Ben-
Once you encode the URL, the subsequent request to Tomcat will cause
tomcat to pull the JSESSIONID from the URL (in the referer header) so
session.getId() will work just the same as before.
As for your second question, I'd store everything in the session.
Something like:
session.setAttribute(key,value);
This eliminates all serverside processing of the user (save finding the
session ID) and off-loads the memory required to store your objects to
the client.
Hope this helps!
-Mike Fowler
I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it
Ben Bookey wrote:
Thanks for the reply.
O.k so I can store the session userid, which is very useful, for a
stateless exchange between
client and server. Can i still use session.getId() to get the id, or
must I do something special, when the id is stored in
the url ?
Where would you recommend storing all my objects, particular to a user
? inside the application object,  something like ?
application.setAttribute(userid  myObject ,myObject);
I would really appreciate your help
regards
Ben


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


Subject: Re: How to handle client session information if client has sessions disabled?

2004-06-25 Thread Ben Bookey, GIStec GmbH
Is it possible to use this sort of session handling (passing the SESSION ID
over HTTP)
when using the Realm security feature within TC ?
I have noticed that there is a cookie saved, JSESSIONID which
stores the SessionID.


Would appreciate any info.

Ben


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



How to handle tomcat's stdout.log size

2004-04-13 Thread Allistair Crossley
Hi Guys, me again :)

I am noticing that the stdout.log is getting rather large very quickly. It is 
specified in the service.bat as

--StdOutputFile %CATALINA_HOME%\logs\stdout.log

It does not appear to have any way of rolling it over or restricting it's size via the 
server.xml. 

Can anyone suggest how I might throttle it to 5MB say or suggest an alternative? It 
seems to store useful stuff that the localhost_ log does not store so I would like to 
keep this type of information..but not at 20MB when I cannot open it!

Cheers, ADC


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



How to handle requests to www.domain.com (no context path) w/ISAPI redirector and IIS?

2002-10-24 Thread Steve Ton
 Hi,
 
 I am having a problem getting IIS to redirect to Tomcat with Virtual
 Servers.
 What I would like to happen is when I type http://host1.mydomain.com or 
 http://host2.mydomain.com for IIS to redirect these requests to Tomcat
 through
 the redirector. I have downloaded  configured the isapi_redirect.dll
 redirector
 to work properly between IIS  Tomcat. I am able to get the examples to
 come
 up by typing http://localhost/examples  executing the JSPs  servlets.  I
 get the green arrow
 in the IIS ISAPI filters tab.
 
 Ideally what I would like to do is also type in
 http://host1.mydomain.com/examples
 or http://host2.mydomain.com/examples and have IIS redirect the requests
 to Tomcat to
 serve up the *.jsp and servlet/* content. I have defined 2 virtual servers
 in IIS called
 host1.mydomain.com  host2.mydomain.com.  I've set the IIS Home directory
 to the
 webapps directory of Tomcat for these virtual servers.  I've also added an
 ISAPI filter
 called jakarta pointing to the isapi_redirect.dll file  the filter
 status is green arrow
 pointing up. Default documents set to default.html and default.htm.  
 
 In my uriworkermap.properties file, I have defined the following entries:
 
 /host1.mydomain.com/examples/*.jsp=$(default.worker)
 /host1.mydomain.com/examples/servlet/*=$(default.worker)
 /host1.mydomain.com/*.jsp=$(default.worker)
 /host1.mydomain.com/servlet/*=$(default.worker)
 /*.jsp=$(default.worker)
 /servlet/*=$(default.worker)
 
 In my server.xml file, I've added the following sections :
 
   Host name=host1.mydomain.com debug=5 appBase=webapps 
unpackWARs=true autoDeploy=true
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=host1.mydomain.com_log.
 suffix=.txt
   timestamp=true/
 Context path=/examples docBase=examples debug=0
  reloadable=true crossContext=true
   .
 /Context
/Host
 
 
 I have the following setup:
 Tomcat 4.1.10
 IIS 5.0
 Win2K server
 
 When I type in http://host1.mydomain.com/examples, I get an 
 HTTP 500 - Internal server error 
 Internet Explorer 
 
 Any ideas or help would be appreciated.  Thanks.

attachment: winmail.dat--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org


AW: How to handle requests in quick sessions / possible thread issue

2002-10-11 Thread Ralph Einfeldt

There is no general answer to this.

There are following common options:

- Deny request until the first is finished:

  static Boolean cMutex = new Boolean(true);
  static boolean cRunning = false;



  // in the method that performs the processing
  synchronized (cMutex) {
 if (cRunning) {
   // return [error]message
 } else {
   cRunning = true;
 }
  }
  try {
// Do what ever has to be done
  } finally {
cRunning = false;
  }  

  (Just one approach, there are several others)

- Serialize Requests

  synchronized void doSomething() {
   // Do what ever has to be done
  }

- Stop the first request
  Depending on the code that you want to perform for
  the request this can get very tricky.

- run them multi threaded
  To do that your code must be thread safe,
  and your database code must be designed in a way
  that the threads will not lock each other. What
  you have to do to achieve this, depends on you own 
  code and the locking strategy of the database. 
  (Wether it has Table-, Page- or Row- locking)

 -Ursprüngliche Nachricht-
 Von: Michael Nicholson [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 10. Oktober 2002 17:53
 An: Tomcat Users List
 Betreff: OT: How to handle requests in quick sessions / 
 possible thread
 issue
 
 So, I now have an Oracle backend that's supposed to be 
 accessed by jsps and servlets.  Which works.  However, if a 
 user gets impatient (I know, it never happens, but just in 
 case!), then while the database is doing it's thing, the java 
 process receives a new request and starts a new thread, 
 right?  But this is a problem in that it stops responding.  
 Entirely.  I don't know if this means that my db connection 
 got closed midway through the second process (which should 
 now have the request and response instances that my browser 
 wants back), and therefore it's sitting there going which 
 way did it go, which way did it go (you have to imagine the 
 silly cartoon voice), or what.  And I don't really know that 
 connection pooling will help.
 

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




OT: How to handle requests in quick sessions / possible thread issue

2002-10-10 Thread Michael Nicholson

So, this is my first project where I need to manage a large number of concurrent 
requests.  And, to make things worse, most of my previous experience in programming is 
Visual Basic for Applications running in either Excel or Access.  (Don't worry, it 
gets more on topic...)

So, I now have an Oracle backend that's supposed to be accessed by jsps and servlets.  
Which works.  However, if a user gets impatient (I know, it never happens, but just in 
case!), then while the database is doing it's thing, the java process receives a new 
request and starts a new thread, right?  But this is a problem in that it stops 
responding.  Entirely.  I don't know if this means that my db connection got closed 
midway through the second process (which should now have the request and response 
instances that my browser wants back), and therefore it's sitting there going which 
way did it go, which way did it go (you have to imagine the silly cartoon voice), or 
what.  And I don't really know that connection pooling will help.

Now, more experinced minds than mine have solved this before.  Most commercial/decent 
sites seem to handle it fine:  do they simply interrupt the old process and then start 
a new one?  Should the beginning of my db-routine have something like:

Connection con = null;  //to close any currently running process on this connection in 
this object/bean/servlet
try
{
  crap;
} catch (crappyException ce) {
  handle it
}  finally  {
  if (con!=null)
  {
con.close();
con=null;
  }
}

Would that solve my problem?  Or do I need to let the first request finish itself and 
then start a new one?  Any ideas?

Thanks for your time.

Michael Nicholson


Re: How to handle requests in quick sessions / possible thread issue

2002-10-10 Thread Michael Nicholson

ok, yes, I'm dumb... the subject should have said How to handle requests in
quick succession / possible thread issues

Mike


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




how to handle requests to www.domain.com (no context path) w/ISAPI redirector and IIS?

2002-09-22 Thread Jeff

I've gotten to the point where I can have requests sent to IIS at
http://anysiteonwin2kmachine.mydomain.com/specific_context_path handled by
the webapp whose context path is /specific_context_path , but I'm at a loss
as to how requests to a site's default page (index.jsp) should be set up
among multiple different virtual IIS hosts. In other words, how to handle
requests to http://specificvirtualsiteonwin2kmachine.mydomain.com or
http://differentvirtualsiteonwin2kmachine.anotherdomain.com that implicitly
map to index.jsp in the site's root directory and get IIS to let Tomcat
handle them.

The main problem I'm seeing is that the whole ISAPI redirector mechanism
seems to have no concept of virtual hosts, nor does it seem to have any
mechanism for handling requests that don't involve a recognizable context
path as part of the request sent to IIS.

in other words, I can set up uriworkermap.properties with:

/context1=$(default_worker)
/context1/*=$(default_worker)
/context2=$(default_worker)
/context2/*=$(default_worker)

and have requests sent to
http://irrelevant_hostname.resolving_to_server_ip.net/context1 handled by
the webapp whose context path is /context1, and have requests sent to
http://irrelevant_hostname.resolving_to_server_ip.net/context2 handled by
the webapp whose context path is /context2, but I see no straightforward way
to have requests made to http://specific_site.hosted_on_myserver.com return
one default jsp file associated with /context1 and have requests made to
http://different_site.hosted_on_myserver.net return a (different) jsp file
associated with /context2.

even if adding

/*.jsp=$(default_worker)

to uriworkermap.properties worked (it didn't), there is still no apparent
mechanism to associate *.jsp for one site with /context1/*.jsp and *.jsp for
another site with /context2/*.jsp

What seems to be missing is a mechanism to tell the ISAPI redirector,
requests made to http://firsthost/*.jsp should be proxied over to Tomcat as
though they were really made to http://firsthost/context1/*.jsp;, requests
made to http://secondhost/*.jsp should be proxied over to Tomcat as though
they were really made to http://secondhost/context2/*.jsp; (with each
handled by a separate Tomcat virtual host), with the existing uriworkermap
scheme simply ADDING context paths to specific IIS virtual sites indicating
requests that should simply be proxied over to Tomcat unchanged, like in
this hypothetical properties file I'm envisioning:

http://iis.virtual.host/*.jsp=http://tomcat.virtual.host/firstcontextpath
http://www.iis.virtual.host/*.jsp=http://tomcat.virtual.host/firstcontextpat
h
http://iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
http://www.iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
http://iis.virtual.host/somecontext/*=http://tomcat.virtual.host/differentco
ntext
http://www.iis.virtual.host/somecontext/*=http://tomcat.virtual.host/differe
ntcontext

with other IIS virtual hosts corresponding to different tomcat virtual
hosts:
http://another.virtual.host/*.jsp=http://different.tomcat.virtualhost/its_co
ntextpath
http://another.virtual.host/struts/*=http://different.tomcat.virtualhost/str
uts

etc.

In other words, providing a mechanism to identify requests that IIS needs to
let Tomcat handle, but give Tomcat (or the redirector) enough information to
intelligently handle requests that make sense to IIS, but not to Tomcat
(without a little rewriting first).

Actually, such a scheme is more or less how I kludged Apache to handle a
similar situation a few months ago (when mod_jk was missing a feature I
needed, and mod_webapp wasn't quite ready for real use) using mod_rewrite to
proxy requests from Apache to Tomcat at port 8080 (dispensing with ajp
altogether). It was ugly and inefficient, but it made the sites work and
kept my boss happy...

Am I overlooking an obvious solution, or is there really no good way to have
Tomcat handle requests to a specific IIS virtual site's default index.jsp
file, or to differentiate among virtual hosts at the Tomcat level as well as
at the IIS level. Actually, if the scheme I mentioned above permitted
context path substitution (so the Tomcat context path had no necessary path
similarity to the request made to IIS), virtual hosts at the Tomcat level
would be nice, but not necessary (http://first.com/servlet could be sent to
Tomcat as http://localhost/first, http://second.com/servlet could be sent to
Tomcat as http://localhost/second, etc.)



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




RE: how to handle requests to www.domain.com (no context path) w/ISAPI redirector and IIS?

2002-09-22 Thread Reynir Hübner

hi, 
you will have to create a virtual host in IIS, and install the ISAPI redirector in 
that host to redirect to a host installed in tomcat.
in other words, if you have a virtual host configured in tomcat with by the name 
host.domain.com you must have a virtual host with the same hostmark in IIS, with the 
isapi_redirect filter installed.

To enable the default.jsp or index.jsp you must have a default.asp page in the folder 
that makes a serverside redirect to index.jsp, as to be able to map the IISredirect 
url (in uriworkermap.properties) you must have a file ending .jsp, if you set 
index.jsp as a default document in IIs the ending does not get resolved in the URL and 
the request is not redirected.


hope it helps,
[EMAIL PROTECTED]


 -Original Message-
 From: Jeff [mailto:[EMAIL PROTECTED]]
 Sent: 22. september 2002 19:13
 To: [EMAIL PROTECTED]
 Subject: how to handle requests to www.domain.com (no context path)
 w/ISAPI redirector and IIS?
 
 
 I've gotten to the point where I can have requests sent to IIS at
 http://anysiteonwin2kmachine.mydomain.com/specific_context_pat
 h handled by
 the webapp whose context path is /specific_context_path , but 
 I'm at a loss
 as to how requests to a site's default page (index.jsp) 
 should be set up
 among multiple different virtual IIS hosts. In other words, 
 how to handle
 requests to http://specificvirtualsiteonwin2kmachine.mydomain.com or
 http://differentvirtualsiteonwin2kmachine.anotherdomain.com 
 that implicitly
 map to index.jsp in the site's root directory and get IIS to 
 let Tomcat
 handle them.
 
 The main problem I'm seeing is that the whole ISAPI 
 redirector mechanism
 seems to have no concept of virtual hosts, nor does it seem 
 to have any
 mechanism for handling requests that don't involve a 
 recognizable context
 path as part of the request sent to IIS.
 
 in other words, I can set up uriworkermap.properties with:
 
 /context1=$(default_worker)
 /context1/*=$(default_worker)
 /context2=$(default_worker)
 /context2/*=$(default_worker)
 
 and have requests sent to
 http://irrelevant_hostname.resolving_to_server_ip.net/context1
  handled by
 the webapp whose context path is /context1, and have requests sent to
 http://irrelevant_hostname.resolving_to_server_ip.net/context2
  handled by
 the webapp whose context path is /context2, but I see no 
 straightforward way
 to have requests made to 
 http://specific_site.hosted_on_myserver.com return
 one default jsp file associated with /context1 and have 
 requests made to
 http://different_site.hosted_on_myserver.net return a 
 (different) jsp file
 associated with /context2.
 
 even if adding
 
 /*.jsp=$(default_worker)
 
 to uriworkermap.properties worked (it didn't), there is still 
 no apparent
 mechanism to associate *.jsp for one site with 
 /context1/*.jsp and *.jsp for
 another site with /context2/*.jsp
 
 What seems to be missing is a mechanism to tell the ISAPI redirector,
 requests made to http://firsthost/*.jsp should be proxied 
 over to Tomcat as
 though they were really made to 
 http://firsthost/context1/*.jsp;, requests
 made to http://secondhost/*.jsp should be proxied over to 
 Tomcat as though
 they were really made to http://secondhost/context2/*.jsp; (with each
 handled by a separate Tomcat virtual host), with the existing 
 uriworkermap
 scheme simply ADDING context paths to specific IIS virtual 
 sites indicating
 requests that should simply be proxied over to Tomcat 
 unchanged, like in
 this hypothetical properties file I'm envisioning:
 
 http://iis.virtual.host/*.jsp=http://tomcat.virtual.host/first
 contextpath
 http://www.iis.virtual.host/*.jsp=http://tomcat.virtual.host/f
 irstcontextpat
 h
 http://iis.virtual.host/servlet/*=http://tomcat.virtual.host/servlet
 http://www.iis.virtual.host/servlet/*=http://tomcat.virtual.ho
 st/servlet
 http://iis.virtual.host/somecontext/*=http://tomcat.virtual.ho
 st/differentco
 ntext
 http://www.iis.virtual.host/somecontext/*=http://tomcat.virtua
 l.host/differe
 ntcontext
 
 with other IIS virtual hosts corresponding to different tomcat virtual
 hosts:
 http://another.virtual.host/*.jsp=http://different.tomcat.virt
ualhost/its_co
ntextpath
http://another.virtual.host/struts/*=http://different.tomcat.virtualhost/str
uts

etc.

In other words, providing a mechanism to identify requests that IIS needs to
let Tomcat handle, but give Tomcat (or the redirector) enough information to
intelligently handle requests that make sense to IIS, but not to Tomcat
(without a little rewriting first).

Actually, such a scheme is more or less how I kludged Apache to handle a
similar situation a few months ago (when mod_jk was missing a feature I
needed, and mod_webapp wasn't quite ready for real use) using mod_rewrite to
proxy requests from Apache to Tomcat at port 8080 (dispensing with ajp
altogether). It was ugly and inefficient, but it made the sites work and
kept my boss happy...

Am I overlooking an obvious solution

How to handle the JNI Exception

2001-09-03 Thread 0xLJCCC6BDDCz/0xLJD1D0BEBFD4BAB7FECEF1C6F7D1D0BEBFCAD2z/0xLJC1AACFEBz


We using JNI in servlet.
The JNI throws a exception, and the servlet handle the exception.
But now, when we throws the Exception which define in JDK, all of thing ok.
When we throws the exception which we define, the tomcat think there is no
method to handle that exception

etc: MyException extend Exception.

We think there should be some configure is not ok.
Can any body give us advice about tomcat configuration which related to
exception handle.

Thanks


 /*
  *  ÌƽÜ(Jebtang)
  *
  *  ÁªÏëÑо¿Ôº ·þÎñÆ÷Ñо¿ÊÒ
  *  Server System Lab
  *  Legend Corporate Research  Development
  *  Tel 010-8289-4127
  *  Email: [EMAIL PROTECTED]
  */


Re: How to handle the JNI Exception

2001-09-03 Thread Dmitri Colebatch

ou still need to adhere to the servlet api - that says you can throw
a
ServletException - so you will need to wrap your exception in a servlet
exception, although I have no idea how to that in JNI.

cheers
dim

On Mon, 3 Sep 2001, 
0xLJCCC6BDDCz/0xLJD1D0BEBFD4BAB7FECEF1C6F7D1D0BEBFCAD2z/0xLJC1AACFEBz wrote:

 
 We using JNI in servlet.
 The JNI throws a exception, and the servlet handle the exception.
 But now, when we throws the Exception which define in JDK, all of thing ok.
 When we throws the exception which we define, the tomcat think there is no
 method to handle that exception
 
 etc: MyException extend Exception.
 
 We think there should be some configure is not ok.
 Can any body give us advice about tomcat configuration which related to
 exception handle.
 
 Thanks
 
 
  /*
   *  ÌƽÜ(Jebtang)
   *
   *  ÁªÏëÑо¿Ôº ·þÎñÆ÷Ñо¿ÊÒ
   *  Server System Lab
   *  Legend Corporate Research  Development
   *  Tel 010-8289-4127
   *  Email: [EMAIL PROTECTED]
   */




How to handle this.

2001-07-30 Thread Wang, Jianming

Hi everybody,

I have an web application and I want to handle the event of user's clicking
on the Back button.  Does anybody know how to do it?  Thanks in advance.

JW.



Re: How to handle this.

2001-07-30 Thread Tsinwah Lee

Yo ucan use javaScript to do that.

Wang, Jianming wrote:

 Hi everybody,

 I have an web application and I want to handle the event of user's clicking
 on the Back button.  Does anybody know how to do it?  Thanks in advance.

 JW.




RE: How to handle this.

2001-07-30 Thread Wang, Jianming

Do you know how?

-Original Message-
From: Tsinwah Lee [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle this.


Yo ucan use javaScript to do that.

Wang, Jianming wrote:

 Hi everybody,

 I have an web application and I want to handle the event of user's
clicking
 on the Back button.  Does anybody know how to do it?  Thanks in advance.

 JW.



Re: How to handle this.

2001-07-30 Thread Mike Alba

See this link
http://www.javascript-page.com/onunload.html

I just found that by doing a normal
google search. In the future cant you
do this rather then wasting an email
when it takes less than a minute to find it?

- Original Message -
From: Wang, Jianming [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 30, 2001 12:12 PM
Subject: RE: How to handle this.


 Do you know how?

 -Original Message-
 From: Tsinwah Lee [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 30, 2001 2:57 PM
 To: [EMAIL PROTECTED]
 Subject: Re: How to handle this.


 Yo ucan use javaScript to do that.

 Wang, Jianming wrote:

  Hi everybody,
 
  I have an web application and I want to handle the event of user's
 clicking
  on the Back button.  Does anybody know how to do it?  Thanks in advance.
 
  JW.





RE: How to handle this.

2001-07-30 Thread Bartosz Adamczyk (LMC)

The unload event doesn't only occur when the user clicks on the back button.
What if he closes the window.  Instead of bashing people when you give bad
advice, how about you check your own advice.

-Original Message-
From: Mike Alba [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 3:11 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle this.


See this link
http://www.javascript-page.com/onunload.html

I just found that by doing a normal
google search. In the future cant you
do this rather then wasting an email
when it takes less than a minute to find it?

- Original Message -
From: Wang, Jianming [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 30, 2001 12:12 PM
Subject: RE: How to handle this.


 Do you know how?

 -Original Message-
 From: Tsinwah Lee [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 30, 2001 2:57 PM
 To: [EMAIL PROTECTED]
 Subject: Re: How to handle this.


 Yo ucan use javaScript to do that.

 Wang, Jianming wrote:

  Hi everybody,
 
  I have an web application and I want to handle the event of user's
 clicking
  on the Back button.  Does anybody know how to do it?  Thanks in advance.
 
  JW.




Re: How to handle this.

2001-07-30 Thread Richard Draucker

I think IE gives you access to the back button, but most browsers don't.  
There are javascript methods you can use with the new event model, but they 
won't work on older browsers.  In short, writing a catch for the back button 
can't be handled consistently.  



On Monday 30 July 2001 03:11 pm, you wrote:
 See this link
 http://www.javascript-page.com/onunload.html

 I just found that by doing a normal
 google search. In the future cant you
 do this rather then wasting an email
 when it takes less than a minute to find it?

 - Original Message -
 From: Wang, Jianming [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 30, 2001 12:12 PM
 Subject: RE: How to handle this.

  Do you know how?
 
  -Original Message-
  From: Tsinwah Lee [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 30, 2001 2:57 PM
  To: [EMAIL PROTECTED]
  Subject: Re: How to handle this.
 
 
  Yo ucan use javaScript to do that.
 
  Wang, Jianming wrote:
   Hi everybody,
  
   I have an web application and I want to handle the event of user's
 
  clicking
 
   on the Back button.  Does anybody know how to do it?  Thanks in
   advance.
  
   JW.

-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers




How to handle so that a class from a jsp file implements an interface ?

2001-03-19 Thread Samuel Arnod-Prin

Hello,

how to handle so that a class from a jsp file implements an interface ?
there is now way using the directive @page implements="..."

Once again, I've modified tomcat so that it is possible,
but I'd prefer not to have to :)

thank you all




RE: how to handle a user clicking very fast repeatedly on a web page

2001-01-28 Thread Luis Andrei Cobo

A long time ago I had this problem, specifically with submit buttons for
forms. But The technique I used was rather straight forward:

in your web page have this javascript:


function disableMe(obj) {
obj.disabled=true;
}


then your HTML buttons and links can have this as an onCLick handler:
eg:
input type="submit" name="submit" value="Click Me Many Many Times I Dare
you!!" onClick="disableMe(this)"

What this does is renders the link or button unclickable. If you have a
submit button problem, and are worried, this is a very quick fix.

Unfortunately this is only half of the solution since this way only works on
IE:

but there is another solution for netscape!!

place all the objects you want to disable into netscape layers and then
invisify them onClick =) its  a dirty trick but it works.

Have fun =)

Luis Andrei Cobo



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




How to handle a user clicking very fast repeatedly on a web page

2001-01-27 Thread Betty Chang



Hi --

This is a sort of a strange question. If a user 
clicks very fast repeatedly on a web page on links that go back to tomcat for a 
new page generated by a servlet, we can get problems where suddenly 
the servlet does not respond.

How do others handle this 
scenario? Is it supposed to be okay for a user to 
do this? Does the webserver queue up all these clicks? Does the 
browser?

I know that all sounded kind of lame, but I'm not sure I 
understand what is going on and what is failing.

Betty



Re: How to handle a user clicking very fast repeatedly on a web page

2001-01-27 Thread Pete Ehli



I am not sure what your problem could be - 
only when you restart tomcat does it check for changes in your class files. If 
there are changes it will reload the servlet - this causes a delay in access 
time but subsuquent requests should be alot faster because the classloader has 
loaded the class into memory. If you want to deploy your sevlets and web app and 
you will make no further changes you can set your context so class checking and 
reloading is not taking place by changing your context via 
server.xml
//My context via my 
server.xml
Context 
path="/bookstore"docBase="webapps/bookstore"crossContext="false"debug="0"reloadable="false" 
 /Change this line to 
false!!/Context

I tink my train of thought is correct on 
this - but please if I am wrong, someone pointout to me errors or 
corrections
Thank You 
-- Pete --

  - Original Message - 
  From: 
  Betty Chang 
  
  To: [EMAIL PROTECTED] 
  Sent: Saturday, January 27, 2001 8:11 
  AM
  Subject: How to handle a user clicking 
  very fast repeatedly on a web page
  
  Hi --
  
  This is a sort of a strange question. If a user 
  clicks very fast repeatedly on a web page on links that go back to tomcat for 
  a new page generated by a servlet, we can get problems where 
  suddenly the servlet does not respond.
  
  How do others handle this 
  scenario? Is it supposed to be okay for a user 
  to do this? Does the webserver queue up all these clicks? Does the 
  browser?
  
  I know that all sounded kind of lame, but I'm not sure I 
  understand what is going on and what is failing.
  
  Betty