Marcelo Heitor

+ Follow
since Aug 20, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marcelo Heitor

Hi folks!

I have one web service created in java that it needs to receive one dataset that was developed in .net.
More necessarily the archive xml that it is generated by dataset.
After to receive this xml, necessary to record it in the database.

Somebody can give an aid to me?
16 years ago
Ok Ransika deSilva, I go to study jsr's, the notes that you it indicated and the book that I cited before, therefore it I already I bought. Thanks for help-me!!!
Hello folks!
The book "Beginning J2ME From Novice..." is enough for certification SCMAD? Or I will have that to read all the JSRs referring CLDC 1,0 and 1,1, MIDP 2,0, WMA, MMAPI?
Hello folks,
after click in "Tomcat Administration", I receive the follow message:

Tomcat�s administration web application is no longer installed by default. Download and install the "admin" package to use it.

ho do resolve this?
17 years ago

I have to do a j2me application under Windows CE 4.2. This application will have to generate a bar code and send it to a bluetooth printer.

I have some doubts:

Which Virtual Machine is the best choice to install under win ce 4.2? I know only the WEME of IBM. I need a JVM that supports jsr 82 (Bluetooth api).

Have I to buy a Bluetooth api? Or a api to print using a bluetooth printer?

Is there an api to generate bar code?

Should I use CDC? or CLDC?

17 years ago

I'm working with http connection with a midlet.
I have to download a archive and When I test using a server in a private domain, all works perfect.

But when I test using a server on a external domain, I get a TCP open.

So I tested the URL of archive on the external server in the browser, I have got the archive.

17 years ago
Hello folks,

How to calculate the time (miliseconds) of response of a request (servlet)?
18 years ago
...thanks, thanks...
18 years ago
thanks, tanks, tanks my friend
it was this same that it was lacking
18 years ago
Help folks
I am new in the struts and...
What is wrong in that code?

package pacotes;
public class ValidacaoUsuario extends ActionForm{

private String usuario;
private String senha;

... getters and setters...

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((usuario == null) || (usuario.length() < 1))
errors.add("username", new ActionError("error.username.required"));
return errors;

content of, he is in the package resources

error.username.required=<LI>Username is required</LI>


<form-bean name="validacaoForm"
type="pacotes.ValidacaoUsuario" />
<action path="/validar"
name="validacaoForm" scope="request"
validate="true" input="/validacao.jsp">
<forward name="show_menu" path="/menu.jsp" />
<message-resources parameter="resources.application"/>

jsp that I need that shows the message in case the user doesn't fill out the field user

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>

<form name="form1" action="" method="post">
Username:<input name="usuario" type="text" id="usuario">
Password:<input name="senha" type="text" id="senha">
<input type="submit" name="Submit" value="Ok">

I believe that it is lacking something in that page, but I don't know what is.

Excuse the size of the message
Marcelo Heitor - Bras�lia - Brazil
18 years ago
yes, for example...

import java.sql.Types;
import java.util.Vector;

import javax.naming.InitialContext;
import javax.sql.DataSource;


* Descri��o: Classe que cont�m os resultados de uma pesquisa realizada no Banco
* de Dados
public class Container implements Serializable {

* Indica a listagem de conex�es ativas
private static Vector listaConexao = new Vector();

* Indica o objeto que reter� o pool de conex�es
private static DataSource ds;

* Indica o objeto Statement
private static Statement sttm;

* Indica o nome do recurso JNDI recuperado pelo Listener
private static String fonteDados;

public Container() {

* M�todo utilizado para realizar uma pesquisa no Banco de Dados abrindo: um
* canal de conex�o e um espa�o destinado ao resultado da consulta. Throws
* SQLException
* @param sql
* String
* @result ResultSet
* @see java.sql.ResultSet *
* @see java.sql.Connection
* @see java.sql.Statement
* @see java.sql.ResultSet
public static Connection getConnection() throws SQLException {
try {
InitialContext initialcontext = new InitialContext();
ds = (DataSource) initialcontext.lookup(Container.getFonteDados());
Connection conn = ds.getConnection();
return conn;

} catch (javax.naming.NamingException e) {
"Um problema ocorreu ao recuperar o objeto DataSource.\n"
+ e.toString());

return null;
18 years ago
Hello folks, I have the problem.

all the class implement serializable and exactly thus it continues this problem.

I am using SecurityFilter.

somebody can help me?


javax.servlet.ServletException: Error matching patterns

root cause

java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
18 years ago
Folks, the code started to function suddenly, is stranger... but OK. I am thankful for the help!!!

Marcelo Heitor
Bras�lia - Brazil
Hello folks,

I have a doubt on the chapter 12 of the book Head-First Servlets and JSP, I tried to do an authentication example in agreement with the book but I don't get to call the standard form of the browser, it follows the example

in tomcat-users.xml ********************************************
<?xml version='1.0' encoding='utf-8'?>
<role rolename="Guest"/>
<role rolename="Adm"/>
<role rolename="Member"/>
<user username="Annie" password="admin" roles="Adm,Member,Guest"/>
<user username="Diane" password="coder" roles="Member,Guest"/>
<user username="Ted" password="newBie" roles="Guest"/>

in web.xml in my application, called Beer *********************************

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

<web-app xmlns=""





and it follows the structure of pastes used in the application ************
-->Beer (with. jsp that calls a servlet through method get)
-->WEB-INF (with web.xml)
-->AddRecipe (with servlet.class)

obs: It�s works, but I don't get to call the form of authentication of the browser