Moving apps around.

This is a discussion on Moving apps around. within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello. I am trying to learn j2ee using Apache Tomcat 5.5.17 under Windows XP Personal edition. I have ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-23-2006
DaLoverhino
 
Posts: n/a
Default Moving apps around.

Hello. I am trying to learn j2ee using Apache Tomcat 5.5.17 under
Windows XP Personal edition. I have the following app which I copied
out of a book:

C:\Program Files\....\webapps\stock

Now, I want to place the "stock" web app in a subdirectory with other
webapps:

C:\Program Files\....\webapps\BookExamples\stock

So I cut and paste the stock directory under BookExamples. Now I use
to type

http://localhost:8080/stock/index.html

I now type

http://localhost:8080/MyApps/stock/index.html

I get the first page up alright, but subsequent links from index.html
do not work. I get "HTTP Status 404 blah blah is not available."

Here's a link from index.html:
<a href="StockList/AnalystForm">See all Analysts</a>


Here's an excerpt from web.xml:

<servlet>
<servlet-name>StockList</servlet-name>
<servlet-class>web.StockListServlet</servlet-class>
</servlet>

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


Now, keep in mind, everything works, if I didn't move the app to a
subdirectory. So what do I need to change to make this app work under
a sub directory? I've tried a bunch of things, and none of them work.
I'm hoping someone here can tell me, or at least tell me it's
impossible.

thanks!

  #2 (permalink)  
Old 06-25-2006
markied
 
Posts: n/a
Default Re: Moving apps around.

Set the context in the web.xml file
i.e. the root path for the app.

http://www.netbeans.org/kb/50/using-...s/webapps.html

cheers,

Mark Dathorne


DaLoverhino wrote:
> Hello. I am trying to learn j2ee using Apache Tomcat 5.5.17 under
> Windows XP Personal edition. I have the following app which I copied
> out of a book:
>
> C:\Program Files\....\webapps\stock
>
> Now, I want to place the "stock" web app in a subdirectory with other
> webapps:
>
> C:\Program Files\....\webapps\BookExamples\stock
>
> So I cut and paste the stock directory under BookExamples. Now I use
> to type
>
> http://localhost:8080/stock/index.html
>
> I now type
>
> http://localhost:8080/MyApps/stock/index.html
>
> I get the first page up alright, but subsequent links from index.html
> do not work. I get "HTTP Status 404 blah blah is not available."
>
> Here's a link from index.html:
> <a href="StockList/AnalystForm">See all Analysts</a>
>
>
> Here's an excerpt from web.xml:
>
> <servlet>
> <servlet-name>StockList</servlet-name>
> <servlet-class>web.StockListServlet</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>StockList</servlet-name>
> <url-pattern>StockList</url-pattern>
> </servlet-mapping>
>
>
> Now, keep in mind, everything works, if I didn't move the app to a
> subdirectory. So what do I need to change to make this app work under
> a sub directory? I've tried a bunch of things, and none of them work.
> I'm hoping someone here can tell me, or at least tell me it's
> impossible.
>
> thanks!


 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0