ita Jonnal

Greenhorn
+ Follow
since Feb 16, 2005
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 ita Jonnal

This is a simple problem.But it is troubling me too much.

When I try to compile java classes whcih are in package struture at command prompt it gives me cannot resolve error.it is basically not recognising the package like eg
I have c:\ejb\example\y.java and x.java
I use y.java in x.java.It can't resolve y when I compile x.java but it complies y.java
And if I give *.java it compiles both

THis is my classpath:
set CLASSPATH=.;d:\AssetsProjectFiles\assetsProject\lib\app\saxpath.jar;d:\AssetsProjectFiles\assetsProject\lib\jaxb\sax.jar;d:\AssetsProjectFiles\assetsProject\lib\app\xalan.jar;d:\AssetsProjectFiles\assetsProject\lib\app\xerces.jar;d:\AssetsProjectFiles\assetsProject\lib\app\jdom.jar;d:\dcse.jar\ead4j-common-bin-2.0.0.jar;d:\dcsejar\ead4j-topaz-bin-2.0.0.jar;CLASSPATH%;c:\Oracle\Ora920\jdbc\lib\classes12.jar;d:\AssetsProjectFiles\assetsProject\lib\apache\struts-el.jar;d:\AssetsProjectFiles\assetsP roject\lib\apache\struts.jar;d:\AssetsProjectFiles\assetsProject\lib\apache\standard.jar;c:\Program Files\WebSphere\AppServer\lib\j2ee.jar;d:\AssetsProjectFiles\dcseWebProj\implementation\appCode;d:\jar\webapp-classes.jar;d:\commons-validator.jar;d:\commons-beanutils.jar;d:\commons-resources.jar;C:\hibernate\hibernate-2.1\hibernate2.jar;c:\hibernate\hibernate-2.1\lib\antlr.jar;c:\hibernate\hibernate-2.1\lib\dom4j.jar;c:\hibernate\hibernate-2.1\lib\commons-collections-2.1.1;c:\hibernate\hibernate-2.1\lib\commons-logging-1.0.4;c:\hibernate\hibernate-2.1\lib\ehcache-0.9;c:\hibernate\hibernate-2.1 \lib\cglib-full-2.0.2;c:\ejb\example;
set PATH=.;D:\bea\jdk142_05\bin
of course my calsspath is in single line in my batch file.

I didn't have this problem uptil 3 days back.It was working fine.

WHat should I do.

Thank you.
18 years ago
My web.xml and srtuts-config.xml are both in WEB-INF folder .
start up log tells me the following

/18/05 9:22:51:152 EDT] 3061d113 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[7/18/05 9:22:51:168 EDT] 3061d113 AdminTool A ADMU3100I: Reading configuration for server: server1
[7/18/05 9:22:53:121 EDT] 3061d113 AdminTool A ADMU3200I: Server launched. Waiting for initialization status.
[7/18/05 9:23:52:230 EDT] 3061d113 AdminTool A ADMU3000I: Server server1 open for e-business; process id is 1200

My struts-config.xml is below:



<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"struts-config_1_1.dtd">


<struts-config>

<form-beans>
<form-bean name="PinForm" type="xx.yy.zz.aa.bb.pinrequest.form.PinForm"/>

</form-beans>

<action-mappings>
<action path="/pin" type="xx.yy.zz.aa.bb.pinrequest.action.PinAction" name="PinForm"
scope="request" input="/pin.jsp" validate="true">
<forward name="pin" path="/pin.jsp" />
</action>
</action-mappings>

<message-resources
parameter="resources.ApplicationResources"
null="false" />


<!-- Validator Configuration -->
<plug-in className="org.apache.struts
.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/
validator-rules.xml, /WEB-INF/
validation.xml"/>
</plug-in>


</struts-config>


Please tell what I'm doing wrong
18 years ago
My war file is deploying fine.But when I click on submit on my jsp I get the following error in the browser:
Error 503: Failed to load target servlet [action]
logs show the followng message:
E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:455)
at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:652)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(WebAppRequestDispatcherInfo.java:187)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.<init>(WebAppRequestDispatcherInfo.java:68)
at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1464)
at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1423)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
What could be the problem.I downloaded the Struts 1.2.7 from apache.org.
I have a the following folder structutre
-x
my.jsp
MTEA-INF
WEB-INF
- all tlds and dtds
-lib all jars
-classes
-yyy
-zzz
-aaaction
.class file
-fffform
.class file
-resources
-Application .prop


I war this folder and I'm deploying it on WAS 5.1.1
My Action.java and Form.java are stored in another location with the package structure yyy,zzz,.

