oracle drivers

2002-06-04 Thread puneet sachar

good morning developers!


tell me if i want to use oracle as my database where
do i keep my drivers in the tomcat and 

2)
where r the oracles drivers 

3) from where i get type 3 or type 4 drivers

4) does oracle 8i personla edition have them...

where is location , so that i copy /paste them to
desired folder


regards
Puneet

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




RE: oracle drivers

2002-06-04 Thread Lee Chin Khiong


put it into tomcat_directory/common/lib
All driver comes with oracle or you cane download it from oracle web site.


-Original Message-
From: puneet sachar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:25 PM
To: Tomcat Users List
Subject: oracle drivers 


good morning developers!


tell me if i want to use oracle as my database where
do i keep my drivers in the tomcat and 

2)
where r the oracles drivers 

3) from where i get type 3 or type 4 drivers

4) does oracle 8i personla edition have them...

where is location , so that i copy /paste them to
desired folder


regards
Puneet

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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



about JavaBeans

2002-06-04 Thread Anibal Constante Brito

I'm doing a simple JavaBenas, like the

jsp:useBean id=JSPWithCounterBeanId scope=session
class=jsptutorial.JSPWithCounterBean /
jsp:setProperty name=JSPWithCounterBeanId property=* /

It very simple, but my question is how can I send text o something to
browser from inside the JavaBeans, inside de JSPWithCounterBeanId for
example?

Best Regards.
Owen.



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




Session variables?

2002-06-04 Thread Anibal Constante Brito

How can I put o retrieve a variable session like in ASP Session('text') =
text?

in JSP or JavaBeans?

Best Regards.
Owen.

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




RE: oracle drivers

2002-06-04 Thread puneet sachar

thanx mr. Lee

do for these drivers ,,

we need any jdk api i mean additional api's needed for
type -3 ,-4 drivers

thanx a lot

Puneet


--- Lee Chin Khiong [EMAIL PROTECTED] wrote:
 
 put it into tomcat_directory/common/lib
 All driver comes with oracle or you cane download it
 from oracle web site.
 
 
 -Original Message-
 From: puneet sachar [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 04, 2002 2:25 PM
 To: Tomcat Users List
 Subject: oracle drivers 
 
 
 good morning developers!
 
 
 tell me if i want to use oracle as my database where
 do i keep my drivers in the tomcat and 
 
 2)
 where r the oracles drivers 
 
 3) from where i get type 3 or type 4 drivers
 
 4) does oracle 8i personla edition have them...
 
 where is location , so that i copy /paste them to
 desired folder
 
 
 regards
 Puneet
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Basic Authentication: Tomcat 4 and IIS 5.0 generates 403 Error

2002-06-04 Thread alastair

We are trying to get basic authentication to work with Tomcat 4 and IIS
5, however it generates a 403 error instead.

Can someone point me in the right direction? We managed to get it
working in Tomcat 3.3, but now the pop up just isnt appearing  -- it
goes straight to the forbidden page.

Can someone help us with this please?

Thanks

PS :- Not sure if this helps, but we have added the following tag to the
context-specific web.xml file. What changes (if any are required to
other files, such as conf/server.xml, or IIS itself) to make the basic
authentication work? 

 security-constraint
  web-resource-collection
web-resource-nameProtected Area/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
  auth-constraint
 role-nameagent/role-name
  /auth-constraint
/security-constraint


alastair mcalpine | smartidea
w +65 62343143 m +65 91444307
[EMAIL PROTECTED]
www.smartidea.com 





??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Tony LaPaso

Hi all,

In looking at past posts, I'm afraid I know the horrible answer
to this issue but I thought I'd ask just in case I missed
anything.

Let me start by saying I'm using Tomcat v4.0.4 beta 3.

As you know, when a client (usually a web browser) has a cached
version of a resource (usually a web page) it can send an
If-Modified-Since header to the HTTP server. The server
compares the time/date stamp specified in the header with that of
the requested resource. If the resource has *not* been modified
since the time specified in the If-Modified-Since header, the
server sends back a 304 (Not-Modified) response, effectively
telling the client (usually a web browser) that its cached
version of the resource is still valid.

When writing a servlet, it's easy to handle this sort of
scenario. The javax.servlet.http.HttpServlet class has a
service() method. This method first checks if the incoming HTTP
method is a GET. If it is, the service() method proceeds to
call the getLastModified() method of the servlet. As a
developer, you can override getLastModified() to return a long
value representing the last time the requested resource was
changed. Depending on the value returned by getLastModified()
(note that -1 is returned if you don't override the method) the
service() method may simply return a 304, Not-Modified response
rather than calling the servlet's doGet() method.

Now, the $18.32 Question: How do you ensure getLastModified()
is called in JSP?

No, you cannot simply do this:

%!
   public long getLastModified() {
  return xxx;
   }
%

The problem is that the above method will never be called by the
container.

I traced through some of the Tomcat/Catalina/Jasper code and it
seems to me that the response code is being set to 200/OK very
early on in the processing.

I also took a cursory look at the JSP spec and didn't find any
indication of setting a Not-Modified response code...so, I am
thinking this is something that is (strangely) missing in the JSP
specification. I have a JSP page that needs to update itself once
per day. Therefore, it would be very handy to have the
getLastModified() functionality enjoyed by servlet writers.

Can anyone confirm this?

Thanks...


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




Re: Out of Memory Error - plz help

2002-06-04 Thread oz


I'm not sure this answers your question, but hopefully:
1. I can't say what the cause for the out of memory error is, but if you
are writing in Java (JSP or servlet), you can try and check the memory
status on your computer. This is done by:

Runtime rt = Runtime.getRuntime();
long mem = rt.totalMemory();
long freemem = rt.freeMemory();

The first line gives you a runtime environment, the second one gives you
the amount of memory the JAVA Runtime Environment (JRE) currently
possesses, and the third line gives you the amount of available memory.
This should help you debug and find the mischievous code.

2. In order to launch the JRE with more memory, you can set the JAVA_OPTS
environment variable, which Catalina uses, in the following manner:
JAVA_OPTS=-ms10M -mx512M

-ms sets the minimum amount of memory for the JRE, in this case it's set to
10MB.
-mx sets the maximum amount of memory (I think the default is 64MB, which
should be quite a lot, I don't know why your program runs out of memory).

The place where you set the JAVA_OPTS depends on your platform and
installation. All I can tell you is that if you installed Tomcat with RPM
on linux, then you best add this line to the file
/etc/init.d/tomcat/tomcat4.conf . As for other installations, check to see
where the catalina.bat or catalina.sh file is, usually this is the place to
update.

3. Finally (sorry for the lengthy answer), you can add a try catch around
your code. Be aware, however that your catch should catch Error since
OutOfMemoryError doesn't extend Exception, so you should do something like
this:

try
{
 code...
}
catch (Exception e)
{
}
cacth (Error e)
{
}

Oz.


   
  
# Lalit Nagpal 
  
#To: [EMAIL PROTECTED]
  
lalit_tomcat@   cc:   
  
yahoo.com   Subject: Out of Memory Error - plz help   
  
   
  
06/04/2002 
  
07:37 AM   
  
Please respond 
  
to Tomcat 
  
Users List
  
   
  
   
  




hello friends,

I get this wierd error Out of Memory --- No Stack
Trace. Actually i have a form that a student fills up
attaches his mark statement (scanned image) and
photograph. The form is received properly on the
server but then the server goes down any time - giving
the output as  Out of Memory Error - No Stack Trace
 in catalina.out file. Any ideas, plz help

Regards


=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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







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




load-on-startup tag problem

2002-06-04 Thread Patrick . Pierra

hello,

i try to run 2 servlets on the starting of tomcat 4.0.3.
i use this portion of xml code in my web.xml file :

servlet
servlet-nameOdataJDOinitializer/servlet-name
servlet-classlds.odata.web.servlets.OdataJDOinitializer/servlet-class
load-on-startup1/load-on-startup
  /servlet
servlet
servlet-nameOdataJDBCinitializer/servlet-name
servlet-classlds.odata.web.servlets.OdataJDBCinitializer/servlet-class
load-on-startup2/load-on-startup
  /servlet

i don't understand why but just the servlet calling OdataJDBCinitializer is
launch.

is someone could help me ?

Patrick PIERRA
Linedata Services Luxembourg
00 352 29 56 65 282
[EMAIL PROTECTED]


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




AW: Detect Cookie Rejection

2002-06-04 Thread Power-Netz \(Schwarz\)

 Does anyone know of a way to detect when cookies are not accepted
 by a browser.  My site uses session cookies and I'd like to be
 able to redirect people somewhere to tell them that the site
 requires cookies and what to do to activate them...

An easy way to find out if cookies are enabled AND working is
to set something in a bean scope=session , refresh to a different side
and check if the session.isNew()=true or if the usedbean has reconstructed
( singleton counter )

why?

session.isNew() will allways return true, because the session can't not be
tracked without the cookie
(ofcourse only if you are NOT USEING urlEncode() ) [That's what i learn from
last weeks posting :-)]

Your bean will be constructed because the session is new. new session - new
beans.

Make something out of it.. :)


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




Re: Out of Memory Error - plz help

2002-06-04 Thread oz


Small correction. In item 2, the path for the config file in linux rpm
installation is
/etc/tomcat/conf/tomcat4.conf


   
  
[EMAIL PROTECTED]
  
 To: Tomcat Users List 
[EMAIL PROTECTED]
06/04/2002   cc:   
  
10:33 AM Subject: Re: Out of Memory Error - plz 
help 
Please respond 
  
to Tomcat 
  
Users List
  
   
  
   
  





I'm not sure this answers your question, but hopefully:
1. I can't say what the cause for the out of memory error is, but if you
are writing in Java (JSP or servlet), you can try and check the memory
status on your computer. This is done by:

Runtime rt = Runtime.getRuntime();
long mem = rt.totalMemory();
long freemem = rt.freeMemory();

The first line gives you a runtime environment, the second one gives you
the amount of memory the JAVA Runtime Environment (JRE) currently
possesses, and the third line gives you the amount of available memory.
This should help you debug and find the mischievous code.

2. In order to launch the JRE with more memory, you can set the JAVA_OPTS
environment variable, which Catalina uses, in the following manner:
JAVA_OPTS=-ms10M -mx512M

-ms sets the minimum amount of memory for the JRE, in this case it's set to
10MB.
-mx sets the maximum amount of memory (I think the default is 64MB, which
should be quite a lot, I don't know why your program runs out of memory).

The place where you set the JAVA_OPTS depends on your platform and
installation. All I can tell you is that if you installed Tomcat with RPM
on linux, then you best add this line to the file
/etc/init.d/tomcat/tomcat4.conf . As for other installations, check to see
where the catalina.bat or catalina.sh file is, usually this is the place to
update.

3. Finally (sorry for the lengthy answer), you can add a try catch around
your code. Be aware, however that your catch should catch Error since
OutOfMemoryError doesn't extend Exception, so you should do something like
this:

try
{
 code...
}
catch (Exception e)
{
}
cacth (Error e)
{
}

Oz.



# Lalit Nagpal

#To:
[EMAIL PROTECTED]
lalit_tomcat@   cc:

yahoo.com   Subject: Out of Memory Error -
plz help

06/04/2002

07:37 AM

Please respond

to Tomcat

Users List







hello friends,

I get this wierd error Out of Memory --- No Stack
Trace. Actually i have a form that a student fills up
attaches his mark statement (scanned image) and
photograph. The form is received properly on the
server but then the server goes down any time - giving
the output as  Out of Memory Error - No Stack Trace
 in catalina.out file. Any ideas, plz help

Regards


=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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







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







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




Oracle JDBC Drivers not fully working

2002-06-04 Thread Power-Netz \(Schwarz\)


Hi,

last time i tried oracle, i found that serveral extremly nice functions
about traversing a
resultset, are not implemented in the oracle drivers. They just throw
SQL-exceptions.

Be prepared for it :-)


 POWER-NETZ®
Full-Service-Provider 

Online-Support:
Support: 0190 - 15 11 15 (EUR 0,62/Min)
http://Support.Power-Netz.de (kostenlos)
http://Support.Power-Netz.com (kostenlos)

Vertrieb Tel:  01805 - 57 35 57 (EUR 0,12/Min.)
Vertrieb Fax: 01805 - 57 45 57 (EUR 0,12/Min.)

Power-Netz
Am Plan 1
37581 Bad Gandersheim

http://www.Power-Netz.de
mailto:[EMAIL PROTECTED]


+=+
--I N F O   C E N T E R--
+ Senden Sie eine leere e-mail an:
+ Providerwechsel: mailto:[EMAIL PROTECTED]
+ Daten/Preise Webspace: mailto:[EMAIL PROTECTED]
+ Reseller-Programm: mailto:[EMAIL PROTECTED]
+ Dedizierte Server: mailto:[EMAIL PROTECTED]
+ Adult/Erotikserver: mailto:[EMAIL PROTECTED]
+ Domainpreise: mailto:[EMAIL PROTECTED]
+ Domain-Nameserver: mailto:[EMAIL PROTECTED]
+ SSL-Zertifikate: mailto:[EMAIL PROTECTED]
+ Geschaeftsbedingungen: mailto:[EMAIL PROTECTED]
+ =+


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




AW: Session variables?

2002-06-04 Thread Power-Netz \(Schwarz\)

 
 in JSP or JavaBeans?

In JSP with JavaBeans :-)

JSP:usebean id=yourname class=web.whatever scope=session /
% 
int X;
yourname.setValue(X);
X = yourname.getValueX();
%

public class whatever {

private int x = 0;

void setValue(int value) {
x = value;
}

int getValueX() {
return x;
}
}



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




requestDispatcher.include() custom tag

2002-06-04 Thread Aurélien Pelletier


Hello,

I have the following custom tag

public class IncludeTag extends TagSupport {

public int doStartTag() throws JspException {

try {
pageContext.getRequest().getRequestDispatcher
(test.html).include(pageContext.getRequest(), pageContext.getResponse());
} catch (ServletException e) {
System.err.println(e.getMessage());
e.printStackTrace();
} catch (IOException e) {
System.err.println(e.getMessage()); 
e.printStackTrace();
}

return SKIP_BODY;
}


}

And when I try to run it under tomcat 4.03 I get the following exception

