Christian/anyone else

I noticed your servlet mapping is

<servlet-mapping>
      <servlet-name>EmployeeForm</servlet-name>
       <url-pattern>/</url-pattern>
</servlet-mapping>

What effect does specifying '/' as the url-pattern have?
Specifically what effect does it have on the action string in a HTML form?
What would happen if you had another servlet mapping (for another servlet)
and had '/' as the url pattern?

Thanks

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Christian Sell
Sent: Wednesday, 22 November 2000 8:23 AM
To: Orion-Interest
Subject: Re: Deploying a servlet ear, war: help an oroin newbie


<aside>
its always useful to describe WHAT error you are getting
</aside>

from looking at your files, I see you are missing a servlet-mapping entry in
web.xml. In your call to the default-web-app, you use the
(orion-preconfigured) servletmapping to /servlet. Now you can do the same
when calling into your new webapp, by saying

<form
action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm">
method="post">

(note the "/servlet/" in there), or you can add a servlet mapping like the
following (note that I've also assigned a shorter servlet name):

<servlet>
     <servlet-name>EmployeeForm</servlet-name>
     <servlet-class>com.objectgeneration.sample.EmployeeForm</servlet-class>
</servlet>
<servlet-mapping>
      <servlet-name>EmployeeForm</servlet-name>
       <url-pattern>/</url-pattern>
</servlet-mapping>


----- Original Message -----
From: "Matthew TorreAlto" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 8:19 PM
Subject: Deploying a servlet ear, war: help an oroin newbie


> I am trying to deploy a servlet with Orion. The servlet runs fine in
> JBuilder. It even runs in Orion if I stick it in the default web
application
> directory. But I want to do it right and use the ear, war files. (or do I)
>
> When I run Orion it seems to pick it up the ear and war file okay.
> Orion finds the ear file and unbundles the war file inside.
> But..... When I post I get an Error...
>
> I think I set up the web.xml and application.xml just so... I based this
off
> the orion-primer example and I even reused the build.xml ant file with
some
> modifications. (I really like ant.) Everything builds just groovy. I even
> check the war and ear files and everything seems in order.
>
> I've enclosed what I think are the related parts of the application.xml,
> web.xml and the entries in config/server.xml. And I show the html for the
> form post that does not work and the post that does work (running against
> the default web application). If you can help, I'd sure appreciate it. I
may
> just have the post screwed up (listed at the bottom).
>
> The web.xml file has the following entry... shortened.
>
> <servlet>
>     <servlet-name>com.objectgeneration.sample.EmployeeForm
> </servlet-name>
>
<servlet-class>com.objectgeneration.sample.EmployeeForm</servlet-class>
> </servlet>
>
> The application.xml has the following entry.
>
> <module>
>     <web>
>       <web-uri>employee-app-web.war</web-uri>
>       <context-root>/employee-app</context-root>
>     </web>
> </module>
>
> When I run Orion it seems to pick it up okay.
>
> I made the following entries in the Orion setup files.
> In config/server.xml I made this entry...
>
> <application name="employee-app"
>             path="D:\Personal\Proto\CodeGen\Employee3
> \rel\employee-app.ear" />
>
> Orion finds it the ear file and unbundles the war file inside.
>
> But..... When I post I get an Error...
>
> The post looks like this....
> <form action="/employee-app/com.objectgeneration.sample.EmployeeForm"
> method="post">
>
> And it does not work....
> However when I post to the one I installed in the default web
> application it works great.....
>
> <form action="/servlet/com.objectgeneration.sample.EmployeeForm"
> method="post">
>
> -- Yours truly
> Mateo Torrealto
>
>
>
>
____________________________________________________________________________
_________
> Get more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com
>
>



Reply via email to