Jhs10g subapplications with struts / uix

I have a bit trouble with 2 subapplications (struts and uix) , if i use mvc i got errors in jboss so i use struts
but now i have a problem how to put this in web.xml
with mvc it was easy,
I checked the new jhsdemo and tutorial2 doc
but i don't get it working with 2 applications
if i configure it for 1 it works fine
can something show how it is done in web.xml 2 appl. struts/uix
thanks edwin

Now i got a new problem ( I now use only 1 application
to make it less comlex)
I made a directory basis in web dir.
and changed in de application structure file
the ui pages virtual directory from /uix/ to /basis/uix/
and copied images / jheadstart and even cabo to the basis dir.
the generator creates a new struts-config.xml
and generates the uix views in web\basis\uix
all goes well
this is the web.xml
<servlet>
<servlet-name>sicmaStrutsController</servlet-name>
<servlet-class>oracle.jheadstart.controller.struts.JhsActionServlet</servlet-class>
<init-param>
<param-name>config/basis</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>mapping</param-name>
<param-value>oracle.jheadstart.controller.struts.config.JhsActionMapping</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
now i got the following error,
500 Internal Server Error
java.lang.NullPointerException
     oracle.cabo.servlet.xml.PageDescriptionCache oracle.jheadstart.view.uix.JhsUIXPageBroker.getPageDescriptionCache(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
          JhsUIXPageBroker.java:96
     oracle.cabo.servlet.PageDescription oracle.cabo.servlet.xml.UIXPageBroker.getPageDescription(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
     oracle.cabo.servlet.PageRenderer oracle.cabo.servlet.AbstractPageBroker.getPageRenderer(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
     void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
     oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
     void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          HttpServlet.java:740
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          HttpServlet.java:853
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          ResourceFilterChain.java:65
     void oracle.security.jazn.oc4j.JAZNFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
          JAZNFilter.java:283
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          EvermindFilterChain.java:16
     void oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
          CharacterEncodingFilter.java:174
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          ServletRequestDispatcher.java:556
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
          ServletRequestDispatcher.java:306
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          ServletRequestDispatcher.java:209
     void org.apache.struts.action.RequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          RequestProcessor.java:1069
     void org.apache.struts.tiles.TilesRequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          TilesRequestProcessor.java:274
     void org.apache.struts.action.RequestProcessor.processForwardConfig(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.config.ForwardConfig)
          RequestProcessor.java:455
     void org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.config.ForwardConfig)
          TilesRequestProcessor.java:320
     void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          RequestProcessor.java:279
     void oracle.jheadstart.controller.struts.JhsRequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          JhsRequestProcessor.java:588
     void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          ActionServlet.java:1482
     void oracle.jheadstart.controller.struts.JhsActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          JhsActionServlet.java:115
     void org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          ActionServlet.java:507
     void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
          HttpServlet.java:740
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          HttpServlet.java:853
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          ResourceFilterChain.java:65
     void oracle.security.jazn.oc4j.JAZNFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
          JAZNFilter.java:283
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          EvermindFilterChain.java:16
     void oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
          CharacterEncodingFilter.java:174
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
          ServletRequestDispatcher.java:556
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
          ServletRequestDispatcher.java:306
     boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
          HttpRequestHandler.java:767
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
          HttpRequestHandler.java:259
     void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
          HttpRequestHandler.java:106
     void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
          PooledExecutor.java:797
     void java.lang.Thread.run()
          Thread.java:484
if i change <param-name>config/basis</param-name> in web.xml to <param-name>config</param-name>
it works
but with 2 applications
<servlet>
<servlet-name>sicmaStrutsController</servlet-name>
<servlet-class>oracle.jheadstart.controller.struts.JhsActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-basis-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/call</param-name>
<param-value>/WEB-INF/struts-call-config.xml</param-value>
</init-param>
<init-param>
<param-name>mapping</param-name>
<param-value>oracle.jheadstart.controller.struts.config.JhsActionMapping</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
then gives the second appl. the same error as above

Similar Messages

  • WebToGo BC4J + Struts + UIX application

    Is there any possibility to write a complete BC4J + Struts + UIX web application to run in the Oracle Lite platform??
    The documentation says about implementing a Servlet, but is it possible to install the .jar files of the struts & uix frameworks and register the *.do & *.uix extensions? What is the specification of the HttpServlet to be implemented?
    What about performance? Could this combination run in a WinXP PIV offline Laptop with reasonable performance?
    Where can I find this kind of information??
    Thanks
    Eduardo

    UIX is not supported in 5.0.2.x release. The next release (10g) will have complete UIX support. Beta release of 10g is already out in case you are interested in trying UIX with it.
    For BC4J refer to 'Chapter 6 BC4J Tutorial' of 'Oracle9i Lite Developer’s Guide'
    Limited support for Struts is there in 5.0.2.10.0 release. If you have the handler for .do extension files then you can use following:
    You can add mime handler to Mobile Server for .do extension by using a ini file. Copy following lines in a file called addmime.ini
    [DATABASE]
    TYPE=ORACLE
    [MIMETYPES]
    NAME = do
    VALUE=text/html
    PLUGIN=<handler class name>
    and run this ini file as following
    wsh -c addmime.ini mobileadmin/[email protected]

  • UiXML with Struts: Illegal Access Error

    I created a project in JDeveloper for the example found in the JDeveloper help documentation, "Using uiXML with Struts". It says I need uix-config.xml in my WEB-INF directory. I created one and copied the xml from the example to it. When I run login.uix from JDeveloper I get:
    500 Internal Server Error
    java.lang.IllegalAccessError: oracle/cabo/servlet/struts/ui/MessageDataProvider
    java.lang.Object oracle.cabo.servlet.struts.ui.DataProviderParserFactory$Parser.getNodeValue(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String, org.xml.sax.Attributes)
    void oracle.cabo.share.xml.LeafNodeParser.startElement(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String, org.xml.sax.Attributes)
    void oracle.cabo.share.xml.TreeBuilder$Handler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
    void oracle.cabo.share.xml.ParserAdapter.startElement(java.lang.String, org.xml.sax.AttributeList)
    void oracle.xml.parser.v2.XMLContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
    XMLContentHandler.java:166
    I notice if I remove that file, I don't get this error, but the struts components do nothing, which seems logical if we do indeed need this configuration information.
    I also notice the following error in JDeveloper when I compile login.uix:
    Warning(11,44): logon.uix: Parsing error, line 11, column 44: <form> is not an understood element.
    This sometimes means the element's namespace (http://xmlns.oracle.com/uix/struts) is set incorrectly. This may also be an issue with the syntax of its parent element.
    I'm not sure what that is.
    Thanks for your help,
    -James

    That solved the problem! I am relatatively new to
    all this as are many of us "seasoned developers"...and learning
    fast...well...sort of.
    Another observation: I placed the following entry,
    oracle.cabo.servlet.struts.StrutsUIExtension, in my web.xml file
    (borrowed from a plain ol' jsp struts test I've been working
    with). Here's the whole section for the uix servlet:
    <servlet>
    <servlet-name>uix</servlet-name>
    <servlet-class>oracle.cabo.servlet.UIXServlet</servlet-class>
    <init-param>
    <param-name>oracle.cabo.servlet.pageBroker</param-name>
    <param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value>
    </init-param>
    <init-param>
    <param-name>oracle.cabo.ui.UIExtensions</param-name>
    <param-value>oracle.cabo.servlet.struts.StrutsUIExtension,oracle.cabo.data.jbo.ui.JboUIExtension</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    That solved the parsing errors I was receiving from JDeveloper
    saying that certain elements were not understood. But
    then...when I run logon.uix, the browser displayed this lovely
    error:
    java.lang.IllegalStateException: ParserFactory already registered at http://xmlns.oracle.com/uix/struts
    AAAAAAARGHH! Sooooooo...I removed the uix-config.xml from
    the WEB-INF directory, and hooray! I got my form. Whew!
    I can also get it to run by leaving my uix-config.xml alone and
    removing that entry in web.xml. Weird? Anyway, I'm leaving out
    the entry in uix-config.xml or just not including it for now.
    I'm sure I'll run in to some other problem with that later :)
    The little application doesn't work quite right yet. When I
    click the "Log On" button I get a "Page not found". Must be a
    typo or something.
    Anyway, thanks for your help Adam. I'm sure I'll have more
    questions later. I'll try to make them good ones.
    -James

  • Warning Popup - Uncommited Changes (Struts/UIX)

    In the JHeadstart demo, if you have created a new record or edited information and attempt to navigate away from the page before committing, a popup appears warning you of this.
    If you disregard, nothing is updated/inserted, and you can continue on.
    Is their a way to implement this in Struts/UIX simply?

    hello
    I do not believe there is a declarative way to do it, i wish there were. Anyway, my team managed to do by using Java Script event (on-click , on whatever) then the java script can call functions embedded in the data action methodes. One of the functions you create should be one that tests the status of the transaction using getPoststate()==STATE_MODIFIED etc ...
    Then the java script could display a popup warning
    The following shows you how to call a data action method from Java Script,, then you write your own function to test the status of the transaction
    Call DataAction Method within JavaScript Function
    (In the code below, specifically the {'event':'Change'} says that an 'event' called 'Change' is generated)
    You should write OnChange event to handle 'Change'
    onChange(DataActionContext ctx)     
    <script>
    <contents>
    function doChange()
    var confirmation = confirm("Are You Sure You …..");
    if (confirmation == true)
    submitForm('frm',1,{'event':'Change'});
    </contents>
    </script>
    SO this is not straight forward .. if anybody is familar with any other approach, it would be nice to see it
    ammar

  • Struts/UIX/JavaScript Child Windows

    I have seen an example of using JavaScript to execute a Struts action mapping that is implemented using UIX. I would like to know if this will work in UIX.
    HC_doOpenRemote('<html:rewrite forward="item"/>');
    This function would be a simple JavaScript function that would cause a child window to be opened and cause the forward to the Struts action item to be executed resulting in the page being displayed.
    Is this possible in UIX? If so, please outline the steps to do it.
    By the way I got this example out of the book Struts In Action by Ted Husted.

    Thanks Adam for the example. The "event" part of the code helped me to do what I needed. (By the way, if there is a more direct way to do this let me know.)
    The issue for me is that the server does not know when a child window page is opened and this causes the blackhole as far as Struts is concerned. Working with Struts events is important because it provides easy integration with BC4J through the BC4JRequestProcessor.
    So your example suggested that I should implement an UIX page that strictly handles events that are recieved from a page that is opening the child window.
    Each event is named differently and makes a call to a Struts event. (The UIX event handler is the only place that UIX can deal with Struts events.)
    Here is some example code:
    The main.uix page has the following links:
    <link text="Open UIX page (events only), transfer control through Struts event. #1">
    <!-- Let's send a request to open a window with an initial event -->
    <boundAttribute name="onClick">
    <concat>
    <fixed text="openWindow(self, '"/>
    <ctrl:pageURL name="/pages/transferwindow" event="GoToRealPage1"/>
    <fixed text="');return false"/>
    </concat>
    </boundAttribute>
    </link>
    <link text="Open UIX page (events only), transfer control through Struts event. #2">
    <!-- Let's send a request to open a window with an initial event -->
    <boundAttribute name="onClick">
    <concat>
    <fixed text="openWindow(self, '"/>
    <ctrl:pageURL name="/pages/transferwindow" event="GoToRealPage2"/>
    <fixed text="');return false"/>
    </concat>
    </boundAttribute>
    </link>
    The transfer.uix page only handles UIX events passed in from JavaScript:
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:struts="http://xmlns.oracle.com/uix/struts">
    <content>
    <!--
    This is a UIX page that is used only to transfer control to a Struts
    event. This is important to Struts/UIX applications that use child
    windows since the Struts controller is on the server side and child
    windows are launched on the client side.
    -->
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    <event name="GoToRealPage1">
    <struts:action path="/realchild1.do"/>
    </event>
    <event name="GoToRealPage2">
    <struts:action path="/realchild2.do"/>
    </event>
    </handlers>
    </page>
    And then the struts-config.xml:
    <action path="/realchild1"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/realwindow1.uix">
    </action>
    <action path="/realchild2"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/realwindow2.uix">
    </action>

  • 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

  • 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
              

  • Custom tag with struts

    Hi
    I would like to create a custom tag that will print this section of html with struts:<tr>
         <td class="f_name"><bean:message bundle="fields" key="firstName" /></td>
         <td class="f_value"><html:text property="firstName" /></td>
    </tr>This means that i sould pass to the custom tag the folowing attributes:
    1. bundle - the bundle name to use ("fields").
    2. property - the name of the submitted filed and the key in the bundle resource ("firstName").
    This is how i want to use it:<html:form action="/register.do" enctype="UTF-8">
    <table cellspacing="0" cellpadding="0" border="0" class="t_details">
    <mytld:text bundle="fields" key="firstName"/>
    <mytld:text bundle="fields" key="lastName"/>
    </html:form>For me, this way looks much easier to develop my application/s, don't you agree?
    The problem is that i can't (or i don't know how) to use custom tags in other a custom tag, and if i include a jsp file (with pageContext.indlude("url");), how do i pass the attributes to the jsp page?
    Thanks a lot
    mamtz

    Interesting answer, i'll put it in my mind, but this is not what i ment :) (nice thinking...)
    what i ment was, html:text tag has many attributes like: property, name, alt, size, maxLength and so on...
    i would like sometimes to use size or maxLength and sometimes not.
    take a look at what i wrote:<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%
         String property=""+request.getAttribute("property");
         String bundle=""+request.getAttribute("bundle");
         Object max=request.getAttribute("maxLength");
         String maxLength= max==null ? "" : ""+max;
         Object s=request.getAttribute("size");
         String size= s==null ? "" : ""+s;
    %>
         <tr>
              <td class="f_name"><bean:message bundle="<%=bundle%>" key="<%=property%>" /></td>
    <%     if(max!=null && s!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" maxlength="<%=maxLength%>" size="<%=size%>" /></td>
    <%     }else if(max!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" maxlength="<%=maxLength%>" /></td>
    <%     }else if(s!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" size="<%=size%>" /></td>
    <%     }else{
    %>          <td class="f_value"><html:text property="<%=property%>" /></td>
    <%     }
    %>     </tr>pretty complicated, is'nt it?
    think what would happen if i would like to add just one more attribute...

  • Easiest way to validate with Struts?..

    Hello,
    I have a problem with validating a simple form with javascript via Struts validator. It inserts the whole javascript instead <html:javascript formName="whatever"/> and as a result half of the html code that follows gets cut off. I don't know why this happens, maybe because the javascript is so big (although that sounds like nonsense).
    Is there a better, simpler way to validate with Struts? I just want something to start working..
    Thanks.

    Make sure you have validator-rules.xml file in WEB-INF/ folder
    Make sure you have validation.xml file in WEB-INF/ folder
    Modifty validation.xml file to match your form name (as defined in struts-config.xml)
    i think this should be enough

  • InputText issue with Struts

    I'm using jsf 1.1 with struts 1.3.5 and am experiencing an issue with the inputText element. The problem is the name attribute being generated is not allowing the form bean's attributes to be set. For example:
    <h:inputText id="username" value="#{loginForm.username}"/>
    generates
    <input id="_idJsp3:username" name="_idJsp3:username" type="text" value=""/>
    The issue being the name of the field is _idJsp3:username so the form property 'username' is not getting set. I've tried removing the inputText tag and replacing it with this:
    <input name="username" type="text"/>
    And it works. What's the deal? I know a lot of people have used/are using JSF and struts together, what am I doing wrong?
    By the way, this is the last hurdle i need to clear so any help would be appreciated.

    first - thanks for your reply
    I can understand what you mean , to adhere to the MVC conception , we need to have any action go through the controler .
    but , once I wanna access to a jsp file , then I need to set a global-forward and a ForwardAction , when time goes by, and the project keeps getting larger , so there will be too many forwards and FrowardActions , right ?
    actually , I have a Office.jsp , which has a frameset inside , left and right,each invokes a jsp file like this :
    <frameset rows="*" cols="144,*" framespacing="2" frameborder="NO" border="2" bordercolor="#CC0000">
    <frame src="OfficeLeft.jsp" name="leftFrame" scrolling="NO" noresize>
    <frame src="Notification.jsp" name="RightFrame">
    </frameset>
    when I have successfully forwarded to this Office.jsp , it prompts OfficeLeft.jsp and Notification.jsp are not available. so my problem is I don't know how to get this work fine .

  • Problem with FileUpload with Struts

    Hello,
    Here is my form I've created :
    <html:form action="/UploadFile.do" method="post" enctype="multipart/form-data">
    <html:file property="file" />
    </html:form>
    The form I submit conatins a "file" attribute of FileForm type.
    I did exatcly as mentionned in different tutorials to upload files with Struts.
    But I get the following exception and I can't figure out what's happening:
    javax.servlet.ServletException: BeanUtils.populate
    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
    java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Please Help !
    I'm using Struts 1.1 by the way
    Thank your for your help
    Hugo

    What is in the form bean you're using? You need a field that holds a FormFile object:
    import org.apache.struts.upload.*;
         private FormFile file;
         public FormFile getFile() {
              return this.file;
         public void setFile(FormFile file) {
              this.file = file;
    ...

  • How to use displaytags with struts

    How to use display tags with struts to generate report from database

    I think it would only consist in including the tag library of displaytags in the header and use the prefix of desplay tags.
    Exporting the report from a database would only need to retrieve this information from the database as a List, Map or Collection of objects (beans) and display tem with the corresponding tag (table)
    You have some more information here:
    http://displaytag.sourceforge.net/11/tut_basic.html
    Regards and good luck,
    Fran Serrano.

  • Exception Handling of JboException with Struts

    Hi,
    I am using BC4J with Struts. The struts <html:errors/> tag displays all the exception messages generated by ActionErrors and JboExceptions automatically. The problem i have is, I get a Jbo-26041 exception when i try to create a duplicate primary key. I have caught the exception in the ***Impl.java file in the doDML() method and I want to ignore the exception but want to display a message through the <html:errors/> tag. How can i do that???
    When i dont catch the jbo-26041 exception the application crashes and when i catch the exception i donno how to show the message in the <html:errors/> tag of struts.
    Need Help... a.s.a.p.
    ~Faraz
    The code is:
    protected void doDML(int operation, TransactionEvent e)
    try{
    super.doDML(operation, e);
    catch (JboException ex)
    if ("26041".equals(ex.getErrorCode()))
    //*** WHAT TO DO HERE ***//
    }

    repost

  • Exception Handling of JboException with Struts  Jun 25, 2003 9:46 AM

    Hi,
    I am using BC4J with Struts. The struts <html:errors/> tag displays all the exception messages generated by ActionErrors and JboExceptions automatically. The problem i have is, I get a Jbo-26041 exception when i try to create a duplicate primary key. I have caught the exception in the ***Impl.java file in the doDML() method and I want to ignore the exception but want to display a message through the <html:errors/> tag. How can i do that???
    When i dont catch the jbo-26041 exception the application crashes and when i catch the exception i donno how to show the message in the <html:errors/> tag of struts.
    And can I somehow show the error messages through the adderrors() method of EditAction or UpdateAction ???
    Need Help... a.s.a.p.
    ~Faraz
    The code is:
    protected void doDML(int operation, TransactionEvent e)
    try{
    super.doDML(operation, e);
    catch (JboException ex)
    if ("26041".equals(ex.getErrorCode()))
    //*** WHAT TO DO HERE ***//
    }

    repost

  • 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

Maybe you are looking for