Struts & JSP

Hi.
I have a jsp page in which I include a menu, and I use it like the following:
<%@ include file="/include/menu.htm" %>
In the file "menu.htm", I use a <logic:equal/> tag of struts,
but when I browse my jsp page, I find only the tags in the file "menu.htm"
was not parsed.
Which tag should I use to parse the tags in the included file?
Any suggestions about this question are welcome.
Thanks in advance.

If you use .htm extention, that htm file shall not be parsed/processed by JSP engine as .htm files will be handled by Web server.
Change this extention either to .jsp or change web.xml such that it handles .htm files also.
Regards

Similar Messages

  • How to retrieve values from the struts DAO to Struts JSP

    Hi friends,
    I have one question. i want to display values in the struts jsp file from the struts DAO class. can anyone tell how do it.
    Appreciated for your help.
    Thanks
    G1 :)

    Hi Santosh,
    Thanks for your prompt reply.
    Actually, my problem is i want to display complete rows from the DAO to JSP page. I'm displaying all the rows in the DAO from DB.
    But i dont know how to retrieve all these data from DAO. Can i take arraylist.??
    DAO:
    ------------     public Customers getData(Customers customers){ // Reading data from DB
         //ArrayList list = null ;
         try
              Connection conn = getSQLConnection();
              Statement statement = conn.createStatement();
              String qry = "select * from register";
              ResultSet resultSet = null;
              PreparedStatement pstat = conn.prepareStatement(qry);
              // pstat.setString(1, customers.getFname());
              resultSet = pstat.executeQuery();
    //Print the data to the console
    while(resultSet.next()){
              String fnam = resultSet.getString(1);
              String lnam = resultSet.getString(2);
              String gen = resultSet.getString(3);
              String addres = resultSet.getString(4);
              String cit = resultSet.getString(5);
              String zip = resultSet.getString(6);
              String county = resultSet.getString(7);
              String emal = resultSet.getString(8);
              System.out.println("First name:"+fnam);
              System.out.println("Last name:"+lnam);
              System.out.println("Address:"+addres);
              customers.setFname(fnam);
              customers.setLname(lnam);
              customers.setGender(gen);
              customers.setAddress(addres);
              customers.setCity(cit);
              customers.setZipcode(zip);
              customers.setCountry(county);
              customers.setEmail(emal);
                   statement.close();
                   conn.close();
              }catch(Exception e1){
                   e1.printStackTrace();
              return customers;
    Bean:
    I have specified in this line in Bean:
    request.getSession().setAttribute("customers", customers);
    But in JSP. how will i populate all these data. Pls..send some code.
    I'm sorry this is just practicals. i'm not doin any real time project. that;s why i have placed all these code.
    Thanks for your patience for resolving my problems.
    Thanks
    G1

  • How to use VPD in Java/Struts JSP portlet with SSO

    DB = 10.1.0 (Standard Edition)
    Portal = 9.0.4.1
    10gAS = 9.4.0.1 (EE)
    I am in the beginning stages of developing some portlets that will be Java/Struts JSP based. We use SSO and have implemented some VPD security in our DB by creating some views that use SYS_CONTEXT('USERENV','CURRENT_USERID').
    These Java portlets connect to the DB using a defined JDBC connection for the OC4J container they are deployed in. The problem I'm having is that the call to SYS_CONTEXT is returning the user of the JDBC connection and not the SSO user. So far I have been unable to find any documentation that will point me in the right direction to get this configured properly.
    Deployment and configuration are as follows. Deploy war file to custom container on app server. In the configuration of the OC4J contain the app used the containers default JDBC connection using the oracle.jdbc.pool.OracleDataSource class. Max and Min open connections are blank.
    In the portal configuration under Navigator - Providers tab we defined a new Registered Provider. In the Connections tab for the provider we Specify the URL Http://hpsrv02.simsol.com:7777/discovery-portlets/providers. Under "Specify how the user's identity will be set by the Portal..." the "The user has the same identity in the Web providers application as in the Single Sign-On identity" is selected. Under "User/Session Information" User is selected and Login Frequency is set to "Once per user session". Then we created a new portal page and created a new portlet with the new provider.
    Just an FYI I do have Discoverer working with VPD and any report portlet, dynamic page portlet and any other type of portlet I created all work correctly with VPD it is just the java/struts one that is not working.
    So does any one have any insight into what configuration steps I have missed?
    Any help is much appreciated,
    Ed Klinger

    Ed,
    Your java code must get the SSO username (it's just a HTTP header variable) :
    ie: code sample...
    Enumeration e = request.getHeaderNames();
    while (e.hasMoreElements()) {
    String name = (String)e.nextElement();
    String value = request.getHeader(name);
    out.println("<br> "+name + " = " + value);
    if (name.toUpperCase().trim().equals("OSSO-USER-DN")){
    dn_user=value;
    out.println("<br>******** USER DN = "+dn_user);
    Then, the SSO username can be used in the VPD policy.
    Note that there is a difference between the sso username and the database username . SSO username is not known by database (CURRENT_USERID will return a database username)
    Discoverer worked OK in your case with the SYS_CONTEXT (.. CURRENT_USERID) because authentication is made by database user, probably.

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • How to use javascript functions in struts jsp page

    hi
    iam using struts jsp pages. here iam calling one javascript function. but iam not able to access the form in javascript.
    wat i have to give as form name to get the elements of the form.
    please reply me soon
    it is urgent
    vamsi

    your form has no name liek this one:
    <html:form action="/userRegistration.do" >so you cannot access the elements inside your form?
    accessing the elements inside the form will be like this:
    document.forms[0].propertyName.value;

  • 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.

  • COMMIT problem in TopLink, Struts, JSP and ADF Databinding sample

    In the sample Developing a J2EE Application using TopLink, Struts, JSP and ADF Databinding,
    I followed all the steps to build a department browse page and a edit page.
    But when I get to Step number 23 in "Create a JSP to Edit Departments" I have a problem with the commit.
    Only after I make a change in the form and click the sumbit button, the commit and rollback buttons become active. And After I click the commit button the data gets commited to the database but the page inofmation changes to the very first department record, not the current one.
    How do I make those buttons active with out the extra click on the submit?
    After I click the commit button, how do I keep the current data on the screen?
    Thanks for you help.

    Shay,
    Thanks for the reply.
    For #1, I was able to do the following and get away with not having to press submit first. I just removed the bindings for disable. I hope that does not cause any problems?
    <input type="submit" name="event_Commit" value="Commit" />
    <input type="submit" name="event_Rollback" value="Rollback" />
    For #2, How I add an action on an HTML button? My UIModel.xml for the edit department page currently has two actions on it. Commit and RollBack. Is it linked through the "name" attribute of the input tag?

  • Alternative to HTML Frame in struts/jsp

    I am using Struts/JSP for my application..
    I have 3 panels(3 jsp's) each with a table of information.. each jsp has a summary part to it.. the data & information in the summary is the same across all panels.. Currently I've copy pasted the code for the summary in all 3 jsp's & Actions & ActionForms... I would like to change this to using a 4th panel sort of for the summary information... not sure what would be the best way to do this.. html frames or anything better maybe.. ?
    Thanks

    did u consider using struts tiles?
    http://struts.apache.org/userGuide/dev_tiles.html

  • Accessing ApplicationModule in Struts/JSP application using JDev 11g TP3

    Hello All,
    I am using Oracle JDeveloper 11g Technical Preview 3
    I got one "AppModule" created under my (Struts/jsp) project "MODEL" structure.
    Now, how can I access that ApplicationModule in my Action Class
    BC4JContext bc4jContext = BC4JContext.getContext(request) is not working, returns null everytime,
    Can anyone please let me know, how can I achieve this?
    Thanks
    user625610

    Hi don't know your name,
    if you get null from BC4JContext.getContext(request) you should check you configuration. Check your web.xml file where you should see something like...  <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>mapping</param-name>
          <param-value>oracle.jbo.html.struts11.BC4JActionMapping</param-value>
        </init-param>
        <init-param>
          <param-name>BC4JDefinition</param-name>
          <param-value>your_model_project_name</param-value>
        </init-param>
    ...The init parameter BC4JDefinition is used to set up the context in the BC4JRequestProcessor class. My guess is that you don't have this parameter in your web.xml (or are pointing to a wrong name). the value should be the name of the cpx file without the .cpx you have in your viewcontroller project.
    If you have migrated your project from JDev 10.1.2 you should check the 10.1.2 web.xml against the 11TP3 web.xml after the migration. The servlet part should be identical.
    Timo

  • Working with large number of search results in struts/jsp application

    I'm developing a struts/jsp web application that returns upwards of
    30000 results obtained from a very complex schema and multiple queries
    to the database.
    We want the user to be able to paginate through the results, sort by
    several fields, add/drop columns and download in several formats. We
    don't expect heavy traffic but we do want it to be scalable.
    Up to now, I have been storing the results in a session ArrayList
    which can eat up a lot of memory. The queries take long to perform so
    I do not want to repeat them with every request.
    I would like to store in a single mysql temp table but I have read
    that when the connection ends, the table is dropped. I understand that
    creating a database Connection as a session variable is not a good
    practice.
    This is not a unique problem - I was hoping someone else has some
    insight into the best way to proceed.
    Thanks

    glwinsor wrote:
    I'm developing a struts/jsp web application that returns upwards of
    30000 results obtained from a very complex schema and multiple queries
    to the database.Who will want to deal with 30,000 rows? Not me. When Google returns a result to me, I get it in chunks of 10 at a time.
    We want the user to be able to paginate through the results, sort by
    several fields, add/drop columns and download in several formats. We
    don't expect heavy traffic but we do want it to be scalable.That's a separate, complex issue.
    Up to now, I have been storing the results in a session ArrayList
    which can eat up a lot of memory. The queries take long to perform so
    I do not want to repeat them with every request.Maybe your schema has issues. Do you have appropriate indexes? Has your DBA checked EXPLAIN PLAN to be sure that the queries are optimal?
    I would like to store in a single mysql temp table but I have read
    that when the connection ends, the table is dropped. I understand that
    creating a database Connection as a session variable is not a good
    practice.Not scalable.
    This is not a unique problem - I was hoping someone else has some
    insight into the best way to proceed.The paging part has been dealt with by Hibernate and other frameworks. Something like the Flex grid UI component might help. Caching and such can help you out. It's not easy, as you already know, and there isn't a canned solution that is one size fits all.
    %

  • What do I download for Struts/JSP/Hibernate?

    My organization has purchased a five-user license for "Workshop" and I would like to use it for Struts/Hibernate/JSP development. However, it's not clear what I need to download and install.
    I tried downloading and installing both of these files:
    workshopstudio102_win32.exe
    workshop102_win32.exe
    In both cases, after the dust settled there was no application called "Workshop" on my Windows XP system.
    There is now something called "WorkSPACE Studio 1.1." ("Space," not "shop.")
    What is "WorkSpace Studio?" I never heard of it before I ran this installer.
    What is the difference between "Workshop Studio" and "Workshop for WebLogic?"
    What do I download to get Eclipse-based Struts/JSP/Hibernate development tools?
    How do I install it?
    Thanks,
    Ethan
    Edited by ethanmichaels at 03/26/2008 4:48 PM

    Hi Ethan,
    The license you have purchased is for WorkshopStudio 10.2
    This allows you to develop Struts/Hibernate/JSP applications against both BEA and non BEA servers.
    Workshop for WebLogic allows users to develop applications against BEA WebLogic Servers and does not require a special license
    More information on Workspace Studio is available at http://edocs.bea.com/wlw/docs102/workspaceFAQ.html
    Hope this helps
    cheers
    Raj

  • FREEEEE struts/jsp editor plugin for Eclipse

    Hi guys,
    I am tired of searching for struts/jsp editor plugin for Eclipse. I tried the trail version for Exadel, My eclipse, Lomboz, but none of them are good enough. I dont want to pay for a plugin.
    So I downloaded Netbeans IDE which has good support for struts. But I dont want to change my Eclipse IDE because its much better.
    In case you are already using a good struts/jsp editor plugin for Eclipse then please advice me ASAP.
    I dont want to type up the code like <html:text or wait for runtime compilation to realize that there is a problem in the syntax. Wouldnt it be a lot better if the IDE help us reduce the development time.
    Thanx
    Rohit Kumar

    Thanx for your reply.
    I used JDeveloper with Oracle many years back. That time I found it to be slow. Maybe it must have improved by now.
    Today I downloaded EasyEclipse which is built on Excipse 3.1
    EasyEclipse
    http://www.easyeclipse.org/site/home/index.html
    EasyEclipse Plugins
         -----> Amateras JSP, HTML, XML editor
         -----> Weblogic Server Plugin for Eclipse
         -----> JBoss IDE
         -----> J2EE Tools
         -----> ....................
    http://www.easyeclipse.org/site/plugins/index.html
    I would say WOW. It satisfies most of my needs. Maybe all u guys might wanna try it too.
    Regards
    Rohit Kumar

  • Edit multiple records with BC4J and Struts-JSP

    Hi everybody,
    I'm building BC4J components using entities and views and JSP business components. How can I edit and update multiple records at a time with Struts-Jsp ? Have someone already an example (with JSP and ActionForm code) ?
    thank you

    Hi,
    Nobody have an example ? Is it so difficult ?
    Thanks

  • How to "Performing an Action on Multiple Selected Records" using Struts-JSP

    Hi all:
    How to do "Performing an Action on Multiple Selected Records" through using Struts/JSP solution that is original MVC/UIX customizing example by Jheadstart.
    I know how to reason by analogy through tutorial guide on
    Model and Control layer of MVC , but for View layer that is torment to me !
    have any idea ?
    thanks a lot .

    Ting Rung,
    In the table in the JSP page you add a checkbox like this:
    <td class="fixed">
    <input type="checkbox" name="multiselect" value="<%=index%>"/>
    </td>
    This will render a checkbox in each row, with index number of that row as value.
    When you submit the page the request contains the multiselect parameter when at least one row has the checkbox checked.
    You can get the value of the multiselect parameter by calling sessionData.getRequestParameterValues("multiselect") in your action. The value is a string array containing the index numbers of the rows that have the checkboc checked.
    Steven Davelaar,
    JHeadstart Team.

  • Where can find  JHeadstart  customizing using Struts & JSP

    We can found the Tutorial-Customizing JHeadstart Applications , using MVC-Framework and UIX,
    but where we can find the tutorial-Customizing on Struts & JSP solution ?

    Dear Steven:
    As you mentioned in early:
    we will make a new version of this tutorial available through the supplement option which will then contains the same customizations as the MVC-UIX one.Whether this new version of Sruts-JSP tutorial is released now ? and whether have any supplement option for Jhs10g have been released ?
    thanks a lot !

  • 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.

Maybe you are looking for

  • How to get One Selection Screen for all queries?

    Hi Experts, I have three queries having selection screens. All the selection screen have the same variables, but the reports are different. I have created a workbook having these three queries. Each time when the workbook opens, the three selection s

  • 2LIS_02_ITM Delta for Cost Center Does Not Work

    Experts,     I have activated 2LIS_02_ITM extractor and it extracts delta for PO Header and Item changes. However, when I change the 'Cost Center' or 'GL Account' assignments for a PO Item, system does not generate a delta. I have to make another cha

  • Doubt in KT4A-V

    hi why if in the description of the mb it says that suporta agp 8x,  in the bios I just can select until 4x? somebody knows why? thanks

  • Can I install Snow Leopard in a PC

    Hi I'm a mac user and my brother no, he has a Toshiba AMD processor laptop and he want to install Snow Leopard in he's comp, is this possible?, can he buy Snow Leopard from Apple and just install it on he's PC?, I would like to know because he ask me

  • Audio is shortened on import ?

    Can someone tell me why my imported mpeg (that exported from Premiere Pro via Encode)  shows up with the audio shortened?  The audio is as long as the video clip in Premiere Pro.  Thoughts? Thanks Dan