servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread dhay

Hi,

I'm using Struts with Tomcat, and am upgrading to Tomcat 5.

It appears that it won't recognize any of my servlets, though, which I
could previously call though ...[webapp]/servlet/servletname.

I managed to call them by adding a servlet-mapping to eliminate the
/servlet/ bit, but this is an existing app and I don't want to change
everything to that degree.

Can't I still use /servlet/ ?  What am I missing?

cheers,

David





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



RE: servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread Shapira, Yoav

Hi,
See http://jakarta.apache.org/tomcat/faq/misc.html#invoker.  You should
have always had servlet-mappings.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 1:52 PM
To: Tomcat Users List
Subject: servlet-mapping required??? Tomcat 5 upgrade problem...


Hi,

I'm using Struts with Tomcat, and am upgrading to Tomcat 5.

It appears that it won't recognize any of my servlets, though, which I
could previously call though ...[webapp]/servlet/servletname.

I managed to call them by adding a servlet-mapping to eliminate the
/servlet/ bit, but this is an existing app and I don't want to change
everything to that degree.

Can't I still use /servlet/ ?  What am I missing?

cheers,

David





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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread Dale, Matt

You need to enable the invoker servlet in your web.xml. This is not recommended for 
production but it should work just as you expect.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 03 August 2004 18:52
To: Tomcat Users List
Subject: servlet-mapping required??? Tomcat 5 upgrade problem...



Hi,

I'm using Struts with Tomcat, and am upgrading to Tomcat 5.

It appears that it won't recognize any of my servlets, though, which I
could previously call though ...[webapp]/servlet/servletname.

I managed to call them by adding a servlet-mapping to eliminate the
/servlet/ bit, but this is an existing app and I don't want to change
everything to that degree.

Can't I still use /servlet/ ?  What am I missing?

cheers,

David





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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread dhay
Sorry for the traffic - I solved it myself.

Obviously, you have to uncomment both the invoker servlet, AND the invoker
mapping.

cheers,

David

- Forwarded by David Hay/Lex/Lexmark on 08/03/2004 01:56 PM -
|-+
| |   David Hay|
| ||
| |   08/03/2004 01:51 |
| |   PM   |
| ||
|-+
  
|
  |
|
  |   To:  Tomcat Users List [EMAIL PROTECTED] 
   |
  |   cc:  
|
  |   Subject: servlet-mapping required???  Tomcat 5 upgrade problem...(Document 
link: David Hay)  |
  
|



Hi,

I'm using Struts with Tomcat, and am upgrading to Tomcat 5.

It appears that it won't recognize any of my servlets, though, which I
could previously call though ...[webapp]/servlet/servletname.

I managed to call them by adding a servlet-mapping to eliminate the
/servlet/ bit, but this is an existing app and I don't want to change
everything to that degree.

Can't I still use /servlet/ ?  What am I missing?

cheers,

David






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



RE: servlet-Mapping using Tomcat 4

2003-08-14 Thread Shapira, Yoav

Howdy,

2. Name of JSP = whoKnows.war

I'll assume you meant name of war file.

1. The main problem ist, that 'normal call' (/whoKnows/) works fine.
That
means that I get my index.jsp, and all works the way I wanted to.
BUT, if I use /whoKnows/foo/bar my java-class of my jsp-Servlet
(defined in
whoKnows web.xml)
is directly called (skipping my index.jsp). But I still want that my
index.jsp is called first.
May JSP-Page knows what to do with the java-class. Any Idea how I can
configure this?

You need a filter also mapped to /foo/bar which inspects the request or
session to see if an attribute is present.  That attribute is one that's
placed there by index.jsp.  If the attribute is not present, the filter
will redirect the request to index.jsp.  If the attribute is present,
the filter will let the request proceed.

2. The default context ist the Name of the JSP in the webapps-dir.
In this case it is '/whoKnows'. Is there any trick, that I cann change
this?

Yes, read the Context configuration reference in the tomcat docs.

I know that it is possible to configure an context for every
application in
tomcats own xml-configuration files. But who is this done, and is there
any
better possibility (doing this in whoKnows web.xml for example)?

You can include a context.xml with your war file.  Or configure the
context in $CATALINA_HOM/conf/server.xml.  Again, read the Context
configuration reference.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



servlet-Mapping using Tomcat 4

2003-08-04 Thread Fred Feuerstein
Hi,

I am a newby to JSP's, but I already love it.

