Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
View Interest List Message Details
<< Back to Search Results

Date: 09/27/2005
From: matt@newatlanta.com
Subject: Re: [ServletExec] Java Web Services on SE 5.0
Michael,
Whew... lots of questions here.
I'll try to get them all:


No both webadapter.properties files are not needed.
The SE installer places that file into SE's config folder by default.
If there is one in the Scripts folder, then you or someone else must 
have placed a copy there.
The adapter will first look for a webadapter.properties in the folder 
where the DLL is (sitting right next to the DLL).
If found there, it will use it.
If not found there, then the adapter will look for it in SE's config       
folder.

You should probably remove the one in the Scripts folder, and just use 
the one SE's config folder since having it be in the Scripts folder is 
considered to be an advanced setup, which one would only do if they had 
specific requirements. Of course whichever one you end up keeping, you 
need to ensure that it contains the right information.

By your desciption of how you normally deploy your code to SE, you are 
not familiar with a formal Web Application (WEB-INF folder, web.xml 
file) as defined by the Servlet 2.2 Specification.
You use what I call the "Legacy" context.

A Context is just a webapplication... see the SE 5.0 User Guide for a 
great description and discussion of what webapp is, how it's structured, 
and the benefits of using a webapp.
There is an entire chapter devoted to webapps in that manual.


You asked:

---
could I have

copied ...\axis_example\webapp\* to C:\ServletExec AS\se-GIFT\webapp\*,
then provided the absolute path of C:\ServletExec AS\se-GIFT\webapp
instead of C:\Java\axis_example\webapp?
---

Technically you could have done that yes... but I would not recommend it.
You need to understand that C:\ServletExec AS\se-GIFT\ is the document root of  
the web app named "default-app".
This is because you made that folder be the doc root of the default-app by      
setting -root equal to that folder.

So the content (html, css, js, images, JSPs, etc...) that goes inside           
C:\ServletExec AS\se-GIFT\ is content that belongs to the default-app, and is   
requested using the context path of the default app.

>From FAQ #259:
---
default-app [whose context path is a single forward slash. "/"]
---

(I believe that answers a different question you asked).

So it would be odd (in my opinion) for you to take the contents (and            
configurations and classes and JARs) of 1 webapp
(...\axis_example\webapp\* as you described it) and place them inside any       
portion of some other webapp (the document root of the default-app in this      
case). It would be a sort of funky nesting, and it is not advisable.

I really recommend that you play around with the exampleWebApp which comes with 
SE.
See what the User Guide says about that app, then deploy it... multiple times   
if you like.
Place it whereever you like on your hard-drive then deploy it by pointing to    
that location.

I typically place all my webapps under:
C:\myWebapps

So I have:

C:\myWebapps\webappA
C:\myWebapps\webappB
C:\myWebapps\webappC

But never:

C:\myWebapps\webappA\webappB\webappC

Because then it could be possible to request a resourse that's in webappC, 
via webappA, or via webappB, or via webappC.
Consider the case where the resource has been protected (configured that way in 
webappC).
So long as the request is made using the context path of webapp C then webapp C 
can enforce protections (or run the filter, or do whatever else is supposed to  
happen when people request that resource).
But the protections (or the filter, or whatever, could be circumvented by       
requesting the resource via webapp A or B.
You see?



Yes you can manually edit application.xml if you want to.
But then you must restart SE if you want SE to see the change.

You said:

---

What is the URL context of files under the
.../se-GIFT/webapps/default/default-app folder? How would I use this
folder to deploy a servlet (assuming a jar file contains the servlet
classes) or a jsp? As I mentioned, currently I hardwire the paths to
these files into the ServletExecStart.bat file. Is this non-standard
behavior? Should I be placing my jsps and servlet code under this
default-app folder?
---

See above (it's "/") :-)

So you want to use the default-app to deploy things?
With all webapps, you content (htmls, jsp, css, js, etc...) goes into the       
document root of the webapp.
For the default-app running in SE AS, that means the value of -root.

You should first get very very clear understanding of normal webapps (the SE    
5.0 User Guide and the exampleWebApp are great for that).
Then you should learn about the default-app (from the guide) and also from:
http://www.newatlanta.com/c/products/servletexec/self_help/faq/detail?faqId=278


the paragraph that begins with:
"You may also need to understand the webapp named "default-app"  
which has special properties."
Has some very good information that I think will help you.


The default-app is there for people that don't know about webapps, and     
don't want to know about them.
But since you edit -root, and -root effects the default-app, you probably need  
to understand webapps in general and the default-app in particular.

Adding JARs to the main classpath is fine, you can do that if you want to.


Now we come to the specific problems you are having running the axis example.
You are using a version of Axis with which that example has never been tested.

Clearly we'll need to get that example updated, but I doubt it will be     
anytime too soon.


You said:

WARNING: Unable to find required classes (javax.activation.DataHandler
and javax.mail.internet.MimeMultipart). Attachment support is disabled. 

and asked:
Is this important or can I ignore it?

I don't know.

javax.activation.DataHandler, likely comes from activation.jar.
Was that JAR in your classpath when you got that warning?
If so, does that JAR contain that class?
If not, maybe you need a newer version of activation.jar to match the newer     
version of Axis that you have.

And maybe that issue is what later causes the AxisFault issue.
I'd tackle the first issue first and see if it clears up the 2nd issue or  
maybe unleashes better/more clues.

Matt McGinty
Software Engineer
New Atlanta Communications, LLC
http://www.newatlanta.com 



Kelly, Michael (DSI) wrote:

>>Ah, so you are using the -root option in your
>>start script to tell your ASI that
>>
>>C:/ServletExec AS/se-GIFT/jsps
>>
>>is the document root of the webapp named "default-app".
>>
>>Now I understand.
>>It is good that you use a subfolder of the
>>se-GIFTS folder since otherwise, people could
>>request your SE configuration files or log files.
>>
>>Also, your subject line indicates that you are using SE 5.0.
>>If that is so, then you do not need the following
>>2 lines in your webadapter.properties file:
>>
>>---
>>servletexec.GIFT.applications=/example
>>servletexec.GIFT.aliases=/servlet,.shtml,.jsp
>>---
>>
>>You should remove those lines.
>>They are not being read in by the adapter.
>>With SE 5.0, those lines are obsolete.
>>
>>    
>>
>I noticed that there is a webadapter.properties file in
>both Inetpub/scripts and in SE's config folder. Are 
>both necessary?
>
>  
>
>>You may want to read:
>>
>>    
>>
>http://www.newatlanta.com/c/products/servletexec/self_help/faq/detail?fa
>qId=259
>  
>
>>for more details.
>>
>>    
>>
>Thanks, I did.
>
>  
>
>>To configure the application, you just go to the
>>SE admin pages and on the left, click the "Manage"
>>link under the "Web Applications" heading.
>>Then click the "Add web application" button and
>>type in a name for the application, a context path
>>of "/axis" (no quotes) and then give the absolute
>>path on the hard drive for the location.
>>
>>For example, on my machine... I unzipped the
>>example to the "My Documents folder", giving me:
>>
>>C:\Documents and Settings\matt\My Documents\axis_example
>>
>>Running all the batch files as you did is what
>>populates the webapp with the classes and JARs that are needed.
>>So then the location to enter in the admin UI would be:
>>
>>C:\Documents and Settings\matt\My Documents\axis_example\webapp
>>
>>Basically it is the same as deploying any webapp...
>>you point SE to the folder that contains the
>>WEB-INF folder for that webapp.
>>Voila... it's configured (i.e. deployed) in SE.
>>
>>    
>>
>Woo hoo! I just created a test_axis configuration! Though I expected it
>to copy the relevant files under the se-GIFT instance (at C:\ServletExec
>AS\se-GIFT). If I had wanted the files under this folder, could I have
>copied ...\axis_example\webapp\* to C:\ServletExec AS\se-GIFT\webapp\*,
>then provided the absolute path of C:\ServletExec AS\se-GIFT\webapp
>instead of C:\Java\axis_example\webapp?
>
>I found it modified the C:\ServletExec
>AS\se-GIFT\ServletExecData\default\application.xml file to include the
>new context information, so I guess you can point your context somewhere
>else using this file instead of using the admin client to recreate the
>context. 
>
>I think the main reason this all confuses me so much is that I use a
>different method to deploy. When I deploy, first I use the SE
>installation executable to create a new SE instance. Then I plop my jar
>file with any servlet code into a lib folder and my jsps into a jsps
>folder. Then I modify the StartServletExec.bat file to include the jsps
>folder and jar file in my classpath. I never use the Browser based SE
>Admin interface to deploy and don't seem to have any URL contexts      
except
>the ones the new instance provides by default (the default and
>servletexec contexts). Heck, I don't really even know what a URL       
context
>IS, though I suspect it is to allow different web apps to run in a
>single SE instance (you must have shaked your head at me when I admitted
>that). Whenever I want a new context, I just create a new instance as
>its own island - no need to split functionality between contexts if each
>instance is dedicated to a single context. This works for us since we
>really do want our projects on different IPs and isolated from each
>other.
>
>What is the URL context of files under the
>.../se-GIFT/webapps/default/default-app folder? How would I use this
>folder to deploy a servlet (assuming a jar file contains the servlet
>classes) or a jsp? As I mentioned, currently I hardwire the paths to
>these files into the ServletExecStart.bat file. Is this non-standard
>behavior? Should I be placing my jsps and servlet code under this
>default-app folder?
>
>
>I did have some problems though. I got this error message a number of
>times:
>WARNING: Unable to find required classes (javax.activation.DataHandler
>and javax.mail.internet.MimeMultipart). Attachment support is disabled. 
>Is this important or can I ignore it?
>
>
>Also the step:
>
>  - Invoke bin\deploy-web-service....
>
>Produced the error:
>Exception: AxisFault
> faultCode: {http://xml.apache.org/axis/}HTTP
> faultSubcode:
> faultString: (405)Method not allowed
> faultActor:
> faultNode:
> faultDetail:
>        {}:return code:                                                     
405&lt;html&gt;&lt;head&gt;&lt;title&gt;Method
>not                                                                         
allowed&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1
&gt;HTTP/1.1 405
>Method not
>allowed&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;{http://
xml.apache.org/axis/
>}HttpErrorCode:405 
>
>Any idea what that is all about? I suspect it has to do with the
>following lines in the deploy.wsdd file:
>
><deployment
>    xmlns="http://xml.apache.org/axis/wsdd/"
>                                                                            
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>
>since the url "http://xml.apache.org/axis/wsdd/" does not exist.  
Perhaps
>your example needs a correction? What can I use instead of this value?
>
>
>  
>
>>You should then be able to use the standalone
>>client that comes with that example to access
>>the webservice that's available in that newly
>>deployed webapp.
>>
>>The exampleWebApp that comes with SE might be a
>>simpler place to start, just to learn about a
>>webapp, how to deploy it, and how one works.
>>The SE 5.0 User Guide discusses the exampleWebApp.
>>
>>Matt McGinty
>>Software Engineer
>>New Atlanta Communications, LLC
>>http://www.newatlanta.com 
>>
>>    
>>
>-------------------------------------------------------------------------
>ServletExec-Interest. For archives and unsubscribe instructions, visit:
>
>    http://www.newatlanta.com/servletexec-interest.jsp
>  
>

-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

    http://www.newatlanta.com/servletexec-interest.jsp

Message Thread
Date Subject Author
09/26/2005 Re: [ServletExec] Java Web Services on SE 5.0 matt@newatlanta.com
09/26/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/26/2005 Re: [ServletExec] Java Web Services on SE 5.0 matt@newatlanta.com
09/26/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/26/2005 Re: [ServletExec] Java Web Services on SE 5.0 matt@newatlanta.com
09/27/2005 RE: [ServletExec] Java Web Services on SE 5.0 jitesh.h.amin@lmco.com
09/27/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/27/2005 RE: [ServletExec] Java Web Services on SE 5.0 jitesh.h.amin@lmco.com
09/27/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/27/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/27/2005 Re: [ServletExec] Java Web Services on SE 5.0 matt@newatlanta.com
09/28/2005 RE: [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
09/28/2005 Re: [ServletExec] Java Web Services on SE 5.0 matt@newatlanta.com
09/26/2005 [ServletExec] Java Web Services on SE 5.0 kellymt@upmc.edu
<< Back to Search Results


   
company media information terms of use privacy policy contact us