• 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

wrong jar reference

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here's the error i have got....

javax.servlet.ServletException: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

but the javax.servlet.jar does'nt not contain getJspApplicationContext... this method exists in jsp-api.jar . why is the wrong reference occuring. please help.

if may be cos of anyother thing please let me know with possible solutions.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ashwin venkat wrote:but the javax.servlet.jar does'nt not contain getJspApplicationContext... this method exists in jsp-api.jar .



What does it matter which jar file it exists in? Have you removed the jsp-api.jar file from the Tomcat lib folder?
 
ashwin venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i will keep that in mind when im posting the next time .. thanks for letting me know " Bear Bibeault "

it is trying to access a method that is not there in javax.servlet.jar , but in jsp-api.jar .

no i have not removed jsp-api.jar from Tomcat lib folder !
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ashwin venkat wrote:it is trying to access a method that is not there in javax.servlet.jar , but in jsp-api.jar .


That makes no sense. javax.servlet is a package, not a jar file. The servlet API is in servlet-api.jar.

Again, it makes no difference which jar file the class is in; both jar files are in Tomcat's class path.

Have you checked to make sure that both jar files are in Tomcat's lib folder? Are you sure you did not copy these jar files to your WEB-INF/lib folder? (which can cause all kinds of weird errors.)
 
ashwin venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya i checked ... both files are not in the WEB-INF/lib... its is present in the Tomcat lib folder !
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ashwin venkat wrote:here's the error i have got....

javax.servlet.ServletException: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

but the javax.servlet.jar does'nt not contain getJspApplicationContext... this method exists in jsp-api.jar . why is the wrong reference occuring. please help.

if may be cos of anyother thing please let me know with possible solutions.




Every JSP translates into a Servlet eventually. The above stacktrace does not seem to be complete. Can you please post the complete stack trace.
The issue here is not with the jsp-api jar. Something is wrong with your jsp page itself.
 
ashwin venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is the jsp page that I have..

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<html>
<head>
<title>ABC, Inc.</title>
</head>
<body>

<div id="mainHeader" align="center">
<font color="green">
<h2><u>ABC, Inc.</u></h2>
</font>
</div>
<br> </br>
<hr width="100%" noshade="true">
<font color="red"><html:errors/></font>
<html:form action="/login/Login">

<Table width="100%" align="center" border="0">
<tr>
<td width="30%"> </td>
<td width="70%" align="left"> </td>
</tr>
<tr>
<td colspan="2" align="center"><h5><u>Welcome to ABC, Inc. Admin Page.</u></h5></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan="2" align="center"><b>Please enter admin username and password to login</b>
</tr>
</table>
<br> </br>
<Table align="center">
<TBODY>
<TR>
<TD width="88" align="center">User Name</TD>
<TD width="224" align="center"><INPUT type="text" name="uid" size="36" maxlength="50"></TD>
</TR>
<TR>
<TD width="88" align="center">Password</TD>
<TD width="224" align="center"><INPUT type="password" name="pwd" size="36" maxlength="50"></TD>
</TR>
<TR>
<TD width="88" height="37"></TD>
<TD height="37" width="224">
<CENTER>
<TABLE>
<TBODY>
<TR>
<TD align="center"><html:submit/></TD>
<TD align="center" valign="middle" width="56"><INPUT type="reset" value="Cancel"></TD>
</TR>
</TBODY>
</TABLE>
</CENTER>
</TD>
</TR>
</TBODY>
</TABLE>


</html:form>
</body>
</html>

Can you please correct me if there are any issues?
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashwin, can you please follow this advice:

Piyush Mangal wrote:The above stacktrace does not seem to be complete. Can you please post the complete stack trace.

 
ashwin venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as a last ditch effort i just started a new project and copied all the file from the previous project... and guess what.. no more error!!

guess this is resolved for now at least

thanks a bunch for all the help...

i am new to java and will be posting a lot as and when i get errors ... and will try and give more information about the errors i am getting ( like the full stack trace in this case :P)

again thank you guys
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic