JSF using Sun Java Studio Creator 2
hi every body:
i developed an application using Sun Java Studio Creator 2 , now by default the url patterns the creator generates is like this:
...../faces/page1.jsp
now i want the ,, i need to change the extension of the page , so i want to replace it from .jsp to .abc for example , and i want to remove the /faces prefix for each page....
that's all
thanks in advance
# 1
And where is your question?
# 2
> i need to change the extension of> the page , so i want to replace it from .jsp to .abc> for example , and i want to remove the /faces prefix> for each page....doesnt that seem a Question :-) thank u BalusC
# 3
> I need .. I want .. I wantThose are just requirements/statements, not questions.Anyway, so you want to know how to do it all with one magic click or shortcut?
# 4
BalusC , may i know when will u stop talking in non-technical things :)yes i need it in magic click Mr Magican :)thank u :)
# 5
Modify URL-PATTERN for your Faces Servlet from /faces/* to *.abc in web.xml
change
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
to
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.abc</url-pattern>
</servlet-mapping>
hope that might help :)
REGARDS,
RaHuL
# 6
> yes i need it in magic click
I am not used with Sun Java Studio Creator, so I can't give an answer on this. If you was using Eclipse with WTP, I was able to tell a bit more.
But I can tell you that you can solve it yourself with a few simple changes into some files when you re-read your own requirements and code accordingly. You need to change the url-pattern of the FacesServlet to *.abc in the web.xml file. In all pages you just have to change the URI of the relevant links to *.abc. That's it :)
# 7
thank u Blause C , iknow this way when i used to write my jsf by code, but i need to congigure it using the Creator Studio,,,, i make what u provide before i post this , but it didnt work... thank u anyway
i forget to ask u , does the format of my replay suits u ? as there is no need want need :) :)
good luck
# 8
> but it didnt workPlease be specific. Do you get any exceptions? If so, show them.
# 9
ok i will be specific ,,,,
when i make it as u told me ,,, the result is a page with list of pages like what appear in tomcat when u dont have index page ,, and when u click at one page of them (they are .jsp by the way) a resquested resource not cound appear ,, but it works fine if i change the extension of the page in url address in browser,,,
thats all
hope u got what i wrote
but i dont think u can provide me a solution as u didint work with creator before ,,,,,,,
thanks in advance
# 10
You could better replace the directory listing by a welcome file with links to the right resources, i.e. <a href="page.abc"> instead of <a href="page.jsp">.
The FacesServlet will be invoked only if the url-pattern of the request URI matches the url-pattern as definied in the web.xml. If the FacesServlet is not invoked by a correct request URI, then you will indeed get those kind of errors.
# 11
What u mentioned is correct, but it is not the case in Creator any way thank u