Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: URl not found error
Created on: 08/09/11 05:55 AM Replies: 3
chetnamca


Joined: 08/09/11
Posts: 2
URl not found error
08/09/11 5:55 AM

Hi,

I have deployed one web application test/HelloWorld.class on apache and then created a web application in ServletExec.

When I am accessing that application using url

http://server name/test/HelloWorld

then I am able to see my application but when i access

http://server name/HelloWorld

then I get error url not found.Although I have given the path for the directory "test" in ServletExec.
Link | Top | Bottom
paulbonfanti


Joined: 10/04/07
Posts: 451
RE: URl not found error
08/10/11 2:23 PM

The file test/HelloWorld.class is not a web application. A web application is a directory or zip file with the following contents:

WEB-INF\web.xml
WEB-INF\classes
WEB-INF\lib
JSP pages
HTML pages
images
etc.

You should find a good tutorial on web applications to learn more about this.

My best guess is HelloWorld is a servlet in the test package. If you configure this servlet with a name of HelloWorld and a class of test.HelloWorld in the default web application then you should be able to invoke it with the URL:

http://server name/HelloWorld

Take a look at the ServletExec User Guide and the exampleWebApp that is installed with ServletExec to learn more about this.
Paul Bonfanti, New Atlanta
Link | Top | Bottom
chetnamca


Joined: 08/09/11
Posts: 2
RE: URl not found error
08/10/11 11:59 PM

Thanks Paul for your reply.......

Actually I am new to the java world.

test is not the package .It is the name of the directory in which I have placed my HelloWorld.class servlet.

The directory structure is as follows:-

/test/WEB-INF/classes/HelloWorld.class

/test/WEB-INF/web.xml

The web.xml has

<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>

So I think there is no need of using test.HelloWorld in the default web application

I will also look at the example in servletexec.

If you have any other suggestion then kindly reply.
Link | Top | Bottom
paulbonfanti


Joined: 10/04/07
Posts: 451
RE: URl not found error
08/12/11 3:45 PM

By using a directory structure of "/test" you have deployed this servlet in the 'test' web application not the default web application. Since it is deployed in the 'test' web application which has a context path of "/test" then you must invoke anything in the 'test' web application with URLs that begin with "/test".

The easiest way to add a servlet to the default app is to place it in /default-app/WEB-INF/classes and configure it in /default-app/WEB-INF/web.xml.
Paul Bonfanti, New Atlanta
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine