RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
This works for me.

Did you restart the app after changing web.xml?
What version of tomcat are you using? 

Mark

 -Original Message-
 From: Alessandro Ronchi [mailto:[EMAIL PROTECTED] 
 Sent: Friday, November 12, 2004 11:40 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie: problem with WebDav Tomcat servlet
 
 I want to use tomcat to develop an application. I've got the tomcat
 server correcly running, and I managed correctly basic users
 permissions.
 
 I have a problem: i want to use webdav to upload my app contents (jsp
 pages), but I get two errors:
 - Webdav runs correctly and ask me the correct password. 
 After that, it
 shows me only the webdav/ contents (index.html  tomcat.gif
 tomcat-power.gif  WEB-INF), and I can't write anything. The
 WEB-INF/web.xml contains the uncommented init-param:
 
 !-- Uncomment this to enable read and write access --
 
 init-param
   param-namereadonly/param-name
   param-valuefalse/param-value
 /init-param
 
 !--load-on-startup1/load-on-startup--
 
 - I want to read and write with webdav (i'm using dreamweaver) my app
 dir:
 
 /usr/share/tomcat/server/webapps/dwers
 
 but I simply can't. 
 
 I need some help, also a correct rtfm, because I've searched a lot but
 with no results.
 
 Thanks in advance.
 
 -- 
 Alessandro Ronchi [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: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Alessandro Ronchi
Il giorno sab, 13-11-2004 alle 12:18 +, Mark Thomas ha scritto:
 This works for me.
 
 Did you restart the app after changing web.xml?

Yes, I did.

 What version of tomcat are you using? 

Apache Tomcat/4.1.27-13

Another question: is it possible to access to a webapp dir contents with
this webdav url: http://host:8080/webapp/webdav/
?
Must I add any configuration directive to get this working?

-- 
Alessandro Ronchi [EMAIL PROTECTED]
http://www.aronchi.org


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



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
 Another question: is it possible to access to a webapp dir 
 contents with
 this webdav url: http://host:8080/webapp/webdav/?

No. The url is http://host[:port]/context/pathtofile/file

 Must I add any configuration directive to get this working?

You shouldn't need to.

You might want to try /* as the servlet mapping rather than /. This sometimes
helps, particularly when the client is IE (but this tends to be more of an issue
with TC5 than TC4)

What webdav client are you using?

 
 -- 
 Alessandro Ronchi [EMAIL PROTECTED]
 http://www.aronchi.org
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Alessandro Ronchi
Il giorno sab, 13-11-2004 alle 13:57 +, Mark Thomas ha scritto:
  Another question: is it possible to access to a webapp dir 
  contents with
  this webdav url: http://host:8080/webapp/webdav/?
 
 No. The url is http://host[:port]/context/pathtofile/file

Here is my example:
I have a context named dwers, and I correctly execute this jsp page:
http://localhost:8080/dwers/index.jsp
located on 
/usr/share/tomcat/webapps/dwers/index.jsp

what's the correct webdav url?


-- 
Alessandro Ronchi [EMAIL PROTECTED]


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



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
From: Alessandro Ronchi [mailto:[EMAIL PROTECTED] 
 Here is my example:
 I have a context named dwers, and I correctly execute this jsp page:
 http://localhost:8080/dwers/index.jsp
 located on 
 /usr/share/tomcat/webapps/dwers/index.jsp
 
 what's the correct webdav url?

All tomcat responses are provided by servlets. Each request is handled by one,
and only one servlet. The servlet that is used is controlled by the servlet
mappings. There are some default ones in conf/web.xml and you can specify
applciatio specific ones in WEB-INF/web.xml. The rules that control the mapping
are defined in the servlet spec. The JSP and sevrlet specs are a must read for
any web developer.

How does all of this affect you?

Well, to view a JSP .jsp files must be mapped to the JSP servlet but to edit
them they must be mapped to the webdav servlet. A resource will only ever be
mapped to a single servlet.

Webdav isn't intended to provide inplace editing of web application files. So,
how can you get around this?

- Use an IDE that lets you edit the JSP locally and deploys it automatically. I
use Eclipse and the MyEclipse plugin but there are plenty of other options out
there.
- Edit you JSPs locally and use ant to deploy.
- If you have access to the machine running tomcat (either directly or via putty
etc) just edit the JSPs directly in the tomcat directory
- Create a second context with the web.xml setup for webdav (use a /* mapping)
and a symbolic link to the files in the 'normal' app - I don't know unix very
well so can't really explain how to set something like this up

HTH

Mark



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



Newbie: problem with WebDav Tomcat servlet

2004-11-12 Thread Alessandro Ronchi
I want to use tomcat to develop an application. I've got the tomcat
server correcly running, and I managed correctly basic users
permissions.

I have a problem: i want to use webdav to upload my app contents (jsp
pages), but I get two errors:
- Webdav runs correctly and ask me the correct password. After that, it
shows me only the webdav/ contents (index.html  tomcat.gif
tomcat-power.gif  WEB-INF), and I can't write anything. The
WEB-INF/web.xml contains the uncommented init-param:

!-- Uncomment this to enable read and write access --

init-param
  param-namereadonly/param-name
  param-valuefalse/param-value
/init-param

!--load-on-startup1/load-on-startup--

- I want to read and write with webdav (i'm using dreamweaver) my app
dir:

/usr/share/tomcat/server/webapps/dwers

but I simply can't. 

I need some help, also a correct rtfm, because I've searched a lot but
with no results.

Thanks in advance.

-- 
Alessandro Ronchi [EMAIL PROTECTED]


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



RE: Newbie problem with JSP contexts virtual hosts

2004-04-14 Thread Yansheng Lin
Hi, that looks ok to me.  You can specify as many servlets as you want to
map/handle various type of patterns.  But I don't quite understand what you
mean by having a new instance of JspServlet with each host is a overhead.
Because that's probably something you want anyways.  

-Yan

-Original Message-
From: James Bucanek [mailto:[EMAIL PROTECTED] 
Sent: April 13, 2004 00:07
To: Tomcat Users List
Subject: Re: Newbie problem with JSP contexts  virtual hosts


While I didn't get any suggestions or feedback on my original question, I
believe I've found a solution.  Now I just need to run it by the group to
see if it's Kosher.

James Bucanek wrote on Sunday, April 11, 2004:
  !-- Virtual host: www.hotelmidnight.net --
  !-- (jlb 11-April-2004) Added virtual host --
  Host name=www.hotelmidnight.net debug=0
appBase=/Users/darkthirty/Sites
unpackWARs=false autoDeploy=true

!-- Context for the top-level web application --
Context path= docBase=. debug=99 reloadable=true/

  /Host

clip

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters for this web application --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param
/web-app

The basic problem with this arrangement is that my JSP pages ran in the
context of the 'jsp' servlet that's defined in
${CATALINA_HOME}/conf/web.xml for the default Host, not the Context that I
defined in my web-app that I want to run in my virtual Host.

So, it occurred to me that I could create may own instance of the JSP engine
as my Servlet.  Now that I have a Servlet to reference, I can then map
all of the *.jsp files in my virtual host to that:

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters available to all web applications --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param

servlet
servlet-namejsp2/servlet-name
 
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueINFORMATION/param-value
/init-param
/servlet

!-- The mapping for the JSP servlet --
servlet-mapping
servlet-namejsp2/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

/web-app

This seems to work just great.  The Manager sees my application (by name),
and all of the context parameters appear in my JSP pages.

As far as I can tell, there doesn't seem to be anything really bad about
this solution.  Except that I end up with a new instance of the JspServlet
for each virtual host, which is probably a tolerable amount of overhead.

My question is this: Is this the right way to accomplish this?

__
James Bucanek   mailto:[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: Newbie problem with JSP contexts virtual hosts

2004-04-13 Thread James Bucanek
While I didn't get any suggestions or feedback on my original question, I believe I've 
found a solution.  Now I just need to run it by the group to see if it's Kosher.

James Bucanek wrote on Sunday, April 11, 2004:
  !-- Virtual host: www.hotelmidnight.net --
  !-- (jlb 11-April-2004) Added virtual host --
  Host name=www.hotelmidnight.net debug=0 appBase=/Users/darkthirty/Sites
unpackWARs=false autoDeploy=true

!-- Context for the top-level web application --
Context path= docBase=. debug=99 reloadable=true/

  /Host

clip

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters for this web application --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param
/web-app

The basic problem with this arrangement is that my JSP pages ran in the context of the 
'jsp' servlet that's defined in ${CATALINA_HOME}/conf/web.xml for the default 
Host, not the Context that I defined in my web-app that I want to run in my virtual 
Host.

So, it occurred to me that I could create may own instance of the JSP engine as my 
Servlet.  Now that I have a Servlet to reference, I can then map all of the *.jsp 
files in my virtual host to that:

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters available to all web applications --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param

servlet
servlet-namejsp2/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueINFORMATION/param-value
/init-param
/servlet

!-- The mapping for the JSP servlet --
servlet-mapping
servlet-namejsp2/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

/web-app

This seems to work just great.  The Manager sees my application (by name), and all of 
the context parameters appear in my JSP pages.

As far as I can tell, there doesn't seem to be anything really bad about this 
solution.  Except that I end up with a new instance of the JspServlet for each virtual 
host, which is probably a tolerable amount of overhead.

My question is this: Is this the right way to accomplish this?

__
James Bucanek   mailto:[EMAIL PROTECTED]

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



Newbie problem with JSP contexts virtual hosts

2004-04-11 Thread James Bucanek
Greetings all,

I'm sure this is a newbie problem, but a search of the archives didn't reveal what I 
was looking for.

It's probably easiest if I first describe what I want to accomplish:

Mac OS X Server 10.3.3
Apache 1.3.29
Tomcat 4.1.24

(a) Deploy a webapp directory (or .war) that contains Java classes, some JSP pages, 
and a web.xml file.

(b) Have the JSP pages execute in the Context of the above web app.  Specifically, 
access the Java beans contained in the WEB-INF/classes directory and read 
configuration parameters defined in the WEB-INF/web.xml file.

I'm having problems with (b).  I've created, what I think is, a valid webapps 
directory complete with WEB-INF/web.xml file and Java classes.

I believe my problem stems from two confounding issues: (1) I'm trying to do this in a 
virtual host alongside Apache and (2) I'm a little fuzzy on the relationship between 
JSP pages, the JSP servlet, and web app Contexts.

[ Note: I've made a lot of progress since I picked up Tomcat: The Definitive Guide, 
by Jason Brittain  Ian F. Darwin.  I was completely lost before I read their book.  
Now, I'm merely bewildered.  ;) ]

In my server.xml file, I've defined a virtual host (beyond the default one for 
'localhost'):

  !-- Virtual host: www.hotelmidnight.net --
  !-- (jlb 11-April-2004) Added virtual host --
  Host name=www.hotelmidnight.net debug=0 appBase=/Users/darkthirty/Sites
unpackWARs=false autoDeploy=true

!-- this site doesn't use any user authentication --

Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=darkthirty_log. suffix=.txt
timestamp=true/

!-- Context for the top-level web application --
Context path= docBase=. debug=99 reloadable=true/

!-- Let's find out if I can use the manager from a virtual host... --
Context path=/manager docBase=/Library/Tomcat/server/webapps/manager 
debug=5 privileged=true
ResourceLink name=users global=UserDatabase 
type=org.apache.catalina.UserDatabase/
/Context

  /Host

Also note that I'm using the default mapping of *.jsp to Tomcat (mod_jk) in Apache, 
and *.jsp is mapped to the 'jsp' servlet in ${catalina_home}/config/web.xml.

The web application I want to deploy for this site is in /Users/darkthirty/Sites.  
I've created a TestBean class in ./WEB-INF/classes.  The ./WEB-INF/web.xml file 
contains the following:

web-app
display-namedarkthirty/display-name
descriptiondarkthirty.net artwork application/description

!-- Global parameters for this web application --
context-param
param-nametest/param-name
param-valueSome Value/param-value
/context-param
/web-app

I then wrote a short test.jsp page to check the installation:

%@ page language=java import=java.util.*,net.darkthirty.web.art.jsp.*%html
jsp:useBean id=testBean class=net.darkthirty.web.art.jsp.TestBean 
scope=application/
head
titleJSP TEST PAGE/title 
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body
pTestBean.getProperty(): %= testBean.getProperty() %/p
pnew Date(): %= (new Date()).toString() %/p
papplication.getServletContextName(): %= application.getServletContextName() 
%/p
papplication.getInitParameterNames(): % Enumeration e = 
application.getInitParameterNames(); while (e.hasMoreElements()) { %%= 
e.nextElement() %, % } %/p
papplication.getAttributeNames(): % e = application.getAttributeNames(); while 
(e.hasMoreElements()) { %%= e.nextElement() %, % } %/p
pconfig.getInitParameterNames(): % e = config.getInitParameterNames(); while 
(e.hasMoreElements()) { %%= e.nextElement() %, % } %/p
pcontext-param test: %= application.getInitParameter(test) %/p
/body
/html

The parts that works are thus:

- If I load the URL http://www.hotelmidnight.net/test.jsp, the file test.jsp at 
/Users/darkthirty/Sites/test.jsp gets compiled and executed by the JSP servlet.  
Here's the output:

TestBean.getProperty(): Hello!
new Date(): Sun Apr 11 21:23:46 MST 2004
application.getServletContextName(): null
application.getInitParameterNames():
application.getAttributeNames(): org.apache.catalina.jsp_classpath, 
javax.servlet.context.tempdir, org.apache.catalina.resources, testBean, 
org.apache.catalina.WELCOME_FILES,
config.getInitParameterNames(): fork, logVerbosityLevel,
context-param test: null

- test.jsp successfully references and instantiates the TestBean object from the class 
contained in ./WEB-INF/classes.  So it seems that the class loader for this web app is 
working.

- If I load http://www.hotelmidnight.net:9006/manager/html/ it shows that I'm 
running two web applications, / and /manager.  Loading the test.jsp page causes 
the number of sessions in the / application to change.

But here's the part that doesn't work:

- The call to application.getInitParameter(test) doesn't return the value

Newbie problem with Sessions

2004-03-02 Thread Derek Clarkson
Hi guys,
Not sure if I'm in the right list for this ;-)

I'm trying to debug an application which has basically been cobbled together
by a number of previous programmers using a mix of servlets, jsp and struts.
The app also uses 3 contexts - 2 normal and 1 secure via apache. The problem
is this, if I log on and setup some stuff on the main site, the software
uses the same session through out. Security is done but storing a user
object in the session. If I then perform a CC transaction which requires the
secure server to be used and then come back to the main server, the session
is lost and the system insists I logon again. Then every time I try to
access a page it keeps creating new sessions and insisting I relogon. This
only seems to happen after I access the secure server. I have to restart the
browser to get everything working again.

I've logged the session ids which is how I tell when it starts accessing
different sessions. The software appears to have originally been written to
use cookies, but whilst they are stored, they are not used anywhere. 

Questions:
1. If the software creates and stores a cookie, but never actually retrieves
it, can this effect the session ? I've read something about cookies
controlling sessions, but I don't know how this works.

2. What sort of things will cause a server to start a new session ? 

Any help much appreciated.

Ciao
Derek.


Newbie problem compiling JSP with Tomcat 5.0.16

2004-01-31 Thread Barry Kimelman






My system is Linux Redhat9 with Tomcat 5.0.16

I can successfully install my tomcat application.When I enter the URL to visit my application the contents of the"index.html" file are successfully displayed.

However, when I click on a "Submit" button from the form displayedon the "index.html" that is when the problem occurs. Note thatthe submit button is part of the FORM which is started as follows :

 FORM method=post action=""

The following is the 1st part of the error message displayed in mybrowser window :

===

HTTP Status 500 - 

Type Exception Report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 8 in the jsp file: /logon.jsp

Generated servlet error: [javac] Compiling 1 source file $TOMCAT_HOME/work/Catalina/localhost/tomcat4/org/apache/jsp/logon_jsp.java:41: cannot resolve symbolsymbol : class Jdbc2jsplocation : class org.apache.jsp.logon_jsp Jdbcjsp2 foobar = null;

=

Here is the contents of my "logon.jsp" file :

 1%@ page language="java" contentType="text/html" % 2%-- This JSP is to test my own personal Bean/class. --% 3html 4head 5titleLogon/title 6/head 7body 8jsp:useBean id="foobar" scope="session" class="Jdbc2jsp" / 9jsp:setProperty name="foobar" property="*" / 10 11%-- First call the method that generates the data --% 12% 13foobar.display_user_table_contents(); 14% 15 16%-- Now call the method that retrieves the generated data --% 17%= foobar.getHtmldata() % 18 19/body 20/html

=

The above JSP file was the same JSP file I used with Tomcat 4.?under Windows a few years ago. Was it incorrect of me to assumethat the syntax would still be appropriate for Tomcat 5.0.16 ??

In my "src" directory for my Tomcat application there is a Java sourcefile named "Jdbc2jsp.java". This file has a "public class" named"Jdbc2jsp".

So, the big question is what have I done wrong in terms of my JSP andJava class file?? Am I possibly missing something in one of the".xml" files ??

*

Barry KimelmanWinnipeg, Manitoba, Canadaemail : [EMAIL PROTECTED] , [EMAIL PROTECTED]









Re: Newbie problem compiling JSP with Tomcat 5.0.16

2004-01-31 Thread Deepak Parbhoo
Hey Barry.
Check your file permissions and whether the user who is running Tomcat has the rights to write 
to the $TOMCAT_HOME/work directory.
Barry Kimelman wrote:

 My system is Linux Redhat9 with Tomcat 5.0.16
 
I can successfully install my tomcat application.
When I enter the URL to visit my application the contents of the
index.html file are successfully displayed.
 
However, when I click on a Submit button from the form displayed
on the index.html that is when the problem occurs. Note that
the submit button is part of the FORM which is started as follows :
 
FORM method=post action=logon.jsp
 
The following is the 1st part of the error message displayed in my
browser window :
 
===
 
HTTP Status 500 -
 
Type  Exception Report
 
message
 
description  The server encountered an internal error () that
 prevented it from fulfilling this request
 
exception
 
org.apache.jasper.JasperException: Unable to compile class for JSP
 
An error occurred at line: 8 in the jsp file: /logon.jsp
 
Generated servlet error:
[javac] Compiling 1 source file
   
$TOMCAT_HOME/work/Catalina/localhost/tomcat4/org/apache/jsp/logon_jsp.java:41:
  cannot resolve symbol
symbol: class Jdbc2jsp
location  : class org.apache.jsp.logon_jsp
  Jdbcjsp2 foobar = null;
 
=
 
Here is the contents of my logon.jsp file :
 
 1 %@ page language=java contentType=text/html %
 2 %-- This JSP is to test my own personal Bean/class. --%
 3 html
 4 head
 5 titleLogon/title
 6 /head
 7 body
 8 jsp:useBean id=foobar scope=session class=Jdbc2jsp /
 9 jsp:setProperty name=foobar property=* /
10 
11 %-- First call the method that generates the data --%
12 %
13  foobar.display_user_table_contents();
14 %
15 
16 %-- Now call the method that retrieves the generated data --%
17 %= foobar.getHtmldata() %
18 
19 /body
20 /html
 
=
 
The above JSP file was the same JSP file I used with Tomcat 4.?
under Windows a few years ago. Was it incorrect of me to assume
that the syntax would still be appropriate for Tomcat 5.0.16 ??
 
In my src directory for my Tomcat application there is a Java source
file named Jdbc2jsp.java. This file has a public class named
Jdbc2jsp.
 
So, the big question is what have I done wrong in terms of my JSP and
Java class file?? Am I possibly missing something in one of the
.xml files ??
 
*
 
Barry Kimelman
Winnipeg, Manitoba, Canada
email :  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] , 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]





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


Re: Newbie problem compiling JSP with Tomcat 5.0.16

2004-01-31 Thread Ben Souther
Your beans need to be in a package.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html






  My system is Linux Redhat9 with Tomcat 5.0.16
  
 I can successfully install my tomcat application.
 When I enter the URL to visit my application the contents of the
 index.html file are successfully displayed.
  
 However, when I click on a Submit button from the form displayed
 on the index.html that is when the problem occurs. Note that
 the submit button is part of the FORM which is started as follows :
  
 FORM method=post action=logon.jsp
  
 The following is the 1st part of the error message displayed in my
 browser window :
  
 ===
  
 HTTP Status 500 -
  
 Type  Exception Report
  
 message
  
 description  The server encountered an internal error () that
  prevented it from fulfilling this request
  
 exception
  
 org.apache.jasper.JasperException: Unable to compile class for JSP
  
 An error occurred at line: 8 in the jsp file: /logon.jsp
  
 Generated servlet error:
 [javac] Compiling 1 source file

 
$TOMCAT_HOME/work/Catalina/localhost/tomcat4/org/apache/jsp/logon_jsp.java:41:
   cannot resolve symbol
 symbol: class Jdbc2jsp
 location  : class org.apache.jsp.logon_jsp
   Jdbcjsp2 foobar = null;
  
 =
  
 Here is the contents of my logon.jsp file :
  
  1 %@ page language=java contentType=text/html %
  2 %-- This JSP is to test my own personal Bean/class. --%
  3 html
  4 head
  5 titleLogon/title
  6 /head
  7 body
  8 jsp:useBean id=foobar scope=session class=Jdbc2jsp /
  9 jsp:setProperty name=foobar property=* /
 10 
 11 %-- First call the method that generates the data --%
 12 %
 13  foobar.display_user_table_contents();
 14 %
 15 
 16 %-- Now call the method that retrieves the generated data --%
 17 %= foobar.getHtmldata() %
 18 
 19 /body
 20 /html
  
 =
  
 The above JSP file was the same JSP file I used with Tomcat 4.?
 under Windows a few years ago. Was it incorrect of me to assume
 that the syntax would still be appropriate for Tomcat 5.0.16 ??
  
 In my src directory for my Tomcat application there is a Java source
 file named Jdbc2jsp.java. This file has a public class named
 Jdbc2jsp.
  
 So, the big question is what have I done wrong in terms of my JSP and
 Java class file?? Am I possibly missing something in one of the
 .xml files ??
  
 *

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



Apache/Tomcat/Jsp newbie problem

2003-03-08 Thread Steven Shourds
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

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 4 in the jsp file: /menu.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\Tomcat 4.1\work\Standalone\localhost\jd3\menu_jsp.java:46: cannot resolve
symbol
symbol  : class menutest
location: class org.apache.jsp.menu_jsp
  menutest tclbean = null;
  ^



An error occurred at line: 4 in the jsp file: /menu.jsp

Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\jd3\menu_jsp.java:48: cannot resolve
symbol
symbol  : class menutest
location: class org.apache.jsp.menu_jsp
tclbean = (menutest) pageContext.getAttribute(tclbean,
PageContext.PAGE_SCOPE);
   ^



An error occurred at line: 4 in the jsp file: /menu.jsp

Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\jd3\menu_jsp.java:51: cannot resolve
symbol
symbol  : class menutest
location: class org.apache.jsp.menu_jsp
tclbean = (menutest)
java.beans.Beans.instantiate(this.getClass().getClassLoader(), menutest);
   ^
3 errors


at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
74)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
84)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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:2415)
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.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:536)





Apache Tomcat/4.1.18


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



jakarta-tomcat-4.1.18 newbie problem

2002-12-31 Thread Mark Coetser
Hi 

I am quite new to the tomcat project and I am having a problem with a
servlet that I cant seem to get working..

Server version: Apache/1.3.26 (Unix)
Tomcat 7.1.18

Tomcat seems to be working fine because when connecting to

http://host:8080

I get the tomcat docs and I can use the administrator and manager fine..

I have a servlet called TNTservlet that sits in the webapps directory
this servlet is supposed to connect to a NT 4 server running the
TNTserver app that serves geographic content to a samba share on the
apache server which the servlet then serves to the browser..

in the TNTservlet directory I have a mainTNTservlet.properties file that
has the following entries

TNTserver=10.1.12.15:4750
DocBase=/usr/local/jakarta-tomcat-4.1.18/webapps/TNTservlet/
ImageBase=//ns1/print/
Resources=/usr/local/jakarta-tomcat-4.1.18/webapps/TNTservlet/resources/
MaxThreads=64
MinThreads=8

when going to http://host:8080/TNTservlet/ the page is displayed when I
click on a map while running tcpdump on the server I see no connections
being made to the specified server on the port

TNTserver=10.1.12.15:4750

any help would be breatly apreciated.

Thank you


-- 
Mark Coetser
Network Engineer
Etech Concepts
Tel: 011-450 4460
Fax: 011-450 4542

The optimum committee has no members.
-- Norman Augustine



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




[Newbie]: Problem getting started with Tomcat

2002-05-26 Thread Holger Hoffmann

Hi all!

I'm having some problems getting Tomcat up and running correctly.
The problem is the following:
When running startup.bat (I'm using a WinXP box, the IBM JVM and the latest
Apache) I get the Message:
-- snip --
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4-b3
Error unable to create jar cache in /tmp directory :
java.util.zip.ZipException:
 error in opening zip file
Error unable to create jar cache in /tmp directory :
java.util.zip.ZipException:
 error in opening zip file
Starting service Tomcat-Apache
Apache Tomcat/4.0.4-b3
-- snip --

When I want to start the Tomcat service it is started and immediately
halted.
When manually starting Tomcat seems to be working since I'm getting the
Tomcat page when opening http://localhost:8080/.

What I tried so far was creating a /tmp folder in %catalina_home% (there's a
/temp folder there), and I tried setting the system variable catalina_home
to my install path. (I even tried setting the catalina_tmp variable, no
effect).

Anyway, would greatly appreciate any help I could get!
TIA
Holger


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




AW: Newbie problem with reading init params

2002-02-08 Thread Dominik Jednoralski

Sorry Chinni,

but that didnt't work. Why isn't there a connection between the server and
the compiler?

Dominik

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 7. Februar 2002 20:15
An: Tomcat Users List
Betreff: Re: Newbie problem with reading init params




You actually read them from ServletContext not from the ServletConfig.

You can get the Servlet Context by doing...

ServletContext sc = getServletContext();


Hope this helps.

-Chinni.





Dominik
Jednoralski  To:
[EMAIL PROTECTED]
tomcat@lime-cc:
design.de   Subject: Newbie problem with
reading init
 params
02/07/02
12:02 PM
Please
respond to
Tomcat Users
List






Hey Guys,

I have a problem with getting my init-params from the web.xml-file.
These are the parameters I inserted into the
webapps/root/web-inf/web.xml-file:

web-app
  servlet
servlet-nameShowMsg/servlet-name
servlet-classlimeservlets.ShowMessage/servlet-class
init-param
  param-namemessage/param-name
  param-valueNerv-Serv/param-value
/init-param
init-param
  param-namerepeats/param-name
  param-value5/param-value
/init-param
  /servlet
/web-app

Now I failed to read these parameters with the follwing servlet:


package limeservlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

 public class ShowMessage extends HttpServlet {
private String message;
private String defaultMessage = Leider keine Nachricht.;
private int repeats = 1;

public void init (ServletConfig config) throws ServletException{
   super.init(config);
   message = config.getInitParameter(message);
   if (message == null) {
message = defaultMessage;
   }

   try {
 String repeatString = config.getInitParameter
(repeats);
 repeats = Integer.parseInt(repeatString);
   } catch (NumberFormatException nfe){}
}

public void doGet (HttpServletRequest request, HttpServletResponse
response)
   throws ServletException, IOException{
   response.setContentType(text/html);
   PrintWriter out = response.getWriter();
   String title = The Servlet which shows a message!;

   out.println(ServletUtilities.headWithTitle(title) +
   body bgcolor=#fdf5f6\nh1+ title + /h1br);
   for (int i = 0; i  repeats; i ++) {
   out.println(message + br);
   }
   out.println(/body/html);
}
 }


Does anyone know the reason for that? I for myself don't have a clue-
I'm
not really
into configuring servers...

Dominik Jednoralski

. Lime Design Mediengestaltung
. Lilienstr. 23
. 63768 Hvsbach
. Tel. 06021.550470

. visit www.lime-design.de

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


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




Newbie problem with reading init params

2002-02-07 Thread Dominik Jednoralski

Hey Guys,

I have a problem with getting my init-params from the web.xml-file.
These are the parameters I inserted into the
webapps/root/web-inf/web.xml-file:

web-app
  servlet
servlet-nameShowMsg/servlet-name
servlet-classlimeservlets.ShowMessage/servlet-class
init-param
  param-namemessage/param-name
  param-valueNerv-Serv/param-value
/init-param
init-param
  param-namerepeats/param-name
  param-value5/param-value
/init-param
  /servlet
/web-app

Now I failed to read these parameters with the follwing servlet:


package limeservlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

 public class ShowMessage extends HttpServlet {
private String message;
private String defaultMessage = Leider keine Nachricht.;
private int repeats = 1;

public void init (ServletConfig config) throws ServletException{
   super.init(config);
   message = config.getInitParameter(message);
   if (message == null) {
message = defaultMessage;
   }

   try {
 String repeatString = config.getInitParameter (repeats);
 repeats = Integer.parseInt(repeatString);
   } catch (NumberFormatException nfe){}
}

public void doGet (HttpServletRequest request, HttpServletResponse
response)
   throws ServletException, IOException{
response.setContentType(text/html);
PrintWriter out = response.getWriter();
String title = The Servlet which shows a message!;

out.println(ServletUtilities.headWithTitle(title) +
body bgcolor=#fdf5f6\nh1+ title + /h1br);
for (int i = 0; i  repeats; i ++) {
out.println(message + br);
}
out.println(/body/html);
}
 }


Does anyone know the reason for that? I for myself don't have a clue- I'm
not really
into configuring servers...

Dominik Jednoralski

. Lime Design Mediengestaltung
. Lilienstr. 23
. 63768 Hvsbach
. Tel. 06021.550470

. visit www.lime-design.de

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




Re: Newbie problem with reading init params

2002-02-07 Thread Chinni . Venkateswara



You actually read them from ServletContext not from the ServletConfig.

You can get the Servlet Context by doing...

ServletContext sc = getServletContext();


Hope this helps.

-Chinni.




   

Dominik

Jednoralski  To: [EMAIL PROTECTED]

tomcat@lime-cc:   

design.de   Subject: Newbie problem with reading init 

 params

02/07/02   

12:02 PM   

Please 

respond to 

Tomcat Users   

List   

   

   





Hey Guys,

I have a problem with getting my init-params from the web.xml-file.
These are the parameters I inserted into the
webapps/root/web-inf/web.xml-file:

web-app
  servlet
servlet-nameShowMsg/servlet-name
servlet-classlimeservlets.ShowMessage/servlet-class
init-param
  param-namemessage/param-name
  param-valueNerv-Serv/param-value
/init-param
init-param
  param-namerepeats/param-name
  param-value5/param-value
/init-param
  /servlet
/web-app

Now I failed to read these parameters with the follwing servlet:


package limeservlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

 public class ShowMessage extends HttpServlet {
private String message;
private String defaultMessage = Leider keine Nachricht.;
private int repeats = 1;

public void init (ServletConfig config) throws ServletException{
   super.init(config);
   message = config.getInitParameter(message);
   if (message == null) {
message = defaultMessage;
   }

   try {
 String repeatString = config.getInitParameter
(repeats);
 repeats = Integer.parseInt(repeatString);
   } catch (NumberFormatException nfe){}
}

public void doGet (HttpServletRequest request, HttpServletResponse
response)
   throws ServletException, IOException{
   response.setContentType(text/html);
   PrintWriter out = response.getWriter();
   String title = The Servlet which shows a message!;

   out.println(ServletUtilities.headWithTitle(title) +
   body bgcolor=#fdf5f6\nh1+ title + /h1br);
   for (int i = 0; i  repeats; i ++) {
   out.println(message + br);
   }
   out.println(/body/html);
}
 }


Does anyone know the reason for that? I for myself don't have a clue-
I'm
not really
into configuring servers...

Dominik Jednoralski

. Lime Design Mediengestaltung
. Lilienstr. 23
. 63768 Hvsbach
. Tel. 06021.550470

. visit www.lime-design.de

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




newbie: problem with local and static variable

2001-09-03 Thread henri charme

hi everybody,
i am currently trying o'reilly example of a counter with a
static variable and a local one to count access
unfortunately their behaviour is the same
so every access to my servlet is on the same instance of the
class
what is wrong in my configuration? i can't find the solution
in the doc and in archives
i know it must be silly but...

thank you for helping me
_
Le journal des abonnés Caramail - http://www.carazine.com




Re: newbie: problem with local and static variable

2001-09-03 Thread ravi shankar

hi henri,
i maybe wrong ,but have u declared the counter as static
it should not be declared as a class variable

ravi

On Mon, 03 Sep 2001 henri charme wrote :
hi everybody,
i am currently trying o'reilly example of a counter 
with a
static variable and a local one to count access
unfortunately their behaviour is the same
so every access to my servlet is on the same instance 
of the
class
what is wrong in my configuration? i can't find the 
solution
in the doc and in archives
i know it must be silly but...

thank you for helping me
-
_
Le journal des abonnés Caramail - 
http://www.carazine.com



 






Re: newbie: problem with local and static variable

2001-09-03 Thread henri charme

the code is:

public class MyServlet extends HttpServlet
{
 int count = 0; // should be separated for each instance
 static int classcount = 0;

 public void doGet(HttpServletRequest request,
HttpServletResponse response)
 throws IOException, ServletException
 {
 this.count++;
 classcount++;
 ...
 }

 ...
}

but i don't think that the problem is here
i guess it's the configuration... no?


 ---Message d'origine---
 De : ravi shankar [EMAIL PROTECTED]
 Date : 03/09/2001 13:37:19



  Attachement - noname029935 


__
Boîte aux lettres - Caramail - http://www.caramail.com




RE: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException

2001-06-06 Thread Jann VanOver

If any of your parameters are null (and it looks like issue is null) you
will get an error when you try to use the equals() method.

It's better style to turn your statements around like this:
   (Printout complete issue).equals(request.getParameter(report));

because this way the initial string is NEVER null and the equals will
return false if the parameter is null.

-Original Message-
From: Terje Kristensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2001 2:18 AM
To: '[EMAIL PROTECTED]'
Subject: newbie problem: javax.servlet.ServletException at
org.apache.jasp er.runtime.PageContextImpl.handlePageException 


Hi, 

I'm new to both this mailinglist and tomcat, and I was hoping you could help
me start out.
I use Tomcat 3.2 on a Win2K Server

My problem:

When going from this file (with the url:
http://localhost:8080/xsql/lsp200/index_redirect.jsp?issue=opn=%25report=A
dvanced+Reporting):

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

html
head
titleLSP-200 - Changes in Issue/title
link rel=STYLESHEET type=text/css
href=includes/stylesheet.css/
/head
% 
String report   = request.getParameter(report);
String opn  = request.getParameter(opn);
String issue= request.getParameter(issue);

boolean no_1= request.getParameter(report).equals(Printout complete
issue);
boolean no_2= request.getParameter(report).equals(Printout changes
since last issue);
boolean no_3= request.getParameter(report).equals(Printout
sections);
boolean no_4= request.getParameter(report).equals(Historic Data);
boolean no_5= request.getParameter(report).equals(Advanced
Reporting);

if (no_1) { 
String section1 = section1.xsql?opn=+ opn + issue= +
issue;
String section2 = section2.xsql?opn=+ opn + issue= +
issue;
String section3 = section3.xsql?opn=+ opn + issue= +
issue;
String section4 = section4.xsql?opn=+ opn + issue= +
issue;
String section5 = section5.xsql?opn=+ opn + issue= +
issue;
String section6 = section6.xsql?opn=+ opn + issue= +
issue;
String section7 = section7.xsql?opn=+ opn + issue= +
issue;
String section8 = section8.xsql?opn=+ opn + issue= +
issue;
String section9 = section9.xsql?opn=+ opn + issue= +
issue;
%
body
jsp:include page=%=section1% flush=true/
jsp:include page=%=section2% flush=true/
jsp:include page=%=section3% flush=true/
jsp:include page=%=section4% flush=true/
jsp:include page=%=section5% flush=true/
jsp:include page=%=section6% flush=true/
jsp:include page=%=section7% flush=true/
jsp:include page=%=section8% flush=true/
jsp:include page=%=section9% flush=true/
/body
%  } 
if (no_2) { 
String section1 = changes_section1.xsql?opn=+ opn +
issue= + issue;
String section2 = changes_section2.xsql?opn=+ opn +
issue= + issue;
String section3 = changes_section3.xsql?opn=+ opn +
issue= + issue;
String section4 = changes_section4.xsql?opn=+ opn +
issue= + issue;
String section5 = changes_section5.xsql?opn=+ opn +
issue= + issue;
String section6 = changes_section6.xsql?opn=+ opn +
issue= + issue;
String section7 = changes_section7.xsql?opn=+ opn +
issue= + issue;
String section8 = changes_section8.xsql?opn=+ opn +
issue= + issue;
String section9 = changes_section9.xsql?opn=+ opn +
issue= + issue;
%
body
jsp:include page=%=section1% flush=true/
jsp:include page=%=section2% flush=true/
jsp:include page=%=section3% flush=true/
jsp:include page=%=section4% flush=true/
jsp:include page=%=section5% flush=true/
jsp:include page=%=section6% flush=true/
jsp:include page=%=section7% flush=true/
jsp:include page=%=section8% flush=true/
jsp:include page=%=section9% flush=true/
/body
%  } 
if (no_3) { %
body   bgcolor=#FFBD9D
br/
br/
br/
br/
div align=center
table class=menu
tr
td
dl
dt/b
style=font-size:10ptPrintout section/bdd/
a
href=section1.xsql?opn=%= opn %issue=%= issue %1. General/abr/
a
href=section2.xsql?opn=%= opn %issue=%= issue %2. PCS/abr/
a
href=section3.xsql?opn=%= opn %issue=%= issue %3. SST/abr

RE: newbie problem: javax.servlet.ServletException at org.apache. jasp er.runtime.PageContextImpl.handlePageException

2001-05-30 Thread Terje Kristensen

Thanks, that did it :-)

Terje K.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: 29. mai 2001 13:16
To: '[EMAIL PROTECTED]'
Subject: AW: newbie problem: javax.servlet.ServletException at
org.apache. jasp er.runtime.PageContextImpl.handlePageException 


As I understand the spec, this is not valid:

jsp:forward page=some.jsp?arg1=value1 /

(See 2.13.5 and 2.5.2)

Instead you can use:

jsp:forward page=some.jsp
 jsp:param name=arg1 value=value1 /
/jsp:forward

This notation is a bit 'noisy' but it should work.

 -Ursprüngliche Nachricht-
 Von: Terje Kristensen [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 29. Mai 2001 12:29
 An: '[EMAIL PROTECTED]'
 Betreff: RE: newbie problem: javax.servlet.ServletException at
snip/ 



Re: newbie problem: javax.servlet.ServletException at org.apache. jasp er.runtime.PageContextImpl.handlePageException

2001-05-30 Thread Guido Medina

Another way to do it is saving the complete URI+parameters in a String
variable and put it as a tag: @jsp:forward page=%=url_plus_paramters%

parameters=?+parameters... to get http://yourdomain.com/some.jsp?...

Guido.

P.D: I already tested but I don't remember if is @jsp:forward or
jsp:forward ... I guess that for that is the first...

- Original Message -
From: Terje Kristensen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 30, 2001 2:53 AM
Subject: RE: newbie problem: javax.servlet.ServletException at org.apache.
jasp er.runtime.PageContextImpl.handlePageException


 Thanks, that did it :-)

 Terje K.

 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
 Sent: 29. mai 2001 13:16
 To: '[EMAIL PROTECTED]'
 Subject: AW: newbie problem: javax.servlet.ServletException at
 org.apache. jasp er.runtime.PageContextImpl.handlePageException


 As I understand the spec, this is not valid:

 jsp:forward page=some.jsp?arg1=value1 /

 (See 2.13.5 and 2.5.2)

 Instead you can use:

 jsp:forward page=some.jsp
  jsp:param name=arg1 value=value1 /
 /jsp:forward

 This notation is a bit 'noisy' but it should work.

  -Ursprüngliche Nachricht-
  Von: Terje Kristensen [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 29. Mai 2001 12:29
  An: '[EMAIL PROTECTED]'
  Betreff: RE: newbie problem: javax.servlet.ServletException at
 snip/





newbie problem: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException

2001-05-29 Thread Terje Kristensen

Hi, 

I'm new to both this mailinglist and tomcat, and I was hoping you could help
me start out.
I use Tomcat 3.2 on a Win2K Server

My problem:

When going from this file (with the url:
http://localhost:8080/xsql/lsp200/index_redirect.jsp?issue=opn=%25report=A
dvanced+Reporting):

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

html
head
titleLSP-200 - Changes in Issue/title
link rel=STYLESHEET type=text/css
href=includes/stylesheet.css/
/head
% 
String report   = request.getParameter(report);
String opn  = request.getParameter(opn);
String issue= request.getParameter(issue);

boolean no_1= request.getParameter(report).equals(Printout complete
issue);
boolean no_2= request.getParameter(report).equals(Printout changes
since last issue);
boolean no_3= request.getParameter(report).equals(Printout
sections);
boolean no_4= request.getParameter(report).equals(Historic Data);
boolean no_5= request.getParameter(report).equals(Advanced
Reporting);

if (no_1) { 
String section1 = section1.xsql?opn=+ opn + issue= +
issue;
String section2 = section2.xsql?opn=+ opn + issue= +
issue;
String section3 = section3.xsql?opn=+ opn + issue= +
issue;
String section4 = section4.xsql?opn=+ opn + issue= +
issue;
String section5 = section5.xsql?opn=+ opn + issue= +
issue;
String section6 = section6.xsql?opn=+ opn + issue= +
issue;
String section7 = section7.xsql?opn=+ opn + issue= +
issue;
String section8 = section8.xsql?opn=+ opn + issue= +
issue;
String section9 = section9.xsql?opn=+ opn + issue= +
issue;
%
body
jsp:include page=%=section1% flush=true/
jsp:include page=%=section2% flush=true/
jsp:include page=%=section3% flush=true/
jsp:include page=%=section4% flush=true/
jsp:include page=%=section5% flush=true/
jsp:include page=%=section6% flush=true/
jsp:include page=%=section7% flush=true/
jsp:include page=%=section8% flush=true/
jsp:include page=%=section9% flush=true/
/body
%  } 
if (no_2) { 
String section1 = changes_section1.xsql?opn=+ opn +
issue= + issue;
String section2 = changes_section2.xsql?opn=+ opn +
issue= + issue;
String section3 = changes_section3.xsql?opn=+ opn +
issue= + issue;
String section4 = changes_section4.xsql?opn=+ opn +
issue= + issue;
String section5 = changes_section5.xsql?opn=+ opn +
issue= + issue;
String section6 = changes_section6.xsql?opn=+ opn +
issue= + issue;
String section7 = changes_section7.xsql?opn=+ opn +
issue= + issue;
String section8 = changes_section8.xsql?opn=+ opn +
issue= + issue;
String section9 = changes_section9.xsql?opn=+ opn +
issue= + issue;
%
body
jsp:include page=%=section1% flush=true/
jsp:include page=%=section2% flush=true/
jsp:include page=%=section3% flush=true/
jsp:include page=%=section4% flush=true/
jsp:include page=%=section5% flush=true/
jsp:include page=%=section6% flush=true/
jsp:include page=%=section7% flush=true/
jsp:include page=%=section8% flush=true/
jsp:include page=%=section9% flush=true/
/body
%  } 
if (no_3) { %
body   bgcolor=#FFBD9D
br/
br/
br/
br/
div align=center
table class=menu
tr
td
dl
dt/b
style=font-size:10ptPrintout section/bdd/
a
href=section1.xsql?opn=%= opn %issue=%= issue %1. General/abr/
a
href=section2.xsql?opn=%= opn %issue=%= issue %2. PCS/abr/
a
href=section3.xsql?opn=%= opn %issue=%= issue %3. SST/abr/
a
href=section4.xsql?opn=%= opn %issue=%= issue %4. VDS/abr/
a
href=section5.xsql?opn=%= opn %issue=%= issue %5. VSK/abr/
a
href=section6.xsql?opn=%= opn %issue=%= issue %6. MDS/abr/
a
href=section7.xsql?opn=%= opn %issue=%= issue %7. ESK/abr/
a
href=section8.xsql?opn=%= opn %issue=%= issue %sc=%rev=%8.
SC/abr/
a

AW: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException

2001-05-29 Thread Ralph Einfeldt

To get an idea what happens, you should have a look at line 72 of the 
generated java file
_0002flsp_00032_00030_00030_0002fadvanced_0005fredirect_0002ejspadvanced_000
5fredirect_jsp_0.java

to find the place in advanced_redirect.jsp which causes this problem.

Try to reduce your jsp's to the bare minimum that reproduces this error.

 -Ursprüngliche Nachricht-
 Von: Terje Kristensen [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 29. Mai 2001 11:18
 An: '[EMAIL PROTECTED]'
 Betreff: newbie problem: javax.servlet.ServletException at
 org.apache.jasp er.runtime.PageContextImpl.handlePageException 
snip/ 
Root cause: 
java.lang.IllegalArgumentException
at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285)
at javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:154)
at
org.apache.tomcat.facade.RequestDispatcherImpl.addQueryString(RequestDispatc
herImpl.java:491)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:176)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:421)
at
lsp_00032_00030_00030._0002flsp_00032_00030_00030_0002fadvanced_0005fredirec
t_0002ejspadvanced_0005fredirect_jsp_0._jspService(_0002flsp_00032_00030_000
30_0002fadvanced_0005fredirect_0002ejspadvanced_0005fredirect_jsp_0.java:72)
snip/ 



RE: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException

2001-05-29 Thread Terje Kristensen

Oops, my error...

The flow is as follows: from file1 to this:
String opn  = request.getParameter(opn);
String pcs  = request.getParameter(pcs);
String vds  = request.getParameter(vds);
boolean no_1= request.getParameter(xsql_file).equals(Section
Selection);
boolean no_2= request.getParameter(xsql_file).equals(PCS Selection);
boolean no_3= request.getParameter(xsql_file).equals(VDS Selection);
boolean no_4= request.getParameter(xsql_file).equals(Pipe Element
Selection);
if (no_1) { %jsp:forward page=advanced_schema_sections.jsp?opn=%= opn
%/% }
if (no_2) { %jsp:forward page=advanced_schema_pcs.jsp?opn=%= opn
%pcs=%= pcs %name=PCS/% }
if (no_3) { %jsp:forward page=advanced_schema_vds.jsp?opn=%= opn
%vds=%= vds %name=VDS/% }
if (no_4) { %jsp:forward page=advanced_schema_pipe.xsql?opn=%= opn
%/% } %

where I try to open file 2 in my previous mail. 
It seems as if there is something wrong with my jsp:forward. Any clue?

Will search the net...

Thanks 

Terje K.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: 29. mai 2001 11:53
To: '[EMAIL PROTECTED]'
Subject: AW: newbie problem: javax.servlet.ServletException at
org.apache.jasp er.runtime.PageContextImpl.handlePageException 


To get an idea what happens, you should have a look at line 72 of the 
generated java file
_0002flsp_00032_00030_00030_0002fadvanced_0005fredirect_0002ejspadvanced_000
5fredirect_jsp_0.java

to find the place in advanced_redirect.jsp which causes this problem.

Try to reduce your jsp's to the bare minimum that reproduces this error.

 -Ursprüngliche Nachricht-
 Von: Terje Kristensen [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 29. Mai 2001 11:18
 An: '[EMAIL PROTECTED]'
 Betreff: newbie problem: javax.servlet.ServletException at
 org.apache.jasp er.runtime.PageContextImpl.handlePageException 
snip/ 
Root cause: 
java.lang.IllegalArgumentException
at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285)
at javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:154)
at
org.apache.tomcat.facade.RequestDispatcherImpl.addQueryString(RequestDispatc
herImpl.java:491)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:176)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:421)
at
lsp_00032_00030_00030._0002flsp_00032_00030_00030_0002fadvanced_0005fredirec
t_0002ejspadvanced_0005fredirect_jsp_0._jspService(_0002flsp_00032_00030_000
30_0002fadvanced_0005fredirect_0002ejspadvanced_0005fredirect_jsp_0.java:72)
snip/ 



Re: Newbie problem starting web server.

2001-05-02 Thread jackling

Thanks for Darrell's advice.
I've tried the method. But the message appear in the TOMSTART.LOG is
minimum:

Starting tomcat. Check logs/tomcat.log for error messages

in the logs directory I do have tomcat.log. I saw the modified datetime that
it was created some date ago (I don't know how it was created.) That means,
this tomcat.log is not updated either.

So, I don't know what's wrong

my config again:
ver: Tomcat v3.1
OS: Windows98 (able to run on Win98? No need WinNT/2000, right?)

thanks again,
jackling.





- Original Message -
???: Darrell Porter [EMAIL PROTECTED]
???: [EMAIL PROTECTED]
: 2001?5?2? AM 03:30
??: RE: Newbie problem starting web server.


 The only output to the command window that appears are java specific in
 nature (disconnects from the database and the like) and there is not a
 non-programmatic way to change this that I am aware of...

 Darrell


 -Original Message-
 From: Peter B. West [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 10:28 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Newbie problem starting web server.


 Darrell Porter wrote:
 
  In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
  Searching through the file, you will find a code snippet that looks
 like
  this:
 
  :startServer
  echo Starting Tomcat in new window
  if %2 == -security goto startSecure
  %_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME%
 org.apache.
  tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
  goto cleanup
 
  At the line that begins %_STARTJAVA% add 
  %TOMCAT_HOME%\LOGS\TOMSTART.LOG (without quotes) so that

 ... and without the newline; i.e.
 %TOMCAT_HOME%\LOGS\TOMSTART.LOG
 (note the right angle bracket `' at the beginning.  That's what does
 the redirect of the output.)

 How does this work with stderr on Windows?

 Peter
 --
 Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
 Lord, to whom shall we go?




RE: Newbie problem starting web server.

2001-05-01 Thread Darrell Porter

The only output to the command window that appears are java specific in
nature (disconnects from the database and the like) and there is not a
non-programmatic way to change this that I am aware of...

Darrell


-Original Message-
From: Peter B. West [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 10:28 PM
To: [EMAIL PROTECTED]
Subject: Re: Newbie problem starting web server.


Darrell Porter wrote:
 
 In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
 Searching through the file, you will find a code snippet that looks
like
 this:
 
 :startServer
 echo Starting Tomcat in new window
 if %2 == -security goto startSecure
 %_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME%
org.apache.
 tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 At the line that begins %_STARTJAVA% add 
 %TOMCAT_HOME%\LOGS\TOMSTART.LOG (without quotes) so that

... and without the newline; i.e.
%TOMCAT_HOME%\LOGS\TOMSTART.LOG
(note the right angle bracket `' at the beginning.  That's what does
the redirect of the output.)

How does this work with stderr on Windows?

Peter
-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
Lord, to whom shall we go?



Newbie problem starting web server.

2001-04-30 Thread jackling




version: tomcat 3.1
platform: win98

I'm new in configuring tomcat and fail to start the 
web server. I've following questions:
1) can I run the tomcat web server on Win98 (9X)? or 
must be WinNT/2000?

2) after I type 'startup' from the /bin directory, 
another DOS window prompts up w/ the log (see blow). From this point on, I try 
using my browser and type: http://localhost:8080(or http://localhost:8080/index.html). 
The web server seems not running and the browser prompts me to connect to 
internet.

I don't know how to capture the screen log, below is 
the extract: (It said 'File not found C:\Apache\Tomcat\webapps\ADMIN.WAR' but 
the file is in that directory. So' I don't know why)

Context log: path="/ADMIN.WAR" File not found 
C:\Apache\Tomcat\webapps\ADMIN.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/ADMIN.WAR" :jsp: initContext log 
path="/ADMIN.WAR" :default: initContext log path="/TEST.WAR" 
:tomcat.errorPage: initContext log: path="/TEST.WAR" File not found 
C:\Apache\Tomcat\webapps\TEST.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/TEST.WAR" :jsp: initContext log 
path="/TEST.WAR" :default: initContext log path="/test" :tomcat.errorPage: 
initContext log path="/test" :jsp: initContext log path="/test" 
:default: initContext log path="/EXAMPLES.WAR" :tomcat.errorPage: 
initContext log: path="/EXAMPLES.WAR" File not found 
C:\Apache\Tomcat\webapps\EXAMPLES.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/EXAMPLES.WAR" :jsp: initContext log 
path="/EXAMPLES.WAR" :default: initContext log path="" :tomcat.errorPage: 
initContext log path="" :jsp: initContext log path="" :default: 
initStarting endpoint port="8080" 
handler="org.apache.tomcat.service.http.HttpConnectionHandler"Starting 
endpoint port="8007" 
handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"
3) I don't see the tomcat/logs files updated. how 
to turn the log function on?

I'm stuck at this point. Your help is much 
appreiated.

thanks,
jackling.


RE: Newbie problem starting web server.

2001-04-30 Thread Darrell Porter

To (mostly) capture what appears in the tomcat command interpreter window on
a Win32 platform, do the following:

In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
Searching through the file, you will find a code snippet that looks like
this:

:startServer
echo Starting Tomcat in new window
if %2 == -security goto startSecure
%_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME% org.apache.
tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup

At the line that begins %_STARTJAVA% add 
%TOMCAT_HOME%\LOGS\TOMSTART.LOG (without quotes) so that
it pipes the output of the stream to a file called TOMSTART.LOG in your
tomcat LOGS directory.  From there,
you can cut and paste it or parse it using a log reader or do with it as
you like...

Logging is turned on by context in SERVER.XML in the %TOMCAT_HOME%\conf
directory.  It is specified in the context tag as debug=n where n is a
number from 0 to 9.  See below for content achieved in log files with
different debug levels set.

I hope this helps...

Level 0
   Errors and states that cause a significant change in program flow.  
   = Anything that causes a Discon+Retry or a giveup message.

Level 1
   Important or inaccessible state information.
   = Connection start, Idle disconnection.

Level 2
   Rare things that cause a minor program flow adjustment.
   = No REST, No PASV, etc.

Level 3
   Errors and useful messages that are slightly too verbose or common
   for 0-2 or don't quite fit in the classifications.
   = Login banner

Level 4
   All remote responses or major results. (Trace results)
   = All 999 Xyzzy responses received.

Level 5
   All remote commands or major tasks. (Trace jobs)
   = All commands sent to server.

Level 6
   General information that will not be too verbose but is normally a
   little less important. (Trace state)

Level 7
   Similar to level 3 but verbose or not as useful.

Level 8
   Very verbose information that'll probably be useful sometime.

Level 9
   Anything and everything else, debugs that probably won't be useful
   ever again.(unclassified)
   


-Original Message-
From: jackling [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 3:34 AM
To: [EMAIL PROTECTED]
Subject: Newbie problem starting web server.



version: tomcat 3.1
platform: win98
 
I'm new in configuring tomcat and fail to start the web server. I've
following questions:
1) can I run the tomcat web server on Win98 (9X)? or must be WinNT/2000?
 
2) after I type 'startup' from the /bin directory, another DOS window
prompts up w/ the log (see blow). From this point on, I try using my browser
and type: http://localhost:8080 (or http://localhost:8080/index.html). The
web server seems not running and the browser prompts me to connect to
internet.
 
I don't know how to capture the screen log, below is the extract: (It said
'File not found C:\Apache\Tomcat\webapps\ADMIN.WAR' but the file is in that
directory. So' I don't know why)
 
Context log: path=/ADMIN.WAR File not found
C:\Apache\Tomcat\webapps\ADMIN.WAR
\WEB-INF\web.xml, using only defaults
Context log path=/ADMIN.WAR :jsp: init
Context log path=/ADMIN.WAR :default: init
Context log path=/TEST.WAR :tomcat.errorPage: init
Context log: path=/TEST.WAR File not found
C:\Apache\Tomcat\webapps\TEST.WAR\W
EB-INF\web.xml, using only defaults
Context log path=/TEST.WAR :jsp: init
Context log path=/TEST.WAR :default: init
Context log path=/test :tomcat.errorPage: init
Context log path=/test :jsp: init
Context log path=/test :default: init
Context log path=/EXAMPLES.WAR :tomcat.errorPage: init
Context log: path=/EXAMPLES.WAR File not found
C:\Apache\Tomcat\webapps\EXAMPL
ES.WAR\WEB-INF\web.xml, using only defaults
Context log path=/EXAMPLES.WAR :jsp: init
Context log path=/EXAMPLES.WAR :default: init
Context log path= :tomcat.errorPage: init
Context log path= :jsp: init
Context log path= :default: init
Starting endpoint port=8080
handler=org.apache.tomcat.service.http.HttpConnec
tionHandler
Starting endpoint port=8007
handler=org.apache.tomcat.service.connector.Ajp12
ConnectionHandler

3) I don't see the tomcat/logs files updated. how to turn the log function
on?
 
I'm stuck at this point. Your help is much appreiated.
 
thanks,
jackling.



Re: Newbie problem starting web server.

2001-04-30 Thread Peter B. West

Darrell Porter wrote:
 
 In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
 Searching through the file, you will find a code snippet that looks like
 this:
 
 :startServer
 echo Starting Tomcat in new window
 if %2 == -security goto startSecure
 %_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME% org.apache.
 tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
 goto cleanup
 
 At the line that begins %_STARTJAVA% add 
 %TOMCAT_HOME%\LOGS\TOMSTART.LOG (without quotes) so that

... and without the newline; i.e.
%TOMCAT_HOME%\LOGS\TOMSTART.LOG
(note the right angle bracket `' at the beginning.  That's what does
the redirect of the output.)

How does this work with stderr on Windows?

Peter
-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
Lord, to whom shall we go?



Help: Newbie problem starting web server.

2001-04-29 Thread jackling



version: tomcat 3.1
platform: win98

I'm new in configuring tomcat and fail to start the 
web server. I've following questions:
1) can I run the tomcat web server on Win98 (9X)? or 
must be WinNT/2000?

2) after I type 'startup' from the /bin directory, 
another DOS window prompts up w/ the log (see blow). From this point on, I try 
using my browser and type: http://localhost:8080(or http://localhost:8080/index.html). 
The web server seems not running and the browser prompts me to connect to 
internet.

I don't know how to capture the screen log, below is 
the extract: (It said 'File not found C:\Apache\Tomcat\webapps\ADMIN.WAR' but 
the file is in that directory. So' I don't know why)

Context log: path="/ADMIN.WAR" File not found 
C:\Apache\Tomcat\webapps\ADMIN.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/ADMIN.WAR" :jsp: initContext log 
path="/ADMIN.WAR" :default: initContext log path="/TEST.WAR" 
:tomcat.errorPage: initContext log: path="/TEST.WAR" File not found 
C:\Apache\Tomcat\webapps\TEST.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/TEST.WAR" :jsp: initContext log 
path="/TEST.WAR" :default: initContext log path="/test" :tomcat.errorPage: 
initContext log path="/test" :jsp: initContext log path="/test" 
:default: initContext log path="/EXAMPLES.WAR" :tomcat.errorPage: 
initContext log: path="/EXAMPLES.WAR" File not found 
C:\Apache\Tomcat\webapps\EXAMPLES.WAR\WEB-INF\web.xml, using only 
defaultsContext log path="/EXAMPLES.WAR" :jsp: initContext log 
path="/EXAMPLES.WAR" :default: initContext log path="" :tomcat.errorPage: 
initContext log path="" :jsp: initContext log path="" :default: 
initStarting endpoint port="8080" 
handler="org.apache.tomcat.service.http.HttpConnectionHandler"Starting 
endpoint port="8007" 
handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"
3) I don't see the tomcat/logs files updated. how 
to turn the log function on?

I'm stuck at this point. Your help is much 
appreiated.

thanks,
jackling.


Help: Newbie problem starting web server.

2001-04-29 Thread jackling

version: tomcat 3.1
platform: win98

I'm new in configuring tomcat and fail to start the web server. I've 
following questions:
1) can I run the tomcat web server on Win98 (9X)? or must be 
WinNT/2000?

2) after I type 'startup' from the /bin directory, another DOS window 
prompts up w/ the log (see blow). From this point on, I try using my 
browser and type: http://localhost:8080 (or 
http://localhost:8080/index.html). The web server seems not running and 
the browser prompts me to connect to internet.

I don't know how to capture the screen log, below is the extract: (It 
said 'File not found C:\Apache\Tomcat\webapps\ADMIN.WAR' but the file is 
in that directory. So' I don't know why)

Context log: path=/ADMIN.WAR File not found 
C:\Apache\Tomcat\webapps\ADMIN.WAR
\WEB-INF\web.xml, using only defaults
Context log path=/ADMIN.WAR :jsp: init
Context log path=/ADMIN.WAR :default: init
Context log path=/TEST.WAR :tomcat.errorPage: init
Context log: path=/TEST.WAR File not found 
C:\Apache\Tomcat\webapps\TEST.WAR\W
EB-INF\web.xml, using only defaults
Context log path=/TEST.WAR :jsp: init
Context log path=/TEST.WAR :default: init
Context log path=/test :tomcat.errorPage: init
Context log path=/test :jsp: init
Context log path=/test :default: init
Context log path=/EXAMPLES.WAR :tomcat.errorPage: init
Context log: path=/EXAMPLES.WAR File not found 
C:\Apache\Tomcat\webapps\EXAMPL
ES.WAR\WEB-INF\web.xml, using only defaults
Context log path=/EXAMPLES.WAR :jsp: init
Context log path=/EXAMPLES.WAR :default: init
Context log path= :tomcat.errorPage: init
Context log path= :jsp: init
Context log path= :default: init
Starting endpoint port=8080 
handler=org.apache.tomcat.service.http.HttpConnec
tionHandler
Starting endpoint port=8007 
handler=org.apache.tomcat.service.connector.Ajp12
ConnectionHandler

3) I don't see the tomcat/logs files updated. how to turn the log 
function on?

I'm stuck at this point. Your help is much appreiated.

thanks,
jackling.





newbie problem

2001-04-12 Thread Duraisamy, Kandaprabhu (Kandaprabhu)** CTR **

Hi all,
I installed tomcat 3.2.1 yesterday and i am unable to run the jsp examples
given.Even in the servlet examples,given i am unable to run some of the
examples.I am getting an error in the run method of thread.It says null
pointer exception and SHA-1 not available.Any idea on where i am going
wrong?

Using CLASSPATH:
c:\tomcat\classes;c:\tomcat\lib\ant.jar;c:\tomcat\lib\jaxp.jar;c:\tomcat\lib
\servlet.jar;c:\tomcat\lib\parser.jar;c:\tomcat\lib\webserver.jar;c:\tomcat\
lib\jasper.jar;.;..;c:\jdk1.3\lib\tools.jar;C:\ASN1PJAV\WIN32\1.1\lib\OSS.JA
R  on Windows 2000 pro

Stack trace1:
java.lang.NullPointerException
at
jsp.error._0002fjsp_0002ferror_0002ferr_0002ejsperr_jsp_0._jspService(_0002f
jsp_0002ferror_0002ferr_0002ejsperr_jsp_0.java:132)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Stack trace 2:
Location: /examples/servlet/SessionExample
Internal Servlet Error:
java.lang.InternalError: internal error: SHA-1 not available.
at sun.security.provider.SecureRandom.init(SecureRandom.java:89)
at sun.security.provider.SecureRandom.(SecureRandom.java:68)
at java.security.SecureRandom.(SecureRandom.java:128)
at
org.apache.tomcat.util.SessionIdGenerator.getIdentifier(SessionIdGenerator.j
ava:135)
at
org.apache.tomcat.util.SessionIdGenerator.generateId(SessionIdGenerator.java
:177)
at
org.apache.tomcat.util.SessionUtil.generateSessionId(SessionUtil.java:180)
at
org.apache.tomcat.session.StandardManager.getNewSession(StandardManager.java
:379)
at
org.apache.tomcat.session.StandardSessionInterceptor.newSessionRequest(Stand
ardSessionInterceptor.java:177)
at
org.apache.tomcat.core.ContextManager.doNewSessionRequest(ContextManager.jav
a:913)
at
org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:478)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getSession(HttpServletRequ
estFacade.java:381)
at SessionExample.doGet(SessionExample.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Thanks

Prabhu










JDBC/MySQL newbie problem with execute Statement

2000-10-26 Thread Melissa Matthews

This is my first experience with JDBC.  I am using the mm.mysql-2.0.1
driver.  (OS is Windows 2000, Tomcat is a 3.2 beta version.) This should be
pretty simple, but it hangs when I call executeQuery.
I have put some prints in and I know I get past createStatement(), but no
further.  The query works fine when I just type it in a MySQL command line.

String query =   "SELECT ItemCode, ItemDesc, ListPrice,
onHand, SupplierName FROM px_products WHERE "
+ where;
   Statement stmt = con.createStatement();
 
   === ResultSet rs = stmt.executeQuery(query);

ResultSetMetaData rsmd = rs.getMetaData();
   int columnCount = rsmd.getColumnCount();


The last thing it prints in the tomcat window after the create statement is:
JspCompiler: extract class name and version.  

I have tried a few versions of the driver, but nothing seems to work.  Any
Suggestions?





RE: JDBC/MySQL newbie problem with execute Statement

2000-10-26 Thread Jarek Skreta

Melissa,

It may not be a solution to your problem but from experience I can say that
Win2000 is very temperamental as far ODBC/JDBC goes. I had troubles with a
very straightforward ODBC link which used to run on on NT and 95. With Java,
the same application sometimes work with JDBC/ODBC bridge and sometimes with
Thin JDBC driver. Move everything to NT and it's fine.

If you can try a different client.

Regds,

Jarek Skreta



 -Original Message-
 From: Melissa Matthews [mailto:[EMAIL PROTECTED]]
 Sent: 26 October 2000 14:47
 To: '[EMAIL PROTECTED]'
 Subject: JDBC/MySQL newbie problem with execute Statement


 This is my first experience with JDBC.  I am using the mm.mysql-2.0.1
 driver.  (OS is Windows 2000, Tomcat is a 3.2 beta version.) This
 should be
 pretty simple, but it hangs when I call executeQuery.
 I have put some prints in and I know I get past createStatement(), but no
 further.  The query works fine when I just type it in a MySQL
 command line.

 String query =   "SELECT ItemCode, ItemDesc, ListPrice,
 onHand, SupplierName FROM px_products WHERE "
 + where;
Statement stmt = con.createStatement();

=== ResultSet rs = stmt.executeQuery(query);

 ResultSetMetaData rsmd = rs.getMetaData();
int columnCount = rsmd.getColumnCount();


 The last thing it prints in the tomcat window after the create
 statement is:
 JspCompiler: extract class name and version.

 I have tried a few versions of the driver, but nothing seems to work.  Any
 Suggestions?