Re: Session Creation with IE

2005-02-15 Thread Wouter Boers
IE makes a difference between 'an instance' (active IE with 'handles
the link' or the 'crtl-N' or file New...) which inherits the
cookiestore from the 'active' browser or a complete new 'start' of the
browser. The latter has it own cookie store and therefore has no
session on the server.

There is not real sollution for this since it is IE behaviour
noting you can control.


On Tue, 15 Feb 2005 11:22:22 +, Mike Fowler
[EMAIL PROTECTED] wrote:
 Hi Mark,
 
 I have experienced this problem as well. It appears that when IE is
 started from a shortcut or from with Outlook/Outlook Express a different
 cookie store is used from the main IE one. I also noticed that if a new
 browser window is opened from within the one created by the
 shortcut/outlook you revert to normal IE cookie store. Regrettably I
 didn't find/look for a solution as the problem didn't affect me in any
 serious way as it does you.
 
 --
 Mike Fowler
 Registered Linux user: 379787
 
 I could be a genius if I just put my mind to it, and I,
 I could do anything, if only I could get 'round to it
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Regards, Wouter Boers
business: http://www.abcdarium.nl
personal: http://www.ikke.net

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



Re: tomcat + SSL, apache

2005-02-14 Thread Wouter Boers
Don't think so. Apache takes on the connection and therefore is in
charge of the SSL handshake. So you will have to confiure apache to
support SSL.

They only way to make tomcat handle the handshake is to make it
directly available to the browser. But guess you allready kind of
suspected it :)

Regards, Wouter


On Mon, 14 Feb 2005 15:25:59 +0200, Laurentiu Vasiescu
[EMAIL PROTECTED] wrote:
  
 Is there any way to have the Tomcat with SSL and a front-end Apache, wich
 should only serve as a interface between client and tomcat? 
 I mean tomcat should serve the certificates and do all the ssl, apache only
 to redirect traffic to it. 
 thanks. 
  
   
 Laurentiu   
 Vasiescu
 Network Administrator 
  
 
  
  
 S.A. Tri-Pen TravelMaster Technologies, SRL 
 Eastern Europe - Bucharest (Romania) 
  Office: +40 (31) 401 1152
 +40 (31) 402 5027 
  Fax: +40 (21) 323 4357 
  E-mail: [EMAIL PROTECTED] 
  Web: http://www.tri-pen.ro 
 
  
 
 
 Confidentiality Notice: This email message, including any attachments,
 is for the sole use of the intended recipient(s) and may contain
 confidential
 and privileged information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the intended recipient, please
 contact Tri-Pen TavelMaster Technologies at +40 (31) 401 1152 and destroy
 all copies of the original message.
 
 
  
 
   
 
  


-- 
Regards, Wouter Boers
business: http://www.abcdarium.nl
personal: http://www.ikke.net

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



Re: order of creation of JNDI datasource from context.xml and Filter.init() using it

2005-02-07 Thread Wouter Boers
  [nl.kransen.mywebapp.context.HibernateSessionFilter]
  Failed to initialize Hibernate!
  net.sf.hibernate.HibernateException: Could not find datasource:
  java:comp/env/jdbc/mydb
 
  Instead, I  tried to put the Datasource in the GlobalNamingResources/
  of the server.xml. In the context.xml I put:
 
   ResourceLink name=My Database
 global=jdbc/mydb
 type=javax.sql.Datasource /
 
  The error I get then is:
 
  20:31:09,550 WARN  [net.sf.hibernate.cfg.SettingsFactory] Could not
  obtain connection metadata
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
  driver of class '' for connect URL 'null'
 at
  org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 
 
 
  Instead of initializing the Hibernate SessionFactory in the Filter's
  init() method, I do it the first time the doFilter() is called. Then I
  get a similar error:
 
  20:42:35,324 DEBUG [net.sf.hibernate.util.JDBCExceptionReporter] Cannot
  open connection
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
  driver of class '' for connect URL 'null'
 at
  org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 
  ...
  Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
  JDBC driver of class '' for connect URL 'null'
 at
  org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 
 at
  org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 
 at
  net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
 
 at
  net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:289)
 ... 54 more
  Caused by: java.lang.NullPointerException
 at java.util.StringTokenizer.init(StringTokenizer.java:182)
 at org.postgresql.Driver.parseURL(Driver.java:251)
 at org.postgresql.Driver.acceptsURL(Driver.java:159)
 at java.sql.DriverManager.getDriver(DriverManager.java:232)
 at
  org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
 
 
 
  What I really want is the first solution with the JNDI datasource
  declaration in the webapp context.xml, and preferably initialization of
  Hibernate in the init() of the Filter. Is it possible that the reason
  that it doesn't work is that the Filter is first created (and its init()
  called) BEFORE the DatasourceFactory is created and bound to JNDI? If
  that is the case, wouldn't it make more sense to turn that around? After
  all, it's the CONTEXT.xml :-)
 
  The second and third structures brought me closer, but why does the
  Postgresql driver think that URL 'null' was passed, when I put a correct
  URL in the config?
 
  I hope anyone can help me.
 
  Jeroen Kransen
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Regards, Wouter Boers
business: http://www.abcdarium.nl
personal: http://www.ikke.net

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



