Aparna Sharma

Ranch Hand
+ Follow
since Mar 12, 2003
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 Aparna Sharma

I came across several posts about disabling directory listing in ear files under TomCat, but couldnt find anything to do the same in WebSphere.

I have a vendor supplied ear file and it has directory listing enabled.

https://app.company.com/contextroot/

displays all files under the context root.

I had directoryBrowsingEnabled=true in the ibm-web-ext.xmi file, which I changed to false.I did recycle the app and server many times.

Here is what I have in the ibm-web-ext.xmi file in the ear/war/WEB-INF folder.

<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" >
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:id="WebApp_1_Ext" reloadInterval="3"
reloadingEnabled="false" fileServingEnabled="true" directoryBrowsingEnabled="false"
serveServletsByClassnameEnabled="false"
preCompileJSPs="false">
<defaultErrorPage xsi:nil="true"/>
<additionalClassPath xsi:nil="true"/>
<webApp href="WEB-INF/web.xml#WebApp_1"/>
</webappext:WebAppExtension>

Also I had added
<webappext:WebAppExtension .... directoryBrowsingEnabled="false" ...>
to ibm-application-bnd.xmi and ibm-application-ext.xmi previously while I was trying to make this work, but both didnt work either.

How can I disable this in an EAR file under WebSphere Application Server?

Any help is greatly appreciated. Thanks everyone.
17 years ago
I was having the same trouble.I rewrote the JSP to a Servlet and it worked like a charm.

I was getting a pdf as binary array and trying to display it in browser.First i was getting some weird characters in the display.

Then one fine morning, I was being shown the File Download message(You computer is trying to download a file.Some files maybe potentially harmful. File name, File type, Location . Open,Save,Cancel,More Info blah blah blah).

But curiously the file type was missing , file name was my whole URL ( .../record.jsp?ID=12345) and location was localhost(I am using WSAD and running the JSP on the test server). When I say Open on the File Download dialog,it started downloading and then errored out saying Could not download from location. On top of that I was getting the outputstream exception in my jsp.

Given below is the jsp code which gave me error.I was writing a scriplet.

If some one is having this same trouble, consider rewriting it to a Servlet.


thanks,
Aparna
18 years ago
JSP
Amit,
I apologize. I should have mentioned that I use the dom4j Document , not the org.w3c.Dom.Document.

I got an error when I tried to use the code snippet that you provided. Here are the import statements that I forgot to include.

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Vector;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentFactory;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

I did find out how to convert a w3c Document to a dom4j Document, but the following didnt work for me. It gave me an incompatible type error.

//convert the org.w3c.dom.Document tree into DOM4J's org.dom4j.Document
//tree using the DOM4J DOMReader class

org.dom4j.io.DOMReader reader = new org.dom4j.io.DOMReader();
org.dom4j.Document document = reader.read((org.w3c.dom.Document )doc);

I am beginning to wonder if this has anything to do with the problem posted in the java forums.
http://forum.java.sun.com/thread.jspa?threadID=282485&start=0&tstart=120

because I get the following exceptions in my console, along with the Invalid Input XML Format error.

