Oscar Diaz

Greenhorn
+ Follow
since Apr 16, 2004
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Oscar Diaz

I have tried with DynaValidatorForm and with ValidatorForm, but I get the same issue.
If I execute an Action that retrieve custom-data from a database and then I forward that action to my editing page, I get the following error.
java.lang.NullPointerException
at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:316) at org.apache.jsp.enterv_ins_edit_jsp._jspx_meth_html_javascript_0(enterv_ins_edit_jsp.java:665)at org.apache.jsp.enterv_ins_edit_jsp._jspService(enterv_ins_edit_jsp.java:106)at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
If I delete the javascript-validator-code from my JSP page, it loads and shows all data correctly, but there is no validation when I submit the page again to the server.
any suggestions?
13 years ago
I'm working on Struts 1.1, I have a logon page running smoothly with Validator even with the client side validation, this part is OK since initially I don't have to retrieve any info from the database.
But I have an issue with an editing section:
A client click on an Enterview ID for editing purposes.
I execute an Action that retrieve all the enterview's data from a database and then I redirect the action to my editing page and I get the following.
java.lang.NullPointerException
at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:316) at org.apache.jsp.enterv_ins_edit_jsp._jspx_meth_html_javascript_0(enterv_ins_edit_jsp.java:665)at org.apache.jsp.enterv_ins_edit_jsp._jspService(enterv_ins_edit_jsp.java:106)at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...

When the final servlet is rendered, this is the problematic-line 665 described above:
int _jspx_eval_html_javascript_0 = _jspx_th_html_javascript_0.doStartTag();
this is the code associated to enterv_edit.jsp, that has the problem:
<html:javascript formName="dynEntReviewForm"/>
these are the actions in my struts-admin.xml
<!--this action retrieve the data from my DB-->
<action path="/adm_edit_enterviews"
type="com.mycomp.admin.actions.EditEntervReviewAction"
name="dynEntReviewForm"
scope="request" validate="false">
<forward name="ent" path="/enterv_edit.jsp" redirect="false"/> </action>
<!--this action update the data to my DB-->
<action path="/adm_upd_enterviews"
type="com.mycomp.admin.actions.UpdEntervReviewAction"
name="dynEntReviewForm"
scope="request"
validate="true"
input="/enterv_ins_edit.jsp">
<forward name="ent" path="/adm_enterviews.do" redirect="false"/> </action>
This is the Dynamic form
<form-bean name="dynEntReviewForm"
dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="type_id" type="java.lang.Integer"/>
<form-property name="desc_txt" type="java.lang.String"/>
</form-bean>
If I eliminate the javascript tag in my jsp page, then I get the display page but the validator doesn't work.
I have tried for 2 days but I am already dumb with this issue,
any help will be appreciated
13 years ago
I've been learning EJB with this book on EJB. I was able to create and deploy the Advisor bean using deploytool with 'Advisor' as JNDI Name (without the quotes). When I run the AdviceClient to invoke getAdvice() on the bean, I got
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
40)at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:280)at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:16) at AdviceClient.main(AdviceClient.java:10)
My J2EE 1.3 RI Server on Windows XP is running smoothly with this final message on the console
...
Loading jar:/C:/j2sdkee1.3.1/repository/master/applications/AdviceApp10828111758
34Server.jar
J2EE server startup complete.

The command that caused the error was -
java -cp AdviceAppClient.jar;c:\j2sdkee1.3.1\bin\j2ee.jar;d:\projects\java\advice AdviceClient
Any suggestions will be much appreciated.
oscar