servlet-mapping

2002-01-31 Thread Dan Ascheman





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





Re: Servlet Mapping Recursion Problem

2001-05-11 Thread Bill Winspur

Thanks Joni,

very elegant. I've started down that route (ie. having externally visible
urls that are different to the internally visible urls), but hadn't thought
of driving the whole thing off a configuration file.  Neat. The application
provider could package it with the app, leaving the front servlet truly
generic. Also, the *.html servlet-mapping hides *.gif resource mapping, etc.
from the servlet.. And reason number four to like this approach is: "it
should work on any webserver".

After my previous post I discovered that recursion doesn't just happen if
the '/' is mapped to your front servlet (it seems obvious now).  If you map
'myUrl' to your front servlet, and then forward to 'myUrl', you also get
recursion and a crash.

Its been a good day,

Bill.


- Original Message -
From: "Joni Suominen" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, May 11, 2001 11:48 AM
Subject: Re: Servlet Mapping Recursion Problem


> Hi Bill!
> I am using a front servlet pattern with Orion. I use Struts but I
> suppose this approach should work in any framework.
>
> 1. The front servlet mapping in web.xml:
>   
> action
> *.html
>   
>
> So all the requests ending to .html are processed by the front-end
> servlet.
>
> 2. All the valid URL's are mapped in an xml config file. The front
> servlet initializes its state by reading this file in a startup. An
> entry in this file looks like:
> type="org.shiftctrl.general.interaction.EmptyAction">
> 
>   
>
> This means that the request http://myserver.com/faq.html is first
> processed by front servlet. The servlet searches its configured mapping
> and forwards the request. In this case it would forward the request to
> faq.jsp.
>
> I haven't had problems with this setup and I really like it for
> following reasons:
> 1. It is easy pipeline actions. Just configure the mapping so that its
> forward part points to another mapping.
> 2. You can hide the technology being used. Clients only see URLs which
> are always ending .html (so .jsps are not exposed outside, their
> function is only to provide the view part in MVC pattern)
> 3. It is possible to dynamically change the URL mapping by calling
> appropriate methods in front servlet.
>
> --
> Joni
> [EMAIL PROTECTED]
>
> > Bill Winspur wrote:
> >
> > In my web.xml I set up the servlet mapping, for a (front) servlet to
> > handle all requests for the web app, to '/'. This works to the extent
> > that all requests are passed to the servlet. BUT... if I do a forward
> > to another resource from the servlet, the servlet's doGet() method is
> > invoked recursively with no response generated until the jvm runs out
> > of memory. The same thing happens with a url-pattern of '/*'. If the
> > servlet itself generates html output, that works.  If I map my servlet
> > to a specific resource, like /index.html, forwarding works fine, but
> > the servlet cant handle all requests and 'http://myhost/myapp' returns
> > 'no directory browsing'.
> >
> > The url-pattern '/' seems like a valid directory specification (as per
> > the servlet 2.2 spec, 'Servlet Mapping Techniques') and a front
> > component, handling all requests is fundamental in the j2EE blueprints
> > (http://java.sun.com/j2ee/blueprints/index.html, section 10.6), so my
> > approach seems architecturally reasonable.
> >
> > I've looked thru the archives and found two reports of the same
> > problem. A proposed workaround from Magnus seems to recommend
> > explicitly mapping every request your app generates (which would make
> > the web.xml coding difficult to maintain in a large app) pendng the
> > delivery of 'filters', perhaps in Servlet 2.3. I dont really
> > understand what Magnus is suggesting:
> >
> > PS: If you're bound to 2.2 or lower then you will not be able to use
> > Filters, in that case you'd have to apply a more complex solution with
> > duplicate resource roots and so on.
> >
> > It looks like 'no front servlets on Orion' to me, but I hope I'm
> > wrong.
> >
> > I was not able to find any references to the problem on bugzilla, but
> > I'm not very adept with its query interface.
> >
> > My hunch is that Orion's request dispatcher is invoked in two contexts
> > (from a client, and from a forward) and does not distinguish between
> > them when it comes to selecting a resource to respond to the client.
> > If the dispatcher ignored ma

Re: Servlet Mapping Recursion Problem

2001-05-11 Thread Joni Suominen

Hi Bill!
I am using a front servlet pattern with Orion. I use Struts but I
suppose this approach should work in any framework.

1. The front servlet mapping in web.xml:
  
action
*.html
  

So all the requests ending to .html are processed by the front-end
servlet.

2. All the valid URL's are mapped in an xml config file. The front
servlet initializes its state by reading this file in a startup. An
entry in this file looks like:
  

  

This means that the request http://myserver.com/faq.html is first
processed by front servlet. The servlet searches its configured mapping
and forwards the request. In this case it would forward the request to
faq.jsp.

I haven't had problems with this setup and I really like it for
following reasons:
1. It is easy pipeline actions. Just configure the mapping so that its
forward part points to another mapping.
2. You can hide the technology being used. Clients only see URLs which
are always ending .html (so .jsps are not exposed outside, their
function is only to provide the view part in MVC pattern)
3. It is possible to dynamically change the URL mapping by calling
appropriate methods in front servlet.

--
Joni
[EMAIL PROTECTED]

> Bill Winspur wrote:
> 
> In my web.xml I set up the servlet mapping, for a (front) servlet to
> handle all requests for the web app, to '/'. This works to the extent
> that all requests are passed to the servlet. BUT... if I do a forward
> to another resource from the servlet, the servlet's doGet() method is
> invoked recursively with no response generated until the jvm runs out
> of memory. The same thing happens with a url-pattern of '/*'. If the
> servlet itself generates html output, that works.  If I map my servlet
> to a specific resource, like /index.html, forwarding works fine, but
> the servlet cant handle all requests and 'http://myhost/myapp' returns
> 'no directory browsing'.
> 
> The url-pattern '/' seems like a valid directory specification (as per
> the servlet 2.2 spec, 'Servlet Mapping Techniques') and a front
> component, handling all requests is fundamental in the j2EE blueprints
> (http://java.sun.com/j2ee/blueprints/index.html, section 10.6), so my
> approach seems architecturally reasonable.
> 
> I've looked thru the archives and found two reports of the same
> problem. A proposed workaround from Magnus seems to recommend
> explicitly mapping every request your app generates (which would make
> the web.xml coding difficult to maintain in a large app) pendng the
> delivery of 'filters', perhaps in Servlet 2.3. I dont really
> understand what Magnus is suggesting:
> 
> PS: If you're bound to 2.2 or lower then you will not be able to use
> Filters, in that case you'd have to apply a more complex solution with
> duplicate resource roots and so on.
> 
> It looks like 'no front servlets on Orion' to me, but I hope I'm
> wrong.
> 
> I was not able to find any references to the problem on bugzilla, but
> I'm not very adept with its query interface.
> 
> My hunch is that Orion's request dispatcher is invoked in two contexts
> (from a client, and from a forward) and does not distinguish between
> them when it comes to selecting a resource to respond to the client.
> If the dispatcher ignored mapping in the forward context and just
> accepted the specified resource, the recursion problem would vanish
> and the front servlet would trap ALL client requests as per the
> blueprint architecture. Just a hunch, things are probably not that
> simple.
> 
> Does anyone know if this is a problem with other webservers ? My
> experience with Apache was all static pages.
> 
> My environment is NT4(sp6), Orion 1.4.8, IE 5.00, JDK 1.2.2.
> 
> Also, if somebody is actually using the front servlet pattern and
> univeral mapping on Orion, and could let me know how to set it up
> and/or get around the recursion I'd be a happy camper.
> 
> TIA,
> 
> Bill.




RE: Servlet Mapping Recursion Problem

2001-05-11 Thread elephantwalker



Bill,
 
yeh...we need the apache url re-writting stuff in a 
servlet. That's an issue with orion. I think the opensymphony people are writing 
something.
 
There 
is a simple workaround. Have a forward.jsp as your welcome page for the default 
app. In the forward.jsp, use this code:
 
<% String servletPath = 
request.getRequestURI().substring(0, 
request.getRequestURI().indexOf(request.getServletPath()));    
response.sendRedirect(servletPath+"/somepath/to/index or home or whatever.html") 
;
 
%>
 
the 
somepath can be /main/home.html, for example.
 
in 
your web.xml, map your "controller-rewriter servlet"  to the 
/main/*
 
so 
instead of your pages asking for resouces at /myfavoritegif.gif, they would 
just be /main/myfavoritegif.gif. 
 
This 
is ugly, and quick and dirty, but it works. You can even read in an xml file 
when you rewriter servlet starts up so that all of your path mapping, rewritting 
works like apache.
 
Regards,
 
The 
elephantwalker
 
 
 
 

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Bill 
  WinspurSent: Thursday, May 10, 2001 8:51 AMTo: 
  Orion-InterestSubject: Servlet Mapping Recursion 
  Problem
  
  In my web.xml I set up the servlet mapping, for a (front) servlet to handle 
  all requests for the web app, to '/'. This works to the extent that all 
  requests are passed to the servlet. BUT... if I do a forward to another 
  resource from the servlet, the servlet's doGet() method is invoked recursively 
  with no response generated until the jvm runs out of memory. The same thing 
  happens with a url-pattern of '/*'. If 
  the servlet itself generates html output, that works.  If I map my servlet to a specific resource, like 
  /index.html, forwarding works fine, but the servlet cant handle all requests and 'http://myhost/myapp' returns 
  'no directory browsing'.  
  The url-pattern '/' seems like a valid 
  directory specification (as per the servlet 2.2 spec, 'Servlet Mapping 
  Techniques') and a front component, handling all requests is fundamental in 
  the j2EE blueprints (http://java.sun.com/j2ee/blueprints/index.html, section 
  10.6), so my approach seems architecturally reasonable.
  
  I've looked thru the archives and found two reports of the same problem. A 
  proposed workaround from Magnus seems to recommend explicitly mapping every 
  request your app generates (which would make the web.xml coding difficult to 
  maintain in a large app) pendng the delivery of 'filters', perhaps in Servlet 
  2.3. I dont really understand what Magnus is suggesting:
  PS: If you're bound to 2.2 or lower then you will not be able to use 
  Filters, in that case you'd have to apply a more complex solution with 
  duplicate resource roots and so on.
  It looks like 'no front servlets on Orion' to me, but I hope I'm wrong.
  I was not able to find any references to the problem on bugzilla, but I'm 
  not very adept with its query interface.
  My hunch is that Orion's request dispatcher is invoked in two contexts 
  (from a client, and from a forward) and does not distinguish between them 
  when it comes to selecting a resource to respond to the client. 
  If the dispatcher ignored mapping in the forward context and just 
  accepted the specified resource, the recursion problem would vanish and the 
  front servlet would trap ALL client requests as per the blueprint 
  architecture. Just a hunch, things are probably not that simple.
  Does anyone know if this is a problem with other webservers ? My experience 
  with Apache was all static pages.
  My environment is NT4(sp6), Orion 1.4.8, IE 5.00, JDK 1.2.2.
  Also, if somebody is actually using the front servlet pattern and univeral 
  mapping on Orion, and could let me know how to set it up and/or get around the 
  recursion I'd be a happy camper. 
  TIA,
  Bill.


Servlet Mapping Recursion Problem

2001-05-11 Thread Bill Winspur




In my web.xml I set up the servlet mapping, for a (front) servlet to handle 
all requests for the web app, to '/'. This works to the extent that all requests 
are passed to the servlet. BUT... if I do a forward to another resource from the 
servlet, the servlet's doGet() method is invoked recursively with no response 
generated until the jvm runs out of memory. The same thing happens with a 
url-pattern of '/*'. If the servlet 
itself generates html output, that works.  If I map my servlet to a specific resource, like /index.html, forwarding 
works fine, but the servlet cant handle 
all requests and 'http://myhost/myapp' returns 'no directory browsing'.  

The url-pattern '/' seems like a valid 
directory specification (as per the servlet 2.2 spec, 'Servlet Mapping 
Techniques') and a front component, handling all requests is fundamental in the 
j2EE blueprints (http://java.sun.com/j2ee/blueprints/index.html, section 10.6), 
so my approach seems architecturally reasonable.

I've looked thru the archives and found two reports of the same problem. A 
proposed workaround from Magnus seems to recommend explicitly mapping every 
request your app generates (which would make the web.xml coding difficult to 
maintain in a large app) pendng the delivery of 'filters', perhaps in Servlet 
2.3. I dont really understand what Magnus is suggesting:
PS: If you're bound to 2.2 or lower then you will not be able to use 
Filters, in that case you'd have to apply a more complex solution with duplicate 
resource roots and so on.
It looks like 'no front servlets on Orion' to me, but I hope I'm wrong.
I was not able to find any references to the problem on bugzilla, but I'm not 
very adept with its query interface.
My hunch is that Orion's request dispatcher is invoked in two contexts (from 
a client, and from a forward) and does not distinguish between them when it 
comes to selecting a resource to respond to the client. If the 
dispatcher ignored mapping in the forward context and just accepted the 
specified resource, the recursion problem would vanish and the front servlet 
would trap ALL client requests as per the blueprint architecture. Just a hunch, 
things are probably not that simple.
Does anyone know if this is a problem with other webservers ? My experience 
with Apache was all static pages.
My environment is NT4(sp6), Orion 1.4.8, IE 5.00, JDK 1.2.2.
Also, if somebody is actually using the front servlet pattern and univeral 
mapping on Orion, and could let me know how to set it up and/or get around the 
recursion I'd be a happy camper. 
TIA,
Bill.


servlet mapping

2001-05-08 Thread Steffen Stundzig

Hi,

I've deployed the Apache Cocoon Servlet as Web App into orion. Works great.
:-)
This Servlet can handle different mime-types such as xml, xsl, html and so on.


Now I've the problem, that If the servlet returns XML to the browser a chained
servlet from within the 'config/global-web-application.xml'
   
will process it. How can I disable this?

My first approach was to remove all the servlet entries from this xml file,
but I think it would be better, to disable the servlet mappings only for my
'web application' context root, such as 'myorionserver/cocoon'. So other web
applications can used the global definitions.


Any ideas on how to setup this? I've overlooked something?

Regards
Steffen...

-- 
__
Steffen Stundzigmailto:[EMAIL PROTECTED]
SMB GmbHhttp://www.smb-tec.com







RE: How to do this servlet-mapping?

2001-03-21 Thread Duffey, Kevin

How about using extension mapping for your actions/servlets, and anything
else would not be an action? I use this in my MVC framework. Simply map an
extension to a servlet that handles all incoming requests. This can be done
in the web.xml file of your web application.

> -Original Message-
> From: Magnus Stenman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 1:33 AM
> To: Orion-Interest
> Subject: Re: How to do this servlet-mapping?
> 
> 
> What you describe is what we call the "filter pattern" (and 
> we're pushing this for the Servlet 2.3 "usage" docs). For 
> this you need a Filter, not a Servlet, since servlets are not 
> "see through". More in detail about the filter pattern at a 
> later date, there will hopefully be a short walk through of 
> it's flow and common design patterns at that point (this is 
> one of our favourite flow patterns if we have such a thing).
> 
> /Magnus Stenman, the Orion team
> 
> PS. If you're bound to 2.2 or lower then you will not be able 
> to use Filters, in that case you'd have to apply a more 
> complex solution with duplicate resource roots and so on. 
> Also note that the Filter spec may change before the 
> finalization of the spec, mainly in the method naming etc 
> category though.
> 
> 
> - Original Message - 
> From: "Gerald" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 10:39 PM
> Subject: How to do this servlet-mapping?
> 
> 
> > 
> > Here's a challenge. It was for me.
> > 
> > For all URLs that start with /app (e.g. /app/login, /app/mainmenu,
> > /app/ball.gif), have all requests go to a servlet for 
> processing. If the
> > servlet recognizes the URL, perform an action and return 
> the appropriate
> > output. If the URL is not recognized, treat the URL as a 
> filename and return
> > the named resource.
> > 
> > Hence, if the URL  /app/login was recognized and requested, 
> the servlet
> > takes an action on them. If the URL /app/ball.gif was 
> requested, the servlet
> > doesn't recognize it as an action to be performed, and 
> tries to return the
> > contents of /app/ball.gif to the user.
> > 
> > I've tried using the servlet-mapping of /app/* and pointing 
> this to the
> > servlet. While this makes requests go to the servlet, if, 
> within that
> > servlet, I try to get a request dispatcher to /app/ball.gif 
> and forward
> > there, I get back into the servlet again , presumably 
> because /app/ball.gif
> > maps to the servlet. This, of course, creates an recursive 
> infinite loop and
> > soon the server dies.
> > 
> > One alternative that might work, but seems somehow "wrong" 
> to me is to name
> > every action in the web.xml file, e.g. individually map /app/login,
> > /app/logout, /app/dothis, /app/dothat, etc. and then have 
> /app/* for all
> > other resources. I'd like to avoid this particular solution.
> > 
> > Any bright ideas?
> > 
> 




Re: How to do this servlet-mapping?

2001-03-21 Thread Magnus Stenman

What you describe is what we call the "filter pattern" (and we're pushing this for the 
Servlet 2.3 "usage" docs). For this you need a Filter, not a Servlet, since servlets 
are not "see through". More in detail about the filter pattern at a later date, there 
will hopefully be a short walk through of it's flow and common design patterns at that 
point (this is one of our favourite flow patterns if we have such a thing).

/Magnus Stenman, the Orion team

PS. If you're bound to 2.2 or lower then you will not be able to use Filters, in that 
case you'd have to apply a more complex solution with duplicate resource roots and so 
on. Also note that the Filter spec may change before the finalization of the spec, 
mainly in the method naming etc category though.


- Original Message - 
From: "Gerald" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 10:39 PM
Subject: How to do this servlet-mapping?


> 
> Here's a challenge. It was for me.
> 
> For all URLs that start with /app (e.g. /app/login, /app/mainmenu,
> /app/ball.gif), have all requests go to a servlet for processing. If the
> servlet recognizes the URL, perform an action and return the appropriate
> output. If the URL is not recognized, treat the URL as a filename and return
> the named resource.
> 
> Hence, if the URL  /app/login was recognized and requested, the servlet
> takes an action on them. If the URL /app/ball.gif was requested, the servlet
> doesn't recognize it as an action to be performed, and tries to return the
> contents of /app/ball.gif to the user.
> 
> I've tried using the servlet-mapping of /app/* and pointing this to the
> servlet. While this makes requests go to the servlet, if, within that
> servlet, I try to get a request dispatcher to /app/ball.gif and forward
> there, I get back into the servlet again , presumably because /app/ball.gif
> maps to the servlet. This, of course, creates an recursive infinite loop and
> soon the server dies.
> 
> One alternative that might work, but seems somehow "wrong" to me is to name
> every action in the web.xml file, e.g. individually map /app/login,
> /app/logout, /app/dothis, /app/dothat, etc. and then have /app/* for all
> other resources. I'd like to avoid this particular solution.
> 
> Any bright ideas?
> 





Re: How to do this servlet-mapping?

2001-03-21 Thread Fejes Balazs

Probably you should use /images/app/ball.gif


Balazs


> 
> > I've tried using the servlet-mapping of /app/* and 
pointing this to the
> > servlet. While this makes requests go to the servlet, 
if, within that
> > servlet, I try to get a request dispatcher 
to /app/ball.gif and forward
> > there, I get back into the servlet again , presumably 
because /app/ball.gif
> > maps to the servlet. This, of course, creates an 
recursive infinite loop and
> > soon the server dies.
> > 
> > One alternative that might work, but seems 
somehow "wrong" to me is to name
> > every action in the web.xml file, e.g. individually 
map /app/login,
> > /app/logout, /app/dothis, /app/dothat, etc. and then 
have /app/* for all
> > other resources. I'd like to avoid this particular 
solution.
> > 
> > Any bright ideas?
> 
> 
> 






Re: How to do this servlet-mapping?

2001-03-20 Thread Tim Endres

Why not have your servlet "forward" any request that it does not recognize
to another namespace. In other words, using your example, you would forward
"/app/ball.gif" to "/images/ball.gif", thus eliminating the "/app" mapping.

tim.

> I've tried using the servlet-mapping of /app/* and pointing this to the
> servlet. While this makes requests go to the servlet, if, within that
> servlet, I try to get a request dispatcher to /app/ball.gif and forward
> there, I get back into the servlet again , presumably because /app/ball.gif
> maps to the servlet. This, of course, creates an recursive infinite loop and
> soon the server dies.
> 
> One alternative that might work, but seems somehow "wrong" to me is to name
> every action in the web.xml file, e.g. individually map /app/login,
> /app/logout, /app/dothis, /app/dothat, etc. and then have /app/* for all
> other resources. I'd like to avoid this particular solution.
> 
> Any bright ideas?





How to do this servlet-mapping?

2001-03-20 Thread Gerald


Here's a challenge. It was for me.

For all URLs that start with /app (e.g. /app/login, /app/mainmenu,
/app/ball.gif), have all requests go to a servlet for processing. If the
servlet recognizes the URL, perform an action and return the appropriate
output. If the URL is not recognized, treat the URL as a filename and return
the named resource.

Hence, if the URL  /app/login was recognized and requested, the servlet
takes an action on them. If the URL /app/ball.gif was requested, the servlet
doesn't recognize it as an action to be performed, and tries to return the
contents of /app/ball.gif to the user.

I've tried using the servlet-mapping of /app/* and pointing this to the
servlet. While this makes requests go to the servlet, if, within that
servlet, I try to get a request dispatcher to /app/ball.gif and forward
there, I get back into the servlet again , presumably because /app/ball.gif
maps to the servlet. This, of course, creates an recursive infinite loop and
soon the server dies.

One alternative that might work, but seems somehow "wrong" to me is to name
every action in the web.xml file, e.g. individually map /app/login,
/app/logout, /app/dothis, /app/dothat, etc. and then have /app/* for all
other resources. I'd like to avoid this particular solution.

Any bright ideas?





Servlet Mapping Tag

2001-03-20 Thread David Hemphill



I don't understand how Orion has implemented the  tag for
the web.xml file.  According to the documentation, I need to declare a
pattern /*.thePattern.  When I do something like the following, it works.
However, I need a separate pattern for each servlet in order for Orion to
invoke a unique servlet.  My questions are:

1. Is the servlet-mapping tag necessary.  (I couldn't invoke a servlet
without it.)
2. How is Orion expecting this to be used?


snoop
SnoopServlet



  snoop
  /*.1

 

dh
dh.TestServlet



  dh
  /*.2






Problems with servlet mapping

2001-02-12 Thread Dan Cramer

Okay, I have a web app that maps "/" to servlet X. According to the Servlet
spec, this is supposed to make X the default servlet. Also, according to the
spec, the container is supposed to do a recursive search for the longest
matching path.

Here's the problem, when requests come in for things like: /images/img.gif,
the container is mapping those to X as well. Ouch! Basically, "/" is being
interpreted to mean "/*".

The strange thing is that, while playing around with it, I redeployed once
and, all of a sudden, it worked correctly. Then, when I redeployed later
(changing something totally unrelated and not web.xml), it went back to the
incorrect behavior.

Has anyone else encountered this behavior? Is this a bug? I'm using 1.4.5.

Help would be greatly appreciated,
Dan Cramer
Chief Architect
Dynamic Resolve, LLC
Internet Solutions Consulting





servlet-mapping for jsp-file [clarification]

2001-01-18 Thread Stan Ng


Just to clarify, I was mapping a specific filename to the jsp.  I changed
the url-pattern to /mytest and it worked, so I guess the question is one
regarding the ambiguity of the servlet specifications.  In what instances
would case 3: "All other strings are used as exact matches only" apply?





servlet-mapping for jsp-file

2001-01-18 Thread Stan Ng

I'm not sure if there was any new information regarding the servlet mapping
and jsp-files for web applications.  I checked the archive... there was a
little bit of info regarding the topic, but it was rather dated.  For some
reason, the jsp mappings in my webapp don't seem to work for Orion 1.4.4.  I
deployed it on the reference implementation and it *seems* to be correct.
afaik, other than specifying my web-app in default-web-site.xml, I don't
have to do any other Orion-specific configuration, right?


Snippets from my config files...



test
test1.jsp
0


test
mytest







AW: Servlet Mapping and Access

2001-01-18 Thread hartmut wilms
Title: SV: Servlet Mapping and Access



Hi 
Magnus,
 
You're right. 
I must have missed that line
 
    name - The name of the 
web-application inside the (enterprise-)application. 
 
But: 
Some pieces are missing in the online docs. Sometimes the information about 
orion config files just stops or breaks respectively in the middle of a 
sentence. 
 
 
Hartmut
 
 

  -Ursprüngliche Nachricht-Von: Magnus Rydin 
  [mailto:[EMAIL PROTECTED]]Gesendet: Donnerstag, 18. Januar 
  2001 08:30An: Orion-InterestBetreff: SV: Servlet Mapping 
  and Access
  Did you check the doc at http://www.orionserver.com/docs/web-site.xml.html 
  (refered to in the documentation outline) ? It says the following on this:  
    Reference to a 
  application - The name of the (enterprise-)application the 
  web-app exists in. load-on-startup - Optional 
  attribute specifying whether or not to preload this web-app, if false then the 
  app will be loaded when needed (at the first request). The default is 
  false.
  max-inactivity-time - Optional attribute specifying number of 
  minutes of inactivity before this web-app can be shut down, if not specified 
  no shutdown will occur.
  name - The name of the web-application inside the 
  (enterprise-)application. root - The path on this site 
  to bind the application to, if for instance an app is installed at "/theapp" 
  it is reached by the URL: "http://www.thesiteserver.com/theapp/".
  shared - Whether or not multiple bindings (different 
  sites/context roots) are to be shared. Sharing implies sharing of sessions, 
  servlet instances etc. The default is 'false' 
  Although a lot of documents are missing, the Orion 
  configuration files are pretty well covered. WR 
  
  > -Ursprungligt meddelande- > Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  > Skickat: den 17 januari 2001 22:53 > Till: Orion-Interest > Ämne: AW: 
  Servlet Mapping and Access > > > Hi Jeff, > 
  > everything works fine nw. Thanks very much. 
  Nearly all of my > configuration > was perfectly all right in the beginning. The problem was - 
  > and still is in > some 
  areas - that there is very few documentation for orion > config-files and > their relationships. 
  The solution: > > 
  default-web-site: >   
   >   
      root="/gamsytest" /> 
  > > My EAR archive contains a 
  WAR called junitee-web.war. I > didn't realize, 
  that > the name attribute in the web-app tag 
  references the WAR filename. > > After reading your mail I realized what was wrong. Thanks, 
  again. > > 
  Hartmut > > 
  -Ursprüngliche Nachricht- > Von: Jeff 
  Schnitzer [mailto:[EMAIL PROTECTED]] 
  > Gesendet: Mittwoch, 17. Januar 2001 22:09 
  > An: Orion-Interest > Betreff: 
  RE: Servlet Mapping and Access > > > Have you successfully installed the 
  sample junitee test in the JUnitEE > 
  tutorial? > > You 
  shouldn't need to modify the global application.xml.  > Here's how my > system is set up, given 
  that my ear contains two wars, > 
  "similarity-web" > and "similarity-test-web" (which 
  contains my TestServlet and JUnit > tests): 
  > > server.xml: 
  > > path="../applications/similarity.ear" /> > > default-web-site: >  
  > root="/similarity" /> > 
   
  > root="/test" /> > 
  > similarity-web's web.xml: >    >   
       
  JUnitTestServlet  > 
        
   JUnit test harness  >   
       TestServlet 
   > 
     > 
  >   
   > 
        
   JUnitTestServlet  >   
       /TestServlet 
   > 
     > > After this, I can access my test 
  servlet as either > http://localhost/test/TestServlet or > http://localhost/test/servlet/TestServlet.  The first 
  because it's > configured in the web.xml, the 
  second because all servlets in the > 
  WEB-INF/classes directory of the war are exported as under the fairly 
  > standard path "/servlet" (it can be 
  configured in the > 
  global-web-application.xml). > > I'm a little confused by what you posted, but assuming that 
  > your normal > web 
  application is in gamesytest-web.war and your tests are in > junitee-web.war, both packaged in "junitee-orion.ear", you 
  should > configure junitee-web in the 
  default-web-site and remove the reference > to it 
  from the global application.xml. > > Then you should be able to use either URL: > http://localhost/junitee/TestServlet > http://localhost/junitee/servlet/TestServlet 
  > > Jeff > > >-Original Message- 
  > >From: hartmut wilms [mailto:[EMAIL PROTECTED]] 
  > >Sent: Wednesday, Januar

SV: Servlet Mapping and Access

2001-01-17 Thread Magnus Rydin
Title: SV: Servlet Mapping and Access





Did you check the doc at
http://www.orionserver.com/docs/web-site.xml.html
(refered to in the documentation outline) ?
It says the following on this:
 

  Reference to a 


application - The name of the (enterprise-)application the web-app exists in.
load-on-startup - Optional attribute specifying whether or not to preload this web-app, if false then the app will be loaded when needed (at the first request). The default is false.

max-inactivity-time - Optional attribute specifying number of minutes of inactivity before this web-app can be shut down, if not specified no shutdown will occur.

name - The name of the web-application inside the (enterprise-)application.
root - The path on this site to bind the application to, if for instance an app is installed at "/theapp" it is reached by the URL: "http://www.thesiteserver.com/theapp/".

shared - Whether or not multiple bindings (different sites/context roots) are to be shared. Sharing implies sharing of sessions, servlet instances etc. The default is 'false' 

Although a lot of documents are missing, the Orion configuration files are pretty well covered.
WR


> -Ursprungligt meddelande-
> Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Skickat: den 17 januari 2001 22:53
> Till: Orion-Interest
> Ämne: AW: Servlet Mapping and Access
> 
> 
> Hi Jeff,
> 
> everything works fine nw. Thanks very much. Nearly all of my 
> configuration
> was perfectly all right in the beginning. The problem was - 
> and still is in
> some areas - that there is very few documentation for orion 
> config-files and
> their relationships. The solution:
> 
> default-web-site:
>   
>       root="/gamsytest" />
> 
> My EAR archive contains a WAR called junitee-web.war. I 
> didn't realize, that
> the name attribute in the web-app tag references the WAR filename.
> 
> After reading your mail I realized what was wrong. Thanks, again.
> 
> Hartmut
> 
> -Ursprüngliche Nachricht-
> Von: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 17. Januar 2001 22:09
> An: Orion-Interest
> Betreff: RE: Servlet Mapping and Access
> 
> 
> Have you successfully installed the sample junitee test in the JUnitEE
> tutorial?
> 
> You shouldn't need to modify the global application.xml.  
> Here's how my
> system is set up, given that my ear contains two wars, 
> "similarity-web"
> and "similarity-test-web" (which contains my TestServlet and JUnit
> tests):
> 
> server.xml:
> 
> path="../applications/similarity.ear" />
> 
> default-web-site:
> 
> root="/similarity" />
> 
> root="/test" />
> 
> similarity-web's web.xml:
>   
>        JUnitTestServlet 
>        JUnit test harness 
>        TestServlet 
>   
> 
>   
>        JUnitTestServlet 
>        /TestServlet 
>   
> 
> After this, I can access my test servlet as either
> http://localhost/test/TestServlet or
> http://localhost/test/servlet/TestServlet.  The first because it's
> configured in the web.xml, the second because all servlets in the
> WEB-INF/classes directory of the war are exported as under the fairly
> standard path "/servlet" (it can be configured in the
> global-web-application.xml).
> 
> I'm a little confused by what you posted, but assuming that 
> your normal
> web application is in gamesytest-web.war and your tests are in
> junitee-web.war, both packaged in "junitee-orion.ear", you should
> configure junitee-web in the default-web-site and remove the reference
> to it from the global application.xml.
> 
> Then you should be able to use either URL:
> http://localhost/junitee/TestServlet
> http://localhost/junitee/servlet/TestServlet
> 
> Jeff
> 
> >-Original Message-
> >From: hartmut wilms [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, January 17, 2001 5:16 AM
> >To: Orion-Interest
> >Subject: AW: Servlet Mapping and Access
> >
> >
> >Hi Santosh,
> >
> >http://localhost/junitee/servlet/TestServlet didn't work, too. 
> >Do you know
> >about an orion servlet example?
> >
> >Bye
> >
> >Hartmut
> >
> >-Ursprüngliche Nachricht-
> >Von: Santosh Kumar [mailto:[EMAIL PROTECTED]]
> >Gesendet: Mittwoch, 17. Januar 2001 10:12
> >An: Orion-Interest
> >Betreff: Re: Servlet Mapping and Access
> >
> >
> >try  http://localhost/junitee/servlet/TestServlet
> >
> >- Original Message -
> >From: hartmut wilms <

AW: Servlet Mapping and Access

2001-01-17 Thread hartmut wilms

Hi Jeff,

everything works fine nw. Thanks very much. Nearly all of my configuration
was perfectly all right in the beginning. The problem was - and still is in
some areas - that there is very few documentation for orion config-files and
their relationships. The solution:

default-web-site:


My EAR archive contains a WAR called junitee-web.war. I didn't realize, that
the name attribute in the web-app tag references the WAR filename.

After reading your mail I realized what was wrong. Thanks, again.

Hartmut

-Ursprüngliche Nachricht-
Von: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 17. Januar 2001 22:09
An: Orion-Interest
Betreff: RE: Servlet Mapping and Access


Have you successfully installed the sample junitee test in the JUnitEE
tutorial?

You shouldn't need to modify the global application.xml.  Here's how my
system is set up, given that my ear contains two wars, "similarity-web"
and "similarity-test-web" (which contains my TestServlet and JUnit
tests):

server.xml:


default-web-site:



similarity-web's web.xml:

 JUnitTestServlet 
 JUnit test harness 
 TestServlet 



 JUnitTestServlet 
 /TestServlet 


After this, I can access my test servlet as either
http://localhost/test/TestServlet or
http://localhost/test/servlet/TestServlet.  The first because it's
configured in the web.xml, the second because all servlets in the
WEB-INF/classes directory of the war are exported as under the fairly
standard path "/servlet" (it can be configured in the
global-web-application.xml).

I'm a little confused by what you posted, but assuming that your normal
web application is in gamesytest-web.war and your tests are in
junitee-web.war, both packaged in "junitee-orion.ear", you should
configure junitee-web in the default-web-site and remove the reference
to it from the global application.xml.

Then you should be able to use either URL:
http://localhost/junitee/TestServlet
http://localhost/junitee/servlet/TestServlet

Jeff

>-Original Message-
>From: hartmut wilms [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 17, 2001 5:16 AM
>To: Orion-Interest
>Subject: AW: Servlet Mapping and Access
>
>
>Hi Santosh,
>
>http://localhost/junitee/servlet/TestServlet didn't work, too. 
>Do you know
>about an orion servlet example?
>
>Bye
>
>Hartmut
>
>-Ursprüngliche Nachricht-
>Von: Santosh Kumar [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 17. Januar 2001 10:12
>An: Orion-Interest
>Betreff: Re: Servlet Mapping and Access
>
>
>try  http://localhost/junitee/servlet/TestServlet
>
>- Original Message -
>From: hartmut wilms <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Sent: Wednesday, January 17, 2001 2:17 PM
>Subject: Servlet Mapping and Access
>
>
>> Hi there,
>>
>> I'm really lost. I can't figure out how to access a mapped 
>servlet from a
>> Web-Browser. I tried several URLs, like:
>>
>> - http://localhost/gamsytest/TestServlet
>> - http://localhost/gamsytest/junitee/TestServlet
>> - http://localhost/junitee/TestServlet
>> - ...
>>
>> Accessing JSPs in the example applications works fine. My 
>problem is that
>I
>> don't understand the relationships between all the orion xml
>> configuration/descriptor files. I know that they are documented, but
>> sometimes some pieces are missing or I don't get enough 
>information. After
>> all I'm a Newbie to Orion.
>>
>> My configuration:
>>
>> server.xml
>> ...
>> >
>> path="../applications/junitee-orion.ear" />
>> ...
>>
>> default-web-site.xml
>> ...
>> > root="/gamsytest" />
>> ...
>>
>> ??? What values are expected for name and root?
>>
>> web.xml
>> ...
>>
>>   TestServlet
>>   Servlet that calls the TestRunner 
>bean
>>
>>
>com.itellium.aeservices.junit.htmlui.TestServlet
>> ss>
>>
>>
>>   TestServlet
>>   /TestServlet
>>
>> ...
>>
>> application.xml
>> ...
>>
>>   
>>  junitee-web.war
>>  /junitee
>>   
>>
>>...
>>
>> What are the relationships between all these name/mapping 
>attributes. I
>used
>> the web.xml and application.xml with jBOSS and WebLogic 
>without having any
>> problems:
>>
>> http://.../junitee/TestServlet WORKED!
>>
>> Can anybody help me and explain the orion way?
>>
>> Regards
>>
>> Hartmut Wilms
>>
>>
>>
>
>
>




RE: Servlet Mapping and Access

2001-01-17 Thread Jeff Schnitzer

Have you successfully installed the sample junitee test in the JUnitEE
tutorial?

You shouldn't need to modify the global application.xml.  Here's how my
system is set up, given that my ear contains two wars, "similarity-web"
and "similarity-test-web" (which contains my TestServlet and JUnit
tests):

server.xml:


default-web-site:



similarity-web's web.xml:

 JUnitTestServlet 
 JUnit test harness 
 TestServlet 



 JUnitTestServlet 
 /TestServlet 


After this, I can access my test servlet as either
http://localhost/test/TestServlet or
http://localhost/test/servlet/TestServlet.  The first because it's
configured in the web.xml, the second because all servlets in the
WEB-INF/classes directory of the war are exported as under the fairly
standard path "/servlet" (it can be configured in the
global-web-application.xml).

I'm a little confused by what you posted, but assuming that your normal
web application is in gamesytest-web.war and your tests are in
junitee-web.war, both packaged in "junitee-orion.ear", you should
configure junitee-web in the default-web-site and remove the reference
to it from the global application.xml.

Then you should be able to use either URL:
http://localhost/junitee/TestServlet
http://localhost/junitee/servlet/TestServlet

Jeff

>-Original Message-
>From: hartmut wilms [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 17, 2001 5:16 AM
>To: Orion-Interest
>Subject: AW: Servlet Mapping and Access
>
>
>Hi Santosh,
>
>http://localhost/junitee/servlet/TestServlet didn't work, too. 
>Do you know
>about an orion servlet example?
>
>Bye
>
>Hartmut
>
>-Ursprüngliche Nachricht-
>Von: Santosh Kumar [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 17. Januar 2001 10:12
>An: Orion-Interest
>Betreff: Re: Servlet Mapping and Access
>
>
>try  http://localhost/junitee/servlet/TestServlet
>
>- Original Message -
>From: hartmut wilms <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Sent: Wednesday, January 17, 2001 2:17 PM
>Subject: Servlet Mapping and Access
>
>
>> Hi there,
>>
>> I'm really lost. I can't figure out how to access a mapped 
>servlet from a
>> Web-Browser. I tried several URLs, like:
>>
>> - http://localhost/gamsytest/TestServlet
>> - http://localhost/gamsytest/junitee/TestServlet
>> - http://localhost/junitee/TestServlet
>> - ...
>>
>> Accessing JSPs in the example applications works fine. My 
>problem is that
>I
>> don't understand the relationships between all the orion xml
>> configuration/descriptor files. I know that they are documented, but
>> sometimes some pieces are missing or I don't get enough 
>information. After
>> all I'm a Newbie to Orion.
>>
>> My configuration:
>>
>> server.xml
>> ...
>> >
>> path="../applications/junitee-orion.ear" />
>> ...
>>
>> default-web-site.xml
>> ...
>> > root="/gamsytest" />
>> ...
>>
>> ??? What values are expected for name and root?
>>
>> web.xml
>> ...
>>
>>   TestServlet
>>   Servlet that calls the TestRunner 
>bean
>>
>>
>com.itellium.aeservices.junit.htmlui.TestServlet
>> ss>
>>
>>
>>   TestServlet
>>   /TestServlet
>>
>> ...
>>
>> application.xml
>> ...
>>
>>   
>>  junitee-web.war
>>  /junitee
>>   
>>
>>...
>>
>> What are the relationships between all these name/mapping 
>attributes. I
>used
>> the web.xml and application.xml with jBOSS and WebLogic 
>without having any
>> problems:
>>
>> http://.../junitee/TestServlet WORKED!
>>
>> Can anybody help me and explain the orion way?
>>
>> Regards
>>
>> Hartmut Wilms
>>
>>
>>
>
>
>




Re: Servlet Mapping and Access

2001-01-17 Thread denis despinoy


In global-web-application.xml under ORIONROOT/config u
can set or check your servlet webdir

servlet-webdir=/servlet (i think that is the default).






--- Santosh Kumar <[EMAIL PROTECTED]> wrote:
> try  http://localhost/junitee/servlet/TestServlet
> 
> - Original Message -
> From: hartmut wilms <[EMAIL PROTECTED]>
> To: Orion-Interest <[EMAIL PROTECTED]>
> Sent: Wednesday, January 17, 2001 2:17 PM
> Subject: Servlet Mapping and Access
> 
> 
> > Hi there,
> >
> > I'm really lost. I can't figure out how to access
> a mapped servlet from a
> > Web-Browser. I tried several URLs, like:
> >
> > - http://localhost/gamsytest/TestServlet
> > - http://localhost/gamsytest/junitee/TestServlet
> > - http://localhost/junitee/TestServlet
> > - ...
> >
> > Accessing JSPs in the example applications works
> fine. My problem is that
> I
> > don't understand the relationships between all the
> orion xml
> > configuration/descriptor files. I know that they
> are documented, but
> > sometimes some pieces are missing or I don't get
> enough information. After
> > all I'm a Newbie to Orion.
> >
> > My configuration:
> >
> > server.xml
> > ...
> >  >
> > path="../applications/junitee-orion.ear" />
> > ...
> >
> > default-web-site.xml
> > ...
> >  name="gamsytest-web"
> > root="/gamsytest" />
> > ...
> >
> > ??? What values are expected for name and root?
> >
> > web.xml
> > ...
> >
> >   TestServlet
> >   Servlet that calls the
> TestRunner bean
> >
> >
>
com.itellium.aeservices.junit.htmlui.TestServlet > ss>
> >
> >
> >   TestServlet
> >   /TestServlet
> >
> > ...
> >
> > application.xml
> > ...
> >
> >   
> >  junitee-web.war
> >  /junitee
> >   
> >
> >...
> >
> > What are the relationships between all these
> name/mapping attributes. I
> used
> > the web.xml and application.xml with jBOSS and
> WebLogic without having any
> > problems:
> >
> > http://.../junitee/TestServlet WORKED!
> >
> > Can anybody help me and explain the orion way?
> >
> > Regards
> >
> > Hartmut Wilms
> >
> >
> >
> 
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




RE: Servlet Mapping and Access

2001-01-17 Thread Stanislav Maximov

Also note that this /servlet/ directory is a virtual one. And it could be
changed in
/application-deployments///orion-web.xml



Also it could be changed to the "/" so you'll be able to run your servlets
from the root of your web-application. Just like in the URLs you tried.

Stas.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Santosh Kumar
> Sent: Wednesday, January 17, 2001 12:12 PM
> To: Orion-Interest
> Subject: Re: Servlet Mapping and Access
>
>
> try  http://localhost/junitee/servlet/TestServlet
>
> - Original Message -
> From: hartmut wilms <[EMAIL PROTECTED]>
> To: Orion-Interest <[EMAIL PROTECTED]>
> Sent: Wednesday, January 17, 2001 2:17 PM
> Subject: Servlet Mapping and Access
>
>
> > Hi there,
> >
> > I'm really lost. I can't figure out how to access a mapped
> servlet from a
> > Web-Browser. I tried several URLs, like:
> >
> > - http://localhost/gamsytest/TestServlet
> > - http://localhost/gamsytest/junitee/TestServlet
> > - http://localhost/junitee/TestServlet
> > - ...
> >
> > Accessing JSPs in the example applications works fine. My
> problem is that
> I
> > don't understand the relationships between all the orion xml
> > configuration/descriptor files. I know that they are documented, but
> > sometimes some pieces are missing or I don't get enough
> information. After
> > all I'm a Newbie to Orion.
> >
> > My configuration:
> >
> > server.xml
> > ...
> >  >
> > path="../applications/junitee-orion.ear" />
> > ...
> >
> > default-web-site.xml
> > ...
> >  > root="/gamsytest" />
> > ...
> >
> > ??? What values are expected for name and root?
> >
> > web.xml
> > ...
> >
> >   TestServlet
> >   Servlet that calls the TestRunner bean
> >
> >
> com.itellium.aeservices.junit.htmlui.TestServlet > ss>
> >
> >
> >   TestServlet
> >   /TestServlet
> >
> > ...
> >
> > application.xml
> > ...
> >
> >   
> >  junitee-web.war
> >  /junitee
> >   
> >
> >...
> >
> > What are the relationships between all these name/mapping attributes. I
> used
> > the web.xml and application.xml with jBOSS and WebLogic without
> having any
> > problems:
> >
> > http://.../junitee/TestServlet WORKED!
> >
> > Can anybody help me and explain the orion way?
> >
> > Regards
> >
> > Hartmut Wilms
> >
> >
> >
>
>





AW: Servlet Mapping and Access

2001-01-17 Thread hartmut wilms

Hi Santosh,

http://localhost/junitee/servlet/TestServlet didn't work, too. Do you know
about an orion servlet example?

Bye

Hartmut

-Ursprüngliche Nachricht-
Von: Santosh Kumar [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 17. Januar 2001 10:12
An: Orion-Interest
Betreff: Re: Servlet Mapping and Access


try  http://localhost/junitee/servlet/TestServlet

- Original Message -
From: hartmut wilms <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 2:17 PM
Subject: Servlet Mapping and Access


> Hi there,
>
> I'm really lost. I can't figure out how to access a mapped servlet from a
> Web-Browser. I tried several URLs, like:
>
> - http://localhost/gamsytest/TestServlet
> - http://localhost/gamsytest/junitee/TestServlet
> - http://localhost/junitee/TestServlet
> - ...
>
> Accessing JSPs in the example applications works fine. My problem is that
I
> don't understand the relationships between all the orion xml
> configuration/descriptor files. I know that they are documented, but
> sometimes some pieces are missing or I don't get enough information. After
> all I'm a Newbie to Orion.
>
> My configuration:
>
> server.xml
> ...
> 
> path="../applications/junitee-orion.ear" />
> ...
>
> default-web-site.xml
> ...
>  root="/gamsytest" />
> ...
>
> ??? What values are expected for name and root?
>
> web.xml
> ...
>
>   TestServlet
>   Servlet that calls the TestRunner bean
>
>
com.itellium.aeservices.junit.htmlui.TestServlet ss>
>
>
>   TestServlet
>   /TestServlet
>
> ...
>
> application.xml
> ...
>
>   
>  junitee-web.war
>  /junitee
>   
>
>...
>
> What are the relationships between all these name/mapping attributes. I
used
> the web.xml and application.xml with jBOSS and WebLogic without having any
> problems:
>
> http://.../junitee/TestServlet WORKED!
>
> Can anybody help me and explain the orion way?
>
> Regards
>
> Hartmut Wilms
>
>
>





Re: Servlet Mapping and Access

2001-01-17 Thread Santosh Kumar

try  http://localhost/junitee/servlet/TestServlet

- Original Message -
From: hartmut wilms <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 2:17 PM
Subject: Servlet Mapping and Access


> Hi there,
>
> I'm really lost. I can't figure out how to access a mapped servlet from a
> Web-Browser. I tried several URLs, like:
>
> - http://localhost/gamsytest/TestServlet
> - http://localhost/gamsytest/junitee/TestServlet
> - http://localhost/junitee/TestServlet
> - ...
>
> Accessing JSPs in the example applications works fine. My problem is that
I
> don't understand the relationships between all the orion xml
> configuration/descriptor files. I know that they are documented, but
> sometimes some pieces are missing or I don't get enough information. After
> all I'm a Newbie to Orion.
>
> My configuration:
>
> server.xml
> ...
> 
> path="../applications/junitee-orion.ear" />
> ...
>
> default-web-site.xml
> ...
>  root="/gamsytest" />
> ...
>
> ??? What values are expected for name and root?
>
> web.xml
> ...
>
>   TestServlet
>   Servlet that calls the TestRunner bean
>
>
com.itellium.aeservices.junit.htmlui.TestServlet ss>
>
>
>   TestServlet
>   /TestServlet
>
> ...
>
> application.xml
> ...
>
>   
>  junitee-web.war
>  /junitee
>   
>
>...
>
> What are the relationships between all these name/mapping attributes. I
used
> the web.xml and application.xml with jBOSS and WebLogic without having any
> problems:
>
> http://.../junitee/TestServlet WORKED!
>
> Can anybody help me and explain the orion way?
>
> Regards
>
> Hartmut Wilms
>
>
>





Servlet Mapping and Access

2001-01-17 Thread hartmut wilms

Hi there,

I'm really lost. I can't figure out how to access a mapped servlet from a
Web-Browser. I tried several URLs, like:

- http://localhost/gamsytest/TestServlet
- http://localhost/gamsytest/junitee/TestServlet
- http://localhost/junitee/TestServlet
- ...

Accessing JSPs in the example applications works fine. My problem is that I
don't understand the relationships between all the orion xml
configuration/descriptor files. I know that they are documented, but
sometimes some pieces are missing or I don't get enough information. After
all I'm a Newbie to Orion.

My configuration:

server.xml
...

...

default-web-site.xml
...

...

??? What values are expected for name and root?

web.xml
...
   
  TestServlet
  Servlet that calls the TestRunner bean
 
com.itellium.aeservices.junit.htmlui.TestServlet
   
   
  TestServlet
  /TestServlet
   
...

application.xml
...
   
  
 junitee-web.war
 /junitee
  
   
   ...

What are the relationships between all these name/mapping attributes. I used
the web.xml and application.xml with jBOSS and WebLogic without having any
problems:

http://.../junitee/TestServlet WORKED!

Can anybody help me and explain the orion way?

Regards

Hartmut Wilms





Re: servlet mapping

2001-01-16 Thread Christian Sell

according to servlet 2.2, chapter 10.2:


A string beginning with a '*.' prefix is used as an extension mapping.


your mapping looks like a typical extension mapping. However, it also looks
to me like you are trying to map all JSPs to one "main" JSP. If orion
accepted this, it would be a nice endless recursion

The default mapping for JSPs is in global-web-application.xml. On a side
note, evermind uses that same syntax that Ozzie mentions ("/*.jsp"), which
is meaningless according to the servlet spec (see below). I once used that
syntax in an app that I redeployed under Tomcat - where it stopped working.
I was then pointed to the spec by the Tomcat gurus.


A string beginning with a '/' character and ending with a '/*' postfix is
used as a path
mapping.
A string beginning with a '*.' prefix is used as an extension mapping.
>>>>All other strings are used as exact matches only<<<<


- Original Message -
From: "Trond Nilsen" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 9:48 PM
Subject: Re: servlet mapping


> Thanks - Tried that already, though, doesn't appear to help. My best
solution
> at the moment is a workaround - I put my component JSPs in a subdirectory,
and
> restrict access to this directory - they are only accessed by includes in
the
> 'main' JSP.
>
>
> > Try changing your url-pattern to "/*.jsp"...
> >
> > Thanks,
> > Ozzie Gurkan
> >
> > --- Trond Nilsen <[EMAIL PROTECTED]> wrote:
> > > According to one of the FAQ's on www.jguru.com, I should be able to
set
> > > up a
> > > mapping in my web application such that all attempts to request a file
> > > ending
> > > with .jsp are redirected to a file of my choice (main.jsp in this
case).
> > > Below
> > > is some code from the web.xml file which (I think) should give this
> > > effect.
> > >
> > > 
> > >   AdminEntryPoint
> > >   main.jsp
> > > 
> > >
> > > 
> > > AdminEntryPoint
> > > *.jsp
> > > 
> > >
> > > I've successfully done this for files that start with some pattern
(such
> > > as
> > > kb* or something similar), but it doesn't appear to work with filename
> > > endings. Has anyone encountered this before? Is it a problem with
Orion,
> > > something I'm doing wrong, or perhaps the faq is wrong?
>
>
>






Re: servlet mapping

2001-01-15 Thread Trond Nilsen

Thanks - Tried that already, though, doesn't appear to help. My best solution
at the moment is a workaround - I put my component JSPs in a subdirectory, and
restrict access to this directory - they are only accessed by includes in the
'main' JSP.


> Try changing your url-pattern to "/*.jsp"...
>
> Thanks,
> Ozzie Gurkan
>
> --- Trond Nilsen <[EMAIL PROTECTED]> wrote:
> > According to one of the FAQ's on www.jguru.com, I should be able to set
> > up a
> > mapping in my web application such that all attempts to request a file
> > ending
> > with .jsp are redirected to a file of my choice (main.jsp in this case).
> > Below
> > is some code from the web.xml file which (I think) should give this
> > effect.
> >
> > 
> >   AdminEntryPoint
> >   main.jsp
> > 
> >
> > 
> > AdminEntryPoint
> > *.jsp
> > 
> >
> > I've successfully done this for files that start with some pattern (such
> > as
> > kb* or something similar), but it doesn't appear to work with filename
> > endings. Has anyone encountered this before? Is it a problem with Orion,
> > something I'm doing wrong, or perhaps the faq is wrong?






Re: servlet mapping

2001-01-15 Thread Ozzie Gurkan

Try changing your url-pattern to "/*.jsp"...

Thanks,
Ozzie Gurkan

--- Trond Nilsen <[EMAIL PROTECTED]> wrote:
> According to one of the FAQ's on www.jguru.com, I should be able to set
> up a
> mapping in my web application such that all attempts to request a file
> ending
> with .jsp are redirected to a file of my choice (main.jsp in this case).
> Below
> is some code from the web.xml file which (I think) should give this
> effect.
> 
> 
>   AdminEntryPoint
>   main.jsp
> 
> 
> 
> AdminEntryPoint
> *.jsp
> 
> 
> I've successfully done this for files that start with some pattern (such
> as
> kb* or something similar), but it doesn't appear to work with filename
> endings. Has anyone encountered this before? Is it a problem with Orion,
> something I'm doing wrong, or perhaps the faq is wrong?
> 
> Trond.
> 
> 





servlet mapping

2001-01-15 Thread Trond Nilsen

According to one of the FAQ's on www.jguru.com, I should be able to set up a
mapping in my web application such that all attempts to request a file ending
with .jsp are redirected to a file of my choice (main.jsp in this case). Below
is some code from the web.xml file which (I think) should give this effect.


  AdminEntryPoint
  main.jsp



AdminEntryPoint
*.jsp


I've successfully done this for files that start with some pattern (such as
kb* or something similar), but it doesn't appear to work with filename
endings. Has anyone encountered this before? Is it a problem with Orion,
something I'm doing wrong, or perhaps the faq is wrong?

Trond.





Bug or not? JSP servlet-mapping of /*

2000-12-14 Thread Gerald Gutierrez


I have a JSP page that I map to /* using servlet-mapping, so that all 
requests to anything within my application go through it. When I tried to 
get the path info (getPathInfo()), I found that I always get an empty 
string regardless of the URL that I hit the application with. Everything, 
works normally if I have a servlet mapping that has a "directory" in it, 
such as /cmd/*.

Is /* invalid or special somehow? If not, is this a bug?






Re: how to use servlet-mapping

2000-11-27 Thread Claudio Miranda


the  tag dictates the browser vision of your resources,
look at the correct code below.

-- 
  Claudio Miranda  
  ___
  SUN Certified Programmer for JAVA 2

Edmund Cheung wrote:
> 
> Hi,
> 
> If I have more than one servlet defined in the web.xml file, how do I use
> servlet-mapping ? Based on the following setting, the program always calls
> the UserManagerController.
> 
>
>   MainAdminController
>   Main controller
>   admin.servlet.MainAdminController
>
>
>   MainAdminController
/MainAdminController
>
>
>   UserManagerController
>   User manager controller
>   admin.servlet.UserManagerController
>
>
>   UserManagerController
>   /UserManagerController
>
> 
> Thanks,
> 
> Edmund

begin:vcard 
n:Miranda;Claudio
x-mozilla-html:FALSE
org:EverSystems;Research & Developmet - Internet & New Tech
adr:;;;Sao Paulo;SP;;Brazil
version:2.1
email;internet:[EMAIL PROTECTED]
title:SUN Certified Programmer for JAVA 2 Platform
fn:Claudio Miranda
end:vcard



RE: how to use servlet-mapping

2000-11-23 Thread Lebedko, Oleg

You have to define not conflicting url-pattern values (which is the case in
your example)
Oleg Lebedko
Wireless Networks, Technology Development
2920 Matheson Blvd. E., F7
Mississauga, ON L4W 5J4
* (905) 282 - 3263  [150 - 3263]
* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 


-Original Message-
From:   Edmund Cheung [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, November 23, 2000 7:44 AM
To: Orion-Interest
Subject:how to use servlet-mapping

Hi,

If I have more than one servlet defined in the web.xml file, how do
I use
    servlet-mapping ? Based on the following setting, the program always
calls
the UserManagerController.

   
  MainAdminController
  Main controller

admin.servlet.MainAdminController
   
   
  MainAdminController
  /
   
   
  UserManagerController
  User manager controller

admin.servlet.UserManagerController
   
   
  UserManagerController
  /
   


Thanks,

Edmund





Re: how to use servlet-mapping

2000-11-23 Thread Mikko Kurki-Suonio

On Thu, 23 Nov 2000, Edmund Cheung wrote:

> servlet-mapping ? Based on the following setting, the program always calls
> the UserManagerController.

>
>   UserManagerController
>   /
>

You've given both servlets the same mapping... which won't do.
You must give them *different* url-patterns.

In addition, in my experience of using just "/" for the pattern, it seems
to be an implicit substring match or something like that.

E.g. If I have a servlet mapped to "/" trying to access a static document
"/whatever.html" gives the servlet instead...

Bug or feature? Didn't see mention of it in docs.

//Mikko








how to use servlet-mapping

2000-11-23 Thread Edmund Cheung

Hi,

If I have more than one servlet defined in the web.xml file, how do I use
servlet-mapping ? Based on the following setting, the program always calls
the UserManagerController.

   
  MainAdminController
  Main controller
  admin.servlet.MainAdminController
   
   
  MainAdminController
  /
   
   
  UserManagerController
  User manager controller
  admin.servlet.UserManagerController
   
   
  UserManagerController
  /
   


Thanks,

Edmund





Servlet Mapping

2000-07-27 Thread pminearo



I found an interesting situation, possibly a bug.  I am using Orion 1.0.3b, and
in the WEB-INF/web.xml file I declare my  in the following
manner:


 Login
 /Login/*


I have a Form that calls this servlet.  Like:


 
  
   
   
   
   
  
 


This mapping works in WebLogic, but does not work in Orion. Well, it sort of
worksThe correct servlet will be fired off, but the Request coming in is
empty.  I do not see anything coming in from the form.  But If I do the
following mapping:


 Login
 /Login



It works.  The first mapping should work as well.  Below I have copied part of
the Java 2 Servlet Specification v2.2 that deals with Mapping, which is Section
10.   -- Notice servlet2 in the Mapping Examples. --

According to the spec(Java 2 Servlet Specification v2.2 -- SRV.10.2; Examples
are in SRV.10.2.2):

SRV.10.2 Specification of mappings
In the web application deployment descriptor, the following syntax is used to
define mappings:

- A string beginning with a '/' character and ending with a '/*' postfix is used
as a path mapping.
- A string beginning with a '*.' prefix is used as an extension mapping
- All other strings are used as exact matches only
- A string containing only the '/' character indicates that the servlet
specified by the mapping becomes the "default" servlet of the application.

SRV.10.2.1 Implicit Mappings




SRV.10.2.2 Example Mapping Set
Consider the set of mappings in Table SRV.10-1

Table SRV10-1 Example Set of Maps
Path PatternServlet
/foo/bar/*  servlet1
/baz/*  servlet2
/catalog   servlet3
*.bop   servlet4


The behavior in Table SRV.10-2 would result.

Table SRV.10-2: Incoming Paths Applied to Example Maps
Incoming PathServlet handling Request
/foo/bar/index.html  servlet1
/foo/bar/index.bop   servlet1
/bazservlet2
/baz/index.html   servlet2
/catalogservlet3
/catalog/index.html  "default" servlet
/catalog/racecar.bop  servlet4
/index.bop   servlet4















RE: PathInfo and servlet-mapping

2000-07-26 Thread Lorin Kobashigawa

I have the same problem on both Orion 1.0 and 1.1.35 on Mandrake Linux 7.1

Here is the specific problem. I re-read the spec, and i'm not sure whether
it ought to work or not. host is myhost.com and the application root is myapp

/test/*
URL: http://myhost.com/myapp/test/some/path/info
req.getPathInfo() returns /some/path/info

/*
URL: http://myhost.com/myapp/some/path/info
req.getPathInfo() returns null

Initially I was using
/test and / as my url-patterns which when i re-read the spec obviously
shouldn't work, but I think this should.  Is there some reason why the
default servlet would lose the pathInfo?

-Lkb


At 10:49 PM 7/26/00 +0200, Robert Krueger wrote:
>
>the best source for this is the spec.have you verified that your 
>understanding of the spec is correct? we use both servlet mappings with 
>url-patterns and security-constraints and path info and so far it all 
>behaves very consistent although you might have a case where it doesn't.
>
>maybe a concrete example would help. which version of orion are you using? 
>there were bugs in the path-info handling but the ones we discovered have 
>been fixed a while ago.
>
>regards,
>
>robert
>
>At 13:57 26.07.00 , Kit Cragin wrote:
>>Actually I have noticed that with servlet mappings security and pathinfo
>>stuff seems to behave erratically (either that or I haven't discovered
>>exactly what the pattern is). Does anyone have a matrix of url-pattern in
>>the servlet-mapping, url-pattern in a security-constraint, servlet-name, and
>>what pathInfo() returns and how they all interact? It would be useful.
>>Thanks...
>>
>>Kit Cragin
>>VP of Product Development
>>Mongoose Technology, Inc.
>>www.mongoosetech.com
>>
>>-
>
>(-) Robert Krüger
>(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
>(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
>(-) Tel: 06151 665401, Fax: 06151 665373
>(-) [EMAIL PROTECTED], www.signal7.de
>
>
>
/** 
 * @author: Lorin Kobashigawa-Bates <[EMAIL PROTECTED]>
 * @title:  CodeMonkey / COO - Robot6 Inc. 
 * @phone:  415.345.8872
 * @addr:   1177 Polk St. San Francisco, CA 94109
 */




RE: PathInfo and servlet-mapping

2000-07-26 Thread Lorin Kobashigawa

Ok, I re-read the spec, and I guess i should be using

/path/* and /*, and that works for /path/*, but /* loses it's pathInfo.

I am still wondering if this is intentional, and I'm trying to do something
i shouldn't, or if this is a bug.

anyone?
-Lkb

At 01:57 PM 7/26/00 -0500, Kit Cragin wrote:
>Actually I have noticed that with servlet mappings security and pathinfo
>stuff seems to behave erratically (either that or I haven't discovered
>exactly what the pattern is). Does anyone have a matrix of url-pattern in
>the servlet-mapping, url-pattern in a security-constraint, servlet-name, and
>what pathInfo() returns and how they all interact? It would be useful.
>Thanks...
>
>Kit Cragin
>VP of Product Development
>Mongoose Technology, Inc.
>www.mongoosetech.com
>
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Lorin
>Kobashigawa
>Sent: Wednesday, July 26, 2000 3:58 AM
>To: Orion-Interest
>Subject: PathInfo and servlet-mapping
>
>
>Ok, I've determined that I don't always lose my pathInfo.  It's only when i
>try to map my servlet as the default servlet.
>
>How do i do a getPathInfo() on my default servlet?  Here is the entry in my
>web.xml file. what am i doing wrong?
>
>When I use:
>  PrintPathInfo
>  /
>
>URL: /testing/the/pathInfo
>getPathInfo() returns null
>
>when I use:
>  PrintPathInfo
>  /path
>
>URL: /path/testing/the/pathInfo
>getPathInfo() returns /testing/the/pathInfo
>
>Thanks for your help.
>-Lkb
>
>
>
>
>





RE: PathInfo and servlet-mapping

2000-07-26 Thread Robert Krueger


the best source for this is the spec.have you verified that your 
understanding of the spec is correct? we use both servlet mappings with 
url-patterns and security-constraints and path info and so far it all 
behaves very consistent although you might have a case where it doesn't.

maybe a concrete example would help. which version of orion are you using? 
there were bugs in the path-info handling but the ones we discovered have 
been fixed a while ago.

regards,

robert

At 13:57 26.07.00 , Kit Cragin wrote:
>Actually I have noticed that with servlet mappings security and pathinfo
>stuff seems to behave erratically (either that or I haven't discovered
>exactly what the pattern is). Does anyone have a matrix of url-pattern in
>the servlet-mapping, url-pattern in a security-constraint, servlet-name, and
>what pathInfo() returns and how they all interact? It would be useful.
>Thanks...
>
>Kit Cragin
>VP of Product Development
>Mongoose Technology, Inc.
>www.mongoosetech.com
>
>-

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





RE: PathInfo and servlet-mapping

2000-07-26 Thread Kit Cragin

Actually I have noticed that with servlet mappings security and pathinfo
stuff seems to behave erratically (either that or I haven't discovered
exactly what the pattern is). Does anyone have a matrix of url-pattern in
the servlet-mapping, url-pattern in a security-constraint, servlet-name, and
what pathInfo() returns and how they all interact? It would be useful.
Thanks...

Kit Cragin
VP of Product Development
Mongoose Technology, Inc.
www.mongoosetech.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lorin
Kobashigawa
Sent: Wednesday, July 26, 2000 3:58 AM
To: Orion-Interest
Subject: PathInfo and servlet-mapping


Ok, I've determined that I don't always lose my pathInfo.  It's only when i
try to map my servlet as the default servlet.

How do i do a getPathInfo() on my default servlet?  Here is the entry in my
web.xml file. what am i doing wrong?

When I use:
  PrintPathInfo
  /

URL: /testing/the/pathInfo
getPathInfo() returns null

when I use:
  PrintPathInfo
  /path

URL: /path/testing/the/pathInfo
getPathInfo() returns /testing/the/pathInfo

Thanks for your help.
-Lkb







PathInfo and servlet-mapping

2000-07-26 Thread Lorin Kobashigawa

Ok, I've determined that I don't always lose my pathInfo.  It's only when i
try to map my servlet as the default servlet.

How do i do a getPathInfo() on my default servlet?  Here is the entry in my
web.xml file. what am i doing wrong?

When I use:
  PrintPathInfo
  /

URL: /testing/the/pathInfo
getPathInfo() returns null

when I use:
  PrintPathInfo
  /path

URL: /path/testing/the/pathInfo
getPathInfo() returns /testing/the/pathInfo

Thanks for your help.
-Lkb





losing my pathInfo with servlet-mapping

2000-07-24 Thread Lorin Kobashigawa

Hello, I have a servlet that gets some information out of the pathinfo,
calling
req.getPathInfo() it works fine by itself, but when I use a servlet-mapping
directive to redirect to it, i lose the pathInfo.  It's still in the
address bar, but getPathInfo() is returning null.

Is this supposed to happen? Is there anything i can do to get it to persist?

-Lkb





RE: no servlet mapping? my app dead

1999-11-16 Thread Magnus Stenman

Yes, this was unfortunately broken in 0.8.1. It is fixed in the latest developer core 
build though which
can be found at http://www.orionserver.com/orion/orion.jar. The fix will be included 
in the 0.8.2 release
due in one to two days. Sorry for any inconvenience caused.

/Magnus Stenman, the Orion team


> This code used to work under 0.8.0,  but not under 0.8.1.  I get a 404:
> 
> 
> snoop
> /snoopy
> 
> 
> My app depends on this kind of mapping,  Is there a new rule or a
> workaround?
> TIA
> -R



RE: no servlet mapping? my app dead

1999-11-16 Thread Kucera, Rich

well I've got my workaround,  add the root for servlet-webdir

/servlet/
/

but this breaks /servlet mapping.  the app works now anyway,
but /servlet/snoop is 404,  while /snoop works.  /snoopy still doesn't work.
-R

> -Original Message-
> From: Kucera, Rich 
> Sent: Tuesday, November 16, 1999 2:24 PM
> To:   orion-interest
> Subject:  no servlet mapping?  my app dead
> 
> This code used to work under 0.8.0,  but not under 0.8.1.  I get a 404:
> 
>   
>   snoop
>   /snoopy
>   
> 
> My app depends on this kind of mapping,  Is there a new rule or a
> workaround?
> TIA
> -R



no servlet mapping? my app dead

1999-11-16 Thread Kucera, Rich

This code used to work under 0.8.0,  but not under 0.8.1.  I get a 404:


snoop
/snoopy


My app depends on this kind of mapping,  Is there a new rule or a
workaround?
TIA
-R