<?xml version="1.0" encoding="UTF-8"?>
<Request><Credentials><UserID>smhsrvuser1</UserID><Password>{SSHA}ylYXKCoM8yMtxnTy8BR2PmOjkbe/c2vccHF+3w==</Password></Credentials><Data><Action>23</Action><ESELoginID>vrangaraj</ESELoginID><AppID>1,2</AppID></Data></Request>
[10/11/05 9:45:33:264 EDT] 4ee41b3f SystemOut O
<?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM>
[10/11/05 9:45:33:274 EDT] 4ee41b3f SystemOut O
b4 Parsing output xml =<?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM>
4ee41b3f SystemErr R org.dom4j.DocumentException: no protocol: <?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM> Nested exception: no protocol: <?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM>
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:333)
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:229)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.getRolesGroups(AppSecurity.java:306)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.GetRolesGroups(AppSecurity.java:119)
4ee41b3f SystemErr R at com.presentment.client.login.doPost(login.java:76)
4ee41b3f SystemErr R at com.presentment.client.login.doGet(login.java:40)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
4ee41b3f SystemErr R at com.m.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
4ee41b3f SystemErr R at com.m.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
4ee41b3f SystemErr R at com.m.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.run(HttpConnection.java:439)
4ee41b3f SystemErr R at com.m.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
4ee41b3f SystemErr R Nested exception:
4ee41b3f SystemErr R java.net.MalformedURLException: no protocol: <?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM>
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java(Compiled Code))
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java(Compiled Code))
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java:450)
4ee41b3f SystemErr R at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:314)
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:229)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.getRolesGroups(AppSecurity.java:306)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.GetRolesGroups(AppSecurity.java:119)
4ee41b3f SystemErr R at com.presentment.client.login.doPost(login.java:76)
4ee41b3f SystemErr R at com.presentment.client.login.doGet(login.java:40)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
4ee41b3f SystemErr R at com.m.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
4ee41b3f SystemErr R at com.m.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
4ee41b3f SystemErr R at com.m.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.run(HttpConnection.java:439)
4ee41b3f SystemErr R at com.m.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
4ee41b3f SystemErr R Nested exception: java.net.MalformedURLException: no protocol: <?xml version="1.0" encoding="UTF-8"?><SM><STAT><CD>999</CD><TXT>Invalid input xml</TXT></STAT></SM>
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java(Compiled Code))
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java(Compiled Code))
4ee41b3f SystemErr R at java.net.URL.<init>(URL.java:450)
4ee41b3f SystemErr R at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
4ee41b3f SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:314)
4ee41b3f SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:229)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.getRolesGroups(AppSecurity.java:306)
4ee41b3f SystemErr R at com.lifeadmin.security.AppSecurity.GetRolesGroups(AppSecurity.java:119)
4ee41b3f SystemErr R at com.presentment.client.login.doPost(login.java:76)
4ee41b3f SystemErr R at com.presentment.client.login.doGet(login.java:40)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
4ee41b3f SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
4ee41b3f SystemErr R at com.m.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
4ee41b3f SystemErr R at com.m.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)[10/11/05 9:45:33:314 EDT] 4ee41b3f SystemOut O
processRequest

4ee41b3f SystemErr R at com.m.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
4ee41b3f SystemErr R at com.m.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
4ee41b3f SystemErr R at com.m.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
4ee41b3f SystemErr R at com.m.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
4ee41b3f SystemErr R at com.m.ws.http.HttpConnection.run(HttpConnection.java:439)
4ee41b3f SystemErr R at com.m.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
4ee41b3f WebGroup I SRVE0180I: [LifeAdminClient] [/LifeAdminClient] [Servlet.LOG]: /home.jsp: init
I am trying to send an XML to a SERVLET using the POST method and I run into a problem.

I am trying to integrate a login component written by another team. They have a test client which shows the XML that will be sent to the servlet. Their input xml and mine matches exactly.
I know that I am forming the input XML correctly, because if I go to http://app.com/test.jsp and replace the XML in the textbox with the XML I create in my code, it always gives me back a good response.

I am using standard POST request in my code, nothing special, so I am lost as to why this happens.

input xml from my code
<?xml version="1.0" encoding="UTF-8"?>
<Request>
<Credentials>
<UserID>smhsrvuser1</UserID>
<Password>{SSHA}CoM8yMtxnTy8BR2PmOjkbe/c2vccHF+3w==</Password>
</Credentials>
<Data>
<Action>23</Action>
<ESELoginID>vrangaraj</ESELoginID>
<AppID>1,2</AppID>
</Data>
</Request>

correct output xml that I get back from the test.jsp
<?xml version="1.0" encoding="UTF-8" ?>
<SM>
<STAT>
<CD>0</CD>
<TXT>OK</TXT>
</STAT>
<R>2^3^112</R>
<G>
<A2>8001^8100^8102^1111111111^8112^8110^8107^8105</A2>
</G>
</SM>

incorrect output xml that I get back in the code
<?xml version="1.0" encoding="UTF-8"?>
<SM>
<STAT>
<CD>999</CD>
<TXT>Invalid input xml</TXT>
</STAT>
</SM>
----------------------------------------
code that I use to send the request

I was looking at IBM WebSphere Integration Event Broker documentation. Does any body know any other similar/competing products?

I am looking for a solution/technology , which can listen for certain application events and then trigger a set of actions. for eg, the cellphone customer decided to opt for email notification when his bill is ready. my component or service gets the user preference and stores it somewhere and then generates the bill according to his preference. i.e, send his bill via email rather than sending him a paper bill.

I was introduced to this IBM product as a way to create rules and design a system as a way to acheive a similar solution.

Any thoughts/ideas are greatly appreciated.

Thanks,
Aparna Sharma
18 years ago
Hi,

I had a general question about writing Stored procedures using WSAD. The database is DB2 and our plan is to write Java Stored procedures. I read some where that in terms of efficiency SQL stored procedure is first , then C stored procedure and last comes Java Stored procedure.

Any thoughts on this?

Thanks,
Aparna S.

-fyi-
on DB2 stored proceduresIBM RedBook link
18 years ago
Hi,

I support a Struts based web application at a company.
I have a single quote in a URL which is giving me a HTTP 403 error.

Due to the presence of characters known to be used in Cross Site Scripting attacks, access is forbidden. This web site does not allow Urls which might include embedded HTML tags.


http://localhost.com:9092/test/addneweventprepare.do?policyNm=3734&polSfx=Unavailable&ownNm=%20JANE%20O'CONNOR&ownTin=012345&adrln1=Unavailable&adrln2=Unavailable&zip=0000&srcSysCd=ABC

But my local websphere(WSAD) does not have any problems rendering the page.

I thought unchecking the first option in
IE->Internet Options->
Advanced->Browsing
which says "Always send URLs as UTF-8(requires restart)" would cause my local debug environment also to show the 403 error.But it didnot.

Question 1> is there any Advanced option that can be changed to make the server ignore ' in the urls?

Talking to some ppl who maintains the web/app servers , it seems that "<" ,">","'" are un-safe characters which they dont recommend u ignore. it seems it is easy for hackers to include scripts in your url.
We use Netegrity SiteMinder for authentication and there is a configuration that can be done which makes it ignore ' . But due to security reasons they dont recommend doing it.So I have to basically use URLEncoder or place escape charactes when ever I come across '.

Have any one come across such a situation?
Thanks,
Aparna
ok..some light shines through!

I assume I would be doing a javascript like

onchange="getStatus(techCd)"

where techCd is the primary key attribute , which goes to the server and brings back the checked/unchecked status.

Then how can you think I can make this work?
19 years ago
But arent they in the same collection as attributes of a bean/object?
19 years ago
Hi,

I have a jsp which shows a drop down combobox, a text box and submit cancel buttons.
the drop down combo box is a collection of objects. to be exact an arraylist which is placed in session in the action class.

The object is a technique object which has the following attributes:
techCd : type String : primary key
techDscr : type String : a description of the technique
actCd : type String : can be A indicating Active and D indicating Deleted

----------------------Earlier only these where present--------------------

-----------------------------------------------------------------------
Earlier the value can be selected and updated. select an old technique and enter the new description in the textbox.

But now I need to place a checkbox alongside the drop down combo box , so that the checkbox gets checked when the selection in the combobox changes.

I read everything I could on how to implement this, and I think I need to do this via html:multibox
----------------------Now trying to implement checkboxes-------------

------------------------------------
the above code gives me a
[ServletException in:/tiles/modifytile.jsp] Cannot create iterator for this collection'

I have the following code in my ModifyForm




Could anyone give any suggestions/help on what am I doing wrong, please? Is it possible to check/uncheck a checkbox/multibox based on the selected value in the dropdown combo box?

I think it will be simpler to write them as a list using <bean;write> and place checkboxes along side for each as indicated in this article

http://www.onjava.com/pub/a/onjava/2003/07/30/jakartastruts.html?page=last

But when there are too many values , the page can be too long.

If I use a single select list , the display will be better and users can easily navigate to a value , but we should only have a single checkbox and the problem becomes similar to that I am facing now.
single select list code sample
http://javaboutique.internet.com/tutorials/strutsform/index-4.html

Please help out. my only other option is scriplets.
Thanks,
Aparna
19 years ago
How does one handle multiple objects of the same kind?
for eg, I have a list of employees in a page. clicking on one of them takes me to a detail page. I want to set some hidden parameters so that I can populate the next page with the selected employee object's details.

but i can say <html:hidden property="ssn"> inside the logic:iterate tag only.
I am getting the html:hidden properties as null in the action class.
Is it bcoz there is not a way to distinguish b/w the different objects?

Has anyone come across this problem? Please let me know your comments/suggs.

Thanks,
Aparna
19 years ago
I am a beginner with Struts and what I think as a solution might not be applicable to your situation.

But I have got the same error msg many times and I think the following things resolved it(for me).

1. check whether your jsp can see your actionform,valueobject(javabean) etc
2. create a formbean(or actionform , i dont know if there is any difference b/w these terms) for the page you are trying to display or use a dynaactionform/dynavalidator form.

HTH,
Aparna
19 years ago
Thanks Marc.
I did try rebuild a couple of times.

Finally a change I made, did away with this problem.
I had added only javaPrj1.jar as a Web Library project(obtained from Properties on project name) on webPrj1. I added javaPrj2.jar also as a web library project. Rebuilt everything. This took the error out.

I dont understand where a Web Library project comes into play while building/compiling. Anyways, I am ok for now!

Thanks for your help.
Aparna
19 years ago
Thanks a lot Jeanne !

I had checked n double-checked the properties to make sure it is correct.

first my error was a certain menu.jsp could not be compiled. it was in menu.jsp that i had my link which brings up the action testAction.do.
Later i found out that my EAR project had two web projects and both had menu.jsp. So i removed one web prj and tried again. this time menu.jsp was been located n compiled successfully. I got to have a different name if i want to keep both web projects, i guess.

now I am getting for the same class

Error 500: Error while defining class: com.test.dept.employee
This error indicates that the class: com.example.person
could not be located while defining the class: com.test.dept.employee
This is often caused by having the class at a higher point in the classloader hierarchy .

I have com.example.person in javaPrj1 and com.test.dept.employee in javaPrj2.

I am checking all the projects in the workspace and arranging the java build path. i seem to have covered everything, but still this is the error that i keep getting.

Please help with any comments/suggestions.
Thanks,
Aparna

menu.jsp
19 years ago
I have a prj javaPrj1 and webPrj1. webPrj1 uses Struts.

I am getting a NoClassDef found error for a class employee which is in javaPrj1 , which is already included in the classpath.

I have the struts.jar included in the classpath also.

[10/5/04 17:23:14:543 EDT] 554b4393 WebGroup E SRVE0026E: [Servlet Error]-[com/test/employee]: java.lang.NoClassDefFoundError: com/test/employee
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1716)
at java.lang.Class.getConstructor1(Class.java:1894)
at java.lang.Class.newInstance3(Class.java:327)
at java.lang.Class.newInstance(Class.java:301)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:860)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

i have a link in the web page on clicking which it invokes an action specified in the struts-config.xml . i have created action class , form bean etc also.

Where am I going wrong?

I am using WSAD5.1.1 and Struts1.1.

Thanks.
19 years ago