shiva

Greenhorn
+ Follow
since Feb 03, 2004
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 shiva

Do I need log4j, even for catalina*.log?
16 years ago
I do not see catalina*log in logs directory. How should I configure this logging ? Using 5.0.*


Thanks
16 years ago
I am beginner. I have tried to create a two webpage struts app.

login.jsp ---->success----> main.jsp
----> failure---> login.jsp

Forcefully added some errors to simulate to display errors on login.jsp.

login.jsp is shown back without any errors...







Action Class's execute method:

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
System.out.println("In execute() of LoginAction1");
ActionErrors errors = new ActionErrors();
System.out.println("In execute() of LoginAction2");
ActionForward forward = new ActionForward();
System.out.println(" In execute() of LoginAction3");
LoginForm loginForm = (LoginForm) form;

ActionMessages messages = new ActionMessages();
ActionMessage msg;
msg = new ActionMessage("error.userid.required");//, "Hellolll");
messages.add("msg1", msg);
saveMessages(request, messages);
//request.setAttribute("loginForm", loginForm);

try {

// do something here

} catch (Exception e) {

// Report the error using the appropriate name and ID.
errors.add("name", new ActionError("id"));

}

// Forcing it to have some errors....
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(ActionErrors.GLOBAL_ERROR, "Helloooo" ));
errors.add("password", new ActionError("error.password.required"));
// errors.add("password", new ActionError("error.password.required"));
// If a message is required, save the specified key(s)
// into the request for use by the <struts:errors> tag.

if (!errors.empty()) {
System.out.println("Errors exist. Forward to failure page.");
saveErrors(request, errors);
//request.g
forward = mapping.findForward("failure");
}
// Write logic determining how the user should be forwarded.
else forward = mapping.findForward("success");
//forward = mapping.findForward("failure");

// Finish with
return (forward);

}
---------------------------------------------------

ActionMapping:

<action-mappings>
<action name="loginForm" path="/login" scope="session" type="com.scoo.webstruts.actions.LoginAction" input="./Login.jsp" validate="true" >
<forward name="success" path="./Main.jsp">
</forward>
<forward name="failure" path="./Login.jsp">
</forward>
</action>
</action-mappings>
-------------------------------------------------------

<!-- Message Resources -->
<message-resources parameter="com.scoo.webstruts.resources.ApplicationResources"/>

-----------------------------------------------------

Ho do I verify that app is able to take the strings from Resource files?

I am trying to test under WSAD Testing env and tried to do it on Tomcat too.

Thanks for any help.
17 years ago
Hi

I am trying to import a self-signed certificate into a keystore.
Getting below error. Please help.

keytool error: java.security.KeyStoreException: TrustedCertEntry not supported


Thanks
18 years ago
I am using WSAD 5.0. I am getting error:
OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group / has not been defined
Trying to test a web-app on WSAD's feature: 'run on server'. Server is starting. When I put the url, getting above error.
18 years ago
Could you help me out.. I am getting this error.
java.lang.NullPointerException
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.addStatement(DB2SQLJConn
ction.java:1096)
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareCall(DB2SQLJConne
tion.java:1270)
at com.ibm.db2.jcc.DB2LogicalConnection.prepareCall(DB2LogicalConnection
java:177)
Using db2j2classes.zip for ConnectionPooling. Calling stored-proc. First call to the stored procedure is fine. Subsequent calls to the same stored-proc are throwing exceptions. Getting new connection before calling stored-proc.
Printed a few connections. they are
com.ibm.db2.jcc.DB2LogicalConnection@2b983f7�mClosed=fal
se;mConnection=573a83f4�:
com.ibm.db2.jcc.DB2LogicalConnection@38d483f4�mClosed=fa
lse;mConnection=573a83f4�:
What is mConnection? They show the same address
I am getting above error while
cstmt = con.prepareCall(sql);

Thanks
[ February 03, 2004: Message edited by: shiva ko ]