Re: Preventing access to a directory

2003-08-14 Thread Zach Gatu
Either use a filter (http://java.sun.com/products/servlet/Filters.html)
or password-protect them using the security-constraint tag in your web 
application's web.xml file.

see http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security.html#wp79663

Zach.

Tim Davidson wrote:

Hi,
how can we prevent access to a set of JSP's inside a specific directory?
aparrently there is a directory tag for server.xml?
thanks in advance.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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


Re: Tomcat with Virtual hosting

2003-07-30 Thread Zach Gatu
In my Apache conf file I have this:

IfModule mod_dir.c
DirectoryIndex index.html index.htm index.jsp
/IfModule
Using mod_jk both in Win32 and Linux, I've never had any problems 
serving index.jsp as a directory index file.

Zach.

John Turner wrote:
That's a known problem with the Apache connectors.  DirectoryIndex 
index.jsp has no effect.  I think some people have had success mucking 
around with mod_rewrite and/or the module load order, but I don't recall 
anyone ever posting a definitive solution to the list.

The most basic workaround is to use a META refresh in index.html to 
redirect to index.jsp.  If anyone has a more elegant solution, I'd love 
to see it.

John

Andrew Geery wrote:

Why do you need to forward the request from index.html to index.jsp? 
Can't you simply set index.jsp to be a directory index page (e.g., 
DirectoryIndex index.html index.jsp)?

Abhinav Gautam wrote:

Hi,

I am having serious problems with Tomcat. It just happened that without
any reason the web server stopped responding to JSP requests. I have
restarted Tomcat and Apache several times, but when the index.html
forwards the request to index.jsp, I get an error saying page not 
found.
I have checked the server.xml and the httpd.conf files and everything
seems to be fine. Also when I do netstat -ta the server seems to be
listening on port 8007.

I have virtual hosting set up in tomcat. There's one primary domain with
an IP address and there are 2 other domains with a different IP 
(different
from primary, but one IP for both of the other domains) set up on the 
same
web server.

Any help will be greatly appreciated.

Thanks.
Abhinav




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



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


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




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


Re: jk connector and response.sendRedirect()

2003-07-30 Thread Zach Gatu
When I use response.sendRedirect(), although redirecting to within the 
same context, I tend supply the whole URL.  I thus avoid the kind of 
problems you seem to be getting.

In a controller servlet where I redirect depending on the request, I do 
this:

String urlPath = request.getScheme() + :// + request.getServerName() + 
: + request.getServerPort() + request.getContextPath();

I can then do this:

response.sendRedirect(urlPath + /afolder/afile.jsp);

Zach.

Chris Egolf wrote:

I'm pulling my hair out on this one, but I think I've narrowed it down 
so I can at least ask the question...

We're running Tomcat 4.1.24/Apache 1.3.27/Sun JDK 1.4.2 using mod_jk.  
The issue we're dealing with now, is that in some cases an existing 
webapp uses the response.sendRedirect() method to redirect the client to 
another relative URL. Previously, we were using the warp connector and 
everything worked fine.  Now, using mod_jk, the redirect fails causing 
the browser to say it can't find the host.

Here's what I've tried so far.  I removed Apache from the mix and setup 
the Coyote HTTP/1.1 connector to listen to port 80.  Everything works 
fine with this setup, so it must be a connector thing, right?

With just the JK connector enabled and listening on 8009, I've added 
Apache back and setup Alias elements in the Host element of my 
server.xml.  The host the browser says it can't find is the actual 
hostname of the machine, not the DNS entry.

I believe this is a problem unique to the jk connector (or how I have it 
configured) and the response.sendRedirect() method.  Here's the 
documentation from the servlet API:

public void sendRedirect(java.lang.String location)
  throws java.io.IOException
Sends a temporary redirect response to the client using the 
specified redirect location URL. This method can accept relative URLs; 
the servlet container will convert the relative URL to an absolute URL 
before sending the response to the client.

If the response has already been committed, this method throws an 
IllegalStateException. After using this method, the response should be 
considered to be committed and should not be written to.

Here's the connector and Host element stuff from my server.xml:
...
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   enableLookups=true acceptCount=10 debug=0
   connectionTimeout=0 useURIValidationHack=false/
...
Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Aliasdemo.mycompany.com/Alias
Aliasgoatweed/Alias
Aliasdemo/Alias
Aliasgoatweed.mycompany.com/Alias
Aliasdemo.anotherdomain.net/Alias
Aliasgoatweed.anotherdomain.net/Alias
...
/Host
Anyone have any ideas or see a glaring mistake on my part?  I'll gladly 
provide more info if needed.

