kelly goedert

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

Recent posts by kelly goedert

Hi,

I read in the other forums that some of the exams are expected to be updated early next year. Is the scea expected to be updated too?

Thanks

Kelly
Hi,

I have to migrate do java some c code of an old application. In this application a different calendar is used and its starting date is 01/01/1998 instead of 01/01/1970. Is it possible to extend GregorianCalendar to have 01/01/1998 as the starting date?

Thanks

Kelly
15 years ago
Hi,

is anyone familiar with the content posted here? http://www.bm-one.com/Se/scea1.html

Is it valid for SCEA 5?

Thanks

Kelly
Hello,

I'm planning to start studying for SCEA part I. Since there isn't a book covering all the topics (reading posts at the forum, it seems one is coming on summer) I was planning to start with head first object oriented analysis and design and head first design patterns, and then go to more specific topics.
Is this a good approach?

Thanks

Kelly
Hello,

I don�t know if this forum is the right place to ask this question, but there it goes...

I�m giving I try on jboss seam, and I need to pass extra data, to the javascript callback function. How do I do that?

When using dwr, I used to do it this way http://getahead.org/dwr/browser/extradata

Is this possible with jboss seam? I tried the same approach, but I got the following error: call.callback is not a function

Thank you for any help.

Kelly
17 years ago
JSF
Hi,

I�m using a tabbed pane and I would like that when one of the tabs is clicked on, a backing bean method is called. Is that possible? If it is, how do I do it?

Thanks

Kelly.
18 years ago
JSF
I'm getting a NoSuchMethodException in a situation like this:

public class Orbit extends Thread implements IOrbit{
public void run(){
URLClassLoader loader = new URLClassLoader(urls);
Class mainClass = loader.loadClass(satellitePOJO.getMainClass());
Class[] executeParams = new Class[]{HashMap.class};
Object satelliteInstance = mainClass.newInstance();
Method[] allMethods = satelliteInstance.getClass().getMethods();
Method executeMethod = mainClass.getMethod("execute", executeParams);
Object[] args = new Object[]{this.args};
executeMethod.invoke(satelliteInstance, args);
Class[] setUpParams = new Class[]{IOrbit.class};
Method setUpMethod = mainClass.getMethod("setUp", setUpParams);
setUpMethod.invoke(satelliteInstance, this);
}
}

In the last line I get the exception. The IOrbit.class just like this:

public interface IOrbit{}

The class on which the methods are invoked is like this:

public class G1IntegrationSatellite extends AbstractSatellite
{
private HashMap<String, String> argumentMap;
public void execute(HashMap<String, String> argumentMap) throws Exception {
//method implementation
}
}

and the AbstractSatellite class is like this:

public abstract class AbstractSatellite
{
private IOrbit orbit;
public abstract void execute(HashMap<String,String> argumentMap) throws Exception;

public void setUp(IOrbit orbit)
{
this.orbit = orbit;
}
}

Why do I get NoSuchMethod exception when trying to execute setup method if it is implemented in the parent class?

Thanks for any help.
18 years ago
Yes,
I agree. In my understanding the transaction.commit() would do that, or the session.flush(). But the database is not being updated in the transaction.commit() or in the session.flush().
Why that happens?
I'm using jboss 4.0.1 and hibernate 2.1

I have a stateless session bean which accesses a DAO class which has hibernate code to insert, update... I noticed that if in this DAO class I use hibernate transactions, with transaction.begin() and transaction.commit() when the transaction.commit() line is executed the database is not updated.
Why that happens? Shouldn't the data be commited to the database when commit is executed?

Other thing I tried was to use JBoss' UserTransaction class but it also didn't work. How can I be sure that when the transaction.commit() is executed the database is really updated?

Thank you

