• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

server not mapping JSF url-pattern

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my web.xml file I have:
as well asBut still when I type in a url for a jsp file with the extension replaced for jsf the webserver returns "file not found".
I should mention that I have a boiled down version of my webapp working on a local tomcat instance. However, the target environment for the jsf enabled jsps is an existing webapplication in a WebSphere Application Server, and here it fails.

In the web.xml file there are also many elements declaring various filter-mappings and servlet-mappings, including for the url-pattern /*, can this be the cause of the mapping not working for *.jsf?

Thanks in advance,

Seb
[ July 27, 2005: Message edited by: seb petterson ]
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to use an index.html file with content like this

<html>
<head>
<meta http-equiv="Refresh" content= "0; URL=pages/home.jsf"/>
<title>Start Web Application</title>
</head>
<body>


</body>
</html>

This will start the FacesContext for you.

And yes, the mapping to * may be a gotcha. Which one is first in the file?
[ July 27, 2005: Message edited by: Paul Smiley ]
 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Smiley:
Try to use an index.html file with content like this

<html>
<head>
<meta http-equiv="Refresh" content= "0; URL=pages/home.jsf"/>
<title>Start Web Application</title>
</head>
<body>


</body>
</html>

This will start the FacesContext for you.

And yes, the mapping to * may be a gotcha. Which one is first in the file?

[ July 27, 2005: Message edited by: Paul Smiley ]



Thanks but it's still the same. Which is consistent with my assumption that the container doesnt at all map the url to the FacesServlet, it redirects but then returns "file not found".

As to your question: the /* filter-mapping is before the *.jsf mapping.

/seb
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by seb petterson:

As to your question: the /* filter-mapping is before the *.jsf mapping.


Extension mapping is only considered when there is no path mapping. In other words, /* will always take precedence over *.jsf!
 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:

Extension mapping is only considered when there is no path mapping. In other words, /* will always take precedence over *.jsf!



Well, you can intercept all request with a filter mapped with /* and then pass on the request to a servlet or to the next filter in the FilterChain. Ofcourse if the filter doesnt pass on the request there is a problem. My problem is that I don't have the source code for the filter that intercepts all url-patterns, so I dont know if it doesnt pass on the request and in that case how it processes it.

/seb
[ July 27, 2005: Message edited by: seb petterson ]
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by seb petterson:


Well, you can intercept all request with a filter mapped with /* and then pass on the request to a servlet or to the next filter in the FilterChain. Ofcourse if the filter doesnt pass on the request there is a problem. My problem is that I don't have the source code for the filter that intercepts all url-patterns, so I dont know if it doesnt pass on the request and in that case how it processes it.

/seb

[ July 27, 2005: Message edited by: seb petterson ]



Sorry. You're right. Your comment that one came before the other made me overlook that the first was a filter (which negates the difference of what order it comes in relation to a servlet mapping.

I think I would write another /* filter to allow you to inspect the request after the problematic filter is done with it. It could show you if the request path is getting unexpectedly changed.
 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I think I got it.

The problem was not JSF related at all: I didn't know that WebSphere had it's own way of updating the deployment descriptor, so just editing the web.xml file in the application directory wasn't enough. So all the changes I had done with the mappings had not gone through at all. (FYI: websphere admin console has a an option called "Use Metadata From Binaries" and if you check it, it updates the master configuration according to your changes and after this + a restart of the application, the application will finally be updated accordingly.)
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

seb petterson wrote:In my web.xml file I have:
as well asBut still when I type in a url for a jsp file with the extension replaced for jsf the webserver returns "file not found".
I should mention that I have a boiled down version of my webapp working on a local tomcat instance. However, the target environment for the jsf enabled jsps is an existing webapplication in a WebSphere Application Server, and here it fails.

In the web.xml file there are also many elements declaring various filter-mappings and servlet-mappings, including for the url-pattern /*, can this be the cause of the mapping not working for *.jsf?

Thanks in advance,

Seb
[ July 27, 2005: Message edited by: seb petterson ]



Hi Ranchers,

I am facing the similar problem. Actually I need to configure a JSF application on eclipse Ide using Websphere CE server. This application currently working on Netbeans Ide and uses Sun One Server. I tried to configure on eclipse using Tomcat first and have tried to run a jsp. I got "404 page not found error" as mentioned in quoted message and the extension changed to jsf. I am new to Websphere and have no idea, how to go about. Could you please let me know the steps involved or probably the helpful links to get my work done.

Thanks & Regards
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic