Internacionalização

1 resposta
Richeli

Pessoas, seguinte:
To tentando implementar um código que o Prof passou sobre Formatação de datas. Mas tah dando erro...

o código é:

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

   
    <fmt : setTimeZone value = "GMT - 3:00" var = " TZ" scope = "page"/> 
    <%@taglib uri = "http://java.sun.com/jstl/fmt" prefix = "fmt"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset= ">
        <title>Exercicio (0,5 pts)</title>
    </head>
    <body>
        <h1>Formatação ou Internacionalização</h1>    
        <jsp: useBean id = "hoje" class = "java.util.Date" />
        <fmt: timeZone value="GMT-7:00">
        <fmt: formate Date value = "${hoje} type = "both" dateStyle = "full" timeStyle = "full"/>
        </fmt: timeZone>
        </br>
        <fmt : timeZone value = "GMT +0:00" var ="timeZone" scope="page"/>
        <fmt: timeZone value="${timeZone}">
        <fmt: formate Date value = "${now} type = "both" dateStyle = "full" timeStyle = "full"/>
        </fmt:format: timeZone>
    </body>
</html>

o erro é :

/jsp.index[14;13] Invalid Standard Action

a parte que apresenta o erro é:
<jsp: useBean id = "hoje" class = "java.util.Date" />
daí tirei o ":" do jsp, apareceu o seguinte erro:
the absolute uri [..] cannot be resolved in either web.xml or the jar fil...
não marca nada, mas acredito que seja referente à parte :
<%@taglib uri = "http://java.sun.com/jstl/fmt" prefix = "fmt"%>
Tirando o %@ da parte
<%@taglib uri = "http://java.sun.com/jstl/fmt" prefix = "fmt"%>
compila e roda, ams soh aparece o título... tenho que mandar fazer algo diferente pra aparecer alguma coisa???

To precisando pakas de ajuda, pq num sei nada de jsp... qualquer ajuda é válida! Brigadaum

1 Resposta

V

Cara, pode ser besteira minha perguntar mas nessa linha:
<fmt: formate Date value = "${hoje} type = “both” dateStyle = “full” timeStyle = “full”/>
Está realmente faltando um " depois do value = "${hoje} ?
:wink:

Criado 23 de novembro de 2006
Ultima resposta 10 de jul. de 2008
Respostas 1
Participantes 2