Question in developing JSP with Struts

Hello,everybody.
Recently,I wrote a simple JSP Web program basing on the Struts architecture.It created a page for a user to input his name and password,and after the user click the submit botton on the form,it can redirect to another page and show the name and password that the use has input on the page.I have completed the program but it can't work properly.
I listed each part of the program as following:
(a) TestForm.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>Login Interface</title>
</head>
<body vLink="#006666" link="#003366" bgColor="#E0F0F8">
<img height="33" src="image/enter.gif" width="148">
<form action="ReadTestForm.do" method="post">
UserName:
<input size="15"name="PersonName"><p>
Password:
<input type="password" size="15" name="Psw"><p>
<input type="submit" value="Submit">
</form>
(b) MTestForm.java
package Test;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
public class MTestForm extends ActionForm{
     private String PersonName = null;
     private String Psw = null;
     public MTestForm(){}
public void setPersonName(String name) {
          this.PersonName = name;
     public String getPersonName() {
          return PersonName;
     public void setPsw(String psw) {
          this.Psw = psw;
     public String getPsw() {
          return Psw;
     public void reset(ActionMapping mapping,
          HttpServletRequest request) {
          this.PersonName = null;
          this.Psw = null;
(c) ReadTestFormAction.java
package Test;
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.ActionMessages;
import org.apache.struts.action.ActionMessage;
import javax.servlet.ServletContext;
import javax.sql.DataSource;
import javax.servlet.http.*;
public final class ReadTestFormAction extends Action{
     public ActionForward execute(
               ActionMapping mapping,
               ActionForm form,
               HttpServletRequest request,
               HttpServletResponse response) throws Exception {
               MTestForm TestFormBean = (MTestForm) form;
     String PersonName = TestFormBean.getPersonName();
     String Psw = TestFormBean.getPsw();
     return mapping.findForward("ReadTestFormOk");
(d) ShowForm.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page import = "classmate.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Read Test Form and Show the Data</title>
</head>
<body>
<%
     MTestForm ReadformBean1 = (MTestForm)request.getAttribute("TestFormBean1");
%>
<h1><img src="image/smile.gif">
Welcome
<%=ReadformBean1.getPersonName()%>
Your Password is:
<%=ReadformBean1.getPsw()%>
</h1><br>
</body>
</html>
(e) 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>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>actionServlet</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>actionServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>TestForm.jsp</welcome-file>
</welcome-file-list>
</web-app>
(f) 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="formBean1" type="Test.UserForm"/>
<form-bean name="TestFormBean1" type="Test.MTestForm">
</form-bean>
     <action-mappings>
          <action path="/login" type="Test.LoginAction" name="formBean1" scope="request" input="/login.jsp" >
               <forward name="failed" path="/error.jsp"></forward>
               <forward name="successed" path="/right.jsp"></forward>
          </action>
          <action path="/regist" forward="/regist.jsp"/>
<action path="/ReadTestForm"
          type="classmate.ReadTestFormAction" name="TestFormBean1" scope="request" input="/login.jsp">
     <forward name="ReadTestFormOk" path="/ReadForm.jsp"></forward>
</action>
     </action-mappings>
</struts-config>
After I accessed the page of "TestForm.jsp" and input the " Username and Password",click "Submit " button ,it can redirect to the page of "ShowForm.jsp",but each time both the Username and Password are "Null", It meaned that the statement {which is MTestForm ReadformBean1 = (MTestForm)request.getAttribute("TestFormBean1");
} and its following statement in the "ShowForm.jsp" can't accessed what the user have input for the Textboxs of Username and Password.
I have tried and tried and modify the program for many times,but it have not been solved.
Can you help me to check out what is the wrong with the program?
Thanks you for help and Regards
(Can you anybody tell me how edit the text so that it can been printed out clearly in this forum?)
Message was edited by:
Devemor

Well as far as i see there is no mapping working between
Form input and ActionForm Bean properties as the reset() method would be called b4 action class
you need to map the properties in the below fashoin
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head> <title>Login Interface</title> </head>
<body vLink="#006666" link="#003366" bgColor="#E0F0F8">
<img height="33" src="image/enter.gif" width="148">
  <form action="ReadTestForm.do" method="post">
     UserName: <input size="15"name="PersonName">
     Password: <input type="password" size="15" name="Psw">
     <input type="submit" value="Submit">
  </form>
</body>
</html>MTestForm.java:
==============
package Test;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
public class MTestForm extends ActionForm{
private String PersonName = null;
private String Psw = null;
public MTestForm(){}
public void setPersonName(String name) { this.PersonName = name; }
public String getPersonName() { return PersonName; }
public void setPsw(String psw) { this.Psw = psw; }
public String getPsw() { return Psw; }
public void reset(ActionMapping mapping, HttpServletRequest request)
{ this.PersonName = request.getParameter("PersonName");
  this.Psw = request.getParameter("Psw");
}or try with
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
   <title><bean:message bundle="form" key="login.title"/></title>  
</head>
<body>
<html:form action="">
Username : <html:text property="personName" />
Password : <html:password property="psw"/>
</html>
</body>
</html:html>MTestForm.java:
==============
package Test;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
public class MTestForm extends ActionForm{
private String PersonName = null;
private String Psw = null;
public MTestForm(){}
public void setPersonName(String name) { this.PersonName = name; }
public String getPersonName() { return PersonName; }
public void setPsw(String psw) { this.Psw = psw; }
public String getPsw() { return Psw; }
public void reset(ActionMapping mapping, HttpServletRequest request)
  this.PersonName = null;
  this.Psw = null;
}and the controller part would be something like the one below
ReadTestFormAction.java
=======================
package Test;
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.ActionMessages;
import org.apache.struts.action.ActionMessage;
import javax.servlet.ServletContext;
import javax.sql.DataSource;
import javax.servlet.http.*;
public final class ReadTestFormAction extends Action{
  public ActionForward execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
  MTestForm TestFormBean = (MTestForm) form;
  String PersonName = TestFormBean.getPersonName();
  String Psw = TestFormBean.getPsw();
  return mapping.findForward("ReadTestFormOk");
}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="formBean1" type="Test.UserForm"/> <form-bean name="TestFormBean1" type="Test.MTestForm">
</form-bean>
<action-mappings>
<action path="/login" type="Test.LoginAction" name="formBean1" scope="request" input="/login.jsp" >
<forward name="failed" path="/error.jsp"></forward>
<forward name="successed" path="/right.jsp"></forward>
</action>
<action path="/regist" forward="/regist.jsp"/> <action path="/ReadTestForm" type="classmate.ReadTestFormAction" name="TestFormBean1" scope="request" input="/login.jsp"> <forward name="ReadTestFormOk" path="/ReadForm.jsp"></forward> </action>
</action-mappings>
</struts-config>Hope that might help :)
REGARDS,
RaHuL

Similar Messages

  • JDeveloper editing JSP with Struts tags terribly, terribly slow!?

    I use JDeveloper 10.1.2 and I do not know the reason but it started to take 15min just to change/edit JSP containing Struts tags. RAM memory is 1GB and there is more than 0.5 GB available, but processor usage shows 100% allocated to JDeveloper!? As soon as I do even slight change in a JSP file JDeveloper starts some computations and I have no idea of what it is doing.
    What is JDeveloper computing? It seems it tries to produce some drop-down lists "helping" me to do the editing, add tags and instead I am spending days to just change one small JSP page!
    How can I stop and PREVENT JDeveloper doing ANY "help" during editing of ANY file?
    There must be an option to switch off whatever JDeveloper is doing?
    Many thanks,

    I did that but it is still very slow, it looks like Jdev is doing some intensive calculations whenever I click somewhere on JSP page with tags. Maybe this is related with my other question I posted before this one? Maybe JDev automatically searches for tag libraries it cannot find and copies them to /WEB-INF directory? (other IDEs used in same environment, like Eclipse and IntelliJ, and they do not have this problem)
    Some other strange things: struts-config.xml seems not integrated with CVS from JDev (other files like tiles-config.xml, web.xml etc. are integrated, I can right click and get CVS info on particular file, except struts-config.xml). When I want to check in/out struts-config.xml I have to do it with external tool like WinCVS etc., cannot do that from JDev!

  • Show jsp with struts

    hello,
    i'm building a web-application with struts. now i have the following problem (i don't find den reason, although i'm trying for hours):
    i want to show in the browser (with tomcat) a jsp-site. this site consists of different jsp-parts:
    file neujob.jsp
    <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
    <template:insert template='/templates/eshop.jsp'>
    <template:put name='header' content='/templates/header.jsp' />
    <template:put name='view' content='/view/erstellen.jsp' />
    <template:put name='footer' content='/templates/footer.jsp' />
    </template:insert>
    header and footer are shown correctly, when i call http://localhost:8080/pmtool/neujob.jsp in the browser; but the view-part is not shown. independent of how it looks. even this narrow-version doesn't work:
    file erstellen.jsp
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    huhu<br>
    huhu<br>
    the login.jsp-site however is shown correctly, and actually it is built similarly.
    what may be the reason? what gets wrong?
    thank you for your help!
    paraphrase

    sorry! now i've found my mistake!

  • Trying to submit back to jsp with struts

    Ok, so I have a jsp page that displays tons of stuff.
    I get there from the struts flow of:
    InputFormJsp -> strutsFormBean ->strutsActionBean->JSP View Page
    So I'm at my view page and I was to resubmit back to the view page again using a bunch of hidden input fields to redo the page with different vars (historic data, based on the 1st time through).
    So it will go:
    JSP View Page->strutsFormBean->strutsActionBean->JSP View Page
    I want to use the same form and action beans and the same view page, just want to pass the hidden vars instead of prompting the user all over again.
    I have my form and hidden fields set up, but my problem is how do I get struts to see the resubmit. I made a new actionmapping that labeled the "input" as the same jsp page as the forward but I keep getting:
    javax.servlet.ServletException
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)followed by a good old NullPointerException from my actionbean's execute method (I think):
    root cause
    java.lang.NullPointerException
         com.air2web.SysReportAction.execute(SysReportAction.java:85)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)struts-config.xml looks like:
    <action   path="/getSysReport"
                  type="com.air2web.SysReportAction"
                  name="SysReportForm"
                  input="/pages/SysReport.jsp"
                  scope="request">
        <forward name="success" path="/pages/genSysReport.jsp"/>         
        </action>
    <action   path="/getSysReportHistoric"
                  type="com.air2web.SysReportAction"
                  name="SysReportForm"
                  input="/pages/genSysReport.jsp"
                  scope="request">
        <forward name="success" path="/pages/genSysReport.jsp"/>         
        </action>Is there a way to specify many input pages or some other trick to do this??
    Thanks
    Chris Liles

    I had exactly the same problem with Struts, and Finally I solve this.
    first of all put into <form-beans> the form path
        <form-bean name="updUserForm" type="com.yourcompany.struts.form.UpdUserForm" />and in <action-mappings >
        <action
          attribute="updUserForm"
          input="/UpdateUser.jsp"
          name="updUserForm"
          path="/updUser"
          scope="request"
          type="com.yourcompany.struts.action.UpdUserAction" >
          <forward name="success" path="/MyJsp.jsp" />
        </action>Be carefull with the first letter of attribute and name they must be in minus! (Instead of mayus in form).
    For more ..
    [email protected]

  • Problem compling JSP with struts tags on Weblogic 8.1

    I have deployed a web application in Weblogic 8.1. However, I am facing a problem while the JSPs are getting compiled. The JSPs ahve taglib declarations referring to Struts tag library files that are present in WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /approve/approve_home.jsp; Line: 53]
    I believe other people have also faced this issue with Weblogic8.1 and struts. Any solutions???
    Thx
    KP

    KP,
    Does this code run in the development environment but not in production? How
    was this code compiled?
    - john
    "KP" <[email protected]> wrote in message
    news:405b9b56$[email protected]..
    I have deployed a web application in Weblogic 8.1. However, I am facing aproblem while the JSPs are getting compiled. The JSPs ahve taglib
    declarations referring to Struts tag library files that are present in
    WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[/approve/approve_home.jsp; Line: 53]
    >
    I believe other people have also faced this issue with Weblogic8.1 andstruts. Any solutions???
    >
    Thx
    KP

  • File save JSP with struts

    I have a web application which saves the data from DB query in csv format.
    I am having problem with saving the file.
    I get the correct result and i can alos save the file.
    Where i am having problem is after the file is saved i want my page to go to
    another page which shows the data of the file.
    What i did was in my struts config file i gave the path of the jsp that shows
    the data, but after the file is saved my page is not redirected.
    so what i did was i first redirected to another page, and used javascript
    onload function and gave the path of the action that saves the file.
    However, even when the page is redirected instead of saving the data
    it saves the html source of the jsp. i dont know why this is happenig.
    anybody with any idea on how can i redirect to another page after saving
    the file or redirecting to another page and saving the file, with correct data?
    please help

    Post snippets from your struts-config.xml and code. This will give idea to ppl who are trying to help.
    - Jay
    http://www.javarss.com - Java News from around the world.
    Spread JavaRSS.com, Add the above signature to your messages or emails!

  • Two dimensional array in JSP with struts

    Is it possible to use two dimensional array in an web application
    based on struts. I am using JSP and to get data from two dimensional
    array im using
    property = "array[0][0]";I read on the internet that bean utils does not support two dimensional array?
    I have a table like spreadsheet with 30 rows and 20 columns and i was
    planning to use two dimensional array? is there any other way to get
    this stuff done easily?
    any ideas welcome.

    HI ,
    i have the same problem you had
    did you get any solution for this?
    if so you can help me out

  • How to create a jsp with struts tld

    Hi
    I am new to jsp technology also struts.
    I want to create one jsp page with using struts.
    The page should be one text box and submit button.
    I was try to create one page in my application. But its showing the Errors
    Here i paste the Error
    javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
    Please anybody help me .
    Thanks
    MerlinRoshina

    hi
    check out this url
    http://forum.java.sun.com/thread.jspa?forumID=4&messageID=1384153&threadID=337537

  • Help running a simple jsp (with struts and core -sun- taglibs)

    Hi, could somebody help me with this simple JSP?
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:c="http://java.sun.com/jsp/jstl/core"
         xmlns:html="http://struts.apache.org/tags-html">
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    </head>
    <body>
         <html:text property="text">text</html:text>
         <label>hello</label>
         <c:forEach begin="1" end="5">
              <label>inside</label>
         </c:forEach>
    </body>
    </html>When I run it, the c:forEach tag doesn’t work.
    Output shows “text hello inside” instead of desired “text hello inside inside inside inside inside”
    Any hints will be really appreciated.
    Edited by: 792625 on 03-sep-2010 0:15

    Add the JSTL Core tag library.
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

  • Help: OJSPC can not compile the JSP with struts tag

    Hi,
    I am trying to precompile the JSP page with EAR package but OJSPC can not parse the Struts tags.
    I always get oracle.jsp.parse.JspParseException:
    Error: org.apache.struts.taglib.html.MessgesTei while reading TLD /WEB-INF/tld/struts-html.tld
    My OC4J version is 10.1.3.2 and I did tried putting the struts-taglib.jar to /opt/oracle/product/app10g/j2ee/home/jsp/lib or /lib/taglib
    but still do not work.
    Can anyone tell me how to configure the OJSPC and let it support customerized taglibs?
    Thanks a lot!

    This is a new problem with jdk1.4 when compiling with tomcat.
    The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
    best
    kev

  • Do anyone develop jsp with JRun?About taglib in JRun

    I have a tld for a set of custom tags. This is developed under tomcat4 and it run successfully. But the deployment is on JRun. Jrun gives the following unhelpful error on any pages which use the tags.
    <head><title>JRun Servlet Error</title></head><h1>500 Internal Server Error</h1><body>
    <PRE>
    <B>/ardeo/purchasemaster/ListBaskets.jsp:</B>
    Error parsing TLD '/dbpager.tld': null.
    java.lang.NullPointerException
    at allaire.jrun.jsp.TagLibraryClassLoader.loadClass(JRunTagLibraryInfo.java:872)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at allaire.jrun.jsp.JRunTagLibraryInfo.getPropertyType(JRunTagLibraryInfo.java:725)
    at allaire.jrun.jsp.JRunTagLibraryInfo.buildAttributeInfo(JRunTagLibraryInfo.java:705)
    at allaire.jrun.jsp.JRunTagLibraryInfo.buildTagInfo(JRunTagLibraryInfo.java:683)
    at allaire.jrun.jsp.JRunTagLibraryInfo.initialize(JRunTagLibraryInfo.java:627)
    at allaire.jrun.jsp.JRunTagLibraryInfo.<init>(JRunTagLibraryInfo.java:199)
    at allaire.jrun.jsp.JRunTagLibraryInfo.lookupTLI(JRunTagLibraryInfo.java:109)
    at allaire.jrun.jsp.JSPParser.taglibDirective(JSPParser.java:844)
    at allaire.jrun.jsp.JSPParser.directive(JSPParser.java:975)
    at allaire.jrun.jsp.JSPParser.parse(JSPParser.java:923)
    at allaire.jrun.jsp.JSPParser.writeXML(JSPParser.java:138)
    It looks like Jrun doesn't understand valid TLDs .It seems that we must use its own jruntags.jar files.I means we could add our .class and .tld to the jruntags.jar.

    hi jpardi :
    My JRun version is 3.1.

  • WLS 8.1 sp1 with Struts 1.1 JSP with bean tag won't compile

              Hello,
              We are currently porting our application which uses struts 1.1 to WLS 8.1 sp1
              from another app server. Everything seems to deploy correctly and pages which
              use struts tags appear to compile and run fine. However, the pages with struts
              <bean:define> tags are not compiling.
              Example JSP Code:
              <bean:define id="userForm" name="userForm" scope="session" toScope="page" type="UserFormBean"/>
              <% if (userForm.hasUserData()) {hasUser=true;} %>
              WLS Console Output:
              ..jsp_servlet\_jsp\_sailor\__home.java:493: cannot resolve symbol
              symbol : variable userForm
              location: class jsp_servlet._jsp._sailor.__home
              if (userForm.hasUserData()) { //[ /jsp/sailor/home.jsp; Line: 38]
              When I look at the JSP's parsed java code (__home.java:493) I find that nowhere
              in the class is the variable userForm declared.
              Is this a bug in WLS? Does anyone know of a workaround?
              Thanks,
              Scott
              

    Please contact customer support [email protected] and request a patch for
              CR112789. AT_END tags do not work correctly in 81sp1
              --Nagesh
              "Scott Fleming" <[email protected]> wrote in message
              news:3f734c0d$[email protected]..
              >
              > Hello,
              >
              > We are currently porting our application which uses struts 1.1 to WLS 8.1
              sp1
              > from another app server. Everything seems to deploy correctly and pages
              which
              > use struts tags appear to compile and run fine. However, the pages with
              struts
              > <bean:define> tags are not compiling.
              >
              > Example JSP Code:
              >
              > <bean:define id="userForm" name="userForm" scope="session" toScope="page"
              type="UserFormBean"/>
              >
              > <% if (userForm.hasUserData()) {hasUser=true;} %>
              >
              > WLS Console Output:
              >
              > ..jsp_servlet\_jsp\_sailor\__home.java:493: cannot resolve symbol
              > symbol : variable userForm
              > location: class jsp_servlet._jsp._sailor.__home
              > if (userForm.hasUserData()) { //[ /jsp/sailor/home.jsp; Line:
              38]
              >
              > When I look at the JSP's parsed java code (__home.java:493) I find that
              nowhere
              > in the class is the variable userForm declared.
              >
              > Is this a bug in WLS? Does anyone know of a workaround?
              >
              > Thanks,
              > Scott
              

  • How to use custumer DataTagsLibrary for BC4J in the JSP's with Struts Suppo

    I've been looking for a good tutorial to learn very well
    BC4J, DataTags Library for JSP , all with struts support.
    But it's dificult to join all this topics.
    Can someone help.
    If you have any answer for me, plesea send an e-mail to
    [email protected]

    Try these links:
    http://radio.weblogs.com/0118231/ - Look for the Toy Store demo.
    http://otn.oracle.com/sample_code/tutorials/bc4jvsm/content.html - The new Shopping Mall tutorial.
    http://otn.oracle.com/products/jdev/howtos/content.html - The JDeveloper how to list.
    Also, check frequently on the JDeveloper forum here on OTN.
    HTH.
    Thanks, George

  • Need a help with Struts Tiles dynamic menu

    Hello,
    I am started few days ago with Tiles, try to develop web application.
    Can anybody sugest very simple example with Tiles and menu.
    So my definition looks like this:
    tiles-def.xml
    <tiles-definitions>
    <definition name="MainDefinition" path="/layouts/myLayout.jsp">
    <put name="title" value="This is the title." />
    <put name="header" value="/tiles/header.jsp" />
    <put name="menu" value="/tiles/menu.jsp" />
    <put name="body" value="/tiles/body.jsp" />
    <put name="footer" value="This is the footer." />
    </definition>
    I am simple layout.
    I need to on menu click change body content, now i am doing it like this:
    index.jsp
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%String body = request.getParameter("body");%>
    <tiles:insert definition="MainDefinition" flush="true">
    <tiles:put name="body" type="string"> <%= body %> </tiles:put>
    </tiles:insert>
    But now body is a string how to make it open url?
    Maybe somebody have link to menu Tiles good examples.
    Thanks

    But here's some useful advice :P
    I'm going to assume that the other two people involved in this have a bit more experience, have them do most of the designing. Have them leave most of the easy stuff for you. You can then spend your time learning the minimum of what you need to know. And if you have problems, or don't understand things, ask your partners for help.
    And you'll want to set some spare time for you to all get together and do something fun so that you don't kill each other because of the stress :P
    I've had a lot of bad project experiences, fortunatly they where all just at school :P I blame myself, mainly because I didn't do the whole thing myself (mostly because I listened to people when they said that I shouldn't or couldn't do everything myself.) I'd like to say that it's mostly because of poor communication, and disorganization, but an awful lot of it had to do with the fact that I tend to be the only person with any work ethic what so ever.
    But whinning and repressed memories aside, good communication and organization help a lot. Come up with a good system with your team mates. And don't be afraid to ask questions. And don't worry about dividing up the work load equally. Just make sure you put in a good amount of effort, if not frightening amounts.
    If all of you are clueless, divide up the learning stuff between yourselves too.
    I have no experience with Struts. I've done a bit of stuff with XML, but nothing too complicated. The XML by itself tends to be extremely easy. What you plan on doing with it can vary (I don't like XML incidentally :P)
    Other then that, good luck.

  • Error 500, deployment with struts

    An application developed in JDeveloper 9.02 with struts 1.1b works fine when running using the local OC4J instance running from JDeveloper. I created a deployment profile with a .war and .ear, deployed to the OC4J standalone instance using the EM website, and all seemed well. Now it sporadically gives the "Internal Server Error" when navigating between pages. I can't find anything in the logs, and ideas?

    It's OC4J core install for 9iAS Release 9.02. I've deployed to Solaris since there is a bug that can give this error that is patched for Solaris, but not Windows. The error occurs when navigating pages in a struts app. Sometimes it works fine, then you click on one of the image buttons to go to the next .jsp and this error comes up.
    Ruth
    What version of OC4J you are testing on ?
    Is it OC4J standalone or Oracle9iAS that you are using.
    more details would be helpful in diagnosing the problem.
    -Prasad

Maybe you are looking for

  • Cumulative credit value against the combined invoice value

    Is there any FI table where we can find cumulative credit value against combined invoice value. The scenario is.. There is a combined invoive created  for multiple sales documents for the value 5000 dollers . 1.I have created a credit memo& accountin

  • PSD library: extension could not be opened because it is not signed correctly ! what can i do???

    PSD CC: extension could not be opened because it is not signed correctly! What can i do???

  • Windows 8 Monitor Problems

    I have a TouchSmart tx2-1020US that I just upgraded to Windows 8. Most things work well but there are two troublesome issues 1) the monitor image will not flip when the monitor is flipped and closed. 2) The fingerprint scanner cannot be used to log i

  • [875P Neo Series] P4N Diamond - RAID problem

    Hi, I just purchased a P4N Diamond. I've installed WinXP-SP2 on a single Samsung 70GB IDE disk on IDE1 as Primary Master. Two CD/DVD drives are on IDE2. SATA-1 and SATA-2 are connected to Hitachi 500GB SATA drives. I've entered the nVidea RAID utilit

  • Can't Figure Out How the Briblocks Widget

    Hey guys. I have a really simple really kind of silly question for you. Does anyone know how to get the blocks from the briblocks widget to multiply in number? Or does it just stay singular for you to look at? Thanks!