Thanks,

Chris Egolf

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




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


Re: Servlets in a protected resource

2003-07-29 Thread Zach Gatu
If you serve your servlets preceded by /servlet, you can add something 
like this to your web.xml

url-pattern/servlet/*/url-pattern

Zach.

Jeff Cummings wrote:

Hi everyone,

I have been able to setup JSPs in a protrected resource. The login page is
displayed and everything works as expected. How do I setup a servlet in a
protected resource to get the same effect?
Jeff





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


Re: Apache + Tomcat + mod_jk

2003-07-29 Thread Zach Gatu
Where have you put your JSPs and/or servlets?

If for example you've put them in tomcat-install/webapps/myfiles, then 
in your mod_jk conf file you need to put a directive like this:

Alias /tcfiles tomcat-install/webapps/myfiles

JkMount /tcfiles/servlet/* ajp13-wrk1
JkMount /tcfiles/*.jsp ajp13-wrk1
ajp13-wrk1 is a worker described in your workers.properties file

This means that only files ending with *.jsp or starting with /servlet/ 
will be served by Tomcat.  Anything else will be served by Apache.

Zach.

v.siguier wrote:
Hello,

I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application 
must be located under Tomcat directory to be founded.
As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat 
to do this ?

Thank you
--
Faites un voeu et puis Voila ! www.voila.fr 



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




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


Re: directory mapping

2003-07-29 Thread Zach Gatu
If you'll use Apache webserver (with mod_jk), you can use the Alias 
directive like this:

Alias /en/mydirectory /var/jakarta-tomcat-3.3.1/webapps/mydirectory

Alias /fr/mydirectory /var/jakarta-tomcat-3.3.1/webapps/mydirectory

Zach.

[EMAIL PROTECTED] wrote:

Hello,
I would like to create a directory mapping as follows:
-a user types in http://localhost:8080/en/mydirectory (virtual directory)
which would map to http://localhost:8080/mydirectory (physical directory)
-a user types in http://localhost:8080/fr/mydirectory (other virtual
directory) which would map to http://localhost:8080/mydirectory (same
physical directory as before)
Is this possible with tomcat?
Thanks in advance,
Julien.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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


Re: Help required

2003-07-25 Thread Zach Gatu
If the page gives an error after Tomcat is up for a long time, may be 
something may be timing out, like a database connection, for example. 
Or the session gets invalidated.

Open up price_jsp.java and have a look at line 414.

Zach.

Veena K.S wrote:

Hi all,
We have a website hosted on tomcat4.1.12 .We are facing the
following problem when the site is up for a long time and the pages does not
load end up with a blank page , but the log file has the entry as stack
trace given below
What could be the reason for this and what could be the possible solution to
rectify this problem?
Thanks in advance
regds,
Veena
2003-07-25 13:31:38 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp threw exception
org.apache.jasper.JasperException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:479)
- Root Cause -
javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:497)
at org.apache.jsp.price_jsp._jspService(price_jsp.java:414)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at

Re: HOW TO INSTALL THE JDBC FOR TOMCAT

2003-07-24 Thread Zach Gatu
Don't forget to put the jdbc jar file in your
CATALINA_HOME/webapps/YOUR_CONTEXT/WEB-INF/lib directory.


epyonne wrote:

 Since you are using MySQL, you can download the Connector-J from MySQL site.
 It is the JDBC driver.
 
 Hope this helps.
 
 
 - Original Message -
 From: frankie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 22, 2003 02:49 AM
 Subject: HOW TO INSTALL THE JDBC FOR TOMCAT
 
 
 
Dear ALL,
   now i have setuped and intergated the apache and Tomat
successfully!Also,i have installed the J2SDK and mysql too.
now i want to install the JDBC but i cannot find the document that can
 
 teach
 
me how to do it!!Anyone can give me guideline of Install JDBC or some
 
 webite
 
for reference??

--
Frankie

Webmail


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


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


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



Re: Tomcat 4.1.24 causes refresh problem ... 4.1.18 does not.

2003-07-24 Thread Zach Gatu
This is what I use to prevent caching and it has worked for me:

%
response.setHeader(Cache-Control,no-store); // HTTP 1.1
response.setHeader(Pragma,no-cache); // HTTP 1.0
response.setDateHeader (Expires, 0); // prevents caching at the proxy 
server
%

I think the first setting is more important as most browsers use HTTP 1.1

Mufaddal Khumri wrote:

Hi,

Added :

%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
The problem still persists.

This problem does not occur with tomcat 4.1.18, but occurs with tomcat 
4.1.24. IE , Netscape
and Safari work fine with 4.1.18. Safari does not work well with 4.1.24 
in regards to refresh.

Am using safari on mac os X with tomcat 4.1.24 ...

I have two .jsp files - LocationInformation.jsp and EditLocation.jsp

LocationInformation.jsp shows me the information of a location from the 
database.
EditLocation.jsp is used to edit the information for a location and 
saved to the database.

On the LocationInformation.jsp I have a link to EditLocation.jsp. When I 
edit the location
information by entering data in the form on EditLocation.jsp and then 
say submit, the data
gets entered in the database and I take the user to the 
LocationInformation.jsp where it shows
the updated information from the database. When I click the link to 
EditLocation.jsp on this page,
it takes me to EditLocation.jsp and the form on EditLocation.jsp shows 
me the old information. When
I click the refresh button in the browser the form shows me the updated 
data.

Does anybody know why or how to solve this problem ?

Thanks.

On Tuesday, July 22, 2003, at 11:28  AM, Bill Barker wrote:

Probably Safari doesn't read META tags.  You could try instead:
%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
Mufaddal Khumri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Well i have the following in all my jsp pages.

meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Pragma content=no-cache
meta http-equiv=Expires content=0
Am using safari on mac os X ... Lets say I have a location. I edit the
location and submit the form .. the new data is entered in the database
and the new data is also reflected on the location description page.
The information shown on this page is correct. I have a link to edit
this location on this location information page (.jsp) ... when the
location edit form appears .. it has the old data and when i click
refresh .. it shows me the new data i had entered. This behaviour only
occurs with Safari. IE and Navigator are working fine. Does anybody
know why ?
On Tuesday, July 22, 2003, at 04:06  AM, Tim Funk wrote:

Heh?

Automagic refresh can be done via a meta tag. (Google is your friend)

Page caching is also easy. Again - google is your friend. (cache jsp)

-Tim

Mufaddal Khumri wrote:

hi,
Is there a way to control the refreshing of html pages in tomcat ?
Thanks.


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





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


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




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


Re: LifecycleListener Do not work

2003-07-24 Thread Zach Gatu
Have a look at this tech tip:

http://developer.java.sun.com/developer/EJTechTips/2003/tt0626.html#2

Adi Katz wrote:
Hello,

I implemented org.apache.catalina.LifecycleListener and registered it in server.xml in the following way:

Context path=/myapp ...
  ...
  Listener className=mypackage.MyListener/
  ...
/Context
Naturally mypackage.MyListener is in my webapp but it seems that when server.xml is being parsed on tomcat startup my listener class is not accessible from catalina side. and i get a classNotFound Exception.

I feel there is something very messy with the class loading going on in tomcat side.

Does anybody have an idea/examople how to implement a org.apache.catalina.LifecycleListener and to use it in server.xml ?

Thanks,
Adi




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




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


Re: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian

2003-07-24 Thread Zach Gatu
You need to use the JDK not the JRE.  So if, for example, you downloaded 
the jdk 1.4.2 and unpacked it into /usr/java/j2sdk1.4.2, your JAVA_HOME 
entry should read JAVA_HOME=/usr/java/j2sdk1.4.2

Zach.

Christian Platzer wrote:

Hi there.
I have a problem while starting the Tomcat Server.
On my server runs a Debian woody system
I've installed the 4.1.24 tomcat with jdk 1.4.1_02.
Both are not the debian packages, but downloaded from the jakarta project and sun.
the JAVA_HOME variable is set to /usr/lib/j2se/j2re1.4.1, where locates the java
installation
the CATALINA_HOME variable is set to /usr/share/jakarta-tomcat.
When i try to start the tomcat server with the startup.sh script, the only output on
the shell is that the JAVA_HOME variable isn't set properly.
I don't know where's the problem.

Thanks a lot for helping me, and sorry for my poor english.

Christian

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




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


Re: Help needed in configuring tomcat 4.1.24

2003-07-24 Thread Zach Gatu
Make sure the your Connector directive ends with / or /Connector, 
i.e. make sure that it's a valid xml tag.

Also take out !-- WEB_PORT -- from within Connector ... /

Restart Tomcat and see if you can shut it down without errors.

Zach.

Sarika Inamdar wrote:

Hi All,

We need to start tomcat with a user-defined port. To enable the same ,
in server.xml, we give the following 

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
!-- WEB_PORT --port=8080  
   minProcessors=5 maxProcessors=75

In our start script, we grep for WEB_PORT and replace the default port
value with a user-defined port.
With this modification, tomcat starts properly. But when I give
shutdown.sh command to stop tomcat , I get the following parse exception
:
bash-2.03# ./shutdown.sh 
Using CATALINA_BASE:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24
Using CATALINA_HOME:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24
Using CATALINA_TMPDIR:
/export/spare/users/sinamdar/jakarta-tomcat-4.1.24/temp
Using JAVA_HOME:   /export/spare/CSCOPerfE/tools/jdk
Jul 23, 2003 3:12:03 PM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 93 column 5: Element type Connector
must be followed by either attribute specifications,  or /.
org.xml.sax.SAXParseException: Element type Connector must be followed
by either attribute specifications,  or /.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkno
wn Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source)

Is there anyway we can avoid this exception ? Any help in this regard
would be useful.
Thanks in Advance,
Sarika






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




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


Re: Probs running tomcat 4.1.24 + jdk 1.4.1_02 on debian

2003-07-24 Thread Zach Gatu
You need j2sdk1.4.2-linux-i586.bin not j2re1.4.2-linux-i586.bin.

Try also adding JAVA_HOME/bin to your PATH, if you haven't already.

Zach.

Christian Platzer wrote:
Nothing.
Always the same problem
I try to execute 'export JAVA_HOME', before catalina.sh or startup.sh, but always
the same problem.
A question.
The file for the java JDK, is it the j2re1.4.2-linux-i586.bin, or the
j2sdk1.4.2-linux-i586.bin?
The sun site isn't very clearly

BTW.
I i try to execute java -version, it gives me the right version (1.4.2)
Thanks
Christian
Chris Halstead ([EMAIL PROTECTED]) schrieb:

Having JAVA_HOME set and having it exported are two different things.
Just before calling catalina.sh, execute the command 'export JAVA_HOME'
and see if it helps...
-chris

On Wed, 2003-07-23 at 07:39, Christian Platzer wrote:

Hi chris.
Thanks for response...
Yes, if i try echo $JAVA_HOME it gives me the right path to the j2re1.4.2 directory.
I've installed the j2re1.4.2-linux-i586.bin file from sun.
Thanks

Christian

Chris Halstead ([EMAIL PROTECTED]) schrieb:

Are you sure you've exported JAVA_HOME?

-chris

On Wed, 2003-07-23 at 06:02, Christian Platzer wrote:

Hi there.
I have a problem while starting the Tomcat Server.
On my server runs a Debian woody system
I've installed the 4.1.24 tomcat with jdk 1.4.1_02.
Both are not the debian packages, but downloaded from the jakarta project and sun.
the JAVA_HOME variable is set to /usr/lib/j2se/j2re1.4.1, where locates the java
installation
the CATALINA_HOME variable is set to /usr/share/jakarta-tomcat.
When i try to start the tomcat server with the startup.sh script, the only
output on

the shell is that the JAVA_HOME variable isn't set properly.

I don't know where's the problem.

Thanks a lot for helping me, and sorry for my poor english.

Christian

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





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




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




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


Re: tomcat, jk2 and apache

2003-07-21 Thread Zach Gatu
I've not used JK2 but I've had sucess with Tomcat + Apache (1.3.27 and 
2.0.44) in Red Hat using mod_jk.  You can download mod_jk for your OS 
here: 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/bin/

If you download for *nix, make surre you chmod it to executable before 
using it.

Zach.

Seamus Hanly wrote:

Hi,

I am trying to set up Apache/2.0.40 to talk to Tomcat
4.1.24 using jk2 connector on Red Hat 9.0.
This is my first time setting something like this up
so can you please tell me where I can get a version
mod_jk2.so compatible with Apache/2.0.40 ?
or should I use mod_jk.so? or some other connector?
Thanks!

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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


JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Zach Gatu
Hi,

I've set my Tomcat 4.1.24 installation to production mode, i.e. I've set 
'development' to false, 'reloading' to true and 'fork' to true in 
CATALINA_HOME/conf/web.xml.

I have some JSPs that are modified from time to time.  My questions are:

1a. Why is the package name for java files generated from a JSP 
compilation different when using JSPC and when you let Jasper compile 
the JSP when you access it (especially for JSP in directories in a context)?

1b. Can you use JSPC to precompile JSPs into the work directory without 
having to wait till they are accessed or using something like UNIX's 
wget to 'touch' the file and force a compilation?

2. How exactly does Jasper precompile JSPs into the work directory?  Can 
one write an Ant build file to precompile JSPs in a context to the work 
dir the same way Jasper does?

3. If you've precompiled your JSPs and mapped them in web.xml would 
Jasper precompile them and reload them if they are subsequently modified?

4. What are the advantages of mapping JSPs in web.xml as opposed to 
having Jasper compile them in the work directory?

Zach.

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


Re: Servlet Context Listener problem...

2003-07-16 Thread Zach Gatu
Have a look at one of the latest Enterprise Java Tech Tip on Servlet 
Life Cycle Listeners: 
http://developer.java.sun.com/developer/EJTechTips/2003/tt0626.html#2

Zach.

[EMAIL PROTECTED] wrote:
Hi:

I implemented ServletContextListener in my class. I then wrote the xml  
in the web.xml file and started tomcat. The error tomcat threw tells me  
that it did not recognize the listener and listener-class elements ?? i  
have them declared in the web.xml as:

web-app
  !-- ServletContextListener --
   listener
   listener-class
   
com.wavesinmotion.cw.classes.jsphelpers.CourseWizardContextListener
   /listener-class
   /listener
/web-app

Any ideas where I am going wrong ?
Thanks.
Tomcat threw this error below:

SEVERE: Parse Error at line 10 column 12: Element type listener must  
be declared.
org.xml.sax.SAXParseException: Element type listener must be declared.
   at  
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error 
HandlerWrapper.java:232)
   at  
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav 
a:173)
   at  
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav 
a:371)
   at  
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav 
a:305)
   at  
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDVali 
dator.java:1833)
   at  
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator. 
java:724)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(X 
MLDocumentFragmentScannerImpl.java:759)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis 
patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDo 
cumentFragmentScannerImpl.java:329)
   at  
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:5 
25)
   at  
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:5 
81)
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
   at  
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java 
:1175)
   at org.apache.commons.digester.Digester.parse(Digester.java:1495)
   at  
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfi 
g.java:282)
   at  
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
   at  
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j 
ava:243)
   at  
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu 
pport.java:166)
   at  
org.apache.catalina.core.StandardContext.start(StandardContext.java:3567 )
   at  
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
   at  
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   at  
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
   at  
org.apache.catalina.core.StandardService.start(StandardService.java:497)
   at  
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav 
a:39)
   at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Jul 14, 2003 3:56:11 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 11 column 19: Element type listener-class  
must be declared.
org.xml.sax.SAXParseException: Element type listener-class must be  
declared.
   at  
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error 
HandlerWrapper.java:232)
   at  
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav 
a:173)
   at  
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav 
a:371)
   at  
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav 
a:305)
   at  
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDVali 
dator.java:1833)
   at  
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator. 
java:724)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(X 
MLDocumentFragmentScannerImpl.java:759)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis 
patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
   at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDo 
cumentFragmentScannerImpl.java:329)
   at  
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:5 

re:mod_jk and apache virtual hosts

2003-07-11 Thread Zach Gatu
Create a file called mod_jk.conf in CATALINA_HOME/conf/jk
Add the following to it:
IfModule !mod_jk.c
  LoadModule jk_module modules/mod_jk.so-ap2.0.46-rh72
/IfModule
JkWorkersFile 
/var/jakarta-tomcat-4.1.24-LE-jdk14/conf/jk/workers.properties
JkLogFile /var/jakarta-tomcat-4.1.24-LE-jdk14/logs/mod_jk.log

JkLogLevel info

NameVirtualHost 127.0.0.1

VirtualHost 127.0.0.1
ServerName host1.com
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
DocumentRoot /var/jakarta-tomcat-4.1.24-LE-jdk14/webapps/context1

Location /WEB-INF/
AllowOverride None
deny from all
/Location
Location /META-INF/
AllowOverride None
deny from all
/Location
/VirtualHost
Create workers.properties in CATALINA_HOME/conf/jk
Add this to it:
# workers.properties
# list of workers
worker.list=ajp13
# define ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
Append this to your Apache httpd.conf
Include /var/tomcat/conf/jk/mod_jk.conf
Add this afer the default virtual host in CATALINA_HOME/conf/server.xml

Host name=host1.com appBase=webapps autoDeploy=true
  Context path= docBase=context1 debug=0
   reloadable=false crossContext=false
Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_context1_log.
   suffix=.txt timestamp=true/
  /Context
/Host
Zach.

Todd Fulton wrote:
I'm using apache 1.3 and tomcat 4.1.18.  I'd like to map virtual host root directories 
directly to tomcat webapp root directories.  mod_webapp does this fine.  Does anyone 
know how to do this with mod_jk?  The ajp13 connector?

Todd
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with [EMAIL PROTECTED]
http://shopnow.netscape.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]