Re: Emergency: make Tomcat forward

2005-01-25 Thread Wouter Boers
Set up apache on the linux box and let it forward all request to the
windows box. The apache httpd documentation provides excelent help on
this subject.

In all fairness, a network administrator should have warned you that
this would happen. DNS changes are never instant but can take up to a
week to get propagated all over the world.

Wouter


On Mon, 24 Jan 2005 21:23:57 +, Graham Bleach
[EMAIL PROTECTED] wrote:
 On Mon, Jan 24, 2005 at 12:15:05PM -0600, Stephen Charles Huey wrote:
  I have Tomcat 4.1.27 on a Linux box at a particular public IP address,
  and I want to make it forward ALL requests to a Tomcat on a Windows box
  at another public IP address.  Over the weekend, we changed the DNS to
  the Linux box, but now we need to roll back to the Windows box, and we
  already changed the DNS through our ISP, and a lot of folks are hitting
  the Windows box, but some people are still hitting the Linux one.  So,
  we want to turn on the Tomcat on the Linux box and somehow send all
  those folks to the Windows one.
 
  Is there any way to do this?
 
 This is completely offtopic.
 
 Some ideas:
 
 - If you only have one virtual host on the Windows box, then start a
 webserver on the Linux box and set it to redirect to the IP address of
 the windows machine.
 
 - Start a proxy on the Linux box and have it hand all requests to the
 Windows box.
 
 - Add some NAT rules to the linux box's netfliter rules to send all
 connections (depends on root access and relevant kernel modules being
 installed)
 
 # very much untested and to be used at your own risk!
 cat /proc/sys/net/ipv4/ip_forward   # check what it's set to now
 echo 1 /proc/sys/net/ipv4/ip_forward
 iptables -I PREROUTING -t nat -p tcp --dport 80 -d linux ip -j DNAT \
 --to-destination windows ip
 
 To revert back to previous state, write the previous value of
 /proc/sys/net/ipv4/ip_forward back to it and then replace the '-I' in
 the iptables command with a '-D'.
 
 G
 --
 The average girl would rather have beauty than brains because she knows
 that the average man can see much better than he can think.
 -- Ladies' Home Journal
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Regards, Wouter Boers
business: http://www.abcdarium.nl
personal: http://www.ikke.net

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



Exploded WAR deployment in Tomcat 5.5

2005-01-21 Thread Wouter Boers
Hello,

I have found some strange behaviour in de Tomcat manager. When adding
an exploded WAR directory, for example file:///c:/java/foo with
context foo, Tomcat 5.5 starts to copy the *complete* C drive to
TOMCAT_HOME/conf/Catalina directory. Tomcat 5.0 does not suffer from
this problem. Is this an known issue? I haven't found it in the bug
list or mail archive.

-- 
Regards, Wouter Boers
business: http://www.abcdarium.nl
personal: http://www.ikke.net

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



RE: Unanswered questions

2003-02-17 Thread Wouter Boers
1. Is there a way to hup the tomcat server or otherwise reload files
from the commandline?

The Tomcat Ant plug-in knows how to reload / load/ remove applications.
So yes it is possible. You can use ant for that or figure out yourselv
how that is done.

Wouter


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




RE: need X running tomcat

2002-06-06 Thread Wouter Boers List

Which JVM do you use? If I'm correct, this bug in the JVM is supposed to
be fixed in JVM 1.4.

Wouter

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] 
Sent: donderdag 6 juni 2002 10:47
To: Tomcat Users List
Subject: AW: need X running tomcat


Better user Xvfb.

Depending on the distribution you use you can
place a start script like this in /etc/init.d or 
/etc/rc.d/init.d to start xvfb.

XVFB=/usr/X11R6/bin/Xvfb
XVFBARGS=:99 -screen 0 1024x768x24 -fbdir /var/run -ac
PIDFILE=/var/run/xvfb.pid case $1 in
  start)
echo -n Starting virtual X frame buffer: Xvfb
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile
--background --exec $XVFB -- $XVFBARGS
echo .
;;
  stop)
echo -n Stopping virtual X frame buffer: Xvfb
start-stop-daemon --stop --quiet --pidfile $PIDFILE
echo .
;;
  restart)
$0 stop
$0 start
;;
  *)
echo Usage: /etc/init.d/xvfb {start|stop|restart}
exit 1
esac

exit 0

This is what we use for debian.
:99 is the value for the xserver id that must be set 
in the DISPLAY env.

DISPLAY=localhost:99.0

Additionaly you have to define a link in /etc/rc?.d to this file for the
run levels where you need the Xvfb. (This is for debian, other
distributions 

For tomcat you can do the same.

 -Ursprüngliche Nachricht-
 Von: Michael Reutter [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 6. Juni 2002 09:52
 An: Tomcat Users List
 Betreff: need X running tomcat
 
 
 Hi!
 
 I'm running tomcat 3.3.1 on a linux box!
 
 my servlets need some fonts to generate some images.
 Now I have to do the following to start tomcat:
 
 (no X is running)
 login as root
 startx 
 export DISPLAY=myserver:0
 tomcat.sh start
 
 or
 
 start xdm
 login as root
 tomcat.sh start
 
 1. Am I on the right way???
 
 2. How to automate this, so my tomcat runs after a reboot ...
 
 
 thanks
 michi
 
 --
 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: IP problem

2001-12-27 Thread Wouter Boers

Hi,

Why don't you simply solve it the way it's supposed to? set the DNS lookup
to the IP address of you ISS box and make sure the reverse lookup of the IP
number to the name also is set correctly. Your problem is a network problem
related (DNS) and has nothing to do with Tomcat or a web server

Wouter

-Original Message-
From: Gautam Banerjee [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 December, 2001 06:43
To: [EMAIL PROTECTED]
Subject: imp:IP problem


Hello!
I have a problem wih running a site with tomcat.We have integrated IIS with
Tomcat succesfully and the site is running.But the problem is that our
domain name is registered with a DNS server whose IP is different than that
of the Web server.Now when I type in the URL ,first in the IE status bar the
DNS IP appear and then it gets rerouted to the web server IP but in the
address space of IE the web server IP is displayed instead of the site
name.The site is running but the Web Server IP is constantly displayed to
the user.However when I am running another site with the same URL only
through IIS the Web server IP is not displayed on the address bar of IE but
the site name only appears.I feel the problem may have something to do with
the Tomcat server configurations.Can u please help?

Thanks  Regards,
Gautam.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Cookies in tomcat-3.2.3

2001-12-24 Thread Wouter Boers

That is not true. Then you have to pass the session cookie as a parameter
through URL rewriting. You see that quite often. But then again, who does
not accept cookies nowadays?

Wouter

-Original Message-
From: Zsolt Koppany [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 December, 2001 14:32
To: Tomcat Users List
Subject: Re: Cookies in tomcat-3.2.3


Hm, when a browser (or firewall) doesn't allow Cookies, I cannot use
seesions. This is not good.

Zsolt

On Monday 24 December 2001 09:25 am, you wrote:
 yes it does so no you can't.

 ditto tomcat 4 - cookies is the only reliable method for identifying an
 individual computer, so is therefopre the only method for managing
 sessions.

 ian


 - Original Message -
 From: Zsolt Koppany [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, December 22, 2001 10:30 AM
 Subject: Cookies in tomcat-3.2.3

  Hi,
 
  does tomcat-3.2.3 use cookies to administrate sessions? Can I use
  sessions

 if

  the browser does not allow cookies?
 
  What's about tomcat-4.x?
 
  Zsolt
 
  --
  Zsolt Koppany
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

--
Zsolt Koppany

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Restricting access to files

2001-12-18 Thread Wouter Boers

Move it to the WEB-INF directory, which cannot be access by the browser by
servlet 2.2 specs (preferred) or move to the file to a location that's in
the classpath so the tomcat classloaded can find it.

Wouter

-Original Message-
From: Behrang Saeedzadeh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 December, 2001 22:57
To: [EMAIL PROTECTED]
Subject: Restricting access to files


Hi Friends,

I have a file named site.properties in the root of my web application that
contains some information about the site.

I want my file be unaccessible to the users, but whenever I point to it
in my browser's address bar, my browser opens it and shows its contents. How
can I make this file unaccessible to the users?

Thanks in advance,
Behrang S.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Error while executing jsp page (Urgent)

2001-12-13 Thread Wouter Boers

Try copying the code in a servlet and compile it, perhaps you get a better
idea of why it can't compile the code.

Wouter

-Original Message-
From: pandrajula seshu srinivas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 December, 2001 11:17
To: [EMAIL PROTECTED]
Subject: Error while executing jsp page (Urgent)



Hi,

While i am executing .JSP file in jakarta-tomcat4.0.1
it is giving the problem as follows. Please let me know the problem quickly.

JSP File

%@ page language=java import=java.sql.* %
html
headtitleNumber Guess/title/head
body

%
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
Connection con=DriverManager.getConnection(Jdbc:Odbc:IMP);
if(con.isReadOnly()) con.setReadOnly(false);
Statement st=con.createStatement();
ResultSet rs = st.executeQuery(select * from [Sheet1$]);
//int rows = st.executeUpdate(INSERT INTO [Sheet1$](PART,Item)
VALUES('-77','N-77'));
//int rows = st.executeUpdate(UPDATE [Sheet1$] SET PART = '-88' WHERE
PART = '-77');
//int rows = st.executeUpdate(DELETE FROM [Sheet1$]);
while(rs.next())
{
System.out.println(First value+rs.getString(1));
}
//System.out.println(Rows inserted:+rows);
con.commit();
con.close();

%
/body
/html

ERROR While Executing the JSP file
---



A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP
if (pageContext != null) pageContext.handlePageException(t);
 ^
1 error

at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.loadJSP(Unknown Source)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unkno
wn Source)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.CertificatesValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

Thanks,

   Bye
Seshu Srinivas
---
IMKT Software Pvt. Ltd.,
Hyderabad.
INDIA.
Tel : 091-040-3379031/33


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Disabling TomcatStandalone under IIS

2001-12-12 Thread Wouter Boers

Yes, disable the web server in tomcat in the config.xml file. Tomcat does
niet need the web server to provide the JSP/Servlet services.

Wouter

-Original Message-
From: Rastislav Vasil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 12 December, 2001 16:59
To: TOMCAT-USER (E-mail)
Subject: Disabling TomcatStandalone under IIS


Hi,
I have a jsp application using Tomcat under IIS.
I installed Tomcat and its service from ...exe file.
I would like to disable connecting direct access to tomcat at :8080 and
force users just to use IIS.
Can somebody let me know how to do it?
Thanks,

Rasto

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: TC 4.0 newbie - servlet app won't run

2001-11-21 Thread Wouter Boers

I think your problem might be this:
   servlet-mapping
   servlet-namemyservlet/servlet-name
   url-pattern/classes/url-pattern
   /servlet-mapping

AFAIK the url-pattern should be:
url-pattern/myservlet/url-pattern to map http:///myapp/myserlvet to
you servlet 'myservlet' which is associated with the myservlet class

Wouter

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2001 21:43
To: [EMAIL PROTECTED]
Subject: TC 4.0 newbie - servlet app won't run


I installed Tomcat 4.0.1 under Win 2k using JDK 1.3 and able to run the
example servlets, but not my own.  My html displays and I can execute my
JSPs, but a POST to a servlet does not work (this app has run under Forte
and VA Java in the past).   I get a 404 error with the requested resource
(/myservlet) is not available. Since the examples work, I have to assume
it's something in my configuration. Any help figuring out why the servlet
won't run would be *greatly* appreciated.  I suspect it's something
simple/braindead on my part.


o  My directory structure for the app:
   TomcatHome
|
+--webapps
  |
  +--myapp\.jsp, .html .gif
 |
 +--WEB-INF\web.xml
   |
   +--classes\.class files


o  My html POST stmt. I've tried various path prefixes to myservlet, eg
   classes/myservlet.  As with the Tomcat examples, this servlet has no
   package:

FORM ACTION=/myservlet method=POST


o  My web.xml - I know Tomcat's seeing/parsing this because if I
deliberately
   make a typo I get an error upon startup:

 ?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;
web-app
   !-- Define servlets that are included in the application --
   servlet
   servlet-namemyservlet/servlet-name
   servlet-classmyservlet/servlet-class
   /servlet
   servlet-mapping
   servlet-namemyservlet/servlet-name
   url-pattern/classes/url-pattern
   /servlet-mapping
/web-app


o  Update to server.xml

   Context path=/myapp docBase=myapp debug=0
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=myapp_log. suffix=.txt
   timestamp=true/
   /Context








--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Is it always necessary to place the servlet class files under the WEB-INF/classes folder?

2001-10-31 Thread Wouter Boers

Yes it is. Tomcat. and any other lstest (application) servlet/jsp container,
including JRun, follows the servlet 2.2 specs which defines the way an
application is layed out and thus can be packed together in a WAR file.

Wouter

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 31 October 2001 15:47
To: [EMAIL PROTECTED]
Subject: Is it always necessary to place the servlet class files under
the WEB-INF/classes folder?


Is it always necessary to create a WEB-INF folder? Is this a standard or is
it just plain mandatory to create a WEB-INF folder. And then place the
class files in the WEB-INF/classes folder (read - application won't work
without these folders)?
Any information will be greatly appreciated.

We are migrating from Website/JRun to Apache/Tomcat. And our current
directory structure doesn't conform to the WEB-INF standard.
Also, we use the SERVLET tag heavily. And Tomcat doesn't support this
tag. I read somewhere (maybe in this forum itself) that we should replace
it with jsp:include... tag instead. Anyone who has successfully
implemented thisI would be glad to hear from him/her.

Thanks in advance



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




TC4 and cocoon 2 and jetspeed

2001-09-24 Thread Wouter Boers

Hello,

Ik have a out of the box installation of tomcat 4 on a W2K Proffesional box
with JDK 1.3.1 from Sun. Tomcat itself runs ok, the examples work etc etc.

When I deploy the jetspeed war (1.3a1) it does not work correctly (I'm not
able change the customizable area). Cocoon2 2.0b2 is also working dispite
following the Tomcat 4 installation instructions to the letter. Both
applications are working very well in tomcat 3.2.3.

These installation have been verified three times on a clean box (and
verified against two other machines) from the ground up. All show the same
problem. Tomcat 4 does not run these applications or application that depend
on them. Is this a know issue?

Regards, Wouter




RE: Is this the way to do it?

2001-09-17 Thread Wouter Boers

Java does have a slimmed down version of the Object of most frequently used
primitive types

boolean - Boolean
int   - Interger
float   - Depends what you want BigInteger, Double etc etc

Look at the JavaDoc documentation of java int the java.lang.*, usually there
is a toInt() method to convert the Object to the desired primitive type.

So to answer you question:
boolean booldans = false;

is probably easier.

Wouter

-Original Message-
From: Magnus Jansson [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2001 09:25
To: [EMAIL PROTECTED]
Subject: Is this the way to do it?


Hi I'm a newbie at both jsp and java. My question is:

Is this the way to set a (in this case) a Boolean value? This seems for me
who is a Pascal programmer as I create a new instance of the Boolean object
everytime I set a new value?

Besides it is a lot of code to write? Can I set the value of the boolean in
any other way

I have the same problem in the other objects of the primitive types (Integer
for example)

snip

  Boolean BoolDans = new Boolean(false);
  Boolean BoolAllman = new Boolean(false);
  Boolean BoolFof = new Boolean(false);
  Boolean BoolTextil = new Boolean(false);
  Boolean BoolHp = new Boolean(false);

  if (request.getParameter(IntresseDans) != null) {BoolDans = new
Boolean(true);};
  if (request.getParameter(IntresseAllman) != null) {BoolAllman = new
Boolean(true);};
  if (request.getParameter(IntresseFof) != null) {BoolFof = new
Boolean(true);};
  if (request.getParameter(IntresseTextil) != null) {BoolTextil = new
Boolean(true);};
  if (request.getParameter(IntresseHp) != null) {BoolHp = new
Boolean(true);};

/snip

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - -
Magnus Jansson
IT-Manager
Väddö folkhögskola
760 40 Väddö
Sweden

Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)
ICQ: 52797837





how is a session identified

2001-09-05 Thread Wouter Boers

Hello,

I have a question reguarding the session. What is this session based on? How
is a client browser uniquely identified by tomcat to map that session to its
own context.

I'm looking for the data that is required to identify the client browser and
the identification process. I would love to have some pointers to the specs
and sources implementing the specs.

Wouter




RE: Tomcat can't open my bd.properties file

2001-09-05 Thread Wouter Boers

Hi,

You need to loopup the exaxt location of the properties file via the
Class.forname structure. That returns the input stream to the file which you
can then load into the contrucor of the properties.

This is the line that does this:
is =
java.lang.Class.forName(net.ikke.etc.properties.ApplicationProperties).get
ResourceAsStream(/ + DEFAULT_PROPSFILE);

Where the classname is the fully qualified name of the class that tries to
locate the properties file.

Wouter

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Enrique Marcote Peña
Sent: 01 September 2001 12:13
To: Tomcat-user mailing list
Subject: Tomcat can't open my bd.properties file


Hi:

I have Tomcat 3.2.2 running over Debian Potato and I'm trying to install
a simple JSP application with database access.

I've got a connection pool that works fine when I run it directly with
java. In the root of my classes directory I have a couple of files, a
log file called ServidorConexiones.log and the properties file
bd.properties.

classes/ServidorConexiones.log
classes/bd.properties.log
classes/com/ishop/sql/ServidorConexiones.class
classes/com/ishop/sql/PoolConexiones.class

The source file for the Connection manager is

sources/com/ishop/sql/ServidorConexiones.java

And reads the bd.properties with these sentences...

public class ServidorConexiones {

/**
 * pNombre del fichero de propiedades empleado para la definición
de los
 * pools.
 */
static private String properties = bd.properties;


...MORE CODE HERE...

/**
 * pConstructor privado que inicializa el servidor y todos sus
pools
 * asociados.  Definiendo el constructor como privado se garantiza
el
 * comportamiento Singleton de la clase.  Las demás clases deberán
 * acceder a la instacia del servidor a través del método
 * codegetInstance/code.
 */
private ServidorConexiones() {
Properties prop = new Properties();
try {
prop.load(new FileInputStream(properties));
} catch (Exception e) {
System.err.println(Error opening  +  properties +  file:
 + e);
return;
}

...CONTINUES...

As I said before, when I run my test applications from de classes
directory directly with java it works fine.  Then, for testing with JSP,
I copy the classes directory to:

jakarta-home/webbapps/isHOP/WEB-INF

After restarting Tomcat, my JSP test application fail opening the
bd.properties file:

Error opening bd.properties file: java.io.FileNotFoundException:
bd.properties (No such file or directory)

What should I do to make this file available for Tomcat?

Any help will be greatly appreciated.  Thanks,

Quique





RE: Why does servlet.jar break servlets?

2001-08-30 Thread Wouter Boers

You allready gave the answer.

Tomcat is amongst other things, a servlet container and therefore needs
access to the javax.servlet.* packages. That's why it's in the common/lib,
it's crucial for tomcat to run. If you look at the startup scripts you will
notice that the jars in the tomcat/common/lib dir are added to the
classpath. The jars in the WEB-INF/lib are only added to the context. So
that really a different thing.

If you want to change the version of servlet.jar, replace it with the
version you want.

Wouter
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Eryq
Sent: 29 August 2001 18:00
To: [EMAIL PROTECTED]
Subject: Why does servlet.jar break servlets?


I've noticed something which seems quite odd.

It appears that I need the javax.servlet.* classes in
order to compile my servlet, to get classes such as
javax.servlet.http.HttpServletRequest, etc.

The classes can be found in a servlet.jar included
with TDK-2.1, in common/lib.

However, it appears that servlet.jar does not need
to be in the WEB-INF/lib directory of a servlet
in order for the servlet to run.

Furthermore. I have noticed that if I put servlet.jar
in the WEB-INF/lib directory of a Tomcat4-b7 servlet
(including the examples servlets), it breaks them...
horribly.  I get ClassCastExceptions or worse.

I am guessing that javax.servlet is somehow
special, and that it's the servlet container's
job to ensure that the servlet has access to it,
no matter what might be in the WEB-INF/lib directory.

I am also guessing that there might be a Servlet API 2.2
versus 2.3 issue going on.

Anyway, if anyone can shed more light on this,
I'd be very interested in understanding it a bit more.

Thanks,

Eryq




RE: Load Balancing for WEB-Application with sessions

2001-07-27 Thread Wouter Boers

I think that what you want is not part of tomcat nor will it be. What you
require is a load blancer (or a machine that acts as a load balancer but I
don't know of any open source initiative on this). The loadbalancer keeps
track of session data will forward each request from one and the same
browser (not ip address but browser) to the same machine untill the users
session expires. I have had good epiriences with the Radware WSD Pro, hard
to install an configure but once up, works like a charm. But it really
depend on your butget if you can spare some for a load balancer.

Wouter

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 11:16
To: [EMAIL PROTECTED]
Subject: Load Balancing for WEB-Application with sessions


Hi,

For improving the performace, we are going to serve requests with many
computers. Here, a problem with redirection arises. As a rule, the requests
are randomly redirected to the existent servers, and it functions well for
undependent pages and servlets. We have to ensure that a hole session is
processed on (redirected to) the same server. Are there possibilities to do
it in Tomcat, or we have to write a redirector-servlet ourselves, to
control the redirections according to the session.

Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  [EMAIL PROTECTED]

ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com






RE: tomcat process dies out...

2001-05-30 Thread Wouter Boers

Maybe it's because you don't start it with nohup. It's common in unix to
kill all process that are initiated the parent if the parent (your shell)
ceases to exist (you are logging out).

See 'man nohup'

Wouter

-Original Message-
From: Krishna Kishore Thotakura [mailto:[EMAIL PROTECTED]]
Sent: 28 May 2001 17:02
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: tomcat process dies out...


Hi,
 thanks for your quick response.

 But my server is a unix box running Red Hat 6.2.


Pernica, Jan wrote:

 this is a known bug of JDK 1.3 on NT

 On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura
 [SMTP:[EMAIL PROTECTED]] wrote:
  hello,
   I am trying to setup multiple JVMs using mod_jk. the JVM running at
port
 8080
  is okay. I'm having problem with the JVM running at port 8090. whenever,
i
 log
  out of my server machine(the machine where i am starting my apache and
 tomcat),
  the tomcat process stops listening to the port 8090. Actually, the
 Tomcat(java)
  threads are getting killed when i log out.
 
   Please let me know where i am going wrong?  i am starting tomcat1
  as ./startup.sh -f server_1.xml
 
  thanks,
  kishore.

 __
 Tato komunikace je urcena vyhradne pro adresata a je duverna.
 This communication is intended solely for the addressee and is
confidential.

--
Krishna Kishore Thotakura.
Work 256 961 7818
Home 256 837 9927




RE: installing tomcat 3.2 on windows 98

2001-05-04 Thread Wouter Boers

Yes it works fine, It's just java so why not...

Use the startup.bat in the tomcat/bin directory. It will set all the
appropiate enviroment variables correcly. Edit it, if needed and tomcat does
not start correcly. I would first start it from the command prompt and test
it before putting it into your autoexec.bat

Wouter

-Original Message-
From: Peter Choe [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 14:20
To: [EMAIL PROTECTED]
Subject: installing tomcat 3.2 on windows 98


is it possible to have tomcat run on windows 98?

i downloaded the binaries for tomcat 3.2 for windows and tried to run
the tomcat.bat file.  but i get an exception saying that
org.tomcat.startup.Tomcat can't be found.

i have the autoexec.bat file with the following:

TOMCAT_HOME=c:\tomcat
CLASSPATH=c:\tomcat\lib\servlet.jar;c:\tomcat\lib\webserver.jar;...etc
for each jar file in tomcat\lib

apparantly the tomcat.bat file is setting the proper classpath.  any
suggestions?

peter choe




RE: tomcat + linux + graphics

2001-05-04 Thread Wouter Boers

I also ran into that problem. There is a freeware/opensource program
available that emulates the X-server, called Xvbf. It works for me. So you
don't need a full blown X-server and save the CPU and memory overhead it
consumes.

Wouter

-Original Message-
From: chris brown [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 13:58
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: tomcat + linux + graphics


According to the current specs for JDK1.4, this issue should become a thing
of the past (see 'Headless' Java proposal).  But then, JDK1.4 isn't
available yet... so you'll need to wait a bit for that solution...

-Chris

- Original Message -
From: Benoit Jacquemont [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 11:26 AM
Subject: Re: tomcat + linux + graphics


 Hi,

 I had the same problem some time ago. I need to generate graphics with AWT
 and due to problem with JVM, I needed to install a X server.
 The first solution that came to my mind was to start an xterm after
launching
 the X server in the rc.local with a -e option to launch a script running
 tomcat.

 So I had a X server that consume memory and CPU on a Web server that do
not
 need any graphics interface...

 Then I found a library that replace some AWT classes and allow you to
 generate graphics without any X server running !!
 The package is a GNU one, it's called PJA and you can download it from the
 following website:
 http://www.eteks.com

 So, I installed this package (no need to recompile, just some add to the
java
 command line of tomcat), removed the X server from my web server, and save
 disk space, save CPU ressource and freed a lot of memory !!


 So, my advice is you should try it, and forget about Java limitation of
the
 JVM !

 Benoît


  i'm having big problems with graphics dynamically created with tomcat on
  linux. on windows, the servlet works fine, on linux i have to start
tomcat
  going to the server, starting X and then starting tomcat. i want to do
this
  automatically and i want to connect tomcat to X windows without going to
  the server. did anybody solve this problem? it would help to get a
working
  startup script for tomcat including the connection to a running X.
 
  thanks,
  michael




RE: How to read property files?

2001-04-21 Thread Wouter Boers

Sorry to tell you that it does work.

I've tried used this on various platforms with various software deployed on
various platforms, like Jserv, Tomcat, WebLogic, Jrun on Win2000, Linux,
Solaris, HP-UX.

So it's fair to say that this contruct does work ;)

Wouter

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 16:08
To: [EMAIL PROTECTED]
Subject: Re: How to read property files?



   InputStream is =
this.getClass().getResourceAsStream("myapp.properties");
   Properties p = new Properties();
   try {
 p.load(is);
   } catch ( java.io.IOException e ) {
 // Can't load props file
   }

 That way the properties file can be anywhere in the classpath.



Have you tried doing this from a class inside a .jar file?   I have
and it didn't work.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 17, 2001 9:27 PM
 To: [EMAIL PROTECTED]
 Subject: How to read property files?


 I would like to put a myapp.properties file in the top level directory
 of my webapp. But I can't figure out what filepath to give the
 Properties.load() method in order to load my servlet property object.
 Can someone help me?

 Thanks

 =eas=





RE: Tomcat 3.2.1 and Servlet shortcut

2001-04-19 Thread Wouter Boers

Hai,

I suggest you put the servlet-mapping/servlet-mapping tag inside the
serlet/servlet scope. After all it's part of you servlet definition.

Wouter

-Original Message-
From: Geobert QUACH [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 11:28
To: Tomcat-List
Subject: Tomcat 3.2.1 and Servlet shortcut


Hi all,

I want to call servlet in my application with shortcut name.
I do this in web.xml :
* web.xml *
[snip]

servlet
 servlet-name
  MyServlet
 /servlet-name
 servlet-class
  foo.bar.some.package.name.MyServletTTrueName
 /servlet-class
/servlet

servlet-mapping
 servlet-name
  MyServlet
 /servlet-name
 url-pattern
  /MyServlet
 /url-pattern
/servlet-mapping

[snip]

** end web.xml *

But Tomcat doesn't find it (404).

Did I missed something ?

Best Regards
--
Geobert QUACH





RE: escape() Problem...

2001-03-16 Thread Wouter Boers

Hi,

Don't rely in JavaScript.

Use java.net.URLDecoder.encode(), and java.net.URLEncoder.decode() before
you push the parameters to the browser.

Wouter

-Original Message-
From: Martin Ko [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 14:52
To: [EMAIL PROTECTED]
Subject: escape() Problem...


Hi, all.

I wrote a jsp page which send request by QUERYSTRING with a parameter
containing international characters, and which get the parameter.

I'm working with apache as a web server and tomcat as a jsp engine.

And, with Netscape browser, I encode the string by escape function
(javascript) before sending it, and it works fine. However, in IE, it
doesn't.

When I use only tomcat as a web server without apache, I saw a strange
thing.
In this case, if I use escape function in NS, and if I don't use escape
function in IE, then it goes well !!
But with apache as a web server, this action does not solve the problem...
So, I think I should set some configurations on apache web server, but I
have no idea...

Can anyone help me?

My jsp page is:

%@ page language="java" %

html
head
title/title
script
!--
function myEscape(s)
{
 if (document.all) { // when IE
 return s;
 } else { // when Netscape
 return escape(s);
 }
}

function test()
{
 var s = prompt("Enter text: ");
 var url = "martin.jsp?t1=" + myEscape(s);
 alert(url);
 location.href = url;
}
//--
/script
/head
body

a href="javascript:test()"Test/a
HR
%=request.getParameter("t1")%

/body
/html


Regards
Martin




RE: Logout of telnet session - tomcat stops

2001-03-12 Thread Wouter Boers

Hi Gary,

You need to start it from the init.d. Below is a script we use to do the
trick. I connect through ssh, change user to root and then run the script:
/etc/init.d/tomcat start
the stop argument will do the obvious of course.

root@www1:/# cat /etc/init.d/tomcat
#! /bin/sh

case "$1" in
'start')
  su - httpd -c /home/httpd/tomcat/bin/tomcat_start
  ;;
'stop')
  su - httpd -c /home/httpd/tomcat/bin/tomcat_stop
  ;;
esac



-Original Message-
From: Gary Lawson [mailto:[EMAIL PROTECTED]]
Sent: 12 March 2001 12:42
To: [EMAIL PROTECTED]
Subject: Logout of telnet session - tomcat stops


Hello

I want to be able to control tomcat on a remote (Solaris) machine by telnet
from a PC.

It starts fine but when I close the telnet session, tomcat stops.

More detail:
1. Log in as gary.
2. su root (it runs on port 80)
3. start tomcat (runs fine)
4. logout root (tomcat still running)
5. logout gary (tomcat stops)

I have searched the archive but couldn't find the answer.

Any ideas?

TIA
Gary


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


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




Re: Logger

2000-10-27 Thread Wouter Boers



Lacerda, Wellington (AFIS) wrote:

 Hi,
 
 I posted a message on the subject few days ago on the subject. We also need
 a logger but have absolutely no time to write it. Can you give me some tips
 or share some code ? Any help will be very welcome.

Have a look at:

http://protomatter.sourceforge.net/whatisprotomatter.html

They have a collection of 'syslog' facilities that might help you.

Wouter
-- 
Mphasis Media BV. Interactive architects
Wouter Boers [EMAIL PROTECTED] http://www.MphasiS.com
Mobile: +31 (0)6 28877723 Fax: +31 (0)20 7785445
Wouter Boers [EMAIL PROTECTED] http://www.ikke.net