Struts ? - (Urgent)

The code in Action
boolean war= false;
        if ( CD.after(AD) ){
          war= true;
          msgAgreement="val";
        req.setAttribute("war",""+war);Code in Struts Config file
<action path="/tell/Act"
            type="com.user.action.SampleUser"
            name="uform" scope="session" validate="false">
      <forward name="success"           path="/tell/scent.do" />
      <forward name="failure"             path="/tell/leave.jsp" />
      <forward name="error"             path="/tell/login.jsp" />
      <forward name="val"             path="/tell/login.jsp" />
  </action>code in JSP
<c:when test="${war == 'true'}">
               alert("This is the Warning ");
          </c:when>Here this code is working fine but afterthe alert message is been displayed i want to go to the "scent.do" page am not able to do it can anyone please help me in this?

Asking a Struts question in a forum about Java programming wasn't a good choice either. But I've noticed that people who have urgent problems seem to panic and strike out in random directions. I expect taking a couple of minutes to search out a Struts forum would have been a good investment of time, but urgency overrides all.

Similar Messages

  • JSP Tag libs with struts Urgent

    Hi
    Has anyone implemanted jsp tag libs with the help of struts-bean.tld,struts-html.tld etc,
    I need to use these , but I am not clear with how the page retrives the key values
    example:
    table width="400" cellpadding="10" cellspacing="0" border="0" bgcolor="#cccccc">
    <tr>
    <td valign="top" colspan="2">
    <bean:message key="logon.welcome"/>
    <html:errors/>
    </td>
    </tr>
    <tr>
    <bean:message key="logon.welcome"/>----?
    I don't no how the"message bean" gets its key value dynamically? how it retrieves from its Application resource file? any idea?
    Also has anyone implemanted jsp templates if so kindly guide me thru these
    thanks!

    Hi..
    I am myself involved in implementing custom taglibs extending struts functionality. This can be done by extending the struts base classes and tag handlers. If you're still working on this topic, please let me know and we might share experiences.
    Best regards,.
    - Bj�rn Syse, [email protected]
    Hi
    Has anyone implemanted jsp tag libs with the help of
    struts-bean.tld,struts-html.tld etc,
    I need to use these , but I am not clear with how the
    page retrives the key values
    example:
    table width="400" cellpadding="10" cellspacing="0"
    border="0" bgcolor="#cccccc">
    <tr>
    <td valign="top" colspan="2">
    <bean:message key="logon.welcome"/>
    <html:errors/>
    </td>
    </tr>
    <tr>
    <bean:message key="logon.welcome"/>----?
    I don't no how the"message bean" gets its key value
    dynamically? how it retrieves from its Application
    resource file? any idea?
    Also has anyone implemanted jsp templates if so
    kindly guide me thru these
    thanks!

  • Urgent: Portletizing an struts JSP application

    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

    Hi all,
    Concerning the message below, does the struts framework affect how normal JSP applications are added to Portal? Or is it as simple as just importing the portal classes and referencing them in the JSP's?
    We would like to use struts for our next web application using JSPs, but need to display them within Portal. I've done this before by just changing the way our hrefs work, but am wondering if using struts will affect any of this.
    Thanks in advance,
    Gillian
    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

  • URGENT! Need help to portalize a Strut JSP App for Portal!

    Hi,
    I have create a little application using Strut ADF. This application only have one page. Can someone tell me how to portalize this in order to deployed it in Portal. I have create my DataSource in OEM and the only thing left is to portalize this jsp.
    I have read the "How to create a Struts Portlet" but I don't understand it.
    Please help me deployed this app to Portal. Is there any tutorial about this?
    Thank you!

    try this article
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/pdkstruts/portletize-your-app.html
    You will also need to download the relevant tag library for the pdk-struts extensions.
    You can also download the java portlet wizard as an add-in for jdeveloper. This makes the creation of the files (for example provider.xml) required by portal easier.

  • Urgent doubt in struts

    Hi,
    I have created the code for search employee from database values,
    my struts code in search.jsp is
    <logic:present name="searchForm" property="results">
    <hr width="100%" size="1" noshade="true">
    <bean:size id="size" name="searchForm" property="results"/>
    <logic:equal name="size" value="0">
    <center><font color="red"><b>No Employees Found</b></font></center>
    </logic:equal>
    <logic:greaterThan name="size" value="0">
    <table border="1">
    <tr>
    <th>Name</th>
    <th>Social Security Number</th>
    </tr>
    <logic:iterate id="result" name="searchForm" property="results">
    <tr>
    <td><bean:write name="result" property="name"/></td>
    <td><bean:write name="result" property="ssNum"/></td>
    </tr>
    </logic:iterate>
    </table>
    </logic:greaterThan>
    </logic:present>
    2. Also i created the code for searchForm for get and set methods
    3. As i created the servlet code as also searchAction.java
    4. the following code used to generate the search values from database as the following code
    EmployeeSearchService.java
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    EmployeeImp Emp=new EmployeeImp();
    ArrayList results =Emp.searchName(name);
    Iterator Int=results.iterator();
    while(Int.hasNext())
    Employee ep=(Employee)Int.next();
    String Name=ep.getName();
    String SSNum=ep.getSsNum();
    resultList.add(Name);
    resultList.add(SSNum);
    return resultList;
    5. EmployeeImp.java contain database connection and search code as
    public ArrayList searchName(String name1)
    {      //External Interface
    ArrayList resultList = new ArrayList();
    ResultSet resultSet = null;
    Statement aStmt2 = null;
    String url="jdbc:odbc:test";
    String uname="root";
    String pwd="root";
    String name="";
    try {
    Connection con=getConnection();
    aStmt2 = con.createStatement();
    String query2 = "SELECT SSNO,NAME FROM EMPLOYEE WHERE NAME ='"+ name1 +"'";
    //cat.debug(query2);
    resultSet = aStmt2.executeQuery(query2);
    while(resultSet.next())
    Employee tvo=new Employee();
    name = resultSet.getString("NAME");
    String SsNum1 = resultSet.getString("SSNO");
    tvo.setName(name);
    tvo.setSsNum(SsNum1);
    // Employee tvo = new Employee(name,SsNum1);
    resultList.add(tvo);
    catch (Exception e) {
    System.out.println( e);
    e.printStackTrace();
    return resultList;
    public ArrayList searchSSNo(String ssNum)
    ArrayList resultList = new ArrayList();
    ResultSet resultSet = null;
    Statement aStmt2 = null;
    String url="jdbc:odbc:test";
    String uname="root";
    String pwd="root";
    String name="";
    try {
    Connection con=getConnection();
    aStmt2 = con.createStatement();
    String query="SELECT SSNO,NAME FROM EMPLOYEE WHERE SSNO ='"+ ssNum +"'";
    // cat.debug(query);
    resultSet = aStmt2.executeQuery(query);
    while(resultSet.next())
    Employee tvo=new Employee();
    name = resultSet.getString("NAME");
    String SsNum1 = resultSet.getString("SSNO");
    tvo.setName(name);
    tvo.setSsNum(SsNum1);
    // Employee tvo = new Employee(name,SsNum1);
    resultList.add(tvo);
    catch (Exception e) {
    System.out.println( e);
    e.printStackTrace();
    return resultList;
    My error is:
    javax.servlet.ServletException: No getter method for property name of bean result
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.search_jsp._jspService(search_jsp.java:239)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
         org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
         org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    I am new to struts how can correct is.
    Plz reply me. its urgent

    Hi,
    My SearchForm.java contain you said plz verify it..
    public class SearchForm extends ActionForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    private List result = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    public void setResult(List result) {
    this.result = result;
    public List getResult() {
    return result;
    After also the same error ...

  • Urgent problem in struts bc4j app

    The problem occurs between the Controller an the View Layer(can I debug there?) Anyway, I can see the data in the Action class, but not in the jsp page, there's just one row (the first).
    Thank you.
    I'm using the 9.0.3.3 build 1205
    The Action class:
    public class ShowneuebehauftrAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    BC4JContext context = BC4JContext.getContext(request);
    ViewObject vo = context.getApplicationModule().findViewObject("BehauftrNeu");
    //here the output looks fine
    Row r = vo.first();
    while (r != null)
    for (int i = 0; i < vo.getAttributeCount(); i++)
    String attrName = vo.getAttributeDef(i).getName();
    String attrVal = r.getAttribute(i).toString();
    System.out.println(attrName + " = " + attrVal);
    r = vo.next();
    return BC4JUtils.getForwardFromContext(context, mapping);
    And the jsp page:
    <%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE>
    <bean:message key="behauftr.title"/>
    </TITLE>
    </head>
    <body>
    <table border="0" bgcolor="#003399">
    <tr>
    <th><font color="white" size="3"><bean:message key="behauftr.nr"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.wunschdatum"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.status"/></font></th>
    <th> </th>
    </tr>
    <jbo:RowsetIterate datasource="DataaccessModule.BehauftrNeu" userange="true" >
    <tr bgcolor="#f3f3f3">
    <td>
    <jbo:ShowValue dataitem="Nr"/>
    </td>
    <td>
    <jbo:ShowValue dataitem="Wunschdatum"/>
    </a>
    </td>
    <td align="right">
    <jbo:ShowValue dataitem="BasNr"/>
    </td>
    </tr>
    </jbo:RowsetIterate>
    </table>
    </body>
    </html>

    There's another question: I tried to format a date field to SimpleDate format dd.MM.yyyy - in the Entity's and ViewObject's Attribute-Editor-Control-Hint.
    It works fine in the BC-App-Module, but in the Action class there's the yyyy-MM-dd format back again (and of course in the jsp page as well). Does this have to be handled in the Action class?
    But, more important, I still can't figure out why there's only one row in the jsp page - as described earlier -
    Thanks in advance for your help.
    Regards
    gabriela

  • Urgent: Struts Tile Version supported in 10.1.2.0.2

    We are porting a tiles-application to 10.1.2.0.2 OC4J. But we get some errors invoking a tiles-page.I think the struts version we are using is 1.2.6. The struts-tiles.tld says version 1.3 And the error we get is:
    Errors parsing struts-tiles.tld
    Error: <>tiles.taglib.useattributeTEI
    Any suggestions? Thanks.

    I've found this is a problem only with the standalone
    version of OC4J 10.1.2.0.0You mean it works correctly in Oracle 10gAS?I have yet to test the main application server.
    It only returns the JAZNUserManager each and every time.Pardon my ignorance, what are you expecting it to return?Well in previous revisions it has always returned the custom UserManager I have declared in my orion-application.xml.
    In my orion-application.xml file I have:
    <user-manager class="com.security.model.MyUserManager" display-name="MyUserManager">
         <property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
         <property name="dbUrl" value="jdbc:mysql://localhost/mysql" />
         <property name="dbUser" value="user" />
         <property name="dbPass" value="user" />
    </user-manager>If I modify the application.xml file and place my own Custom UserManager there it affects the whole server. In my case it should only affect the current application it is declared in.
    I've already spent a week on this with metalink and we resolved that this is the way it should work.
    Going back to revision 9.0.4.0.0 of the OC4J standalone this problem does not exist and I get the Custom User manager returned that was declared.
    Even the standalone_guide.pdf in 10.1.2.0.0 still has the same reference that this should work - but it does not.
    Anthony

  • Urgently!! Deploy project using Struts and Toplink

    Hello. I want to make a deploy of a project in wich I'm using Struts and Toplink technologies.
    I'm using JDeveloper 10g for Windows and my production server is a SUN V880 with Soloaris 8 and I make it ok, but when I run it since a PC in the intranet the following errors appears (obviously those don't appear before):
    java.lang.NullPointerException     at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)     at jsp.login._jspService(_login.java:50)     [SRC:/jsp/login.jsp:5]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:567)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:536)
    Thank you so much for help.

    NOO!! :( I don't install any libraries in the server, but in the WAR file of the application, in the lib folder, there was the jars corresponding. I thought that those libraries, in the WAR file, was "local" to the project, anyway, the Struts and Toplink libraries must be global at server level, 'cause I will use it sure once agian, and now I'm trying to install those in the server...
    Thank you so much!!

  • Urgent:Struts question

    Hi,
    I am working on a web application using struts framework. I know Struts provides internationalization of messages and labels using MessageResources. I have a requirement that all the error messages (not the fields labels on the form) should come from a table in the database. I know how to do this using a messageresource properties file. Is there any way I can retrieve the error messages from a database table and still be able to provide internationalization. Please help.

    have look at this page:
    http://java.sun.com/docs/books/tutorial/i18n/resbundle/propfile.html
    if they are using a code line like this
    ResourceBundle labels =
    ResourceBundle.getBundle("LabelsBundle", currentLocale);
    in struts you should be able to simply provide
    a class named like the application properties you specify in struts-config.xml implementing the ResourceBoundle interface ... and it should get called for retrievign messages.
    You should be able to find details on the page mentioned above.
    Also it might be a good idea to browse the struts sourcecode for a line like the one above to check if they really do it that way..
    good luck
    Spieler

  • Urgent: Please help! Struts in portal

    I put struts-config.xml under beaApps\portalApp\mywebApp\WEB-INF. But it seems
    not seen by the system. Somebody has done this before, please advise me how to
    integrate struts into bea portal 7.0
    I am waiting for your response here!
    Thanks a lot!!!!!!!!
    Penny

    In that scenario, you assign the variable with the list of Users to be assigned to worklist user payload. Suppose you are storing the values of the users to be assigned in the variable /ns0:BPELProcess1Request/ns0:input. Now you append this to user payload /task:task/task:payload as it can accept Any Type. In the Human Task page(on .task page in the Assignment and Routing Policy select "By Expression") as an assignee add /task:task/task:payload//ns0:BPELProcess1Request/ns0:input. This should solve your problem.
    Can you check the Human Task Samples in SOA Suite? There is one example related to this. I could not find it handy as I have somehow deleted that from my system. I will tell you if I can find that.

  • URGENT:Convert a Single Struts Project to Multiple Struts - 10g

    Hello,
    Currently, I have a single Struts config file. Can i Add more projects and convert it to a multiple struts config project.
    I followed the multiple struts config file in http://www.oracle.com/technology/products/jdev/howtos/10g/StrutsMultiConfigs/struts_multiconfig_howto.html
    and when i tryied to add struts in a new project, only the already existing struts file is added in the new project (Since the public_html dir is same). I cannot manually add a struts config file. Is there any way to do this ?
    Please advise and help.

    Repost! please advise!!

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • STRUTS AGAIN! URGENT

    When i wanna use propertyListAction in the
    priceListReport.jsp (which user can select a list of property name), I get an error like this
    bean property_list is not found within the scope
    at line <jsp:useBean id="property_list" scope="session" type="java.util.List"/>
    I already change the struts-config file like below
    <action path="/jsp/rpt/priceListReport"
    type="com.brel.psm.sys.PropertyListAction">
    <forward name="success" path="/jsp/sys/priceListReport.jsp"/>
    </action>

    IMHO this has nothing to do with JSF, please ask Struts-related questions on the struts-user mailing list:
    http://jakarta.apache.org/site/mail.html

  • Struts using DAO Design Pattern ..?Please give an example..... URGENT......

    Dear all,
    I have to develop an application in Struts by using DAO design pattern ..........
    Please give an example on Struts using DAO...................
    Thank you
    Please

    I'm glad you asked. It means Read The Flaming Manual. That'd be the struts manual by the way.

  • URGENT: struts with ejb

    Hi
    I m using struts with session and entity beans.Actually i dont know the pattern how to call session bean from struts and from where the session bean is called.
    Plz help me to guide in this direction.If possible tell me steps
    bye from akbar

    Hi
    I m using struts with session and entity beans.Actually i dont know the pattern how to call session bean from struts and from where the session bean is called.
    Plz help me to guide in this direction.If possible tell me steps
    bye from akbar

Maybe you are looking for