Kelly.
I have this form:
<%@ taglib uri="struts/bean-el" prefix="bean" %>
<%@ taglib uri="struts/html-el" prefix="html" %>
<%@ taglib uri="jstl/c" prefix="c" %>
<%@ taglib uri="struts/logic-el" prefix="logic" %>
<html>
<head>
<link href="<html:rewrite page="/pages/style/default.css" />" rel="stylesheet" type="text/css">
<title><bean:message key="title.usuario.usuarioform"/></title>
</head>
<body>
<c:choose>
<c:when test="${usuarioForm.map.methodToCall == 'insert'}">
<h1><bean:message key="title.usuario.insert"/></h1>
</c:when>
<c therwise>
<h1><bean:message key="title.usuario.update"/></h1>
</c therwise>
</c:choose>
Hello
</body>
</html>
And when I call it I get the following exception:
javax.servlet.ServletException: javax/servlet/jsp/jstl/core/ConditionalTagSupport
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
The .tld files are placed under WEB-INF and mapped in web.xml. I using tomcat 4.1.29 and jdk 1.4
20 years ago
JSP
In my applet on the init method I have:
try{
ObjectOutputStream outputToServlet = new ObjectOutputStream(con.getOutputStream());
outputToServlet.write(1);
outputToServlet.flush();
outputToServlet.close();
con.disconnect();
}
And in a servlet on the doGet method I have:
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

System.out.println("to no checar");
ObjectInputStream in = new ObjectInputStream(request.getInputStream());
int aux = in.read();
in.close();
System.out.println("" + aux);
}
And this doesn't work. The servlet seems not to be called. The strange thinsg is that if I try to send data from servlet to applet it works fine with the same ObjectInputStream and ObjectOutputStream. Why I can get this to work from applet to servlet??
20 years ago
Can 't I have two HttpURLConnections in the same applet? I have this code:
private HttpURLConnection con;
private HttpURLConnection con2;
public void init() {
con = abreConexao("http://localhost:8080/hardkey/checar?checa=true");
con2 = abreConexao("http://localhost:8080/hardkeydevolver?test=true");
try{
ObjectInputStream inputFromServlet = new ObjectInputStream(con.getInputStream());
inputFromServlet.close();
ObjectInputStream inputFromServlet2 = new ObjectInputStream(con2.getInputStream());
inputFromServlet2.close();
}
catch(IOException e){
e.printStackTrace();
e.getMessage();
}
}
All the method abreConexao() does is open an connection to the url I send to it.
In the servlets all I have is a println in the doGet method. Why I can see the output from the first servlet but not from the second??
I'm stuck in this for days, please help.
20 years ago
I trying to use roles in my application, like an administrator can do anything and other users cannot. I using JDBC realm for that but it doesn't seem to be working.
Here is my struts-config.xml
<!-- Action Mapping Definitions -->
<action-mappings>
<action path="/login"
type="LoginAction"
name = "loginForm"
scope="request"
input="/index.jsp"
validate="true">
<forward
name="continue"
path="/principal.jsp"/>
<forward
name="erro"
path="/index.jsp"/>
</action>
<action path="/adm"
roles = "adm"
forward = "/adm.jsp">
</action>
<action path="/user"
roles = "user"
forward = "/usr.jsp">
</action>
<action path="/principal"
forward = "/principal.jsp">
</action>
</action-mappings>
And here is my web.xml (the security part)
<security-constraint>
<display-name></display-name>
<web-resource-collection>
<web-resource-name></web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/do/*</url-pattern>
<!-- If you list http methods, only those methods are protected -->
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>adm</role-name>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<!-- Default login configuration uses form-based authentication -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/index.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>

<!-- Security roles referenced by this web application -->
<security-role>
<role-name>adm</role-name>
<role-name>user</role-name>
</security-role>

In my login form the action is called like this
<html:form action="/login">
....
</html:form>
I would like that after the login I would go to principal.jsp and there I would have two links: one to be accessed by adm users and other to be used by the ones with "user" role.
What I'm doing wrong?
20 years ago
Could someone give me an example on how to use action roles?
Does it have to be used with the container security features?
Thanks
20 years ago
What i wanted, don�t know if it is possible or not, is the bean in the jsp to be populated with the values I typed in the form, then I could use this session bean in the servlet that also acesses the session. Did I make myself clear??
Is it possible?
20 years ago
JSP