Problems with CSS on an XHTML page

Asked

Viewed 660 times

1

When starting my project I created all the favorable structure for the proper functioning of the CSS file.

This is my page;

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<h:head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <h:outputStylesheet library="css" name="sistema.css" />
</h:head>


<h:body>

    <div id="tudo">

        <div id="topo">
            <div id="fone">TELEFONE DE CONTATO 011-3847-9076</div>
        </div>
        <div id="menu">
        Agendadorhbjhbscjbdhcjhbsd

        </div>
        <div id="conteudo"></div>
        <div id="rodape"></div>

    </div>

</h:body>
</html>

Since this bit of code didn’t work;

    <div id="menu">
    Agendadorhbjhbscjbdhcjhbsd

    </div>

At first I thought it was the eclipse that was slow in replicating the change, so I cleared the project, stopped and started on Tomcat and pressed F5 on keyboard to update the web page, but I was unsuccessful and still generated an error message on the eclipse consoles;

ADVERTÊNCIA: 
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Uma conexão estabelecida foi anulada pelo software no computador host
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
    at java.nio.channels.Channels$WritableByteChannelImpl.write(Unknown Source)
    at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:283)
    at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:125)
    at org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:99)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:591)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Uma conexão estabelecida foi anulada pelo software no computador host
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(Unknown Source)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
    at sun.nio.ch.IOUtil.write(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
    at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:127)
    at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
    at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:173)
    at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
    at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
    at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
    at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
    at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:118)
    at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
    at org.apache.coyote.Response.doWrite(Response.java:503)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
    ... 31 more

Obviously I know the cause is because of "An established connection has been overridden by the software on the host computer"

belaza, no problem, the only problem is knowing how to solve, because I’ve never had a problem like this.

I accept suggestions.

======================================================================

See how the tag is

#menu{
    position:relative;
    height:90px;
    font-size: 32px;

    background: black;
    filter:alpha(opacity=27);
    -moz-opacity:.27;
    opacity:.27;
}

The problem is here;

background: black;
filter:alpha(opacity=27);
-moz-opacity:.27;
opacity:.27;

When I add these lines of code in CSS it causes things written not to appear.

Why does that happen? How do I fix it?

1 answer

1


Try it this way. The fact that it doesn’t appear is that the menu text was the same as the background, when I switched to red it appeared. I don’t know how you get with the rest of your style, but running here appeared.

This will not make the server error disappear, but reinforcing the need to put the h:html tag.

#menu{

    position:relative;
    height:90px;
    font-size: 32px;
    color:red;
    background: black;
    filter:alpha(opacity=27);
    -moz-opacity:.27;
    opacity:.27;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

   
<head>


<body>

    <div id="tudo">

        <div id="topo">
            <div id="fone">TELEFONE DE CONTATO 011-3847-9076</div>
        </div>
        <div id="menu">
        Agendadorhbjhbscjbdhcjhbsd

        </div>
        <div id="conteudo"></div>
        <div id="rodape"></div>

    </div>

</body>
</html>

  • I just updated my post, take a look.

  • Just so I understand, when you call this page it presents some texts except whatever is in the div menu and the server spits out that exception, right ?

  • from what I understand of your question, yes.

  • I updated the answer.

  • very good, thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.