felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcin Wilkos (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-1015) Hardcoded HTML Header/Footer in AbstractWebConsolePlugin
Date Tue, 16 Jun 2009 00:12:07 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcin Wilkos updated FELIX-1015:
---------------------------------

    Attachment: branding.patch

Adding plugin which resolves the problem. 

> Hardcoded HTML Header/Footer in AbstractWebConsolePlugin
> --------------------------------------------------------
>
>                 Key: FELIX-1015
>                 URL: https://issues.apache.org/jira/browse/FELIX-1015
>             Project: Felix
>          Issue Type: Sub-task
>          Components: Web Console
>    Affects Versions: webconsole-1.2.8
>            Reporter: Thomas Diesler
>         Attachments: branding.patch
>
>
> Instead of 
>     private static final String HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"
?>"
>         + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">"
>         + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
>         + "<head>"
>         + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
>         + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
>         + "<title>{0} - {2}</title>"
>         + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/admin.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
>         + "<script language=\"JavaScript\">"
>         + "appRoot = \"{5}\";"
>         + "pluginRoot = appRoot + \"/{6}\";"
>         + "</script>"
>         + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" type=\"text/css\">"
>         + "</head>"
>         + "<body>"
>         + "<div id=\"main\">"
>         + "<div id=\"lead\">"
>         + "<h1>"
>         + "{0}<br>{2}"
>         + "</h1>"
>         + "<p>"
>         + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img src=\"{5}/res/imgs/logo.png\"
width=\"165\" height=\"63\" border=\"0\"></a>"
>         + "</p>" + "</div>";
> we propose 
>     protected String getHeader()
>     {
>        String HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
>         + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">"
>         + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
>         + "<head>"
>         + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
>         + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
>         + "<title>{0} - {2}</title>"
>         + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/admin.js\" language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
>         + "<script language=\"JavaScript\">"
>         + "appRoot = \"{5}\";"
>         + "pluginRoot = appRoot + \"/{6}\";"
>         + "</script>"
>         + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" type=\"text/css\">"
>         + "</head>"
>         + "<body>"
>         + "<div id=\"main\">"
>         + "<div id=\"lead\">"
>         + "<h1>"
>         + "{0}<br>{2}"
>         + "</h1>"
>         + "<p>"
>         + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img src=\"{5}/res/imgs/logo.png\"
width=\"165\" height=\"63\" border=\"0\"></a>"
>         + "</p>" + "</div>";
>        return HEADER;
>     }
> -------------
>     protected PrintWriter startResponse( HttpServletRequest request, HttpServletResponse
response ) throws IOException
>     {
>         ...
>         String header = MessageFormat.format( getHeader(), new Object[]
>     }
>     protected void endResponse( HttpServletRequest request, PrintWriter pw )
>     {
>         pw.println( "</body>" );
>         pw.println( "</html>" );
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message