这个问题很难也很简单,用application也许你会舒服点!

解决方案 »

  1.   

    客户端不是一定非要要用web界面的,
    SWing,webstart也可以啊传说中用Echo技术象写图形界面一样写web界面,不需要设计html即使你需要用html你也可以用JSF,Taglib,Struts,...抛弃html,直接用xml也可以啊
      

  2.   

    想不明白,html这么简单,值得讨厌吗?
      

  3.   

    是呀学html用不了3天的讨厌他干什么
      

  4.   

    没有什么必要
    对于
    html看懂就行。
      

  5.   

    开玩笑?从本质上来说,java跟html有什么关系?只是Java的应用跟html有关系罢了
      

  6.   

    同意楼上,JAVA里没有什么HTML的,但是要写JSP的话,除了XML和justtest(阿礼)说的一些,就得用到HTML了,其实并不需要这么讨厌的,了解一下HTML就可以了
      

  7.   

    html挺好的啊
    干吗讨厌呢:)
      

  8.   

    java当然可以不接触html了,你可以学习一下swing
    不过我个人认为html没有那么令人讨厌呀
      

  9.   

    java当然可以不接触html了,你可以学习一下swing
    不过我个人认为html没有那么令人讨厌呀
      

  10.   

    你可以只写javabean,那些jsp代码另外找人写不就行了吗
      

  11.   

    晕啊
    我们公司写java的有3个人,只有一个和html有关系,写jsp的
    一个是写后台的没关系,而我是写application的也是没关系,最多我要把applet嵌到html中。
    真不知道你怎么有这样的抱怨。
      

  12.   

    //:! c15:jsp:Hello.jsp
    <%-- This JSP comment will not appear in the
    generated html --%>
    <%-- This is a JSP directive: --%>
    <%@ page import="java.util.*" %>
    <%-- These are declarations: --%>
    <%!
        long loadTime= System.currentTimeMillis();
        Date loadDate = new Date();
        int hitCount = 0;
    %>
    <html><body>
    <%-- The next several lines are the result of a 
    JSP expression inserted in the generated html;
    the '=' indicates a JSP expression --%>
    <H1>This page was loaded at <%= loadDate %> </H1>
    <H1>Hello, world! It's <%= new Date() %></H1>
    <H2>Here's an object: <%= new Object() %></H2>
    <H2>This page has been up 
    <%= (System.currentTimeMillis()-loadTime)/1000 %>
    seconds</H2>
    <H3>Page has been accessed <%= ++hitCount %> 
    times since <%= loadDate %></H3>
    <%-- A "scriptlet" that writes to the server
    console and to the client page. 
    Note that the ';' is required: --%>
    <%
       System.out.println("Goodbye");
       out.println("Cheerio");
    %>
    </body></html>
    ///:~//:! c15:jsp:DisplayFormData.jsp
    <%-- Fetching the data from an HTML form. --%>
    <%-- This JSP also generates the form. --%>
    <%@ page import="java.util.*" %>
    <html><body>
    <H1>DisplayFormData</H1><H3>
    <%
      Enumeration flds = request.getParameterNames();
      if(!flds.hasMoreElements()) { // No fields %>
        <form method="POST" 
        action="DisplayFormData.jsp">
    <%  for(int i = 0; i < 10; i++) {  %>
          Field<%=i%>: <input type="text" size="20"
          name="Field<%=i%>" value="Value<%=i%>"><br>
    <%  } %>
        <INPUT TYPE=submit name=submit 
        value="Submit"></form>
    <%} else { 
        while(flds.hasMoreElements()) {
          String field = (String)flds.nextElement();
          String value = request.getParameter(field);
    %>
          <li><%= field %> = <%= value %></li>
    <%  }
      } %>
    </H3></body></html>
    ///:~//:! c15:jsp:PageContext.jsp
    <%--Viewing the attributes in the pageContext--%>
    <%-- Note that you can include any amount of code
    inside the scriptlet tags --%>
    <%@ page import="java.util.*" %>
    <html><body>
    Servlet Name: <%= config.getServletName() %><br>
    Servlet container supports servlet version:
    <% out.print(application.getMajorVersion() + "."
    + application.getMinorVersion()); %><br>
    <%
      session.setAttribute("My dog", "Ralph");
      for(int scope = 1; scope <= 4; scope++) {  %>
        <H3>Scope: <%= scope %> </H3>
    <%  Enumeration e =
          pageContext.getAttributeNamesInScope(scope);
        while(e.hasMoreElements()) {
          out.println("\t<li>" + 
            e.nextElement() + "</li>");
        }
      }
    %>
    </body></html>
    ///:~
    //:! c15:jsp:SessionObject.jsp
    <%--Getting and setting session object values--%>
    <html><body>
    <H1>Session id: <%= session.getId() %></H1>
    <H3><li>This session was created at 
    <%= session.getCreationTime() %></li></H1>
    <H3><li>Old MaxInactiveInterval = 
      <%= session.getMaxInactiveInterval() %></li>
    <% session.setMaxInactiveInterval(5); %>
    <li>New MaxInactiveInterval= 
      <%= session.getMaxInactiveInterval() %></li>
    </H3>
    <H2>If the session object "My dog" is 
    still around, this value will be non-null:<H2>
    <H3><li>Session value for "My dog" =  
    <%= session.getAttribute("My dog") %></li></H3>
    <%-- Now add the session object "My dog" --%>
    <% session.setAttribute("My dog", 
                        new String("Ralph")); %>
    <H1>My dog's name is 
    <%= session.getAttribute("My dog") %></H1>
    <%-- See if "My dog" wanders to another form --%>
    <FORM TYPE=POST ACTION=SessionObject2.jsp>
    <INPUT TYPE=submit name=submit 
    Value="Invalidate"></FORM>
    <FORM TYPE=POST ACTION=SessionObject3.jsp>
    <INPUT TYPE=submit name=submit 
    Value="Keep Around"></FORM>
    </body></html>
    ///:~
    就是这种程序,和html 混杂的,看得很不爽 好像脑袋里面要有一个IE 一样,一边看一边解析,难受!