Help coderanch get a
new server
by contributing to the fundraiser

scott gaidos

Greenhorn
+ Follow
since Jan 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by scott gaidos

I have a session scope backing bean that I want to use for security authentication and authorization.

How can I invoke the methods on the bean from a JSP with no user interaction?
18 years ago
JSF
I'm looking at replacing our Sun Starfire servers with Intel hardware running Linux.
Does Weblogic 7.x work on a Linux Beowulf cluster?
I have found different information on a BEA's website.
I'm also looking at utilizing a SMP machine from Dell or IBM. Any thoughts?
Thanks,
Scott
21 years ago
We are currently running Weblogic 5.1 SP9.
Recently some of our DBA's started making an issue of the user id and password being in the weblogic.properties and not even encrypted.
Are there any alternatives or a way to encrypt the password?
21 years ago
I'm investigating using Struts. I can hydrate a ActionForm and display the information to the screen. But when I try to save the info and validate it the values in the ActionForm are null. It's my undersatnding that Struts will populate the ActionForm with the new values but my original values aren't even there. Why?
Here's a listing of my code:
Struts Config:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<!-- ========== Form Bean Definitions ============ -->
<form-beans>
<form-bean name="login" type="test.struts.LoginForm" />
<form-bean name="addressform" type="struts.formbean.AddressForm" />
</form-beans>
<!-- ========== Global Forward Definitions ========= -->
<global-forwards>
</global-forwards>

<!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/login"
type="test.struts.LoginAction"
name="login"
input="/jsp/LoginView.jsp"
validate="true">
<forward name="valid" path="/editaddress.do" />
<forward name="invalid" path="/jsp/LoginView.jsp" />
</action>
<action
path="/editaddress" scope="request"
name="addressform"
type="struts.action.AddressEditAction" unknown="false"
validate="false">
<forward name="valid" path="/jsp/EditAddress.jsp"/>
</action>
<action
path="/saveaddress" scope="request"
name="addressform"
type="struts.action.AddressSaveAction" unknown="false"
input="/jsp/EditAddress.jsp"
validate="true">
<forward name="valid" path="/jsp/LoginView.jsp"/>
</action>
</action-mappings>
</struts-config>
JSP:
<!-- EditAddress.jsp -->
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<HTML>
<HEAD><TITLE><struts:message key="title.editaddress" /></TITLE></HEAD>
<BODY>
<struts:message key="heading.editaddress" />
<html:errors />
<html:form action="/editaddress">
<p>
<struts:message key="label.address1" />:
<html:text property="address1" size="10" />
</html:form>
<html:form action="/saveaddress">
<html:submit>
<bean:message key="editaddressbutton.submit" />
</html:submit>
</html:form>
</BODY>
</HTML>
ActionForm:
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
public class AddressForm extends ActionForm {
private String address1;
private int id;
}
public AddressForm() {
super();
}
public int getId() {
return this.id;
}
public void setId(int aId) {
this.id = aId;
}
public String getAddress1() {
if (this.address1 == null) {
this.address1 = new String();
}

return this.address1;
}
public void setAddress1(String aAddress1) {
this.address1 = aAddress1;
}
public void load(int key) {
this.setId(key);
this.setAddress1("address1");
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors ae = new ActionErrors();
if (this.getAddress1().trim().length() == 0) {
ae.add("address1", new ActionError("error.no.address1"));
}
return ae;
}
}
Edit Action:
import j2ee.test.AddressVO;
import org.apache.struts.action.*;
import struts.formbean.AddressForm;
public class AddressEditAction extends org.apache.struts.action.Action {
public AddressEditAction() {
super();
}
public ActionForward perform(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {
AddressForm f = (AddressForm)form;
f.load(1);
return mapping.findForward("valid");
}
}
Save Action:
import j2ee.test.AddressVO;
import org.apache.struts.action.*;
import struts.formbean.AddressForm;
public class AddressSaveAction extends Action {
public AddressSaveAction() {
super();
}
public ActionForward perform(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {
System.out.println("Saved");
return mapping.findForward("valid");
}
}
Thanks,
Scott
22 years ago
I'm trying to use a Weblogic connection pool and Oracle OCI drivers to call an Oracle stored procedure and return a REF CURSOR.
Weblogic 5.1 sp11
Oracle 8.1.6
The WL connection pool and OCI driver combination does not appear to work. The pool is created on WebLogic startup as expected.
Weblogic Properties Snippet
weblogic.jdbc.connectionPool.prmdPool=\
url=jdbc racle ci8:@dbOracle,\
driver=oracle.jdbc.driver.OracleDriver,\
loginDelaySecs=1,\
initialCapacity=1,\
maxCapacity=40,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
props=user=testuser;password=*;
Java Code Snippet
this.setConnectionURL("jdbc:weblogic ool rmdPool");
this.setJDBCDriverName("weblogic.jdbc.pool.Driver");
cstatement.registerOutParameter(2, OracleTypes.CURSOR);
cstatement.execute();
rs = (ResultSet)cstatement.getObject(2);
I think because the stored procedure request gets filtered through the WebLogic driver, which does not recognize OracleTypes.CURSOR, an exception is thrown. The underlying Oracle driver requires the OracleTypes.CURSOR type for the Ref Cursor to be returned as a ResultSet.
Has anyone had this issue or have suggestions as to a resolution.
Thanks,
Scott
I'm trying to use Oracle OCI drivers to connect to a Oracle 8.1.6 database on a Solaris box with Weblogic 5.1 sp11. The connection pool gets created successfully but when I try to run a query I get the following error:
java.sql.SQLException: Invalid column type
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:43)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.
java:4028)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(Oracl
eCallableStatement.java:226)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(Oracl
eCallableStatement.java:376)
at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:
437)
The code works with the standard weblogic drivers.
Thanks,
Scott