|
|
|
|
|
|
|
|
Re: Browser window title and favicon on RWT level [message #129504 is a reply to message #129491] |
Wed, 22 April 2009 13:33  |
Eclipse User |
|
|
|
Originally posted by: peterka.jiri.gmail.com
Markus, thanks, you're the man! Now it works great :).
Jiri
Markus Wolf wrote:
> Hi Jiri,
>
>> thanks for detailed instructions. Nevertheless I've got still the same
>> problem. getServletName() is called twice and nothing more.
>>
>> I've tried servlet name in getServletName() as
>> localhost:8180/rapServlet" or "localhost:8180/ServletTest/rapServlet",...
>>
>> Web.xml servlet is defined like this:
>> <servlet>
>> <servlet-name>rapServlet</servlet-name>
>> <servlet-class>org.eclipse.rwt.internal.engine.RWTDelegate</servlet-class >
>> </servlet>
>>
>> <servlet-mapping>
>> <servlet-name>rapServlet</servlet-name>
>> <url-pattern>/index.html</url-pattern>
>> </servlet-mapping>
>>
>> Finally URL is http://localhost:8180/ServletTest where "ServletTest" is
>> Project name in Eclipse. I'm little bit confused with this mapping.
>> Any idea is welcome. (RAP 1.2 M6)
>>
> You specified '/index.html' as mapped servlet. Therefore using
> 'index.html' in your Binding as getServletName() should work.
>
> Regards
> Markus
>
>> Best regards
>>
>> Jiri
>>
>> Markus Wolf wrote:
>>> Hi Jiri,
>>>
>>>> I followed this steps, wrote own implementation of AbstractBranding and
>>>> this class is instantiated when app is executed. But getTitle() and
>>>> other methods are never called.
>>>>
>>>> Don't you know what's wrong? (URL, some other details, etc.)?
>>>>
>>> You should define the following to get this working:
>>>
>>> <context-param>
>>> <param-name>org.eclipse.rwt.themes</param-name>
>>> <param-value>my-theme#my-theme.css</param-value>
>>> </context-param>
>>> <context-param>
>>> <param-name>org.eclipse.rwt.brandings</param-name>
>>> <param-value>example.Branding</param-value>
>>> </context-param>
>>>
>>> Then you need a file my-theme.css in your root classpath and the class
>>> 'example.Branding'. This class must extend the AbstractBranding class of
>>> RWT and override the following methods:
>>> * getServletName() - this must return the servlet mapping url but
>>> without leading slash
>>> * getFavIcon() - this should return the path to the favicon you want
>>> to use
>>> * getTitle() - this should return the page title you want to display
>>> * getThemeId() - this should return 'my-theme' as specified in the
>>> web.xml before the dash
>>>
>>> Hope that helps :)
>>>
>>> Regards
>>> Markus
>>>
>>>
>>>> Jiri
>>>>
>>>> Markus Wolf wrote:
>>>>> Hi Jiri
>>>>>
>>>>>> is there a way howto set Browser window title and flavicon from RWT
>>>>>> application?
>>>>>>
>>>>> in the FAQ is explained on how to create an RWT application:
>>>>> http://wiki.eclipse.org/RAP/FAQ#How_do_I_use_a_RWT_standalon e_application_in_Tomcat
>>>>>
>>>>>
>>>>>
>>>>> With the branding you can define your requested aspects.
>>>>>
>>>>> Regards
>>>>> Markus Wolf
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04412 seconds