The Situation:
--
1. ServletServer = Tomcat 4 (Standalone)
2. Name of JSP = whoKnows.war
3. Using to deploy = Tomcats-Manager-Interface (FileUpload)
4. Servlet-Mapping (in whoKnows's web.xml) to = /foo/bar
5. Host of VirtuellServer = localhost (default)
6. Port of Host = 8080 (default)
7. OperatingSystem = Linux
8. DeployDir = $TOMCAT_HOME$/webapps

My application (whoKnows.war):
-
1. My index.jsp takes some information from the user
2. Using form action= method=POST.../form to pipe this forward
3. Using http://localhost:8080/whoKnows/index.jsp works just fine!

The problem/question:
-
1. The main problem ist, that 'normal call' (/whoKnows/) works fine. That
means that I get my index.jsp, and all works the way I wanted to.
BUT, if I use /whoKnows/foo/bar my java-class of my jsp-Servlet (defined in
whoKnows web.xml) 
is directly called (skipping my index.jsp). But I still want that my
index.jsp is called first.
May JSP-Page knows what to do with the java-class. Any Idea how I can
configure this?

2. The default context ist the Name of the JSP in the webapps-dir.
In this case it is '/whoKnows'. Is there any trick, that I cann change this?

I know that it is possible to configure an context for every application in
tomcats own xml-configuration files. But who is this done, and is there any
better possibility (doing this in whoKnows web.xml for example)?

Best regards,
Fred 

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


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



servlet-mapping problem - tomcat 4.0.1

2001-12-21 Thread Scott Eade

How do I default a user to my servlet without blocking access
to other directories?  Using a default mapping of / results in
failure to gain access to resources under my servlet directory.

I think I have a fairly standard set-up of tomcat 4.0.1 on win2k.

Within C:\jakarta-tomcat-4.0.1\webapps I have a directory
structure like this:

myapp
styles
global.css
WEB_INF
web.xml
lib
[jar files]

web.xml defines a servlet whose output includes a reference to 
http://mysite.com/myapp/styles/global.css

If I set my servlet mapping up like this:
servlet-mapping
servlet-namemyapp/servlet-name
url-pattern//url-pattern
/servlet-mapping
then the stylesheet cannot be loaded when the user surfs to
http://mysite.com/myapp/

Alternatively if I set up my mapping like this:
servlet-mapping
servlet-namemyapp/servlet-name
url-pattern/foo/*/url-pattern
/servlet-mapping
then the stylesheet can be located, but the user must surf to
http://mysite.com/myapp/foo/

How can I configure tomcat or structure my directories so that 
a user can surf to http://mysite.com/myapp/ and also successfully
access the stylesheet?

Note that the above is a contrived example.  The real servlet
includes many other resources in the myapp directory to which
the servlet refers.

Any advice would be most welcome.

Thanks,

Scott



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




Re: servlet-mapping problem - tomcat 4.0.1

2001-12-21 Thread ian silvester

Its a little clunky, but you could use your second 'foo' mapping, and then
have an index.htm that does a meta-refresh to redirect them to your servlet:

meta http-equiv=Refresh content=0; url=foo/


Not nice and invisible I know, but it'll work..

ian



- Original Message -
From: Scott Eade [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 21, 2001 12:53 PM
Subject: servlet-mapping problem - tomcat 4.0.1


 How do I default a user to my servlet without blocking access
 to other directories?  Using a default mapping of / results in
 failure to gain access to resources under my servlet directory.

 I think I have a fairly standard set-up of tomcat 4.0.1 on win2k.

 Within C:\jakarta-tomcat-4.0.1\webapps I have a directory
 structure like this:

 myapp
 styles
 global.css
 WEB_INF
 web.xml
 lib
 [jar files]

 web.xml defines a servlet whose output includes a reference to
 http://mysite.com/myapp/styles/global.css

 If I set my servlet mapping up like this:
 servlet-mapping
 servlet-namemyapp/servlet-name
 url-pattern//url-pattern
 /servlet-mapping
 then the stylesheet cannot be loaded when the user surfs to
 http://mysite.com/myapp/

 Alternatively if I set up my mapping like this:
 servlet-mapping
 servlet-namemyapp/servlet-name
 url-pattern/foo/*/url-pattern
 /servlet-mapping
 then the stylesheet can be located, but the user must surf to
 http://mysite.com/myapp/foo/

 How can I configure tomcat or structure my directories so that
 a user can surf to http://mysite.com/myapp/ and also successfully
 access the stylesheet?

 Note that the above is a contrived example.  The real servlet
 includes many other resources in the myapp directory to which
 the servlet refers.

 Any advice would be most welcome.

 Thanks,

 Scott



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





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




RE: servlet-mapping problem - tomcat 4.0.1

2001-12-21 Thread SHeyns

set the welcome file list element to the URL address you want to default to
Something like -

welcome-file-list
welcome-filepages/main.jsp/welcome-file
/welcome-file-list

This will default a user going to your context to the file pages/main.jsp -
Tomcat (4.1) has a few default context attributes which are located in the
CATALINA_HOME/conf/web.xml which a context will default to if the welcome
file list element is not specified - they are as follows

  welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
  /welcome-file-list

HTH

S.

-Original Message-
From: Scott Eade [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 21, 2001 6:54 AM
To: [EMAIL PROTECTED]
Subject: servlet-mapping problem - tomcat 4.0.1


How do I default a user to my servlet without blocking access
to other directories?  Using a default mapping of / results in
failure to gain access to resources under my servlet directory.

I think I have a fairly standard set-up of tomcat 4.0.1 on win2k.

Within C:\jakarta-tomcat-4.0.1\webapps I have a directory
structure like this:

myapp
styles
global.css
WEB_INF
web.xml
lib
[jar files]

web.xml defines a servlet whose output includes a reference to 
http://mysite.com/myapp/styles/global.css

If I set my servlet mapping up like this:
servlet-mapping
servlet-namemyapp/servlet-name
url-pattern//url-pattern
/servlet-mapping
then the stylesheet cannot be loaded when the user surfs to
http://mysite.com/myapp/

Alternatively if I set up my mapping like this:
servlet-mapping
servlet-namemyapp/servlet-name
url-pattern/foo/*/url-pattern
/servlet-mapping
then the stylesheet can be located, but the user must surf to
http://mysite.com/myapp/foo/

How can I configure tomcat or structure my directories so that 
a user can surf to http://mysite.com/myapp/ and also successfully
access the stylesheet?

Note that the above is a contrived example.  The real servlet
includes many other resources in the myapp directory to which
the servlet refers.

Any advice would be most welcome.

Thanks,

Scott



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

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




RE: servlet-mapping problem - tomcat 4.0.1

2001-12-21 Thread Cox, Charlie

servlet-mapping
servlet-nameMyServlet/servlet-name
url-patternindex.html/url-pattern
/servlet-mapping

I think you have to have an empty index.html file to convince the
welcome-list that its valid.

This will take all index.html files, so if you have other index.html files
in other directories, add a dummy.html to the welcome-file list and map it
to your servlet.

I recall doing this in 3.2, so I'm not sure if it still works in 4.0 -
although I don't see why it wouldn't.

Charlie

 -Original Message-

 From: Scott Eade [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 21, 2001 7:54 AM
 To: [EMAIL PROTECTED]
 Subject: servlet-mapping problem - tomcat 4.0.1
 
 
 How do I default a user to my servlet without blocking access
 to other directories?  Using a default mapping of / results in
 failure to gain access to resources under my servlet directory.
 
 I think I have a fairly standard set-up of tomcat 4.0.1 on win2k.
 
 Within C:\jakarta-tomcat-4.0.1\webapps I have a directory
 structure like this:
 
 myapp
 styles
 global.css
 WEB_INF
 web.xml
 lib
 [jar files]
 
 web.xml defines a servlet whose output includes a reference to 
 http://mysite.com/myapp/styles/global.css
 
 If I set my servlet mapping up like this:
 servlet-mapping
 servlet-namemyapp/servlet-name
 url-pattern//url-pattern
 /servlet-mapping
 then the stylesheet cannot be loaded when the user surfs to
 http://mysite.com/myapp/
 
 Alternatively if I set up my mapping like this:
 servlet-mapping
 servlet-namemyapp/servlet-name
 url-pattern/foo/*/url-pattern
 /servlet-mapping
 then the stylesheet can be located, but the user must surf to
 http://mysite.com/myapp/foo/
 
 How can I configure tomcat or structure my directories so that 
 a user can surf to http://mysite.com/myapp/ and also successfully
 access the stylesheet?
 
 Note that the above is a contrived example.  The real servlet
 includes many other resources in the myapp directory to which
 the servlet refers.
 
 Any advice would be most welcome.
 
 Thanks,
 
 Scott
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

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




Re: servlet-mapping problem - tomcat 4.0.1

2001-12-21 Thread Scott Eade

From: Craig R. McClanahan [EMAIL PROTECTED]
 On Fri, 21 Dec 2001, Scott Eade wrote:
  Subject: servlet-mapping problem - tomcat 4.0.1
 
  How do I default a user to my servlet without blocking access
  to other directories?  Using a default mapping of / results in
  failure to gain access to resources under my servlet directory.

 Understanding this requires a little explanation about what is really
 going on.

 * The servlet mapping pattern of / establishes the
   default servlet -- in other words, the servlet that
   Tomcat will hand the request to if it can find no other
   servlet mapping that matches.

 * Tomcat, out of the box, defines a default servlet that
   serves the static resources (including your stylesheet).

 * You can take over the default mapping yourself, but then
   you give up Tomcat's standard file-serving service and
   do it yourself if you still need that feature.

 To give you suggestions, it would be helpful to understand what you mean
 by default a user to my servlet.  What application functionality are you
 trying to accomplish?

Thanks Craig.

What I would like to do is be able to serve up some static content
from the root of my web server, say http://mysite.com/ and from there
provide a link to an Apache Turbine application located at
webapps/myapp.  I am simply hoping to provide a relatively
clean url for the application - http://mysite.com/myapp rather than
http://mysite.com/myapp/foo.

I actually have this working at one host provider that uses Zeus
and Resin.  The root directory they provide contains the necessary
resources (styles, templates, etc.) along with the WEB-INF
directory that contains a web.xml with a url-mapping of /myapp/*
and everything works fine.

I am switching to a new hosting organization that uses Apache and
Tomcat and I am only now running into this problem.  I thought
the problem was that the new host provider is running tomcat 3.1
(upgrading to 4.01 next week) but then I realised that all of my
development was being done under tomcat with servlet mappings
that included at least some additional component such as
/myapp/foo/*.

Ultimately I guess I am worried about the aesthetics of the url,
however it would be great if I could somehow mimic the behaviour
of the old site.  What about users that have bookmarked the old
address without the foo - I'll have to provide a redirect for them
on top of a redirect that turbine does as a matter of course.  This
will cause some messy behaviour at the beginning of my application.

Incidentally the new hosting organization provides me with my own
virtual tomcat server.  By default they configured a root context
(path=) pointing to a directory called public_html and I had
them provide another (path=/myapp
docBase=/home/myaccount/tomcat/webapps/myapp) where I
am installing my turbine application.  I do have the ability to change
server.xml and restart tomcat if this will help.  I host provider does
need to alter something (mod_jserv or apache I guess) if I add any
new contexts.  It is unclear how this will change when they upgrade
to tomcat 4.01.

I hope this gives you a clearer idea of what I am trying to achieve.

Thanks in advance for any advice.

Scott





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




How can I make the servlet mapping of Tomcat work with Apache http server?

2001-07-19 Thread Youzhi Fan

I read Craig R. McClanahan's article Developing
Applications With Tomcat coming with Tomcat. The
article gives a sample application also coming with
Tomcat. The sample application uses a servlet mapping.
The servlet mapping works fine with Tomcat. But it
does not work when I use Apache http server with
Tomcat together. Anybody can try it which is used at
the link of a html file to a servlet. Author seggests
me to get help at here. web.xml, httpd.conf, and
tomcat-apache.conf are attached. Can anyone give me a
hand? Your assistance is appreciated.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

!DOCTYPE web-app 
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN 
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app

display-nameHello, World Application/display-name
description
	This is a simple web application with a source code organization
	based on the recommendations of the Application Developer's Guide.
/description

servlet
servlet-nameHelloServlet/servlet-name
servlet-classHello/servlet-class
/servlet

servlet-mapping
servlet-nameHelloServlet/servlet-name
url-pattern/hello/url-pattern
/servlet-mapping
	
/web-app

 tomcat-apache.conf
 httpd.conf


Servlet Mapping in tomcat

2001-04-12 Thread Lakshmeenarayana G G



Hi..

I have mapped requests to any resource in my images 
directory under my application context, to the home page of my application. But 
the problem is that the internal references to the Images directory are also 
being routed to the home page. I dont want my internal references to be 
considered while mapping. I want the mapping to work only when the resources 
under image directoryare referenced externally through an URL from the 
location bar of a browser.

Regards.

L G GoundalkarIntertec CommunicationsINDIA