You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Java Mails <av...@yahoo.com> on 2002/04/26 09:42:27 UTC

changing default URL

 hi all!
conventionally, I invoke turbine application using the following URL
http://localhost:8080/myapp/servlet/myapp
This can sometimes be long and somehow not very friendly. 
How can I make do it in such a way that I can invoke it using only
http://localhost:8080/myapp
 
tia 
 



---------------------------------
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more

Re: changing default URL

Posted by Jean-Michel FRANCOIS <jm...@datasystem.fr>.
Hi there,
to avoid this problem in my app I didn't change my web.xml but simply 
add an index.jsp in top of my webapp with this content:
<% response.sendRedirect("servlet/mypapp"); %>

I'm not sure it's best way, but it's working.....


Patrice Le Cozler wrote:

>I had the same problem with one of my app (no more images)
>it seems that when you use url mapping, the portion of the url you type after  http://localhost:8080/myapp/ is ignored
>( if you type http://localhost:8080/myapp/images/the-image-you-want-to-display.gif , you always come back to your app
>home page )
>I didn't find the way to avoid that. If you find where the problem comes from, I'm interested.
>
>Patrice
>
>Java Mails wrote:
>
>> thanks for the quick response
>>I tried ur advice... it did worked.
>>however, it can no longer see the images/picture files i use in the app. and so does the CSS ive set.
>>
>>  Patrice Le Cozler <pl...@dexem.com> wrote: You just add the following lines in your myapp/WEB-INF/web.xml file
>>(after the section) :
>>
>>myapp
>>/*
>>
>>see
>>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/funcspecs/fs-default.html
>>
>>or the Java Servlet specification for more informations
>>
>>Patrice
>>
>>Java Mails wrote:
>>
>>>hi all!
>>>conventionally, I invoke turbine application using the following URL
>>>http://localhost:8080/myapp/servlet/myapp
>>>This can sometimes be long and somehow not very friendly.
>>>How can I make do it in such a way that I can invoke it using only
>>>http://localhost:8080/myapp
>>>
>>>tia
>>>
>>>
>>>---------------------------------
>>>Do You Yahoo!?
>>>Yahoo! Games - play chess, backgammon, pool and more
>>>
>>--
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>>
>>---------------------------------
>>Do You Yahoo!?
>>Yahoo! Games - play chess, backgammon, pool and more
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>


Re: changing default URL

Posted by Patrice Le Cozler <pl...@dexem.com>.
I had the same problem with one of my app (no more images)
it seems that when you use url mapping, the portion of the url you type after  http://localhost:8080/myapp/ is ignored
( if you type http://localhost:8080/myapp/images/the-image-you-want-to-display.gif , you always come back to your app
home page )
I didn't find the way to avoid that. If you find where the problem comes from, I'm interested.

Patrice

Java Mails wrote:

>  thanks for the quick response
> I tried ur advice... it did worked.
> however, it can no longer see the images/picture files i use in the app. and so does the CSS ive set.
>
>   Patrice Le Cozler <pl...@dexem.com> wrote: You just add the following lines in your myapp/WEB-INF/web.xml file
> (after the section) :
>
> myapp
> /*
>
> see
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/funcspecs/fs-default.html
>
> or the Java Servlet specification for more informations
>
> Patrice
>
> Java Mails wrote:
>
> > hi all!
> > conventionally, I invoke turbine application using the following URL
> > http://localhost:8080/myapp/servlet/myapp
> > This can sometimes be long and somehow not very friendly.
> > How can I make do it in such a way that I can invoke it using only
> > http://localhost:8080/myapp
> >
> > tia
> >
> >
> > ---------------------------------
> > Do You Yahoo!?
> > Yahoo! Games - play chess, backgammon, pool and more
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: changing default URL

Posted by Java Mails <av...@yahoo.com>.
 thanks for the quick response
I tried ur advice... it did worked.
however, it can no longer see the images/picture files i use in the app. and so does the CSS ive set.
 
  Patrice Le Cozler <pl...@dexem.com> wrote: You just add the following lines in your myapp/WEB-INF/web.xml file
(after the section) :


myapp
/*


see
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/funcspecs/fs-default.html

or the Java Servlet specification for more informations

Patrice

Java Mails wrote:

> hi all!
> conventionally, I invoke turbine application using the following URL
> http://localhost:8080/myapp/servlet/myapp
> This can sometimes be long and somehow not very friendly.
> How can I make do it in such a way that I can invoke it using only
> http://localhost:8080/myapp
>
> tia
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more

Re: changing default URL

Posted by Patrice Le Cozler <pl...@dexem.com>.
You just add the following lines in your myapp/WEB-INF/web.xml file
(after the <servlet> section) :

  <servlet-mapping>
    <servlet-name>myapp</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

see
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/funcspecs/fs-default.html

or the Java Servlet specification for more informations

Patrice

Java Mails wrote:

>  hi all!
> conventionally, I invoke turbine application using the following URL
> http://localhost:8080/myapp/servlet/myapp
> This can sometimes be long and somehow not very friendly.
> How can I make do it in such a way that I can invoke it using only
> http://localhost:8080/myapp
>
> tia
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>