![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
PFO Founder
![]() ![]() |
Spring Framework Controller
I have been playing around with java web programming a lot lately, and am using the Spring Framework MVC to do this. My problem is that when I go to the url http://localhost:8080/Forum/index.html the spring framework calls the controller it is suppose to call, but when I go to http://localhost:8080/Forum/ it won't call the controller, and I can't seem to figure out how I can get it to do that.
Below is my web.xml file: xml Syntax (Toggle Plain Text)
Below is my springapp-servlet.xml xml Syntax (Toggle Plain Text)
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#2 |
|
Sexy Programmer
|
Re: Spring Framework Controller
EDIT: Nevermind. Sorry.
Maybe you need to play with the mapping options more. All I can think of.
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#3 |
|
Java Developer
|
Re: Spring Framework Controller
when you call any URL; procedure to locate this resource within the webserver is:
for a URL: <http|https>://<hostname|IP>[:portno]/<ApplicationName>/[Resource] 1: Go to the <ApplicationName>'s web.xml 2: Find the matching servlet-mapping tag with <url-pattern> regex. for URL:/[Resource] Go to the servelet-mapping tag.. and execute the servelet-class tag servelet 3: If there is no Servelet-mapping match then resource not found error is displayed. 4: if URL:/[Resource] is blank it will take each <welcome-file> from <welcome-file-list> is taken and used as URL:/[Resource] and execute the whole thing from 2: skipping the 3rd point. In your second case http://localhost:8080/Forum/ resource is blank and specified welcome-file "index.jsp" is not matching with any servelet-mapping tag's <url-pattern> so... Insted of <url-pattern>*.html</url-pattern> put <url-pattern>*.*</url-pattern> in servelet-mapping tag.. so scope of index.jsp will within the front controller.
__________________
[Pushkaraj] Imagination is more important than knowledge – Albert Einstein |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Symfony Vs Zend Framework | Sanjay Aggarwal | PHP | 5 | Aug 12th, 2008 9:58 AM |
| Model View Controller ( Front Controller ) | hoffmandirt | Other Web Development Languages | 0 | Feb 27th, 2006 5:41 PM |
| VB O5 Program Running Problem..Think its .net framework | Silent | Visual Basic .NET | 3 | Dec 15th, 2005 4:43 AM |
| Framework 2.0 came out, kinda | bja888 | Coder's Corner Lounge | 11 | Nov 9th, 2005 4:06 PM |
| Net Group /ADD (on a windows box, non domain controller) | Infinite Recursion | Other Programming Languages | 1 | Apr 13th, 2005 2:27 PM |