This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JspContext Error  RSS feed

 
Bruce Dempsey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi we have had to upgrade to JDK 1.4 and our tag libraries have stopped working. Any ideas where I should be looking to resolve this?

[7/5/04 9:42:01:318 EDT] 68e72fa4 WebGroup E SRVE0026E: [Servlet Error]-[javax/servlet/jsp/JspContext]: java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext

Thank you,
Bruce
 
C Kutler
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure this is your problem, but the Javac bytecode compiler in J2SE 1.4.0 is more strict than in previous versions in enforcing compliance with the Java Language Specification, which requires that imported classes be in named namespaces (that is, they be in packages). Do you have any classes in your tag libraries that are not in packages?
 
Bruce Dempsey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All of my tag library classes are in a pacage called taglib.

Here is one of my tag library classes if that helps..

package taglib;

import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.JspException;
import java.io.IOException;
import HCCFIA.BusinessObjects.DataInterface;
import HCCFIA.BusinessObjects.User;
import HCCFIA.Utility.ListManager;

public class IsCheckedHandler extends TagSupport {
private String listName;
private String type;

public void setListName(String ln)
{
this.listName = ln;
}

public void setType(String t)
{
this.type = t;
}


public int doStartTag() throws JspException
{
if (this.type == null)
{
this.type = "";
}

JspWriter out = pageContext.getOut();

ListManager lm = (ListManager)pageContext.getAttribute(listName,pageContext.REQUEST_SCOPE);
if (listName.compareTo("Subscription") == 0)
{
this.listName = "Committee";
}
DataInterface di = (DataInterface)pageContext.getAttribute("iterateOverObjects." + listName +".currentObject", pageContext.REQUEST_SCOPE);
String msg = di.getName();

try {
if (type.compareTo("ActiveUser") == 0)
{

User thisUser = (User)di;
if (thisUser.isActive())
{
out.print("CHECKED");
}
return SKIP_BODY;
} else if (type.compareTo("InActiveUser") == 0)
{
User thisUser = (User)di;
if (! thisUser.isActive())
{
out.print("CHECKED");
}
return SKIP_BODY;
}
} catch (IOException ioe)
{
throw new JspException(ioe.toString());
}

if (lm == null)
{
return SKIP_BODY;
}

if (lm.isMember(msg.trim()))
{
try
{
out.print("CHECKED");

} catch (IOException ioe)
{
throw new JspException(ioe.toString());
}
}


return SKIP_BODY;
}
}
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you would already have checked your classpath settings.
If you havent, you may want to try to run a simple class from console that makes a reference to JspContext.
 
Bruce Dempsey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your help. We were getting mixed up with our versions. We had downloaded Suns J2EE 1.4 JDK in error for our local devleopment environment. When we downloaded J2EE 1.3 JDK and recompilled our app (with a few minor fixes) we were able to get it running on our QA server again!

Thank you again,
Bruce
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!