Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

web.xml/spring url mappings

Thread view: 
Aljosa Mohorovic - 28 May 2007 15:05 GMT
i have this defined in web.xml:
<servlet-mapping>
 <servlet-name>admin</servlet-name>
 <url-pattern>/admin/*</url-pattern>
</servlet-mapping>

and in admin-servlet.xml:
<bean name="/" class="com.[...].pages.Page"></bean>

and when i load http://localhost/admin/ everything works as expected
but when i load http://localhost/admin i get http 404 error. is there
a simple way to fix this little issue?
Alexandre Jaquet - 28 May 2007 15:15 GMT
> i have this defined in web.xml:
> <servlet-mapping>
[quoted text clipped - 8 lines]
> but when i load http://localhost/admin i get http 404 error. is there
> a simple way to fix this little issue?

Hi,

You can fix it by using a welcome file

<welcome-file-list>
   <welcome-file>/admin/index.jsp</welcome-file>
</welcome-file-list>

Hope this help.

Regards,

Alexandre
Aljosa Mohorovic - 28 May 2007 15:50 GMT
> Hi,
> You can fix it by using a welcome file
[quoted text clipped - 4 lines]
>
> Hope this help.

i tried that, it didn't work. from log:
[org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping] -
<Looking up handler for [/admin]>
[org.springframework.web.servlet.PageNotFound] - <No mapping for [/
admin] in DispatcherServlet with name 'admin'>

any other ideas?
Alexandre Jaquet - 28 May 2007 16:55 GMT
> i have this defined in web.xml:
> <servlet-mapping>
[quoted text clipped - 8 lines]
> but when i load http://localhost/admin i get http 404 error. is there
> a simple way to fix this little issue?

and by updating the bean name <bean name="/admin" ?
Aljosa Mohorovic - 29 May 2007 14:58 GMT
> > i have this defined in web.xml:
> > <servlet-mapping>
[quoted text clipped - 10 lines]
>
> and by updating the bean name <bean name="/admin" ?

it doesn't work, welcome-file-list has no effect with bean name "/
admin".
any other ideas?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.