java.lang.IllegalStateException: getOutputStream() has already been called for 
this response
at org.apache.catalina.connector.ResponseBase.getWriter
(ResponseBase.java:755)
at org.apache.catalina.connector.ResponseFacade.getWriter
(ResponseFacade.java:165)
at org.apache.jasper.runtime.JspWriterImpl.initOut
(JspWriterImpl.java:166)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer
(JspWriterImpl.java:158)
at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
at org.apache.jasper.runtime.PageContextImpl.release
(PageContextImpl.java:177)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext
(JspFactoryImpl.java:198)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext
(JspFactoryImpl.java:193)
at org.apache.jsp.test$jsp._jspService(test$jsp.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


The exact same tag works wonderfully with resin.
What's wrong??


Thank you

Aurélien

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




auto deploy seems to fail on 4.0.2/win98 and 4.0.1/linux

2002-06-04 Thread Ray Tayek

hi, using tomcat 4.0.2 on win98 and 4.0.1 on slak 8.0. trying to work 
through the examples in Java Tools for Extreme Programming: Mastering Open 
Source Tools: Including Ant, JUnit, and Cactus by Richard Hightower, 
Nicholas Lesiecki.

all is well until i copy the hello.wat file to tomat/webapps (while it is 
running). i can not get at the servlet from a browser. stopping and 
restarting does not help. the hello.war is not unjared.

anybody got a clue?

thanks

---
ray tayek http://home.attbi.com/~rtayek/ actively seeking telecommuting work
vice chair orange county java users group http://www.ocjug.org/ 
mailto:[EMAIL PROTECTED]
hate spam? http://samspade.org/ssw/


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




CrossContext

2002-06-04 Thread Jonathan Perry

Hi,
I'm running jakarta-tomcat-4.0.3 on Mac OSX.  I've got two contexts set
up, A, and B.  Both have crossContext=true in their section of
server.xml.  I have a copy of a servlet in each context, which has the
following lines of code:

ServletContext c = getServletContext( ).getContext( /A/ );
RequestDispatcher dispatcher = c.getRequestDispatcher( /helloWorld.jsp );

This code works as expected in context A, but fails to obtain a context
(simply returning null, no exceptions thrown) in context B.  I've searched
through archives on several sites, including this one, and haven't found
anything promising.  Does anyone have any ideas of what I might be doing
wrong?

Thanks for your time,
JP


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




Re: ??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Markus Kirsten

Hi Tony,
Isn't it possible to put in the method after the jsp file has been 
rewritten (by Tomcat) to a standard java source code file? Maybe it's 
quick and dirty but I can't see why it shouldn't work.

Best of luck!


Markus

On Tuesday, June 4, 2002, at 09:28 AM, Tony LaPaso wrote:

 Hi all,

 In looking at past posts, I'm afraid I know the horrible answer
 to this issue but I thought I'd ask just in case I missed
 anything.

 Let me start by saying I'm using Tomcat v4.0.4 beta 3.

 As you know, when a client (usually a web browser) has a cached
 version of a resource (usually a web page) it can send an
 If-Modified-Since header to the HTTP server. The server
 compares the time/date stamp specified in the header with that of
 the requested resource. If the resource has *not* been modified
 since the time specified in the If-Modified-Since header, the
 server sends back a 304 (Not-Modified) response, effectively
 telling the client (usually a web browser) that its cached
 version of the resource is still valid.

 When writing a servlet, it's easy to handle this sort of
 scenario. The javax.servlet.http.HttpServlet class has a
 service() method. This method first checks if the incoming HTTP
 method is a GET. If it is, the service() method proceeds to
 call the getLastModified() method of the servlet. As a
 developer, you can override getLastModified() to return a long
 value representing the last time the requested resource was
 changed. Depending on the value returned by getLastModified()
 (note that -1 is returned if you don't override the method) the
 service() method may simply return a 304, Not-Modified response
 rather than calling the servlet's doGet() method.

 Now, the $18.32 Question: How do you ensure getLastModified()
 is called in JSP?

 No, you cannot simply do this:

 %!
public long getLastModified() {
   return xxx;
}
 %

 The problem is that the above method will never be called by the
 container.

 I traced through some of the Tomcat/Catalina/Jasper code and it
 seems to me that the response code is being set to 200/OK very
 early on in the processing.

 I also took a cursory look at the JSP spec and didn't find any
 indication of setting a Not-Modified response code...so, I am
 thinking this is something that is (strangely) missing in the JSP
 specification. I have a JSP page that needs to update itself once
 per day. Therefore, it would be very handy to have the
 getLastModified() functionality enjoyed by servlet writers.

 Can anyone confirm this?

 Thanks...


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



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




Out of Memory error - plz help

2002-06-04 Thread # Lalit Nagpal #

hello friends,

I get this wierd error Out of Memory --- No Stack
Trace. Actually i have a form that a student fills up
attaches his mark statement (scanned image) and
photograph. The form is received properly on the
server but then the server goes down any time - giving
the output as  Out of Memory Error - No Stack Trace
 in catalina.out file. Any ideas, plz help

Regards



=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




how to virtual hosting with apache 13.x, tomcat 4.0.3, mod_webapp

2002-06-04 Thread pascal GEND

Hello,

I used apache with mod_jserv (no jsp) and I known how to configure virtual hosting in 
httpd.conf.
VirtualHost 193.10.10.25
DocumentRoot /path/to/website1
ServerName www.website1.org
...
/VirtualHost

VirtualHost 193.10.10.25
DocumentRoot /path/to/website2
ServerName www.website2.org 

/VirtualHost

Since I am working with tomcat 4.0.3 with mod_webapp,I don't know how to do in my 
httpd.conf: Where to put, for instance

WebAppConnection conn warp localhost:8008
WebAppDeploy website1 conn /website1 (I have now to use the bad way 
http://www.myweb.org/website1 which is totally incorrect
WebAppDeploy website2 conn /website2 (I have now to use the bad way 
http://www.myweb.org/website2 which is totally incorrect)

Pascal



problem with ressources and/or class loader

2002-06-04 Thread Patrick . Pierra

hello,

i use tomcat 4.0.3 with an external API (JDO libelis implementation).
If i put the API jar files in the WEB-INF/lib directory of my Web
appliaction, the API classes can't open a properties file :

javax.jdo.JDOFatalDataStoreException: DataSource initialization error
NestedThrowables:
javax.jdo.JDOFatalUserException: Unable to open dictionary.properties file
at com.libelis.lido.ds.jdbc.b.do(JdbcContext.java:36)
at com.libelis.lido.ds.jdbc.b.init(JdbcContext.java:28)
at com.libelis.lido.ds.jdbc.d.init(JdbcStorage.java:38)
at com.libelis.lido.ds.jdbc.JdbcFactory.if(JdbcFactory.java:16)
at com.libelis.lido.a.init(PersistenceManagerImpl.java:40)
at
com.libelis.lido.PersistenceManagerFactory$a.a(PersistenceManagerFactory.java:454)
at com.libelis.lido.internal.h.b.a(TrivialPool.java:25)
at
com.libelis.lido.PersistenceManagerFactory$a.init(PersistenceManagerFactory.java:450)
at
com.libelis.lido.PersistenceManagerFactory.i(PersistenceManagerFactory.java:88)
at
com.libelis.lido.PersistenceManagerFactory.getPersistenceManager(PersistenceManagerFactory.java:71)
at
lds.osl.jdo.JDOContextFactory.getCurrentPersistenceManager(JDOContextFactory.java:87)
at
lds.osl.jdo.JDOContextFactory.initialize(JDOContextFactory.java:135)
at lds.osl.jdo.JDOInstaller.initialize(JDOInstaller.java:87)
at
lds.odata.web.servlets.OdataJDOinitializer.init(OdataJDOinitializer.java:48)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)


if i put the API jar in the CATALINA_HOME/common/lib directory, the API
classes can't find or load ? my businness classes that i have put in the
WEB-INF/classes directory of my Web application :

javax.jdo.JDOFatalUserException: There's something wrong in the enhanced
classes check enhanced class lds.ecm.actor.Post
alAddress
NestedThrowables:
javax.jdo.JDOFatalUserException: Can't locate the
lds.ecm.actor.PostalAddress class
at com.libelis.lido.metadata.a.a.a(RTMetadataProcessor.java:32)
at
com.libelis.lido.PersistenceManagerFactory.e(PersistenceManagerFactory.java:96)
at
com.libelis.lido.PersistenceManagerFactory.i(PersistenceManagerFactory.java:86)
at
com.libelis.lido.PersistenceManagerFactory.getPersistenceManager(PersistenceManagerFactory.java:71)
at
lds.osl.jdo.JDOContextFactory.getCurrentPersistenceManager(JDOContextFactory.java:87)
at
lds.osl.jdo.JDOContextFactory.initialize(JDOContextFactory.java:135)
at lds.osl.jdo.JDOInstaller.initialize(JDOInstaller.java:87)
at
lds.odata.web.servlets.OdataJDOinitializer.init(OdataJDOinitializer.java:48)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3266)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)

I think it's a problem of class loading but i don't know how to resolve
this problem 

Patrick PIERRA
Linedata Services Luxembourg
00 352 29 56 65 282
[EMAIL PROTECTED]


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




Managing applications with apache/tomcat403/mod_webapp

2002-06-04 Thread pascal GEND

Hello,

I installed tomcat403 and mod_webapp. 
I read in the documentation that it is possible to manage applications (for instance 
mytomcatapp1 and mytomcatapp2) with:
http://www.mywebsite.org:8080/manager/reload?path=mytomcatapp1

It works with tomcat which is running in standalone on port 8080: I can start, stop, 
reload mytomcatapp1 without reloading mytomcatapp2 for instance 

But mytomcatapp1 and mytomcatapp2 are also declared at the end of  my apache 
httpd.conf file:
WebAppConnection conn warp localhost:8008
WebAppDeploy website1 conn /mytomcatapp1
WebAppDeploy website2 conn /mytomcatapp2

I tried to do the same using apache which talks to tomcat:
http://www.mywebsite.org/manager/reload?path=mytomcatapp1 

and I got an error because of a security problem (at the end of this message): so I 
have to reload the whole Tomcat server for only one application I have to reload
HOW TO DO please?

Pascal

Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Error allocating a servlet instance
..

root cause 
java.lang.SecurityException: Servlet of class 
org.apache.catalina.servlets.ManagerServlet is privileged and cannot be loaded by this 
web application
..




AW: how to virtual hosting with apache 13.x, tomcat 4.0.3, mod_webapp

2002-06-04 Thread Ralph Einfeldt

Although I'm not using mod_webapp I would suggest:

VirtualHost 193.10.10.25
  DocumentRoot /path/to/website1
  ServerName www.website1.org
  WebAppConnection conn warp localhost:8008
  WebAppDeploy website1 conn /website1
/VirtualHost

VirtualHost 193.10.10.25
  DocumentRoot /path/to/website2
  ServerName www.website2.org
  WebAppConnection conn warp localhost:8008
  # If you want a seperate instance for each virtual host
  # you have to change the port number to make it unique
  WebAppDeploy website1 conn /website2
/VirtualHost

 -Ursprüngliche Nachricht-
 Von: pascal GEND [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 11:48
 An: [EMAIL PROTECTED]
 Betreff: how to virtual hosting with apache 13.x, tomcat 4.0.3,
 mod_webapp
 
snip/ 
 know how to do in my httpd.conf: Where to put, for instance
 
 WebAppConnection conn warp localhost:8008
 WebAppDeploy website1 conn /website1 (I have now to use the 
 bad way http://www.myweb.org/website1 which is totally incorrect
 WebAppDeploy website2 conn /website2 (I have now to use the 
 bad way http://www.myweb.org/website2 which is totally incorrect)
 
snip/ 

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




tomcat vs ant vs j2me

2002-06-04 Thread puneet sachar

good morning developers


tell me what is this tomcat ant...

1) is it software 

r extra utility...which added to taomcat

and where to install it

whatz difference b/w this and tomcat ..and what will
added advantages

3) my j2me program don't work with tomcat
actullay trying to make a small application which will
send sms to mobile ..

does anyone have program for that do send me

thanx a lot ..

Regards
Puneet

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Bypassing user role assignment???

2002-06-04 Thread Geoff Peters

Does anyone know if it is possible to bypass the requirement to have user roles 
defined within a table in the JDBC Realm? Reason being is that I have an app where all 
users need to be standard, and I have scripts and other apps creating the users, 
therefore bypassing the user role definition would save me from having to edit these 
other scripts and processes (which are not Java based..)
Currently when a new user is created I manually add them to the user role table as 
defined in my realm tags in my server.xml file, but as mentioned above I want to get 
away from this altogether - any thoughts?

Thanks Geoff 

Geoff Peters, BScFE, AIT  Phone  : (441) 296-9640
Applications DeveloperFax: (441) 292-1509
Logic Communications  E-mail : [EMAIL PROTECTED]
12 Par-La-Ville Road  WWW: http://www.logic.bm
Hamilton, Bermuda  HM JX



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




AW: tomcat vs ant vs j2me

2002-06-04 Thread Ralph Einfeldt

ant is a java based build tool (a kind of make).
http://jakarta.apache.org/ant/index.html

 -Ursprüngliche Nachricht-
 Von: puneet sachar [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 13:06
 An: Tomcat Users List
 Betreff: tomcat vs ant vs j2me
 
 
 tell me what is this tomcat ant...
 
 1) is it software 
 

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




AW: Bypassing user role assignment???

2002-06-04 Thread Ralph Einfeldt

The only way I see, is to create your own realm by
extending JDBC Realm and overriding the hasRole() 
method.

 -Ursprüngliche Nachricht-
 Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 13:19
 An: [EMAIL PROTECTED]
 Betreff: Bypassing user role assignment???
 
 
 Does anyone know if it is possible to bypass the requirement 
 to have user roles defined within a table in the JDBC Realm? 
 Reason being is that I have an app where all users need to be 
 standard, and I have scripts and other apps creating the 
 users, therefore bypassing the user role definition would 
 save me from having to edit these other scripts and processes 
 (which are not Java based..)

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




RE: Bypassing user role assignment???

2002-06-04 Thread Geoff Peters

So it isn't possible to set a default role for everyone at login with a parameter in 
the web.xml file?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:34 AM
To: Tomcat Users List
Subject: AW: Bypassing user role assignment???


The only way I see, is to create your own realm by
extending JDBC Realm and overriding the hasRole() 
method.

 -Ursprüngliche Nachricht-
 Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 13:19
 An: [EMAIL PROTECTED]
 Betreff: Bypassing user role assignment???
 
 
 Does anyone know if it is possible to bypass the requirement 
 to have user roles defined within a table in the JDBC Realm? 
 Reason being is that I have an app where all users need to be 
 standard, and I have scripts and other apps creating the 
 users, therefore bypassing the user role definition would 
 save me from having to edit these other scripts and processes 
 (which are not Java based..)

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


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




RE: Bypassing user role assignment???

2002-06-04 Thread Barney Hamish

Why don't you set the user roles table to be the same as the users table.
Have a user_role field in the users table with a default value default
role or something. That way when you create a new user a role is
automatically created for them with the role of default role. Then you
don't have to change anything or rewrite the hasRole() method.

-Original Message-
From: Geoff Peters [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:36 PM
To: Tomcat Users List
Subject: RE: Bypassing user role assignment???


So it isn't possible to set a default role for everyone at login with a
parameter in the web.xml file?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:34 AM
To: Tomcat Users List
Subject: AW: Bypassing user role assignment???


The only way I see, is to create your own realm by
extending JDBC Realm and overriding the hasRole() 
method.

 -Ursprüngliche Nachricht-
 Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 13:19
 An: [EMAIL PROTECTED]
 Betreff: Bypassing user role assignment???
 
 
 Does anyone know if it is possible to bypass the requirement 
 to have user roles defined within a table in the JDBC Realm? 
 Reason being is that I have an app where all users need to be 
 standard, and I have scripts and other apps creating the 
 users, therefore bypassing the user role definition would 
 save me from having to edit these other scripts and processes 
 (which are not Java based..)

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


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

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




RE: Bypassing user role assignment???

2002-06-04 Thread Geoff Peters

See THAT is why I subscribe to this list - easy solutions right under my nose, but 
someone else can think of them quicker!

Thanks, that should do the job perfectly, even though it is Access 97 (yuck)

Thanks again, Geoff


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:47 AM
To: 'Tomcat Users List'
Subject: RE: Bypassing user role assignment???


Why don't you set the user roles table to be the same as the users table.
Have a user_role field in the users table with a default value default
role or something. That way when you create a new user a role is
automatically created for them with the role of default role. Then you
don't have to change anything or rewrite the hasRole() method.

-Original Message-
From: Geoff Peters [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:36 PM
To: Tomcat Users List
Subject: RE: Bypassing user role assignment???


So it isn't possible to set a default role for everyone at login with a
parameter in the web.xml file?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:34 AM
To: Tomcat Users List
Subject: AW: Bypassing user role assignment???


The only way I see, is to create your own realm by
extending JDBC Realm and overriding the hasRole() 
method.

 -Ursprüngliche Nachricht-
 Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 13:19
 An: [EMAIL PROTECTED]
 Betreff: Bypassing user role assignment???
 
 
 Does anyone know if it is possible to bypass the requirement 
 to have user roles defined within a table in the JDBC Realm? 
 Reason being is that I have an app where all users need to be 
 standard, and I have scripts and other apps creating the 
 users, therefore bypassing the user role definition would 
 save me from having to edit these other scripts and processes 
 (which are not Java based..)

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


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

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


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




RE: Help with Tomcat and IIS

2002-06-04 Thread simpson

try changing all references from isapi_redirector.dll to isapi_redirect.dll



 -Original Message-
 From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]]
 Sent: June 3, 2002 19:07
 To: Tomcat Users List
 Subject: RE: Help with Tomcat and IIS
 
 
 Hi Larry.  I checked my registry (NT4 SP6) and the only reference to
 islapi_rediector.dll is under 
 HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software
 Foundation/Jakarta Isapi
 Redirector/1.0/extension_uri=/jakarta/isapi_redirector.dll. 
  I did notice
 in other docs that the redirector should only be entered for 
 Filter DLLs
 for Win98.  Could I be confused and the
 extension_uri=/jakarta/isapi_redictor.dll should not exist?
 
 Thanks,
 
 Rob
 
 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 03, 2002 11:31 AM
 To: Tomcat Users List
 Subject: RE: Help with Tomcat and IIS
 
 
 The /jakarta/isapi_redirector.dll URI should never
 be forwarded to Tomcat.  It occurrence indicates that the
 isapi_redirector.dll filter is being called more than once
 per request.
 
 In the past this error was most often accomplished on
 WinNT/Win2k systems by adding the filter via the Admin
 console and incorrectly adding it again via the Filter DLLs
 registry key.  The Filter DLLs is for Win9x only.
 There have also been instances of the dll filter being
 added globally and to an individual web server causing
 it to be called twice.
 
 Cheers,
 Larry
 
  -Original Message-
  From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 03, 2002 11:55 AM
  To: [EMAIL PROTECTED]
  Subject: Help with Tomcat and IIS
 
 
  I installed Tomcat 4.0.3 and followed the How To directions
  for redirecting
  when using IIS.  JSP pages are served correctly through
  Tomcat http://local
  host:8080/examples/jsp/dates/date.jsp but when I try  and
  serve a simple jsp
  http://localhost/test.jsp where test.jsp is
  html
  head
  titleWelcome JSP/title
  /head
  body bgcolor=white
  h3 Welcome /h3
  pb Today is %= new java.util.Date() %.  Have a nice
  day! :-) /b/p
  /body
  /html
 
  I receive the error
  ...titleApache Tomcat/4.0.3 - Error report/title
  ...Apache Tomcat/4.0.3 - HTTP Status 404 -
  /jakarta/isapi_redirector.dll
  ...type/b Status report
  ...message/b u/jakarta/isapi_redirector.dll
  ...description/b uThe requested resource
  (/jakarta/isapi_redirector.dll)
  is not available.
  through IIS.
  I checked the authority to the /jakarta virtual directory and
  it does have
  Execute permission.
 
  Any ideas would be appreciated.
 
  Robert A. Rogerson
  Phone:   905-826-7761
  Cell:   416-562-1039
  Email:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 

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




tomcat vs ant vs j2me still problem

2002-06-04 Thread puneet sachar

hi everybody and hi ralph

what u mean by this

ant is a java based build tool (a kind of make).
http://jakarta.apache.org/ant/index.html


what kind of make..

what does this have advantage..i serioulsy don't
undersatnd this

regards
Puneet
4th june 2002
==


--- Ralph Einfeldt [EMAIL PROTECTED]
wrote:
 ant is a java based build tool (a kind of make).
 http://jakarta.apache.org/ant/index.html
 
  -Ursprüngliche Nachricht-
  Von: puneet sachar [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 4. Juni 2002 13:06
  An: Tomcat Users List
  Betreff: tomcat vs ant vs j2me
  
  
  tell me what is this tomcat ant...
  
  1) is it software 
  
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Running Tomcat 4 Tomcat 3 on IIS 5.0

2002-06-04 Thread Arzhang Saman

I'm trying to get Tomcat 3 running on a Win 2K system that already has
Tomcat 4 on it mainly for testing purposes.  I have used different port
numbers for each version but get the following error when I try to start
up Tomcat 3: Unable to locate servlet.jar, check the value of
TOMCAT_HOME.  I have checked the value of TOMCAT_HOME and it did point
to the directory where Tomcat 4 was installed.  I changed it to point to
Tomcat 3 installation directory to no avail.  I'm wondering if these
environmental variables get written in the registry and are not as
easily changed just by changing the path in the environmental variables
- but that's my thought and I'm stumped.  Anyone have any ideas?  Any
help would be greatly appreciated.



JSP page is working for intranet not for internet

2002-06-04 Thread Rong Li

We have a chat system installed. The jsp is working perfectly from 
intranet. However, we can not make it run from outside intranet. Anybody 
has any clue about this? Configuration problem?

Thanks,

Ron



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




jdbc connection list

2002-06-04 Thread Darya Chernikhova


Hi all,

I'd like to write a bean that would keep track of all of the jdbc
connections that users make.

So, say that I have 2 applications registered on tomcat -- appA and appB.
And, say that there are 5 servlets or jsp pages per application --
appA/serv1, appA/serv2, ..., appB/serv5 .  And, each servlet's doService
method opens a jdbc connection and gets some data out of my database.

I would like to write a bean that would sit there and listen to jdbc
connections being made.  It would store a list of objects containing the
following data:
- connection pointer
- session the connection was made out of
- app and servlet the connection was made out of.

My problem is that I don't know much about the connection making process
in Tomcat.  When a new connection is made, which Tomcat controller beans
know about it?  What events are sent, and to whom?  What should my bean
extend or implement?

Thanks a lot for your help,
Darya.




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




RE: Out of Memory Error - plz help

2002-06-04 Thread Jack Li

in setclasspath.bat file set JAVA_OPTS=-ms10M -mx512M

Jack Li

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 4:34 AM
To: Tomcat Users List
Subject: Re: Out of Memory Error - plz help



I'm not sure this answers your question, but hopefully:
1. I can't say what the cause for the out of memory error is, but if you
are writing in Java (JSP or servlet), you can try and check the memory
status on your computer. This is done by:

Runtime rt = Runtime.getRuntime();
long mem = rt.totalMemory();
long freemem = rt.freeMemory();

The first line gives you a runtime environment, the second one gives you
the amount of memory the JAVA Runtime Environment (JRE) currently
possesses, and the third line gives you the amount of available memory.
This should help you debug and find the mischievous code.

2. In order to launch the JRE with more memory, you can set the JAVA_OPTS
environment variable, which Catalina uses, in the following manner:
JAVA_OPTS=-ms10M -mx512M

-ms sets the minimum amount of memory for the JRE, in this case it's set to
10MB.
-mx sets the maximum amount of memory (I think the default is 64MB, which
should be quite a lot, I don't know why your program runs out of memory).

The place where you set the JAVA_OPTS depends on your platform and
installation. All I can tell you is that if you installed Tomcat with RPM
on linux, then you best add this line to the file
/etc/init.d/tomcat/tomcat4.conf . As for other installations, check to see
where the catalina.bat or catalina.sh file is, usually this is the place to
update.

3. Finally (sorry for the lengthy answer), you can add a try catch around
your code. Be aware, however that your catch should catch Error since
OutOfMemoryError doesn't extend Exception, so you should do something like
this:

try
{
 code...
}
catch (Exception e)
{
}
cacth (Error e)
{
}

Oz.


 

# Lalit Nagpal

#To:
[EMAIL PROTECTED]  
lalit_tomcat@   cc:

yahoo.com   Subject: Out of Memory Error -
plz help 
 

06/04/2002

07:37 AM

Please respond

to Tomcat

Users List

 

 





hello friends,

I get this wierd error Out of Memory --- No Stack
Trace. Actually i have a form that a student fills up
attaches his mark statement (scanned image) and
photograph. The form is received properly on the
server but then the server goes down any time - giving
the output as  Out of Memory Error - No Stack Trace
 in catalina.out file. Any ideas, plz help

Regards


=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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







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


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




Tomcat redirectors

2002-06-04 Thread Sankaranarayanan (Ganesh) Ganapathy

Hi All,

Has anyone built and used Tomcat redirectors for apache1.3.24 on HP-UX 11.10 and AIX 
4.3.3? Has anyone used these in a production scenario? 

And why does every tomcat release selectively bundle only a few pre compiled binaries 
for tomcat redirectors - like for example with tomcat4.2.3 ISAPI_redirector.dll is 
available for win2k, mod_jk.so for solaris 8, nsapi_redirector.dll for solaris 6. 

Why isnt the precompiled binaries for other configurations available if they are built 
and tested by the developers?


Thanx
Ganesh

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


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




Re: AW: how to virtual hosting with apache 13.x, tomcat 4.0.3, mod_webapp

2002-06-04 Thread August Detlefsen

You only need one WebAppConnection statement - The same connection is
shared by multiple vhosts/webapps. Try it like this: 

WebAppConnection conn warp localhost:8008

VirtualHost 193.10.10.25
   DocumentRoot /path/to/website1
   ServerName www.website1.org
   WebAppDeploy website1 conn /website1
/VirtualHost
 
VirtualHost 193.10.10.25
   DocumentRoot /path/to/website2
   ServerName www.website2.org
   WebAppDeploy website2 conn /website2
/VirtualHost





--- Ralph Einfeldt [EMAIL PROTECTED] wrote:
 Although I'm not using mod_webapp I would suggest:
 
 VirtualHost 193.10.10.25
   DocumentRoot /path/to/website1
   ServerName www.website1.org
   WebAppConnection conn warp localhost:8008
   WebAppDeploy website1 conn /website1
 /VirtualHost
 
 VirtualHost 193.10.10.25
   DocumentRoot /path/to/website2
   ServerName www.website2.org
   WebAppConnection conn warp localhost:8008
   # If you want a seperate instance for each virtual host
   # you have to change the port number to make it unique
   WebAppDeploy website1 conn /website2
 /VirtualHost
 
  -Ursprüngliche Nachricht-
  Von: pascal GEND [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 4. Juni 2002 11:48
  An: [EMAIL PROTECTED]
  Betreff: how to virtual hosting with apache 13.x, tomcat 4.0.3,
  mod_webapp
  
 snip/ 
  know how to do in my httpd.conf: Where to put, for instance
  
  WebAppConnection conn warp localhost:8008
  WebAppDeploy website1 conn /website1 (I have now to use the 
  bad way http://www.myweb.org/website1 which is totally incorrect
  WebAppDeploy website2 conn /website2 (I have now to use the 
  bad way http://www.myweb.org/website2 which is totally incorrect)
  
 snip/ 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto%Û4Æ{[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




FW: AW: How to use setRequestedSessionId

2002-06-04 Thread Subir Sengupta



I'm still unclear about how to do this.  Once a request has been associated
with a session, how do we associate it with a different session.  I'm
probably wrong but it seems the only way is to use setRequestedSessionId().
Once I call getSession(), the session gets associated with the request, and
I'm not sure how to associate it with another session.  I tried setting up
an HttpRequestWrapper but it needs a bunch of abstract methods implemented.

Here's what I'm trying to do:
- In a filter, get the session ID (getSession().getId()) and compare the
value with a value set in another cookie
- if they don't match, create a new session
- associate the new session with the request

So, it's the last step that I don't know how to do.

Any help is appreciated.

Thanks,
Subir



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: AW: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Ralph Einfeldt wrote:

 Date: Mon, 3 Jun 2002 19:03:46 +0200
 From: Ralph Einfeldt [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: AW: How to use setRequestedSessionId

 Have a look at:
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html


Ralph, thanks for pointing people to the archives :-).  There is lots of
good stuff there.  This one, happens to be a ResponseWrapper -- the
principles of writing a request wrapper are really similar.

The outline of a conditionally create the session filter might be lke
this:

public class MyFilter implements Filter {

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
  throws IOException, ServletException {

HttpServletRequestWrapper wrapper =
  new MyWrapper((HttpServletRequest) request;
chain.doFilter(wrapper, response);

}

}

and the corresponding wrapper class would look like:

public class MyWrapper extends HttpServletRequestWrapper {

public HttpSession getSession() {
if (ok to create session) {
return super.getSession();
} else {
return (null);
}

public HttpSession getSession(boolean create) {
if (ok to create session) {
return super.getSession(create);
} else {
return (null);
}
}


}

All of the rest of the HttpServletRequest methods get delegated through to
the original request -- you only need to override the stuff you want to
customize.  The wrapper instance is ultimately passed on to your servlet
or JSP page, which doesn't necessarily know that the wrapping took place.

Filters and wrappers are very cool -- it's worth your time learning how to
use them.  One source of information is the tutorial on web applications
that is availavle with the Java Web Services Developer Pack
(http://java.sun.com/webservices/), which includes Tomcat 4 as its server.

Useful homework exercise - write a Filter and request wrapper that add a
new request parameter to the request, under certain conditions.

Craig


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

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




RE: AW: How to use setRequestedSessionId

2002-06-04 Thread Subir Sengupta

I'm still unclear about how to do this.  Once a request has been associated
with a session, how do we associate it with a different session.  I'm
probably wrong but it seems the only way is to use setRequestedSessionId().
Once I call getSession(), the session gets associated with the request, and
I'm not sure how to associate it with another session.  I tried setting up
an HttpRequestWrapper but it needs a bunch of abstract methods implemented.

Here's what I'm trying to do:
- In a filter, get the session ID (getSession().getId()) and compare the
value with a value set in another cookie
- if they don't match, create a new session
- associate the new session with the request

So, it's the last step that I don't know how to do.

Any help is appreciated.

Thanks,
Subir



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:23 AM
To: Tomcat Users List
Subject: Re: AW: How to use setRequestedSessionId




On Mon, 3 Jun 2002, Ralph Einfeldt wrote:

 Date: Mon, 3 Jun 2002 19:03:46 +0200
 From: Ralph Einfeldt [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: AW: How to use setRequestedSessionId

 Have a look at:
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41615.html


Ralph, thanks for pointing people to the archives :-).  There is lots of
good stuff there.  This one, happens to be a ResponseWrapper -- the
principles of writing a request wrapper are really similar.

The outline of a conditionally create the session filter might be lke
this:

public class MyFilter implements Filter {

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
  throws IOException, ServletException {

HttpServletRequestWrapper wrapper =
  new MyWrapper((HttpServletRequest) request;
chain.doFilter(wrapper, response);

}

}

and the corresponding wrapper class would look like:

public class MyWrapper extends HttpServletRequestWrapper {

public HttpSession getSession() {
if (ok to create session) {
return super.getSession();
} else {
return (null);
}

public HttpSession getSession(boolean create) {
if (ok to create session) {
return super.getSession(create);
} else {
return (null);
}
}


}

All of the rest of the HttpServletRequest methods get delegated through to
the original request -- you only need to override the stuff you want to
customize.  The wrapper instance is ultimately passed on to your servlet
or JSP page, which doesn't necessarily know that the wrapping took place.

Filters and wrappers are very cool -- it's worth your time learning how to
use them.  One source of information is the tutorial on web applications
that is availavle with the Java Web Services Developer Pack
(http://java.sun.com/webservices/), which includes Tomcat 4 as its server.

Useful homework exercise - write a Filter and request wrapper that add a
new request parameter to the request, under certain conditions.

Craig


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

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




Re: MS SQL Server Datasouerce

2002-06-04 Thread Adam Greene

Make sure that you call the parameter name as username.
- Original Message -
From: Anibal Constante Brito [EMAIL PROTECTED]
To: Tomcat [EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 9:40 PM
Subject: MS SQL Server Datasouerce


 A tried to create a datasource with SQL Server, but can I wiev even the
 index.htm page, why?

 this is my datasource:

 Resource name=jdbc/News auth=Container
 type=javax.sql.DataSource
  description=Employees Database for HR Applications/

 ResourceParams name=jdbc/News
   parameter
 namedriverClassName/name

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
   /parameter
   parameter
 namedriverName/name
 /valuejdbc:microsoft:sqlserver/value
   /parameter
   parameter
 nameuser/name
 valuesa/value
   /parameter
   parameter
 namepassword/name
 value/value
   /parameter
 /ResourceParams

 what I did wrong?

 best regards.

 Owen.

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




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




Re: Tomcat is the best ?!

2002-06-04 Thread Pascal Forget

Sean LeBlanc wrote:


I noticed Resin's web site has a link about clustering and such.
Which makes me wonder - how are people doing this in Tomcat, if they are
doing it all? Are there any whitepapers anywhere on the various ways of 
accomplishing this? Any experiences to share? 



www.ubeans.com/tomcat





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




Manager App Question

2002-06-04 Thread Adam Pfeiffer

Hello,
I just began playing with the manager app and am confused on how it deploys a new web 
application.
 Here is the lowdown.

I had an existing one at:
/opt/jakarta-tomcat-4.0.3/webapps/trips

I did a cp -r from /opt/jakarta-tomcat-4.0.3/webapps/trips to
/opt/jakarta-tomcat-4.0.3/webapps/trips-dev in order to set up a development 
environment.

Then I ran the command:
http://localhost:8080/manager/install?path=/trips-dev?war=file:/opt/jakarta-tomcat-4.0.3/webapps/trips-dev

This worked, the web app deployed and I can now browse it perfectly.  What I am 
confused on it
that I can stop and start tomcat /opt/jakarta-tomcat-4.0.3/bin/shutdown.sh  
startup.sh and it
still sees the trips-dev app.  Where does it store this information??  I have checked 
server.xml
and it does not contain any info on trips-dev.  I must be missing some config file, 
but for the
life of me I can't figure out what it is. 

Thanks,
Adam





__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: requestDispatcher.include() custom tag

2002-06-04 Thread Todd Kaplinger


Wouldn't it be easier to just do pageContext.include(someResource.x);



From: Aurlien Pelletier [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: requestDispatcher.include() custom tag
Date: Tue,  4 Jun 2002 11:15:10 +0200


Hello,

I have the following custom tag

public class IncludeTag extends TagSupport {

   public int doStartTag() throws JspException {

   try {
   pageContext.getRequest().getRequestDispatcher
(test.html).include(pageContext.getRequest(), pageContext.getResponse());
   } catch (ServletException e) {
   System.err.println(e.getMessage());
   e.printStackTrace();
   } catch (IOException e) {
   System.err.println(e.getMessage());
   e.printStackTrace();
   }

   return SKIP_BODY;
   }


}

And when I try to run it under tomcat 4.03 I get the following exception

java.lang.IllegalStateException: getOutputStream() has already been called 
for
this response
   at org.apache.catalina.connector.ResponseBase.getWriter
(ResponseBase.java:755)
   at org.apache.catalina.connector.ResponseFacade.getWriter
(ResponseFacade.java:165)
   at org.apache.jasper.runtime.JspWriterImpl.initOut
(JspWriterImpl.java:166)
   at org.apache.jasper.runtime.JspWriterImpl.flushBuffer
(JspWriterImpl.java:158)
   at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
   at org.apache.jasper.runtime.PageContextImpl.release
(PageContextImpl.java:177)
   at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext
(JspFactoryImpl.java:198)
   at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext
(JspFactoryImpl.java:193)
   at org.apache.jsp.test$jsp._jspService(test$jsp.java:88)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


The exact same tag works wonderfully with resin.
What's wrong??


Thank you

Aurlien

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



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




GlobalNamingResources element required in Tomcat 4.1.2?

2002-06-04 Thread Jonathan Eric Miller

I noticed that you will receive the following error if you do not have a
GlobalNamingResources element in your server.xml file for Tomcat 4.1.2.
IMHO, this tag shouldn't be required because sometimes you might not having
anything to put in that section. i.e. I want to use JNDIRealm, not the
UserDatabaseRealm, therefore, I don't really have anything that I need to
put in that section.

java.lang.NullPointerException
at
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingC
ontextListener.java:269)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:698
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:504)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Jon



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




Re: ??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Tony LaPaso

Yes, but I'd prefer not to muck w/HttpJspBase -- as you said, it
is Tomcat specific.

I was hoping ther would be a more portable, approved
way...but it looks like the JSP spec does not yet support it.
Really too bad -- getLastModified() was a big win.


- Original Message -
From: Carlos Ferreira [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 10:33 AM
Subject: Re: ??? Using JSPs to Send Not-Modified-Since Header ???



 a not so good solution would be to subclass
 org.apache.jasper.runtime.HttpJspBase ( or redesign it ) with
your
 required behaviour and extend your jsp pages from this new
class.
 the problem is that HttpJspBase is tomcat specific. perhaps
somebody has a
 better idea.

 Carlos Ferreira
 Gilem Informatique

  Hi all,
 
  In looking at past posts, I'm afraid I know the horrible
answer
  to this issue but I thought I'd ask just in case I missed
  anything.
 
  Let me start by saying I'm using Tomcat v4.0.4 beta 3.
 
  As you know, when a client (usually a web browser) has a
cached
  version of a resource (usually a web page) it can send an
  If-Modified-Since header to the HTTP server. The server
  compares the time/date stamp specified in the header with
that of
  the requested resource. If the resource has *not* been
modified
  since the time specified in the If-Modified-Since header,
the
  server sends back a 304 (Not-Modified) response, effectively
  telling the client (usually a web browser) that its cached
  version of the resource is still valid.
 
  When writing a servlet, it's easy to handle this sort of
  scenario. The javax.servlet.http.HttpServlet class has a
  service() method. This method first checks if the incoming
HTTP
  method is a GET. If it is, the service() method proceeds to
  call the getLastModified() method of the servlet. As a
  developer, you can override getLastModified() to return a
long
  value representing the last time the requested resource was
  changed. Depending on the value returned by
getLastModified()
  (note that -1 is returned if you don't override the method)
the
  service() method may simply return a 304, Not-Modified
response
  rather than calling the servlet's doGet() method.
 
  Now, the $18.32 Question: How do you ensure
getLastModified()
  is called in JSP?
 
  No, you cannot simply do this:
 
  %!
public long getLastModified() {
   return xxx;
}
  %
 
  The problem is that the above method will never be called by
the
  container.
 
  I traced through some of the Tomcat/Catalina/Jasper code and
it
  seems to me that the response code is being set to 200/OK
very
  early on in the processing.
 
  I also took a cursory look at the JSP spec and didn't find
any
  indication of setting a Not-Modified response code...so, I
am
  thinking this is something that is (strangely) missing in the
JSP
  specification. I have a JSP page that needs to update itself
once
  per day. Therefore, it would be very handy to have the
  getLastModified() functionality enjoyed by servlet writers.
 
  Can anyone confirm this?
 
  Thanks...
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED] For
additional
  commands, e-mail:
mailto:[EMAIL PROTECTED]




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



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




RE: Help with Tomcat and IIS

2002-06-04 Thread Larry Isaacs

The isapi_redirect[or].dll is both a filter and an
extension.  The filter portion examines the request to
see if it should be forwarded to Tomcat. If so, the
request URI is saved in new header entries which are
added to the request and the request URI is replaced
with the extension-uri value.  This causes the
request to be processed by the extension portion of the
dll which handles the communications with Tomcat.

Your symptom is typical of having the isapi filter called
twice per request where even /jakarta/isapi_redirector.dll
is configured to be forwarded to Tomcat.  The second call to
the filter routine replaces the correctly request URI, saved
previously, with /jakarta/isapi_redirector.dll and the request
is now doomed to failure.

Since it appears you didn't make the mistake of adding
the Filter DLLs key, check to make sure the filter
appears only once in either the desired virtual host(s)
or in their parent node.  It should not appear at both
levels.

Cheers,
Larry

 -Original Message-
 From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, June 03, 2002 7:07 PM
 To: Tomcat Users List
 Subject: RE: Help with Tomcat and IIS
 
 
 Hi Larry.  I checked my registry (NT4 SP6) and the only reference to
 islapi_rediector.dll is under 
 HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software
 Foundation/Jakarta Isapi
 Redirector/1.0/extension_uri=/jakarta/isapi_redirector.dll. 
  I did notice
 in other docs that the redirector should only be entered for 
 Filter DLLs
 for Win98.  Could I be confused and the
 extension_uri=/jakarta/isapi_redictor.dll should not exist?
 
 Thanks,
 
 Rob
 
 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 03, 2002 11:31 AM
 To: Tomcat Users List
 Subject: RE: Help with Tomcat and IIS
 
 
 The /jakarta/isapi_redirector.dll URI should never
 be forwarded to Tomcat.  It occurrence indicates that the
 isapi_redirector.dll filter is being called more than once
 per request.
 
 In the past this error was most often accomplished on
 WinNT/Win2k systems by adding the filter via the Admin
 console and incorrectly adding it again via the Filter DLLs
 registry key.  The Filter DLLs is for Win9x only.
 There have also been instances of the dll filter being
 added globally and to an individual web server causing
 it to be called twice.
 
 Cheers,
 Larry
 
  -Original Message-
  From: Robert A. Rogerson [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 03, 2002 11:55 AM
  To: [EMAIL PROTECTED]
  Subject: Help with Tomcat and IIS
 
 
  I installed Tomcat 4.0.3 and followed the How To directions
  for redirecting
  when using IIS.  JSP pages are served correctly through
  Tomcat http://local
  host:8080/examples/jsp/dates/date.jsp but when I try  and
  serve a simple jsp
  http://localhost/test.jsp where test.jsp is
  html
  head
  titleWelcome JSP/title
  /head
  body bgcolor=white
  h3 Welcome /h3
  pb Today is %= new java.util.Date() %.  Have a nice
  day! :-) /b/p
  /body
  /html
 
  I receive the error
  ...titleApache Tomcat/4.0.3 - Error report/title
  ...Apache Tomcat/4.0.3 - HTTP Status 404 -
  /jakarta/isapi_redirector.dll
  ...type/b Status report
  ...message/b u/jakarta/isapi_redirector.dll
  ...description/b uThe requested resource
  (/jakarta/isapi_redirector.dll)
  is not available.
  through IIS.
  I checked the authority to the /jakarta virtual directory and
  it does have
  Execute permission.
 
  Any ideas would be appreciated.
 
  Robert A. Rogerson
  Phone:   905-826-7761
  Cell:   416-562-1039
  Email:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 

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




Translating Apache .conf command to Tomcat stand-alone

2002-06-04 Thread @Basebeans.com

Subject: Translating Apache .conf command to Tomcat stand-alone
From: Rob Storrs [EMAIL PROTECTED]
 ===
I'm trying to fix a problem we're having getting Tomcat to serve out a Flash
*.swf over HTTPS to MSIE on Windows. What my research has led me to is
trying to have Tomcat modify its response based on the User-Agent.

In Apache, here is the command I'd use:
SetEnvIf User-Agent .*MSIE* nokeepalive ssl-unclean-shutdown

I don't know how to translate this into my Tomcat configuration.

Thanks for any assistance.
~R

Tomcat 4.0.2
RedHat Linux 7.0





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




JSP precompilation and including webinc.xml in web.xml

2002-06-04 Thread Al Tingley

Hello,
We are trying to automate the pre-compilation of our JSP files with JspC and
the inclusion of the generated webinc.xml file in our application
web.xml file.  We have constructed an application web.xml as shown below.
Both web.xml and webinc.xml are local to the
.../webapps/application/WEB-INF/ directory.

Our problem is that Tomcat complains when starting up with the message:
 org.xml.sax.SAXParseException: Relative URI webinc.xml; can not
be resolved without a base URI.

Note the local reference to webinc.xml below in the DOCTYPE tag.

If we change the reference to webinc.xml to an absolute URI of the form
below (on Windows):

file://E/jakarta-tomcat-4.0.4b3/webapps/appname/WEB-INF/webinc.xml

... we get a null pointer exception when Tomcat starts up (parser error at
the line where we reference the file to be included):

2002-06-04 08:55:27 ContextConfig[/voicemail] Parse error in application
web.xml
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
...

What are we doing wrong?  We're using Tomcat 4.0.4b3.
Thanks,
Alan Tingley
Iperia, Inc.

---
The application web.xml file:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
[!ENTITY includes SYSTEM webinc.xml]


web-app
!-- all of the precompiled jsp declarations and mappings are in this
included file from the JspC --
includes;
/web-app

---
Output when starting up Tomcat:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4-b3
PARSE error at line 6 column -1
org.xml.sax.SAXParseException: Relative URI webinc.xml; can not be
resolved without a base URI.


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




Re: Having a Newbie Delamere here.

2002-06-04 Thread August Detlefsen

Still having this problem? I think in here you need to add rs.next() or
rs.first() to move to the first row of the ResultSet before you call
rs.getString():

if (bPageExists)
{
  sQuery = SELECT * FROM tblforms WHERE PageOrder =  + iPage;
  stmt = conn.createStatement();
  rs = stmt.executeQuery(sQuery);

  //ADDED: 
  rs.first();

  // Assign values from the database
  sSubTitle = rs.getString(SubTitle);
  sFormName = rs.getString(FormName);
  sContent = rs.getString(Content);
  
  iBackPage = iPage - 1;
  iNextPage = iPage + 1;

  rs.close();
  stmt.close();
}



--- Nicholas Orr [EMAIL PROTECTED] wrote:
 Again coming from the ASP world of doing things.
 in ASP you can open a connection to a Database (DB) and execute a
 bunch of
 queries and do whatever you need to then after you have finished
 close the
 connection.
 
 Now I have tried to do this in jsp, but not having much luck.  Keep
 getting
 'Result set type is TYPE_FORWARD_ONLY'
 
 Cause In ASP when you start a new ResultSet, after you have closed
 the
 previous one, (asp equiv = recordset) It automatically goes back to
 the
 begining as it should, but in jsp it seems to just hang around at
 rs.last().
 
 !I don't know!
 
 Well if you could help, I would appreciate it, Source included.
 
 Regards,
 
 Nicholas
 
 
 
 

**
 The information contained in this e-mail is confidential and is
 intended only for the use of the addressee(s).
 If you receive this e-mail in error, any use, distribution or
 copying of this e-mail is not permitted. You are requested to
 forward unwanted e-mail and address any problems to the
 MIM Holdings Limited Support Centre.
 
 For general enquires: ++61 7 3833 8000
 Support Centre e-mail:[EMAIL PROTECTED]
 Support Centre phone: Australia 1800500646
   International ++61 7 38338042

**
 
 

 ATTACHMENT part 2 application/octet-stream name=LanIDForm.jsp
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




RE: MS Driver (again)

2002-06-04 Thread Sean LeBlanc

Thanks for the help. I saw this before, but after giving it a closer
look I realized I needed to add the appropriate jars and use the dbcp
factory class. Now that it actually at last connects, what is the best
way to use this? I stress-tested a bit, and I started to get errors showing
up in the log that say this in the stack trace:

java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.getConnection(Unknown Source)

This is after the stress test has been running a few seconds. I suspect I'm not
using the DataSource and Connection correctly. Should I keep a Singleton that
holds one DataSource instance, and always use it to do getConnection? I tried that,
and seem to get the same results. Any help appreciated.



 -Original Message-
 From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 03, 2002 9:25 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: MS Driver (again)
 
 
 Hello Sean,
 
 See this email.  It has links to a few resources that tell about a
 proven way to use DBCP.
 
 http://marc.theaimsgroup.com/?l=tomcat-userm=102242646003357w=2
 
 Take a look at your parameters.  For instance, user should be
 username.  Just check and double check that all your configuration
 is proper and matches up with an example that has been proven to work
 (link above).
 
 Jake
 
 Monday, June 03, 2002, 9:25:33 AM, you wrote:
 
 SL Has anyone gotten either the Beta 2 or the finalized 
 driver to work via DataSource? I am getting
 SL nowhere fast with this - does it even work? I *can* 
 connect w/o using DataSource, but I'm trying
 SL to get database pooling working with Tomcat connecting to 
 a MS SQL Server 2000 database, and
 SL this seems like it should be a viable option. Thanks in advance.
 
 SL Here is the relevant code snippet:
 
 SL Context ctx = new InitialContext();
 SL Context envCtx = (Context)ctx.lookup(java:comp/env);
 SL System.out.println(Got first context.);
 
 SL NamingEnumeration enum =ctx.listBindings(java:comp/env/jdbc);
 SLwhile( enum.hasMore() ) {
 SL  System.out.println(Binding:  + 
 ((Binding)enum.next()).toString() );
 SL}
 SL DataSource ds = 
 (DataSource)envCtx.lookup(jdbc/nutrosDB);
 SL System.out.println(Got the second context.);
 
 SL if (ds != null)
 SL {
 SL System.out.println(Getting the 
 connection from the context.);
 SL connection = ds.getConnection();
 SL }
 
 SL ==
 SL DataSource is null. Here is the output:
 
 SL Got first context.
 SL Binding: nutrosDB: 
 org.apache.naming.ResourceRef:Reference Class Name: 
 javax.sql.DataSource
 SL Type: scope
 SL Content: Shareable
 SL Type: auth
 SL Content: Container
 SL Type: user
 SL Content: 
 SL Type: factory
 SL Content: com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
 SL Type: password
 SL Content: 
 SL Type: url
 SL Content: 
 jdbc:microsoft:sqlserver://192.168.9.253;user=;Password=xx
 xx;DatabaseName=NutrosDev
 SL Type: driverClassName
 SL Content: com.microsoft.jdbc.sqlserver.SQLServerDriver
 SL Type: database
 SL Content: NutrosDev
 
 SL Got the second context.
 SL =
 
 SL Here is the server.xml snippet:
 SL Resource name=jdbc/nutrosDB auth=Container
 SL type=javax.sql.DataSource/
 SL ResourceParams name=jdbc/nutrosDB
 SL parameter
 SL namedatabase/namevalueNutrosDev/value
 SL /parameter
 
 SL parameter
 SL 
 namefactory/namevaluecom.microsoft.jdbcx.sqlserver.SQLSe
 rverDataSourceFactory/value
 SL /parameter
 
 
 SL parameter
 SL 
 namedriverClassName/namevaluecom.microsoft.jdbc.sqlserve
 r.SQLServerDriver/value
 SL /parameter
 
 SL parameter
 SL 
 nameurl/namevaluejdbc:microsoft:sqlserver://192.168.9.25
 3;user=;Password=;DatabaseName=N
 SL utrosDev/value
 SL /parameter
 
 SL parameter
 SL nameuser/namevalue/value
 SL /parameter
 SL parameter
 SL namepassword/namevalue/value
 SL /parameter
 SL /ResourceParams
 
 SL And the web.xml snippet:
 SL resource-env-ref
 SL descriptiontest jdbc/nutrosDB/description
 SL 
 resource-env-ref-namejdbc/nutrosDB/resource-env-ref-name
 SL 
 resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type
 SL /resource-env-ref
 
 
 
 
 
 SL --
 SL To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 SL For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 -- 
 Best regards,
  Jacobmailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL 

Problems accessing xls and ppt files over ajp13

2002-06-04 Thread Lawlor, Frank

I added mime types to conf/web.xml for xls and ppt:

application/vnd.ms-excel
application/vnd.ms-powerpoint

and this works fine when I access tomcat directly,

However, when I access tomcat via our IIS server in
the firewall (SSL), they are sent as text.  Other MS filetypes
(doc, mdb) seem fine.

Any idea what is wrong here and how to fix it?
Does IIS have to be restarted if I add mime types
for tomcat?  

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



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




Re: ??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Tony LaPaso

Well, simply inserting a getLastModified() method into the generated
servlet will not work due to the class inheritance involved.

With standard (non-JSP generated) servlets, the service() method in
HttpServlet calls getLastModified(). With JSP-based servlets,
HttpServlet's service() method has been overriden by Tomcat (i.e.,
Catalina stuff) so the call to getLastModified() does not occur.

Still, it might be possible to hack the JSP-based servletI hate to hack
though

I'll think about it. Thanks for the suggestion.

Tony



- Original Message -
From: Markus Kirsten [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 5:16 AM
Subject: Re: ??? Using JSPs to Send Not-Modified-Since Header ???


 Hi Tony,
 Isn't it possible to put in the method after the jsp file has been
 rewritten (by Tomcat) to a standard java source code file? Maybe it's
 quick and dirty but I can't see why it shouldn't work.

 Best of luck!


 Markus

 On Tuesday, June 4, 2002, at 09:28 AM, Tony LaPaso wrote:

  Hi all,
 
  In looking at past posts, I'm afraid I know the horrible answer
  to this issue but I thought I'd ask just in case I missed
  anything.
 
  Let me start by saying I'm using Tomcat v4.0.4 beta 3.
 
  As you know, when a client (usually a web browser) has a cached
  version of a resource (usually a web page) it can send an
  If-Modified-Since header to the HTTP server. The server
  compares the time/date stamp specified in the header with that of
  the requested resource. If the resource has *not* been modified
  since the time specified in the If-Modified-Since header, the
  server sends back a 304 (Not-Modified) response, effectively
  telling the client (usually a web browser) that its cached
  version of the resource is still valid.
 
  When writing a servlet, it's easy to handle this sort of
  scenario. The javax.servlet.http.HttpServlet class has a
  service() method. This method first checks if the incoming HTTP
  method is a GET. If it is, the service() method proceeds to
  call the getLastModified() method of the servlet. As a
  developer, you can override getLastModified() to return a long
  value representing the last time the requested resource was
  changed. Depending on the value returned by getLastModified()
  (note that -1 is returned if you don't override the method) the
  service() method may simply return a 304, Not-Modified response
  rather than calling the servlet's doGet() method.
 
  Now, the $18.32 Question: How do you ensure getLastModified()
  is called in JSP?
 
  No, you cannot simply do this:
 
  %!
 public long getLastModified() {
return xxx;
 }
  %
 
  The problem is that the above method will never be called by the
  container.
 
  I traced through some of the Tomcat/Catalina/Jasper code and it
  seems to me that the response code is being set to 200/OK very
  early on in the processing.
 
  I also took a cursory look at the JSP spec and didn't find any
  indication of setting a Not-Modified response code...so, I am
  thinking this is something that is (strangely) missing in the JSP
  specification. I have a JSP page that needs to update itself once
  per day. Therefore, it would be very handy to have the
  getLastModified() functionality enjoyed by servlet writers.
 
  Can anyone confirm this?
 
  Thanks...
 
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
 


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



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




Re: oracle drivers

2002-06-04 Thread Tia Haenni

Drivers are with your Oracle distribution, just search for 
classes111.zip or classes12.zip. Also, they are available here:

http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
 You will have to sign up for the Oracle Technology Network if you are 
not already a member.

puneet sachar wrote:

thanx mr. Lee

do for these drivers ,,

we need any jdk api i mean additional api's needed for
type -3 ,-4 drivers

thanx a lot

Puneet


--- Lee Chin Khiong [EMAIL PROTECTED] wrote:
  

put it into tomcat_directory/common/lib
All driver comes with oracle or you cane download it
from oracle web site.


-Original Message-
From: puneet sachar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:25 PM
To: Tomcat Users List
Subject: oracle drivers 


good morning developers!


tell me if i want to use oracle as my database where
do i keep my drivers in the tomcat and 

2)
where r the oracles drivers 

3) from where i get type 3 or type 4 drivers

4) does oracle 8i personla edition have them...

where is location , so that i copy /paste them to
desired folder


regards
Puneet

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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





__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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


  




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




RE: load-on-startup tag problem

2002-06-04 Thread Shapira, Yoav

Howdy,
A bit more info would be nice.  Specifically, do you get any errors
parsing your web.xml?  Is there anything in your context log or the
general tomcat logs regarding not being able to find a class required by
one of the servlets below?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 4:17 AM
To: [EMAIL PROTECTED]
Subject: load-on-startup tag problem

hello,

i try to run 2 servlets on the starting of tomcat 4.0.3.
i use this portion of xml code in my web.xml file :

servlet
servlet-nameOdataJDOinitializer/servlet-name
servlet-classlds.odata.web.servlets.OdataJDOinitializer/servlet-clas
s
load-on-startup1/load-on-startup
  /servlet
servlet
servlet-nameOdataJDBCinitializer/servlet-name
servlet-classlds.odata.web.servlets.OdataJDBCinitializer/servlet-cla
ss
load-on-startup2/load-on-startup
  /servlet

i don't understand why but just the servlet calling
OdataJDBCinitializer is
launch.

is someone could help me ?

Patrick PIERRA
Linedata Services Luxembourg
00 352 29 56 65 282
[EMAIL PROTECTED]


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


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




Re: Bypassing user role assignment???

2002-06-04 Thread Ben Walding

Alternatively,

Create a view (Access query) to handle roles, then you don't need that 
superfluous column in your user table and you can modify your view at a 
later stage to handle additional roles.

eg.
create a query with the sql
SELECT Username, DEFAULT from usertable


At some later stage change query to

SELECT Username, DEFAULT from user table
union all
select username, realrole from role table (with appropriate joins 
between user table and role table)



I'm not 100% sure that you will be able to use this with the JDBC realm, 
but I'd be very surprised as it is fairly simple internally and should 
just select the data out.

Almost as simple, and far more flexible.

Geoff Peters wrote:

See THAT is why I subscribe to this list - easy solutions right under my nose, but 
someone else can think of them quicker!

Thanks, that should do the job perfectly, even though it is Access 97 (yuck)

Thanks again, Geoff


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:47 AM
To: 'Tomcat Users List'
Subject: RE: Bypassing user role assignment???


Why don't you set the user roles table to be the same as the users table.
Have a user_role field in the users table with a default value default
role or something. That way when you create a new user a role is
automatically created for them with the role of default role. Then you
don't have to change anything or rewrite the hasRole() method.

-Original Message-
From: Geoff Peters [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:36 PM
To: Tomcat Users List
Subject: RE: Bypassing user role assignment???


So it isn't possible to set a default role for everyone at login with a
parameter in the web.xml file?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: June 4, 2002 8:34 AM
To: Tomcat Users List
Subject: AW: Bypassing user role assignment???


The only way I see, is to create your own realm by
extending JDBC Realm and overriding the hasRole() 
method.

  

-Ursprüngliche Nachricht-
Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Juni 2002 13:19
An: [EMAIL PROTECTED]
Betreff: Bypassing user role assignment???


Does anyone know if it is possible to bypass the requirement 
to have user roles defined within a table in the JDBC Realm? 
Reason being is that I have an app where all users need to be 
standard, and I have scripts and other apps creating the 
users, therefore bypassing the user role definition would 
save me from having to edit these other scripts and processes 
(which are not Java based..)



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


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

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


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


  





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




TOMCAT 4.0.3 Servlet.service() for servlet jsp

2002-06-04 Thread Gustavo Mejia

Hello every one!

I have a problem, I was using Tomcat 4.0.1 with jdk1.3.2 and worked ok, but I
changed it by Tomcat 4.0.3 LE 14, and jdk 1.4 and I got an error like this..

I hope you could help me..  Thanks in advance 

2002-06-04 10:09:02 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp
threw exception
java.lang.IllegalArgumentException: Unterminated quote
 at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:689)
 at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:494)
 at java.text.SimpleDateFormat.init(SimpleDateFormat.java:443)
 at java.text.SimpleDateFormat.init(SimpleDateFormat.java:424)
 at
org.apache.jsp.ResultadoConsultaOcupacion$jsp._jspService(ResultadoConsultaOcupacion$jsp.java:333)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
 at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
 at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
 at java.lang.Thread.run(Thread.java:536)
--
Saludos

Gustavo Mejía Mora
INFOTEC
Centro de Tecnologias Avanzadas
Tel: +(55) 5 624 28 00
Ext: 253 / 220
-

We should take care not to make the intellect our god; it has, of course,
powerful muscles, but no personality. - Albert Einstein


---
[This E-mail scanned for viruses]
[Deteccion de virus para una mayor seguridad en sus correos de Entrada y Salida]
---


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




mod_jk slows down apache 1.3.23

2002-06-04 Thread Power-Netz \(Schwarz\)

Hi,

I have found that the auto config of tomcat for mod_jk
slows down my apache.

I guess that i did not configure tomcat correctly.

Where should i look for and change things??

mod_jk is working so far, as i can access my apps via normale http urls like
http://domain/application
but no longer via http://domain:8080/application ( which is what i wanted
btw )

tomcat 3.3
apache 1.3.23
Linux



Ihr Support-Team

 POWER-NETZ®
Full-Service-Provider 

Online-Support:
Support: 0190 - 15 11 15 (EUR 0,62/Min)
http://Support.Power-Netz.de (kostenlos)
http://Support.Power-Netz.com (kostenlos)

Vertrieb Tel:  01805 - 57 35 57 (EUR 0,12/Min.)
Vertrieb Fax: 01805 - 57 45 57 (EUR 0,12/Min.)

Power-Netz
Am Plan 1
37581 Bad Gandersheim

http://www.Power-Netz.de
mailto:[EMAIL PROTECTED]


+=+
--I N F O   C E N T E R--
+ Senden Sie eine leere e-mail an:
+ Providerwechsel: mailto:[EMAIL PROTECTED]
+ Daten/Preise Webspace: mailto:[EMAIL PROTECTED]
+ Reseller-Programm: mailto:[EMAIL PROTECTED]
+ Dedizierte Server: mailto:[EMAIL PROTECTED]
+ Adult/Erotikserver: mailto:[EMAIL PROTECTED]
+ Domainpreise: mailto:[EMAIL PROTECTED]
+ Domain-Nameserver: mailto:[EMAIL PROTECTED]
+ SSL-Zertifikate: mailto:[EMAIL PROTECTED]
+ Geschaeftsbedingungen: mailto:[EMAIL PROTECTED]
+ =+


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




Re: CrossContext

2002-06-04 Thread Jonathan Perry

Anybody?  Please?  This is really doing my head in.

Thanks a lot,
JP

On 4/6/02 10:51 am, Jonathan Perry [EMAIL PROTECTED] wrote:

 Hi,
   I'm running jakarta-tomcat-4.0.3 on Mac OSX.  I've got two contexts set
 up, A, and B.  Both have crossContext=true in their section of
 server.xml.  I have a copy of a servlet in each context, which has the
 following lines of code:
 
 ServletContext c = getServletContext( ).getContext( /A/ );
 RequestDispatcher dispatcher = c.getRequestDispatcher( /helloWorld.jsp );
 
 This code works as expected in context A, but fails to obtain a context
 (simply returning null, no exceptions thrown) in context B.  I've searched
 through archives on several sites, including this one, and haven't found
 anything promising.  Does anyone have any ideas of what I might be doing
 wrong?
 
 Thanks for your time,
 JP
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]


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




Differences in XML data received by servlet in Tomcat?

2002-06-04 Thread Bo Min Jiang

Hi,

I have a simple Java client that uses HTTP Post to pass an XML string to a
servlet on Tomcat.  This is done with a HttpURLConnection and writing to a
DataOutputSteam. The string looks like the following:

xmldocument=?xml version=1.0
encoding=UTF-8?AdvancedSearchtest/AdvancedSearch

In my servlet, when I call getParameterNames() on the request, I get the
following:

parameter name: 1.0 encoding 
parameter value: UTF-8?AdvancedSearchtest/AdvancedSearch

These values are not what I expected.

However, when I call the same servlet with the same data using a browser
(IE5), I get the correct values

parameter name: xmldocument
parameter value: ?xml version=1.0
encoding=UTF-8?AdvancedSearchtest/AdvancedSearch

Both calls use application/x-www-form-urlencoded as the content-type.  I
also tried to explicitly encode the string passed by the Java client using
URLEncoder.encode() but that didn't work.

Does anyone have any idea why these differences occur?  Is there something
significantly different between how a browser and a standalone client do a
HTTP post, besides some header info?  Also, if anyone knows of a simple
example demonstrating posting XML to a servlet in Tomcat, it would be great
if you could refer me to it.

Thanks,
Bo






winmail.dat
Description: application/ms-tnef

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


Re: CrossContext

2002-06-04 Thread Phillip Morelock

Are you supposed to have the trailing slash?

maybe:
getServletContext( ).getContext( /A )

I haven't used this feature, just trying to help.

fillup


On 6/4/02 2:44 PM, Jonathan Perry [EMAIL PROTECTED] wrote:

 Anybody?  Please?  This is really doing my head in.
 
 Thanks a lot,
 JP
 
 On 4/6/02 10:51 am, Jonathan Perry [EMAIL PROTECTED] wrote:
 
 Hi,
   I'm running jakarta-tomcat-4.0.3 on Mac OSX.  I've got two contexts set
 up, A, and B.  Both have crossContext=true in their section of
 server.xml.  I have a copy of a servlet in each context, which has the
 following lines of code:
 
 ServletContext c = getServletContext( ).getContext( /A/ );
 RequestDispatcher dispatcher = c.getRequestDispatcher( /helloWorld.jsp );
 
 This code works as expected in context A, but fails to obtain a context
 (simply returning null, no exceptions thrown) in context B.  I've searched
 through archives on several sites, including this one, and haven't found
 anything promising.  Does anyone have any ideas of what I might be doing
 wrong?
 
 Thanks for your time,
 JP
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




RE: about JavaBeans

2002-06-04 Thread McLane, Bryan

Simply, put the value in an attribute of the bean and access through the
getter. See mtemp in the example attached.

-Original Message-
From: Anibal Constante Brito [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:35 PM
To: Tomcat
Subject: about JavaBeans


I'm doing a simple JavaBenas, like the

jsp:useBean id=JSPWithCounterBeanId scope=session
class=jsptutorial.JSPWithCounterBean /
jsp:setProperty name=JSPWithCounterBeanId property=* /

It very simple, but my question is how can I send text o something to
browser from inside the JavaBeans, inside de JSPWithCounterBeanId for
example?

Best Regards.
Owen.



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




Result.jsp
Description: Binary data


ExceptionInfo.java
Description: Binary data


RuleInfo.java
Description: Binary data


PcraRestrictionsReturn.java
Description: Binary data


RestrictionsInfo.java
Description: Binary data

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


RE: auto deploy seems to fail on 4.0.2/win98 and 4.0.1/linux

2002-06-04 Thread Douglas, Rory

tomcat will only auto deploy war's at startup and then only if a directory
with the same name as the war file does not already exist in your webapps
directory. If you want to update a running web-app, you need to specify a
context element for it in conf\server.xml and specify the 'reloadable'
attribute as true. You can then manually copy updated web app files into
the existing webapp dir and Tomcat will reload the app.

-Original Message-
From: Ray Tayek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 5:29 AM
To: [EMAIL PROTECTED]
Subject: auto deploy seems to fail on 4.0.2/win98 and 4.0.1/linux


hi, using tomcat 4.0.2 on win98 and 4.0.1 on slak 8.0. trying to work 
through the examples in Java Tools for Extreme Programming: Mastering Open 
Source Tools: Including Ant, JUnit, and Cactus by Richard Hightower, 
Nicholas Lesiecki.

all is well until i copy the hello.wat file to tomat/webapps (while it is 
running). i can not get at the servlet from a browser. stopping and 
restarting does not help. the hello.war is not unjared.

anybody got a clue?

thanks

---
ray tayek http://home.attbi.com/~rtayek/ actively seeking telecommuting work
vice chair orange county java users group http://www.ocjug.org/ 
mailto:[EMAIL PROTECTED]
hate spam? http://samspade.org/ssw/


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



Re: jdbc connection list

2002-06-04 Thread Darya Chernikhova


Sorry if this is a copy.  I got an error message from my mail server,
after I sent this email, so I'm trying again.
Darya

On Tue, 4 Jun 2002, Darya Chernikhova wrote:

 Hi all,

 I'd like to write a bean that would keep track of all of the jdbc
 connections that users make.

 So, say that I have 2 applications registered on tomcat -- appA and appB.
 And, say that there are 5 servlets or jsp pages per application --
 appA/serv1, appA/serv2, ..., appB/serv5 .  And, each servlet's doService
 method opens a jdbc connection and gets some data out of my database.

 I would like to write a bean that would sit there and listen to jdbc
 connections being made.  It would store a list of objects containing the
 following data:
 - connection pointer
 - session the connection was made out of
 - app and servlet the connection was made out of.

 My problem is that I don't know much about the connection making process
 in Tomcat.  When a new connection is made, which Tomcat controller beans
 know about it?  What events are sent, and to whom?  What should my bean
 extend or implement?

 I've been looking into the online docs and some books I have, but I
 haven't found anything useful yet.

 Thanks a lot for your help,
 Darya.

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



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




Re: CrossContext

2002-06-04 Thread Phillip Morelock

From the servlet api:

Returns a ServletContext object that corresponds to a specified URL on
the server.

This method allows servlets to gain access to the context for various
parts of the server, and as needed obtain RequestDispatcher objects from the
context. The given path must be begin with /, is interpreted relative to
the server's document root and is matched against the context roots of other
web applications hosted on this container.

In a security conscious environment, the servlet container may return null
for a given URL.

Parameters:
uripath - a String specifying the context path of another web application in
the container.Returns:
the ServletContext object that corresponds to the named URL, or null if
either none exists or the container wishes to restrict this access.

Is it possible that tomcat returns null by default?  I started digging
through source for you, but you might have to do some more digging.

I checked the source for:
org.apache.catalina.core.StandardContext

Notice this interesting source comment (I don't know where it gets set at
runtime, however):
 /**
 * Should we allow the codeServletContext.getContext()/code method
 * to access the context of other web applications in this server?
 */
private boolean crossContext = false;

 and also some getters and setters:
/**
 * Return the allow crossing servlet contexts flag.
 */
public boolean getCrossContext() {

return (this.crossContext);

}


/**
 * Set the allow crossing servlet contexts flag.
 *
 * @param crossContext The new cross contexts flag
 */
public void setCrossContext(boolean crossContext) {

boolean oldCrossContext = this.crossContext;
this.crossContext = crossContext;
support.firePropertyChange(crossContext,
   new Boolean(oldCrossContext),
   new Boolean(this.crossContext));

}


You should definitely take a look at
org.apache.catalina.core.ApplicationContext.java

since it implements ServletContext for tomcat -- that will show you where to
trace the source path.  it also has an interesting inner class at the top
called :

 protected class PrivilegedGetRequestDispatcher
implements PrivilegedAction {


good luck
fillup



On 6/4/02 2:44 PM, Jonathan Perry [EMAIL PROTECTED] wrote:

 Anybody?  Please?  This is really doing my head in.
 
 Thanks a lot,
 JP
 
 On 4/6/02 10:51 am, Jonathan Perry [EMAIL PROTECTED] wrote:
 
 Hi,
   I'm running jakarta-tomcat-4.0.3 on Mac OSX.  I've got two contexts set
 up, A, and B.  Both have crossContext=true in their section of
 server.xml.  I have a copy of a servlet in each context, which has the
 following lines of code:
 
 ServletContext c = getServletContext( ).getContext( /A/ );
 RequestDispatcher dispatcher = c.getRequestDispatcher( /helloWorld.jsp );
 
 This code works as expected in context A, but fails to obtain a context
 (simply returning null, no exceptions thrown) in context B.  I've searched
 through archives on several sites, including this one, and haven't found
 anything promising.  Does anyone have any ideas of what I might be doing
 wrong?
 
 Thanks for your time,
 JP
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: jdbc connection list

2002-06-04 Thread Phillip Morelock

Use the Listener design pattern.  You'll probably write an interface,
implement it, and then register listeners with classes that will inform them
of events.

The java kit already has some of this pattern:
HttpSessionBindingListener

for example.

The pattern is also prevalent throughout Swing and AWT.

cheers
fillup


On 6/4/02 4:01 PM, Darya Chernikhova [EMAIL PROTECTED] wrote:

 
 Sorry if this is a copy.  I got an error message from my mail server,
 after I sent this email, so I'm trying again.
 Darya
 
 On Tue, 4 Jun 2002, Darya Chernikhova wrote:
 
 Hi all,
 
 I'd like to write a bean that would keep track of all of the jdbc
 connections that users make.
 
 So, say that I have 2 applications registered on tomcat -- appA and appB.
 And, say that there are 5 servlets or jsp pages per application --
 appA/serv1, appA/serv2, ..., appB/serv5 .  And, each servlet's doService
 method opens a jdbc connection and gets some data out of my database.
 
 I would like to write a bean that would sit there and listen to jdbc
 connections being made.  It would store a list of objects containing the
 following data:
 - connection pointer
 - session the connection was made out of
 - app and servlet the connection was made out of.
 
 My problem is that I don't know much about the connection making process
 in Tomcat.  When a new connection is made, which Tomcat controller beans
 know about it?  What events are sent, and to whom?  What should my bean
 extend or implement?
 
 I've been looking into the online docs and some books I have, but I
 haven't found anything useful yet.
 
 Thanks a lot for your help,
 Darya.
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: jdbc connection list

2002-06-04 Thread Phillip Morelock

also called the Observer pattern.


On 6/4/02 4:07 PM, Phillip Morelock [EMAIL PROTECTED]
wrote:

 Use the Listener design pattern.  You'll probably write an interface,
 implement it, and then register listeners with classes that will inform them
 of events.
 
 The java kit already has some of this pattern:
 HttpSessionBindingListener
 
 for example.
 
 The pattern is also prevalent throughout Swing and AWT.
 
 cheers
 fillup
 
 
 On 6/4/02 4:01 PM, Darya Chernikhova [EMAIL PROTECTED] wrote:
 
 
 Sorry if this is a copy.  I got an error message from my mail server,
 after I sent this email, so I'm trying again.
 Darya
 
 On Tue, 4 Jun 2002, Darya Chernikhova wrote:
 
 Hi all,
 
 I'd like to write a bean that would keep track of all of the jdbc
 connections that users make.
 
 So, say that I have 2 applications registered on tomcat -- appA and appB.
 And, say that there are 5 servlets or jsp pages per application --
 appA/serv1, appA/serv2, ..., appB/serv5 .  And, each servlet's doService
 method opens a jdbc connection and gets some data out of my database.
 
 I would like to write a bean that would sit there and listen to jdbc
 connections being made.  It would store a list of objects containing the
 following data:
 - connection pointer
 - session the connection was made out of
 - app and servlet the connection was made out of.
 
 My problem is that I don't know much about the connection making process
 in Tomcat.  When a new connection is made, which Tomcat controller beans
 know about it?  What events are sent, and to whom?  What should my bean
 extend or implement?
 
 I've been looking into the online docs and some books I have, but I
 haven't found anything useful yet.
 
 Thanks a lot for your help,
 Darya.
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




if you want to help a newbie

2002-06-04 Thread Paul Clifford

Hi, I just joined the list today. I have installed Tomcat-4.0.3 on 
Redhat Linux-7.3 running Apache-1.3.23.
A starting question, J2EE (i'm using 1.3.1) says it includes tomcat, is 
it bad to have both The stand alone tomcat RPM and J2EE installed. Might 
they conflict somehow?


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




Re: Manager App Question

2002-06-04 Thread Thomas Bierhance

Hello Adam,

AP I just began playing with the manager app and am confused on how it deploys a new 
web application.
AP  Here is the lowdown.

AP /opt/jakarta-tomcat-4.0.3/webapps/trips-dev in order to set up a development 
environment.

AP This worked, the web app deployed and I can now browse it perfectly.  What I am 
confused on it
AP that I can stop and start tomcat /opt/jakarta-tomcat-4.0.3/bin/shutdown.sh  
startup.sh and it
AP still sees the trips-dev app.

  Tomcat will always deploy all applications in the directory
  webapps on startup. It's a feature you do not have to configure
  that somewhere.
  
-- 
Regards,
 Thomasmailto:[EMAIL PROTECTED]


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




Re: Does Tomcat want to stand alone?

2002-06-04 Thread Gus Heck

Your response is helpful, though I can't tell if it will help until I check
out struts, and attempt to create a dispacher like you describe. At least
now I have some more leads... still it seems that there should be a simple
option that provides the simple functionality. Flexability and power is
great, but sometimes one only wants part of the power... and just wants the
rest to work like it does elsewhere.

I am not yet at the point where I am writing full scale web apps. I hope to
do that sort of thing eventually, but for the moment I just want the ability
to do some dynamic content, and respond to forms taking advantage of the
relatively safe, and secure Java platform to keep people from doing nasty
things to my home server when I don't quite check cgi input right or screw
up the permissions on a script.

My impression of Tomcat is that one winds up having to learn ALL of it's
features at once. It is also very hard to find out answers to simple things
on their web site... like how do you turn off directory indexing in Tomcat?
I can find stuff on security managers, jndi and class loaders, but whenever
I have a simple question I get stuck.

Thanks,
Gus

- Original Message -
From: Phillip Morelock [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, June 03, 2002 9:16 PM
Subject: Re: Does Tomcat want to stand alone?


  But this is within the servlet/jsp page, not the config file. unless I
  misunderstand you. there is no response until a page has been settled on
for
  processing right? This means to redirect a request I would have to have
a
  phantom page that tomcat decided to serv that then redirected to the
real
  page. One of the top features of redirection is to have the user ask for
one
  thing, and not need it to exist physically on the file system.
 
  Of course I may be entirely missing something here :)

 You are  :)

 First, look into frameworks like struts.  They do exactly what you're
 talking about.  (Struts is another jakarta project).  Second, get creative
 with your servlet mappings:  check out the servlet specification for
what's
 allowed in a servlet mapping.  The thing about the servlet / jsp
 specifications, they are really supposed to be broad bases that are highly
 portable and highly flexible, at the expense of some of the convenience
 features of an environment like ASP or PHP.

 Struts uses this paradigm:
 *.do

 or *.action or whatever file extension.  Struts catches all requests for
 *.do and dynamically instantiates appropriate developer-defined handlers
for
 these actions.  It's very cool.

 Second, even with struts or without it, I've written very simple servlets
 (like 50 lines) that essentially are mini-dispatchers -- they
 load-on-startup and read a flat file of forwarding dispatches.  That way
you
 can forward any request like:
 fandango/*
 to a particular servlet and from that servlet you can check out the url
and
 see where you want to dispatch it (this is very easy -- but again, struts
 does this all automagically and securely for you).  I don't remember the
 exact details of every servlet-mapping rule, but the spec is usually very
 helpful in that.

 I also have some friends at a very high-profile entertainment company who
 use WebLogic (off topic...) and they use the Struts framework in that
 environment for an extremely high-traffic, high-security, yadda yadda
 deployment that has exactly the kinds of flexibility requirements you're
 asking for.  Struts is written to the servlet spec, so it's almost
 invariably portable.

 You might not know about the request dispatcher object too.
 javax.servlet.http.RequestDispatcher -- or maybe it's
 javax.servlet.RequestDispatcher.  This has a forward method that allows
 you to internally forward a request on the server to another servlet or
jsp.
 In fact this is how my apps work -- servlets take all user input, and do
all
 the processing / database work / error-intensive / security-conscious
tasks,
 etc. -- and then forward the request to a simple display-only jsp (after
 putting items into the request scope hashtable).  This is kind of the
 right way to do things, although there are obviously a million shades of
 gray.  I can forward to A.jsp if condition A is satisfied, or B.jsp
 otherwise, etc.

 Does this help?

 cheers
 fillup


 On 6/3/02 6:17 PM, Gus Heck [EMAIL PROTECTED] wrote:

  But this is within the servlet/jsp page, not the config file. unless I
  misunderstand you. there is no response until a page has been settled on
for
  processing right? This means to redirect a request I would have to have
a
  phantom page that tomcat decided to serv that then redirected to the
real
  page. One of the top features of redirection is to have the user ask for
one
  thing, and not need it to exist physically on the file system.
 
  Of course I may be entirely missing something here :)
 
  Actually I expect that I am missing something which is why I have asked
  tomcat users :)
 
  Gus
 
  - 

JSSE vs MOD_SSL

2002-06-04 Thread Johnny


 Hi Tomcat Users,

 I found out the mod_ssl is disabled after I integrated tomcat 4.0.3 with
apache 1.3.20. So I wondering is it possible to run mod_ssl + tomcat +
apache in the same time, instead of using JSSE?

 Regards
 Johnny.





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




Re: Does Tomcat want to stand alone?

2002-06-04 Thread Phillip Morelock

On 6/3/02 9:24 PM, Gus Heck [EMAIL PROTECTED] wrote:

 Your response is helpful, though I can't tell if it will help until I check
 out struts, and attempt to create a dispacher like you describe. At least
 now I have some more leads... still it seems that there should be a simple
 option that provides the simple functionality. Flexability and power is
 great, but sometimes one only wants part of the power... and just wants the
 rest to work like it does elsewhere.
 
 I am not yet at the point where I am writing full scale web apps. I hope to
 do that sort of thing eventually, but for the moment I just want the ability
 to do some dynamic content,

Understandable.  I still use PHP for this purpose.

 and respond to forms taking advantage of the
 relatively safe, and secure Java platform to keep people from doing nasty
 things to my home server when I don't quite check cgi input right or screw
 up the permissions on a script.

Security is definitely one of the best reasons to use Java.  I do think
security stuff has improved considerably since the olden days of cgi --
and I think that less-powerful-but-more-specialized solutions (like PHP) are
also considerably more secure than they used to be.

 My impression of Tomcat is that one winds up having to learn ALL of it's
 features at once. It is also very hard to find out answers to simple things
 on their web site... like how do you turn off directory indexing in Tomcat?
 I can find stuff on security managers, jndi and class loaders, but whenever
 I have a simple question I get stuck.

I don't know that you have to learn *all* of the features.  But I will
definitely grant you that working with Servlet/JSP stuff is much more
application programming than simple scripting.  People looking to use JSP as
an easy scripting platform are in for some hard times.

Again, nothing to feel bad about -- there are a thousand other things that
someone like me hasn't learned -- I just happened to like tomcat when I
first used it, and I stuck with it for application development, but
certainly not for the sort of quick cgi type of stuff, as I find it
cumbersome for that.

 
 Thanks,
 Gus

Cheers,
Phillip

 
 - Original Message -
 From: Phillip Morelock [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, June 03, 2002 9:16 PM
 Subject: Re: Does Tomcat want to stand alone?
 
 
 But this is within the servlet/jsp page, not the config file. unless I
 misunderstand you. there is no response until a page has been settled on
 for
 processing right? This means to redirect a request I would have to have
 a
 phantom page that tomcat decided to serv that then redirected to the
 real
 page. One of the top features of redirection is to have the user ask for
 one
 thing, and not need it to exist physically on the file system.
 
 Of course I may be entirely missing something here :)
 
 You are  :)
 
 First, look into frameworks like struts.  They do exactly what you're
 talking about.  (Struts is another jakarta project).  Second, get creative
 with your servlet mappings:  check out the servlet specification for
 what's
 allowed in a servlet mapping.  The thing about the servlet / jsp
 specifications, they are really supposed to be broad bases that are highly
 portable and highly flexible, at the expense of some of the convenience
 features of an environment like ASP or PHP.
 
 Struts uses this paradigm:
 *.do
 
 or *.action or whatever file extension.  Struts catches all requests for
 *.do and dynamically instantiates appropriate developer-defined handlers
 for
 these actions.  It's very cool.
 
 Second, even with struts or without it, I've written very simple servlets
 (like 50 lines) that essentially are mini-dispatchers -- they
 load-on-startup and read a flat file of forwarding dispatches.  That way
 you
 can forward any request like:
 fandango/*
 to a particular servlet and from that servlet you can check out the url
 and
 see where you want to dispatch it (this is very easy -- but again, struts
 does this all automagically and securely for you).  I don't remember the
 exact details of every servlet-mapping rule, but the spec is usually very
 helpful in that.
 
 I also have some friends at a very high-profile entertainment company who
 use WebLogic (off topic...) and they use the Struts framework in that
 environment for an extremely high-traffic, high-security, yadda yadda
 deployment that has exactly the kinds of flexibility requirements you're
 asking for.  Struts is written to the servlet spec, so it's almost
 invariably portable.
 
 You might not know about the request dispatcher object too.
 javax.servlet.http.RequestDispatcher -- or maybe it's
 javax.servlet.RequestDispatcher.  This has a forward method that allows
 you to internally forward a request on the server to another servlet or
 jsp.
 In fact this is how my apps work -- servlets take all user input, and do
 all
 the processing / database work / error-intensive / security-conscious
 tasks,
 

Re: Does Tomcat want to stand alone?

2002-06-04 Thread Eric Hollander

On Monday 03 June 2002 18:24, you wrote:
 My impression of Tomcat is that one winds up having to learn ALL of it's
 features at once. It is also very hard to find out answers to simple things
 on their web site... like how do you turn off directory indexing in Tomcat?
 I can find stuff on security managers, jndi and class loaders, but whenever
 I have a simple question I get stuck.

One of the common criticisms about Java is that it's great for big-scale 
stuff but it's harder to use for small stuff.  This really is true, and it's 
also true for Tomcat.  You can learn perl very quickly and you can write a 
basic cgi and install it in apache very quickly.  Just learning how to 
install and get Tomcat started is a challenge.  Just writing hello world is 
vastly more complicated.  You can write a hello-world cgi in two lines.  In 
Java you need to install everything, and then subclass Servlet, and set up 
web.xml, etc, etc.  So you are right, you need to learn a lot more to do 
simple stuff, but it works a lot better when you need to do big stuff.

But if you are already familiar with java and tomcat it because very quick 
and easy to set up simple applications.

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




Re: Does Tomcat want to stand alone?

2002-06-04 Thread Phillip Morelock

On 6/4/02 7:51 PM, Eric Hollander [EMAIL PROTECTED] wrote:

 On Monday 03 June 2002 18:24, you wrote:
 My impression of Tomcat is that one winds up having to learn ALL of it's
 features at once. It is also very hard to find out answers to simple things
 on their web site... like how do you turn off directory indexing in Tomcat?
 I can find stuff on security managers, jndi and class loaders, but whenever
 I have a simple question I get stuck.
 
 One of the common criticisms about Java is that it's great for big-scale
 stuff but it's harder to use for small stuff.  This really is true, and it's
 also true for Tomcat.  You can learn perl very quickly and you can write a
 basic cgi and install it in apache very quickly.  Just learning how to
 install and get Tomcat started is a challenge.  Just writing hello world is
 vastly more complicated.  You can write a hello-world cgi in two lines.  In
 Java you need to install everything, and then subclass Servlet, and set up
 web.xml, etc, etc.  So you are right, you need to learn a lot more to do
 simple stuff, but it works a lot better when you need to do big stuff.

Very succinct statement.

 But if you are already familiar with java and tomcat it because very quick
 and easy to set up simple applications.

I find this is especially true after you've done a project or two with it,
and you have all sorts of framework code lying around.

fillup


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




Re: Does Tomcat want to stand alone?

2002-06-04 Thread Gus Heck

I don't think it is so hard to do the java part, and I suspect that the
tomcat part isn't that hard either, but I am really criticising the
documentation more than anything else. I am not opposed to extra keystrokes
for benefits of java, but I do really dislike reading page after irrelevant
page hoping to stumble on the nugget I need. I feel that the documentation
focuses on the neat cool things that tomcat does that non java servers
don't, and omits the routine basic stuff. Even if it takes a few more
keystrokes or some extra thought in Tomcat, I shouldn't have trouble finding
out how to turn of directory indexing. (for example).

Gus

- Original Message -
From: Eric Hollander [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 10:51 PM
Subject: Re: Does Tomcat want to stand alone?


 On Monday 03 June 2002 18:24, you wrote:
  My impression of Tomcat is that one winds up having to learn ALL of it's
  features at once. It is also very hard to find out answers to simple
things
  on their web site... like how do you turn off directory indexing in
Tomcat?
  I can find stuff on security managers, jndi and class loaders, but
whenever
  I have a simple question I get stuck.

 One of the common criticisms about Java is that it's great for big-scale
 stuff but it's harder to use for small stuff.  This really is true, and
it's
 also true for Tomcat.  You can learn perl very quickly and you can write a
 basic cgi and install it in apache very quickly.  Just learning how to
 install and get Tomcat started is a challenge.  Just writing hello world
is
 vastly more complicated.  You can write a hello-world cgi in two lines.
In
 Java you need to install everything, and then subclass Servlet, and set up
 web.xml, etc, etc.  So you are right, you need to learn a lot more to do
 simple stuff, but it works a lot better when you need to do big stuff.

 But if you are already familiar with java and tomcat it because very quick
 and easy to set up simple applications.

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





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




Re: JSP page is working for intranet not for internet

2002-06-04 Thread Gus Heck

Can't guess about your code without more detail but make sure whatever ports
you are talking on are allowed through your firewall. Also if your systems
have files listing local machines addresses that they use to get dns numbers
without a server lookup, you could be feeding off of those on you network
and not achieving good lookups when you have to ask a server... but that
seems unlikely as the problem would probably be universal for all programs
on the machine. I can't think of any reasons why java would distinguish
between local net and internet, so I would be looking at the system level to
start.

- Original Message -
From: Rong Li [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 3:27 PM
Subject: JSP page is working for intranet not for internet


 We have a chat system installed. The jsp is working perfectly from
 intranet. However, we can not make it run from outside intranet. Anybody
 has any clue about this? Configuration problem?

 Thanks,

 Ron



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





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




Re: Does Tomcat want to stand alone?

2002-06-04 Thread Phillip Morelock

On 6/4/02 8:37 PM, Gus Heck [EMAIL PROTECTED] wrote:

 I don't think it is so hard to do the java part, and I suspect that the
 tomcat part isn't that hard either, but I am really criticising the
 documentation more than anything else. I am not opposed to extra keystrokes
 for benefits of java, but I do really dislike reading page after irrelevant
 page hoping to stumble on the nugget I need. I feel that the documentation
 focuses on the neat cool things that tomcat does that non java servers
 don't, and omits the routine basic stuff. Even if it takes a few more
 keystrokes or some extra thought in Tomcat, I shouldn't have trouble finding
 out how to turn of directory indexing. (for example).
 
 Gus

Yeah that one is particularly nasty.  I agree with you on all your points, I
guess I'm just one of those people who's invested so much of this time on
irrelevant keystrokes that I can't turn back :)

The benefits continue -- I've actually found that because I've had to find
out so much about the guts of Tomcat, my knowledge and skills are very
portable because I know all these dirty tricks, irrelevant keystrokes, and
hidden corners -- that perhaps some implementations document better than
others. 

The other funny little paradox is:
Tomcat 4 has 10 times as much official documentation as Tomcat 3, but Tomcat
4 is 50 times more complex to use than Tomcat 3.  Well, not really...but
there is a sneaky ratio like this at play.

fillup


 
 - Original Message -
 From: Eric Hollander [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, June 04, 2002 10:51 PM
 Subject: Re: Does Tomcat want to stand alone?
 
 
 On Monday 03 June 2002 18:24, you wrote:
 My impression of Tomcat is that one winds up having to learn ALL of it's
 features at once. It is also very hard to find out answers to simple
 things
 on their web site... like how do you turn off directory indexing in
 Tomcat?
 I can find stuff on security managers, jndi and class loaders, but
 whenever
 I have a simple question I get stuck.
 
 One of the common criticisms about Java is that it's great for big-scale
 stuff but it's harder to use for small stuff.  This really is true, and
 it's
 also true for Tomcat.  You can learn perl very quickly and you can write a
 basic cgi and install it in apache very quickly.  Just learning how to
 install and get Tomcat started is a challenge.  Just writing hello world
 is
 vastly more complicated.  You can write a hello-world cgi in two lines.
 In
 Java you need to install everything, and then subclass Servlet, and set up
 web.xml, etc, etc.  So you are right, you need to learn a lot more to do
 simple stuff, but it works a lot better when you need to do big stuff.
 
 But if you are already familiar with java and tomcat it because very quick
 and easy to set up simple applications.
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: Manager App Question

2002-06-04 Thread Jacob Kjome

At 02:00 AM 6/5/2002 +0200, you wrote:
Hello Adam,

AP I just began playing with the manager app and am confused on how it 
deploys a new web application.
AP  Here is the lowdown.

AP /opt/jakarta-tomcat-4.0.3/webapps/trips-dev in order to set up a 
development environment.

AP This worked, the web app deployed and I can now browse it 
perfectly.  What I am confused on it
AP that I can stop and start tomcat 
/opt/jakarta-tomcat-4.0.3/bin/shutdown.sh  startup.sh and it
AP still sees the trips-dev app.

   Tomcat will always deploy all applications in the directory
   webapps on startup. It's a feature you do not have to configure
   that somewhere.


I have found this *not* to be true in the case that you specify the context 
in the Server.xml.  If I don't specify it in server.xml, it expands the 
.war file on startup.  With it specified, the .war file isn't expanded and 
if I don't expand it manually before Tomcat startup, the context will not 
be found.   Any solution to that problem?

Jake



--
Regards,
  Thomasmailto:[EMAIL PROTECTED]


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



Integration-Issue!!!

2002-06-04 Thread Hanks Mei

Hi,

 I have configured apache 1.3.22 + tomcat4.0.3. And have been successful,
ofcourse with the help of online documentation.

The Apache has been configured to serve static pages, whereas tomcat has been
configured to serve dynamic pages.

I have added a security-constraint for a directory. But since apache serves
static pages and directory listings, I am able to access the directory without
any security.

I have also searched the list for any possible solutions? But could find only
questions regarding this answered. Can anyone shed some light on this?

Is there any other connector which takes care of these kind of issues?
Can we make apache to have a handshake mechanism to check whether the requested
resource can be served? If so, please explain how to do the same.

Thx
mano






-
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

Take the shortest route to success! 
Click here to know how http://education.sify.com

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




Re: tomcat vs ant vs j2me still problem

2002-06-04 Thread Nikola Milutinovic

 ant is a java based build tool (a kind of make).
 http://jakarta.apache.org/ant/index.html
 

All varietes of UNIX have a make command, which reads instructions/setup from 
Makefile and builds the requested target of that project. ant does the same, only 
it is Java based and uses build.xml file, which is far more understandable than 
Makefile.

Nix.



Re: AW: how to virtual hosting with apache 13.x, tomcat 4.0.3, mod_webapp

2002-06-04 Thread Nikola Milutinovic

 You only need one WebAppConnection statement - The same connection is
 shared by multiple vhosts/webapps. Try it like this: 
 
 WebAppConnection conn warp localhost:8008
 
 VirtualHost 193.10.10.25
DocumentRoot /path/to/website1
ServerName www.website1.org
WebAppDeploy website1 conn /website1
 /VirtualHost
  
 VirtualHost 193.10.10.25
DocumentRoot /path/to/website2
ServerName www.website2.org
WebAppDeploy website2 conn /website2
 /VirtualHost

Will this work? I have seen that each connection registers a ServerName on the Tomcat 
side. I'm not saying it is not supported, but I had problems with some previous 
instances. I must confess that those instances refused to work even for one VHost, so 
I cannot claim that *that* will not work. Have you tried it?

Nix.



How to load properties into tomcat 4.0.3?

2002-06-04 Thread Adam Pfeiffer

Hello,
I have a bean that uses the Properties Object.  Currently, on each jsp that calls that 
bean I have
to do a bean.setPropsDir() which sets the directory where to find the properties file. 
 Is there a
way in server.xml, web.xml or some other way that I can put in a variable that will 
define the
directory where the properites file exists so that the class can access this?  

Thanks.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




tomact not staring

2002-06-04 Thread puneet sachar

hi developers


i have installed tomcat 4.0.4
and did everything as mention ...

and in autoexec file mention set java_home as
c:\jdk1.3


still giving me error out of environment space 

when changes made to memory of the .bat file ..

now saying java_home variable is not defien...

this is starnge to me ..
same working ta my home not in office


vie my bat file and tell me what could be error


--
SET  JAVA_HOME=C:\JDK1.3
SET  CATALINA_HOME=c:\Tomcat

SET
PATH=C:\JDK1.3\bin;C:\Tomcat\bin;C:\JMETER\jakarta-jmeter\bin;C:\Oracle\Ora81\BIN;.;
SET
CLASSPATH=C:\jdk1.3\lib\tools.jar;C:\Tomcat\lib\jasper-compiler.jar;C:\Tomcat\lib\jasper-runtime.jar;C:\Tomcat\lib\naming-factory.jar;.;

-

regards
Puneet

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




AW: MS Driver (again)

2002-06-04 Thread Ralph Einfeldt

This sounds to me as the pool has reached it maximal count on
concurrent connections and the application doesn't give back a 
connection within the timeout of the request for a new connection.

- request the connections as late as possible.
  (E.G. don't hold a connection in a session or servlet, get it 
   for each request)
- release all connections as early a possible.
  (And don't forget one)

This will decrease the number of concurrent connections for a given
load.

- If you still observe this behaviour, increase the max
  pool size and the timeout (don't know if this is possible
  with this driver)

 -Ursprüngliche Nachricht-
 Von: Sean LeBlanc [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 4. Juni 2002 18:33
 An: 'Tomcat Users List'; 'Jacob Kjome'
 Betreff: RE: MS Driver (again)
 
 
 Thanks for the help. I saw this before, but after giving it a closer
 look I realized I needed to add the appropriate jars and use the dbcp
 factory class. Now that it actually at last connects, what is the best
 way to use this? I stress-tested a bit, and I started to get 
 errors showing up in the log that say this in the stack trace:
 
 java.util.NoSuchElementException: Timeout waiting for idle object
 at 

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




Re: prohibit stopping tomcat by generic user

2002-06-04 Thread Dennis Muhlestein

Even if the permissions are set correctly you could just

telnet localhost 8005 and type SHUTDOWN.

If your worried about users that much, I'd rethink their account on that
box.  And do make sure port 8005 is not available where someone can send
the shutdown command!

-Dennis

On Mon, 2002-06-03 at 17:18, Leland Chen wrote:
 
 Hi,
 
 I have tomcat web server configured run as nobody,
 but it can be stoped by any generic user using shutdown.sh
 script. Even the CATALINA_BASE is not set correctly, tomcat
 web server can be shutdown by any user account.
 
 Is there any way to prohibit this ?
 
 Thanks,
 
 Leland
 
 
 
 htmlDIVnbsp;/DIV/html
 
 
 _
 Join the world’s largest e-mail service with MSN Hotmail. 
 http://www.hotmail.com
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Server name setting in Apache Tomcat 4

2002-06-04 Thread Luca Ventura

Hello everybody!

I have installed Apache Tomcat 4 as plug-in of IIS to support jsp pages and
servlets, and alla works fine. For test purposes I installed all on the same
machine  without changing the server-name (localhost) of my Web Server (IIS)
and Servlet/JSP Container (Tomcat). I would like to know what configuration
files I must change in Apache Tomcat 4  if I change the name of my Web
Server (for example in: http://myservername/) to make all go on working
correctly.

Thanks a lot in advance!

  Luca


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




Using JSPs to Send NOT-MODIFIED-SINCE Header

2002-06-04 Thread Tony LaPaso

Hi all,

In looking at past posts, I'm afraid I know the horrible answer
to this issue but I thought I'd ask just in case I missed
anything.

Let me start by saying I'm using Tomcat v4.0.4 beta 3.

As you know, when a client (usually a web browser) has a cached
version of a resource (usually a web page) it can send an
If-Modified-Since header to the HTTP server. The server
compares the time/date stamp specified in the header with that of
the requested resource. If the resource has *not* been modified
since the time specified in the If-Modified-Since header, the
server sends back a 304 (Not-Modified) response, effectively
telling the client (usually a web browser) that its cached
version of the resource is still valid.

When writing a servlet, it's easy to handle this sort of
scenario. The javax.servlet.http.HttpServlet class has a
service() method. This method first checks if the incoming HTTP
method is a GET. If it is, the service() method proceeds to
call the getLastModified() method of the servlet. As a
developer, you can override getLastModified() to return a long
value representing the last time the requested resource was
changed. Depending on the value returned by getLastModified()
(note that -1 is returned if you don't override the method) the
service() method may simply return a 304, Not-Modified response
rather than calling the servlet's doGet() method.

Now, the $18.32 Question: How do you ensure getLastModified()
is called in JSP?

No, you cannot simply do this:

%!
   public long getLastModified() {
  return xxx;
   }
%

The problem is that the above method will never be called by the
container.

I traced through some of the Tomcat/Catalina/Jasper code and it
seems to me that the response code is being set to 200/OK very
early on in the processing.

I also took a cursory look at the JSP spec and didn't find any
indication of setting a Not-Modified response code...so, I am
thinking this is something that is (strangely) missing in the JSP
specification. I have a JSP page that needs to update itself once
per day. Therefore, it would be very handy to have the
getLastModified() functionality enjoyed by servlet writers.

Can anyone confirm this?

Thanks...


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




Re: ??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Carlos Ferreira


a not so good solution would be to subclass
org.apache.jasper.runtime.HttpJspBase ( or redesign it ) with your
required behaviour and extend your jsp pages from this new class.
the problem is that HttpJspBase is tomcat specific. perhaps somebody has a
better idea.

Carlos Ferreira
Gilem Informatique

 Hi all,

 In looking at past posts, I'm afraid I know the horrible answer
 to this issue but I thought I'd ask just in case I missed
 anything.

 Let me start by saying I'm using Tomcat v4.0.4 beta 3.

 As you know, when a client (usually a web browser) has a cached
 version of a resource (usually a web page) it can send an
 If-Modified-Since header to the HTTP server. The server
 compares the time/date stamp specified in the header with that of
 the requested resource. If the resource has *not* been modified
 since the time specified in the If-Modified-Since header, the
 server sends back a 304 (Not-Modified) response, effectively
 telling the client (usually a web browser) that its cached
 version of the resource is still valid.

 When writing a servlet, it's easy to handle this sort of
 scenario. The javax.servlet.http.HttpServlet class has a
 service() method. This method first checks if the incoming HTTP
 method is a GET. If it is, the service() method proceeds to
 call the getLastModified() method of the servlet. As a
 developer, you can override getLastModified() to return a long
 value representing the last time the requested resource was
 changed. Depending on the value returned by getLastModified()
 (note that -1 is returned if you don't override the method) the
 service() method may simply return a 304, Not-Modified response
 rather than calling the servlet's doGet() method.

 Now, the $18.32 Question: How do you ensure getLastModified()
 is called in JSP?

 No, you cannot simply do this:

 %!
   public long getLastModified() {
  return xxx;
   }
 %

 The problem is that the above method will never be called by the
 container.

 I traced through some of the Tomcat/Catalina/Jasper code and it
 seems to me that the response code is being set to 200/OK very
 early on in the processing.

 I also took a cursory look at the JSP spec and didn't find any
 indication of setting a Not-Modified response code...so, I am
 thinking this is something that is (strangely) missing in the JSP
 specification. I have a JSP page that needs to update itself once
 per day. Therefore, it would be very handy to have the
 getLastModified() functionality enjoyed by servlet writers.

 Can anyone confirm this?

 Thanks...


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




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