| Author |
Depricated API Error pls help
|
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi guys, Please help me to come out of this error, i'm struggling from 2 days. I know the depricated api error occurs due to use of some old method name of older version of api. If that would be my java class then i could have looked for that. But in my case it is Servlet of jsp which is causing the error. If i try to run any jsp in my weblogic server am getting this error. PLEASE HELP ME. Here is the error details. D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__teststruts.java:251: cannot resolve symbol (No more information available, probably caused by another error) D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__teststruts.java uses or overrides a deprecated API. -------------------------------------------------------------------------------- Full compiler error(s): D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__teststruts.java:251: cannot resolve symbol symbol : method popBody () location: class javax.servlet.jsp.PageContext while (out != null && out != _originalOut) out = pageContext.popBody(); ^ Note: D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__teststruts.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details.
|
 |
Amit KumarS
Ranch Hand
Joined: Oct 10, 2003
Posts: 100
|
|
hi.. first thing is that in case of depricated APIs.. errors are not thrown.. it is simply a warning and not error... error might be due to some other cause... please give some chunks of codes also to analize the situation better.. thanks Amit
|
****************************<br />In 24 hrs Earth rotates once on its Axis.
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi Amit, Here is my Struts based JSP. Also when i tried to compile other simple jsp without struts, still i get the error, basically none of my jsp's are working after i reinstalled my weblogic. <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <html:html locale="true"> <head> <html:base/> </head> <body bgcolor="white"> <html:errors/> <html:form action="/TestStruts.do" focus="username"> <center> <font size="4" COLOR="#0000FF"><p align="RIGHT"> LOGIN PAGE<HR></font> <br><br><br><br><br><br><br><br> <br><br> <br><br> <p align="CENTER"><b>UserName</b> <html:text property="username" size="16" maxlength="16"/> <p align="CENTER"><b>PassWord</b>  <html assword property="password" size="16" maxlength="16" redisplay="false"/> <P><B><html:submit property="submit" value="Submit"/><html:reset/></B> </center> </html:form> </body> </html:html> Thanks, Rashmi
|
 |
Malhar Barai
Author
Ranch Hand
Joined: Aug 17, 2001
Posts: 399
|
|
Hi Rashmi.. First thing first, plz change your display name according to JavaRanch Naming Policy. On your problem, well you say that none of the JSP's work after re-installing your Weblogic, then you should be checking your configuration files, because that is where the root of your problem could be. hth MB
|
Malhar Barai
SOA & Java Book
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi, What do you mean by configuration file, would you please eloborate on that? About changing my name, i tried every possiblity of names, there are already people registered with my name Thanks, Rashmi
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi, To make my problem look simpler, Here is the simple jsp i have written <%@ page import="java.util.*"%> <HTML> <BODY> Hello, world !!!<br> <% out.println("\nThe time in scriptlet is\n<br>"); Date date=new Date(); System.out.println("The date in the scriptlet would be:<br>"); out.println(String.valueOf(date)); out.println( "<BR>Your machine's address is " ); out.println( request.getRemoteHost()); out.println("<br>"); %> <%=date%> </BODY> </HTML> And the error i'm getting is Compilation of 'D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__hello.java' failed: -------------------------------------------------------------------------------- D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__hello.java:103: cannot resolve symbol (No more information available, probably caused by another error) -------------------------------------------------------------------------------- Full compiler error(s): D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__hello.java:103: cannot resolve symbol symbol : method popBody () location: class javax.servlet.jsp.PageContext while (out != null && out != _originalOut) out = pageContext.popBody(); ^ 1 error Please send me the answers thanks, Rashmi
|
 |
Malhar Barai
Author
Ranch Hand
Joined: Aug 17, 2001
Posts: 399
|
|
well Rashmi... You can check it out with sheriffs & bartenders for your name. In fact I didnt know Rashmi's so popular . AW..I dont know specifically about Weblogic, but there should be a conf folder, maybe your JAVA_HOME is not specified in a proper way. plz chk that out. oops..maybe I could be missing something.. hth MB [ October 20, 2003: Message edited by: Malhar Barai ]
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi, I checked out my config file, but the problem doesn't seems to be there Thanks, Rashmi
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Hi, As Amit Said the problem is not with the depricated API, it was just causing the warning. The actual error is in converting the jsp to servlet. D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__hello.java:103: cannot resolve symbol symbol : method popBody () location: class javax.servlet.jsp.PageContext while (out != null && out != _originalOut) out = pageContext.popBody(); Still not able to identify the error. Rashmi
|
 |
G Raghavan
Greenhorn
Joined: Aug 21, 2000
Posts: 15
|
|
The method popBody() is actually a container generated code. It was included in the final version of JSP 1.1 documentation. Maybe check with the version of JSP ann servlets you are using. if you are using servlet 2.2 and JSP 1.2 I think the problem will be solved. regards, G. Raghavan
|
G Raghavan
|
 |
Malhar Barai
Author
Ranch Hand
Joined: Aug 17, 2001
Posts: 399
|
|
Hi Rashmi... Tried yr code in my system, working perfectly..this is wat I get to see...
Hello, world !!! The time in scriptlet is Mon Oct 20 18:14:31 IST 2003 Your machine's address is 127.0.0.1 Mon Oct 20 18:14:31 IST 2003
About your prob...even I am confused...Is that something to do with this problem...Version Change In that case, get the latest one...Servlet.jar hth MB
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
Welcome to the Ranch SKYHigh! You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required as Malhar has pointed out. Please take a look at the JavaRanch Naming Policy and change your display name to match it. Thanks! bear JSP Forum Bartender
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Rashmi Reddy
Greenhorn
Joined: Oct 16, 2003
Posts: 19
|
|
Dear all, Thanks for all the suggestions. But I really don't know what went wrong, Now it's working fine with my weblogic reinstalled again with same versions. About my name changing i'll be doing that soon. This is really great forume to solve our problem. Thanks again, Rashmi
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
Rashmi, thanks for trying to comply with the naming standard, but please check the naming standard again. Your display name must be a first and a last name. thanks, bear
|
 |
 |
|
|
subject: Depricated API Error pls help
|
|
|