Please give some answer.
Thanks
18 years ago
I got what you said..But that didn't help either.I don't understand why when I hit submit when it should come back to the same jsp but it is going to page not found page.For some reason it is not reading the config file apart from validations.
18 years ago
I didn't understand that part ..what is removing blanks in the applications keys
18 years ago
thanks for all replies.I still see the sam error even after I specify
new ActionError("error.Invalid SSN.errorMsg","SSN1").Is there anything else that I'm missing.
18 years ago
I'm not able to see html error message when I enter all 9's or all 0's for ssn and when I submit it is not getting forwarded to the same jsp again.I get this page cannot be found mesage on submit.What mistake did I do.I'm getting the following errors in the log:

No message text associated with key NULL_MESSAGE_KEY_PASSED in bundle com.ibm.ejs.resources.seriousMessages

E NULL_MESSAGE_KEY_PASSED




My jsp looks like this:
<html:html>
<html:errors/>
<html:form action="pin" method='get' onsubmit="return validate(this)">

<table>
<td align="center">
<html assword property="SSN1" size="3" maxlength="3" styleClass="field_name"/>
<html assword property="SSN2" size="2" maxlength="2" styleClass="field_name"/>
<html assword property="SSN3" size="4" maxlength="4" styleClass="field_name"/>
</td>

<td align="center">
<html:submit property="submit">
</html:submit>
</td>
</table>
</html:form>
</html:html>

my Form is:


import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.validator.*;
import org.apache.struts.action.ActionError;



public class PinForm extends ActionForm
{


public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.ssn1 = null;
this.ssn2 = null;
this.ssn3 = null;

}

public String ssn1 = null;
public String ssn2= null;
public String ssn3= null;


public String getSSN1()
{
return ssn1;
}

public void setSSN1(String ssn1)
{
this.ssn1=ssn1;
}

public String getSSN2()
{
return ssn2;
}

public void setSSN2(String ssn2)
{
this.ssn2=ssn2;
}

public String getSSN3()
{
return ssn3;
}

public void setSSN3(String ssn3)
{
this.ssn3=ssn1+ssn2+ssn3;
}


public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors errors = null;
errors = super.validate(mapping,request);


if(this.ssn3 == "000000000" || this.ssn3 =="999999999")
{

errors.add("SSN1", new ActionError("error.Invalid SSN.errorMsg"));

}
return errors;
}

}

Action is:



import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.Action;


public class PinAction extends Action
{

public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{

final ActionErrors errors = new ActionErrors();

final PinForm pinForm = (PinForm) form;
boolean ssnValid = true;
final String ssn = pinForm.getSSN3();




return mapping.findForward("pin");


}

}


config.xml is:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"struts-config_1_1.dtd">


<struts-config>

<form-beans>
<form-bean name="PinForm" type="xxx.xxx.xxxPinForm"/>

</form-beans>

<action-mappings>
<action path="/pin" type="xxx.xxxx.xxxxx.PinAction" name="PinForm"
scope="request" input="/pin.jsp" validate="true">
<forward name="pin" path="/pin.jsp" />
</action>
</action-mappings>

<message-resources
parameter="resources.ApplicationResources"
null="false" />


<!-- Validator Configuration -->
<plug-in className="org.apache.struts
.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/
validator-rules.xml, /WEB-INF/
validation.xml"/>
</plug-in>





</struts-config>
application resources file is:

error.Invalid SSN.errorMsg=<span class='error_message'> Please enter a valid SSN. {0}</span>
error. No record found.errorMsg=<span class='error_message'> No record found for this SSN. {0}</span>
prompt.no record = No record found for this SSN. {1}



# Struts Validator Error Messages
errors.required={0} is required.
errors.minlength={0} can not be less than {1} characters.
errors.maxlength={0} can not be greater than {1} characters.
errors.invalid={0} is invalid.

errors.byte={0} must be a byte.
errors.short={0} must be a short.
errors.integer={0} must be an integer.
errors.long={0} must be a long.
errors.float={0} must be a float.
errors.double={0} must be a double.

errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is an invalid credit card number.
errors.email={0} is an invalid e-mail address.
18 years ago
Hi All,
Where should I put the jar files which form the location for the JDBC resource provider classess in the Appserver so the classloader can pick them.

Thank you.
18 years ago
What are the different steps involved in establishing database connection using websphere 5.1.0.I know we should be using connection pooling.
Any help is appreciated!
18 years ago
I�ve downloaded James and Java mail API and JAF and have set up the class path .I made changes to config.xml and to james-fetch.xml. My James server is running fine. I�m trying to run the example at the link below

http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html.


E.g. is running fine with no errors but the message is not being sent.


I don�t see no messages apart from start, stop and related message and in the log at path james-2.2.0\apps\james\logs.


Can you let me know what I missed doing.
19 years ago
Can anybody tell me how to configure IBM Httpserver 1.3.28 with IBM websphere 5.1

I'm doing this locally on my machine and when I acces my application I get to the home page and I can't access the other links in the page as the webserver is not communicating with the Application server

I searched in google and got few ideas but that didn't help..(like here:http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tins_manualWebIHS13.html)

I really dopn't have very good knowledge of configuring things .
19 years ago