• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

struts problem in weblogic 8.1

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
************************
 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
*************
I have written a simple web application in struts that accepts
username and password in "login.jsp" and corresponding "bean" ActionForm for the same.
***************
Correction...

I am using only username field
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Nikesh@Sun Shah"

Please check your private message, for a message from JavaRanch.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic