File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JavaCompile errors in JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JavaCompile errors in JSPs" Watch "JavaCompile errors in JSPs" New topic
Author

JavaCompile errors in JSPs

Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,
I have imported an existing clearcase 4.x project in WSADIE 5.1
After the import there were many errors related to build paths,many of which I have resolved.

Cureently I am stuck up with some errors in jsp pages
They are of the following type:

JavaCompile: The method getXXX() is undefined for the type xxxBean.
xxx.jsp line 91

There are few more errors of the same type.

Can somebody pls tell me what can be the reason for these errors and how to resolve them.

Thanks in Advance
Ratan
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

A JSP is trying to access properties of a bean which has no corresponding public getters.

For example :

In this case, there should be a getName() method in the Employee class.


[My Blog]
All roads lead to JavaRanch
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,
Thanks for the reply.
But I have checked that particular Bean and verified that it has the corresponding getter.I have imported this existing application with no errors into my workspace.Hence I am not able to figure out the peoblem
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Please show an example of error you get (not XXX), and the corresponding bean.
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Nice to see ur reply and interest..
as of now i don't have the code

what I can do is..tomm I will paste that part of code

may be that will be good to find the solution.

Thanks again..hope its ok with you
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Originally posted by Ratan Kumar:
Nice to see ur reply and interest..


"ur" is not a word. Please use real words such as "yours" when posting.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
As I said, that i have imported the existing WSADIE 4.x application from clearcase into my workspace in WSADIE 5.1 and tweaked with some build paths.

This is one of the errors in the JSP. There are few more errors of the same type.
***************************************************************************************
ContactUsPopUs.jsp

Code fragment in this JSP

<jsp:useBean id="userInfoBean" scope="session" class="bpp.base.data.UserInfoBean"/>

<% }
if (userInfoBean.isSegTypeValue("CONTACT_INFO","FAX")) { %>



Error

JavaCompile: The method isSegTypeValue(String, String) is undefined for the type UserInfoBean.ContactUsPopUp.jspline 64

***************************************************************************************

UserInfoBean.java

The code fragment for that particular method:


public boolean isSegTypeValue(String aType, String aValue) {
boolean isIn = false;
int index;

String aList = (String)fCustSegMap.get(aType.toUpperCase());
index = aList.indexOf(aValue.toUpperCase());
if (index >= 0)
isIn = true;

return isIn;
}

***************************************************************************************
What can be the problem? Any solution?

Thanks In Advance
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
Maybe you have an old version of the class packaged in your deployment.


write, revise, re-write, revise, again...<br />write, revise, re-write, revise, again...
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,
Thanks for the reply.

Maybe you are right.That can be a possibility.

What I can do is try to create the jar again which has the class UserInfoBean and include it agin in the classpath.

Any solution you can suggest me?Can there be any other issue here?
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,
I have tried creating a new jar again. But that also hasn't helped.Can there be any other issue?
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
1. open the jar file using winzip.
2. decompile the UserInfoBean.class using JAD
3. have a look at the generated UserInfoBean.jad file (using notepad). Does it have the isSegTypeValue() function?

If it doesn't., then you are still packaging an older version of the class into the jar.


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,
I used Jad to decompile the class.I verified that the particular method which s creating problem is actually there .


So what can be the problem?i am still confused.
Also in some other jsp ,some other method of the same class is used with no errors.

can anyone help?
Thanks
 
 
subject: JavaCompile errors in JSPs