Francois Bourgault

Ranch Hand
+ Follow
since Oct 30, 2001
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 Francois Bourgault

Hi,

We use the following format when we have variables in the where clause:

WHERE USER_ID = #userId:VARCHAR# AND SESSION_ID = #sessionId:VARCHAR#

it is a java.util.List
11 years ago
JSF
Hi,

I'm new to richfaces and I'm having a problem with the datascroller. I use jsf1.2 with richfaces 3.2. I get result on the initial page(5 rows), but when I try to navigate on the 2nd page, everything goes blank. For some reason, the reRender doesn't work. In the console, I can see that scrollerPage = 2 now. Not sure what else I'm missing. Bean scope for systemMessagesBean is session. Even the refresh(f5) won't display that 2nd page. I need to leave the page and get back. Then I'll see the 2nd page. Below is the code in the view section of the jsp page. Also added scrollerPage code in the session bean.

Does anyone know what I may be missing?
Thanks,
Francois



11 years ago
JSF
I'm new to JSF and trying to execute some code from the tutorial in Complete Reference JSF. But I'm getting an error when login.jsp is about to be displayed. See code below. Even if I delete <f:view> from login.jsp, it's bombing out on <h:form>. Not sure what I'm missing. I have jstl.jar, standard.jar, jsf-api.jar & jsf-impl.jar in WEB-INF/lib Any idea what's wrong with this code? Thanks.



********************* index.jsp
<html>
<body>
<% response.sendRedirect( "login.faces" ); %>
</body>
</html>
I also tried: <jsp:forward page="/login.faces" /> and I got the same result.


********************* login.jsp
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<f:view>
<html>

<head> <title>MYVTA</title> </head>
<body>
<h:form>
<h2><b>Welcome to My Virtual Training, Please login</b></h2> <h:outputText value="Enter your userid.." />
</h:form>
</body>
</html>
</f:view>


********************* faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<faces-config>

<!-- Navigation rules -->
<navigation-rule>
<description>Login Page</description>
<from-view-id>/index.jsp</from-view-id>
<navigation-case>
<from-outcome>login</from-outcome>
<to-view-id>/login.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>


and the trace in firefox:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /login.jsp:5

2: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
3:
4:
5: <f:view>
6:
7: <html>
8:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
org.apache.jsp.login_jsp._jspx_meth_f_view_0(login_jsp.java:86)
org.apache.jsp.login_jsp._jspService(login_jsp.java:62)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
16 years ago
JSF
I tried that and it works. But what if I added errors in the ActionErrors class in the validate() method? The user will see all error messages. Will he/she need to re-enter all the data again?
17 years ago
Hi,

When I select from a system list(populated using optionsCollection ) it works very well. For instance, systemname[0] = '21' if I select the 1st system in the list. Problem is when I unselect that system. systemname[0] is still = '21' when it should be = to '' or null

When I trace the code, I can see the setSystemName() being executed when I select a system. But the same method isn't executed when I unselect the system I selected before. So, systemname[0] is still = '21' and nothing is selected on the window. How do I get around that problem when I unselect all data in a optionsCollection? I don't want to use the reset button for this. Below I added code from the formbean and jsp page.


thanks.

In struts-config, action for the search form..
<action path="/smtSearch" type="gov.mdot.webapp.smt.control.action.SearchAction"
name="SearchForm"
input="/jsp/Search.jsp"
delegater="gov.mdot.webapp.smt.delegate.SearchDelegateImpl"
scope="session"
validate="true" >
<forward name="success" path="/jsp/Search.jsp"/>
</action>


// formbean
private String systemName[]

// jsp page
<TD align="left" valign="top">
<html:select property="systemName" size="10" multiple="multiple">
<html:optionsCollection name="SearchForm" property="systemList"/>
</html:select>
</TD>
17 years ago
All,

I'm looking for a book that explains how Ajax and Java works together. So far, there are 2 books:

Practical Ajax Projects with Java Technology (Practical)
by Frank W. Zammetti
Pro Ajax and Java Frameworks (Pro) by Nathaniel T. Schutta

I'm new to Ajax and have some J2EE experience. Is one better than the other? Looking at the book description in amazon, each book covers Ajax with J2EE. Which one does a better job at explaining the integration between the 2 technology? I'm currently working on a project using J2EE and struts and would like to integrate some Ajax in the application.
Hi Axel,

I'll check IBM's website and get the latest version. If I remember, evaluation is for 30 or 60 days. That's not very long. That's why I wanted to buy the book. It comes with a 'trial version'. Not sure if the trial version is like the download version: 30 or 60 days then it expires OR is it limited to 1 cpu with no expiration date. Thanks for your info..
Hi,

I'd like to learn IBM WebSphere(specially WSAD) and get certified. I saw the book comes with a trial version. That 'trial version', what is it? Software expires after 30 or 60 days? Limited to 1 cpu? Can someone give me more details about it? Thanks,
Hi,

I'd like to learn IBM WebSphere(specially WSAD) and I saw the book comes with a trial version. That 'trial version', what is it? Software expires after 30 or 60 days? Limited to 1 cpu? Can someone give me more details about it? Thanks,
18 years ago
I plan to buy: J2EE Web Services by Richard Monson-Haefel. I'll check the tutorials on Sun's site and go from there. thnxs
19 years ago
All,

I'd like to learn web services using Apache Axis and I was wondering if this book is a good start? I haven't seen the book listed in the book reviews section yet. Or is the documentation on Apache's website good enough to get me started? Thnxs
19 years ago
Hello,

I've installed Eclipse 3.0 on my Mandrake 9.1 system . Everything went fine a short cut on the desktop perfect but when I doubleclick the icon to start the app. it looks like it's starting (hour glass turning) but then I get the main screen and it hangs there. At the console level, it works, at the root level as well as at the user level. I can create a project and start using it. I use kde3.1 and jdk1.5 . I thought this might be the problem, but Eclipse works fine when I start it from the konsole. Is this a permission thing? I did a "chmod +x eclipse" but it didn't do any thing. Any ideas? thanks
19 years ago
Hi,

When I try to install a new theme(click on a link to install a theme), Firefox doesn't display a dialog asking me permission to install the theme. I run mandrake 9.1 Not sure what I'm missing. Any idea? tnxs
19 years ago