Java 选项卡面板未正确显示

Java 选项卡面板未正确显示,java,html,jsp,struts2,struts,Java,Html,Jsp,Struts2,Struts,我试图显示选项卡式面板,但选项卡未显示。这是浏览器显示的内容- Welcome To Struts 2! This is the first pane This is the remote tab 欢迎来到Struts 2! 这是第一个窗格 这是远程选项卡 我的代码: <%@ taglib prefix="s" uri="/struts-dojo-tags" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitiona

我试图显示选项卡式面板,但选项卡未显示。这是浏览器显示的内容-

Welcome To Struts 2! This is the first pane This is the remote tab 欢迎来到Struts 2! 这是第一个窗格 这是远程选项卡 我的代码:

<%@ taglib prefix="s" uri="/struts-dojo-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Basic Struts 2 Application - Welcome</title>
</head>
<body>
<h1>Welcome To Struts 2!</h1>

<s:tabbedpanel id="test" >
   <s:div id="one" label="one" theme="ajax" labelposition="top" >
       This is the first pane<br/>
   </s:div>
   <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
       This is the remote tab
   </s:div>
</s:tabbedpanel>


</body>
</html>

基本Struts 2应用程序-欢迎使用
欢迎来到Struts 2!
这是第一个窗格
这是远程选项卡

感谢您的帮助

这似乎有效-不确定原因:

<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
  <head>
    <s:head theme="ajax" debug="true"/>
  </head>
  <body>
  <table border="1" width="50%">
    <tr>
    <td width="100%">

    <s:tabbedPanel id="test" >

      <s:div id="one" label="Tab 1" theme="ajax" labelposition="top" >
        This is the first panel.
        RoseIndia.nt<br>
        JavaJazzUp.com<br>
        NewsTrackIndia.com
      </s:div>

      <s:div id="two" label="Tab 2" theme="ajax">
        This is the second panel.
      </s:div>

      <s:div id="three" label="Tab 3" theme="ajax">
        This is the third panel.<br>
        Java Tutorial<br>
        PHP Tutorial<br>
        Linux Tutorial
      </s:div>

      <s:div id="four" label="Tab 4" theme="ajax">
        This is the forth panel.
      </s:div>

     </s:tabbedPanel>

     </td>
    </tr>
  </table>
  </body>
</html>

这是第一个面板。
RoseIndia.nt
JavaJazzUp.com
印度新闻网 这是第二个小组。 这是第三个面板。
Java教程
PHP教程
Linux教程 这是第四个小组。

这是第一个面板。
RoseIndia.nt
JavaJazzUp.com
印度新闻网 这是第二个小组。 这是第三个面板。
Java教程
PHP教程
Linux教程 这是第四个小组。
调试任何struts或其他jsp框架的最佳方法是查看呈现的输出

在浏览器中查看HTML

有一种可能性是带的位仍然在输出中,这意味着它没有被解析。 您的页面是否具有正确的扩展名(*.jsp而非*.html是典型的扩展名)

如果HTMl是您所期望的,那么请确保您具有应用程序所期望的正确样式表

<%@ taglib prefix="s" uri="/struts-dojo-tags" %>

<html>
  <head>
    <s:head debug="true"/>
  </head>
  <body>
  <center>
  <table border="0" width="50%">
    <tr>
    <td width="100%">

    <s:tabbedpanel id="test" >

      <s:div id="one" label="Tab 1" theme="ajax" labelposition="top" >
        This is the first panel.
        RoseIndia.nt<br>
        JavaJazzUp.com<br>
        NewsTrackIndia.com
      </s:div>

      <s:div id="two" label="Tab 2" theme="ajax">
        This is the second panel.
      </s:div>

      <s:div id="three" label="Tab 3" theme="ajax">
        This is the third panel.<br>
        Java Tutorial<br>
        PHP Tutorial<br>
        Linux Tutorial
      </s:div>

      <s:div id="four" label="Tab 4" theme="ajax">
        This is the forth panel.
      </s:div>

     </s:tabbedpanel>

     </td>
    </tr>
  </table>
  </center>
  </body>
</html>