• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JspContext Error

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
}
}
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic