Hi
I am using weblogic8.1 Application server
I have written a simple web application in
struts that accepts
username and password in "login.jsp" and corresponding "bean" ActionForm
for the same.
Below are my application source files......
*******************************************
login.jsp
*******************************************
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<html:html>
<head>Struts
Test</head>
<body bgcolor="#E6F1FC">
<html:form action="login.do">
<table>
<tr>
<td><html:text property="uname" value=" "/></td>
<td><html:submit>SUBMIT</html:submit></td>
</tr>
</table>
</html:form>
</body>
</html:html>
******************************************
web.xml
******************************************
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<
servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
</web-app>
************************
struts-config.xml
***********************
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="LoginFrom" type="com.nit.StrutsEx.LoginFrom"/>
</form-beans>
<action-mappings>
<action path="/login" type="com.nit.StrutsEx.LoginAction" name="LoginFrom" validate="false"
input="/login.jsp">
<forward name="success" path="/success.jsp"/>
</action>
</action-mappings>
<message-resources parameter="ApplicationResource" null="false"/>
</struts-config>
************************
ActionForm
*************************
package com.nit.StrutsEx;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.*;
import javax.servlet.*;
import java.io.*;
public class LoginForm extends ActionForm
{
private
String uname=null;
public void setUname(String uname){
this.uname=uname;
}
public String getUname(){
return this.uname;
}
public void reset(ActionMapping am, HttpServletRequest req) {
this.uname=null;
}
public ActionErrors validate(ActionMapping am,HttpServletRequest req)
{
System.out.println("I am in Validate");
return null;
}
}
************************
ActionServlet
************************
package com.nit.StrutsEx;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import javax.servlet.*;
import java.io.*;
public class LoginAction extends Action
{
public ActionForward execute(
ActionMapping am,
ActionForm af,
HttpServletRequest req,
HttpServletResponse res) throws ServletException , IOException
{
return am.findForward("success");
}
}
*************************************************************************
My application runs well under
tomcat but when i deploy it on Weblogic 8.1 it gives following error
Compilation of 'E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java' failed:
--------------------------------------------------------------------------------
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
probably occurred due to an error in /login.jsp line 4:
<html:html>
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
probably occurred due to an error in /login.jsp line 8:
<html:form action="login.do">
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
probably occurred due to an error in /login.jsp line 13:
<td><html:submit>SUBMIT</html:submit></td>
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
probably occurred due to an error in /login.jsp line 13:
<td><html:submit>SUBMIT</html:submit></td>
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
probably occurred due to an error in /login.jsp line 16:
</html:form>
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
probably occurred due to an error in /login.jsp line 18:
</html:html>
--------------------------------------------------------------------------------
Full compiler error(s):
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
symbol : variable EVAL_BODY_BUFFERED
location: interface javax.servlet.jsp.tagext.BodyTag
if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 4]
^
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
symbol : variable EVAL_BODY_BUFFERED
location: interface javax.servlet.jsp.tagext.BodyTag
if (_int1 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 8]
^
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
symbol : variable EVAL_BODY_BUFFERED
location: interface javax.servlet.jsp.tagext.BodyTag
if (_int2 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 13]
^
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
symbol : variable EVAL_BODY_BUFFERED
location: interface javax.servlet.jsp.tagext.BodyTag
if (_int2 == BodyTag.EVAL_BODY_BUFFERED) out = pageContext.popBody(); //[ /login.jsp; Line: 13]
^
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
symbol : method doAfterBody ()
location: class org.apache.struts.taglib.html.FormTag
} while (_html_form0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 16]
^
E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
symbol : method doAfterBody ()
location: class org.apache.struts.taglib.html.HtmlTag
} while (_html_html0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 18]
^
6 errors
--------------------------------------------------------------------------------
Wed Jul 25 17:06:07 GMT+05:30 2007
Please reply the solution
************************