The varStatus attribute in c:forEach in jsp

pls i want to know how to use it

<table>
<c:forEach var="person" items="${memberList}" varStatus="status">
  <tr>
    <td><c:out value="${status.count}"/></td>
    <td><c:out value="${person.name}"/></td>
  </tr>
</c:forEach>
</table>Given a list ["Tom", "Richard", "Harry"]
Would result in something like
1 Tom
2 Richard
3 Harry

Similar Messages

  • JSP-can i reuse the instance of a bean in another .jsp file

    am having a bean like clsStudent and i have used the usebean tag and setproperty to set all the values of the same bean. then i want to access the contents in the instane of clsStudent in another .JSP file.

    That doesn't sound like you're doing it right. Beans, like any java class, are actually defined in Java, and class files placed in the WEB-INF directory (By the way class names should be capitalised).
    JSPs shouldn't be populating beans, they should be generating HTML based on them. If you're loading form data into a bean use a servlet.
    That said there's no problem referencing beans in multiple JSPs, but you have to pay attention to how the actual reference gets into the JSP. This is done through "scope" on useBean. Generally a Servlet builds a bean and places it into the request attributes, then forwards to a JSP to format the HTML.

  • In Jsp TagLib how can I get the Attribute value (like JavaBean) in jsp

    Dear Friends,
    TagLib how can I get the Attribute value (like JavaBean) in jsp .
    I do this thing.
    public void setPageContext(PageContext p) {
              pc = p;
    pc.setAttribute("id", new String("1") );
              pc.setAttribute("first_name",new String("Siddharth")); //,pc.SESSION_SCOPE);
              pc.setAttribute("last_name", new String("singh"));
    but in Jsp
    <td>
    <%=pageContext.getAttribute("first_name"); %>
    cause null is returing.
    Pls HELP me
    with regards
    Siddharth Singh

    First, there is no need to pass in the page context to the tag. It already is present. How you get to it depends on what type of tag:
    Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html]SimpleTagSupport
    public class MyTag extends SimpleTagSupport
      public void doTag()
        PageContext pc = (PageContext)getJspContext();
        pc.setAttribute("first_name", "Siddharth");
        pc.setAttribute("last_name", "Singh");
        pc.setAttribute("id", "1");
    }Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/TagSupport.html]TagSupport or it's subclass [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/BodyTagSupport.html]BodyTagSupport the page context is aleady declared as an implicit object:
    public class MyTag extends TagSupport
      public void doStartTag()
        pageContext.setAttribute("first_name", "Siddharth");
        pageContext.setAttribute("last_name", "Singh");
        pageContext.setAttribute("id", "1");
    }In each case, this sort of thing should work:
    <mytags:MyTag />
    <%= pageContext.getAttribute("first_name") %>I

  • Attribute "Report Layout" is missing in the "Print Attributes" tab for IR

    Hallo,
    The attribute “Report Layout” is missing in the “Print Attributes” tab for an interactive report?
    How to alter the report layout (xsl-fo) of an interactive report?
    Has someone any idea where to configure this?
    Btw, for the "classic" SQL Report the XSL-FO "Report Layout" can be cahnged in "Print Attributes" and this works fine for me. But I want to change the xsl-fo for the interactive report.
    "If you do not select a report layout, a default XSL-FO layout is used. The default XSL-FO layout is always used for rendering Interactive Report regions. ... Unlike classic reports, the Interactive Report Print Attributes can only utilize the default XSL-FO layout and is initiated from the Report Attributes, Download section rather than directly from this screen. Once configured, these attributes only apply only to the current region and cannot be used outside the context of the region."
    http://apex.oracle.com/i/doc/bldapp_rpt_print.htm
    How can the "default XSL-FO layout" be changed?
    Changing is necessary because the Apache FOP 1.0 reports the following error (for the transmitted default XSL-FO):
    "fo:simple-page-master", "fo:region-body" must be declared before "fo:region-before"
    http://www.w3.org/TR/xsl/#fo_region-before
    The default report layout is not saved in:
    select * from APEX_040000.WWV_FLOW_REPORT_LAYOUTS
    Thx, Willi

    I've found two workaround for getting Apache FOP 1.0 to work with Oracle Apex 4.0 for PDF printing of interactive reports:
    1, Use an application process to set your custom layout for interactive reports:
    [ ] grant all on APEX_040000.WWV_RENDER_REPORT3 to {YOUR_SCHEMA_NAME};
    [ ] Create an Application Process e.g. "Custom Report Layout" with constraint for request 'PDF' and Process Text:
    declare
    v_xsl varchar2(32767);
    begin
    v_xsl := '<?xml version = ''1.0'' encoding = ''utf-8''?>
    <xsl:stylesheet version="2.0"
      <fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
      <fo:region-before region-name="region-header" extent="54.0pt"/>
    </xsl:stylesheet>';
    APEX_040000.WWV_RENDER_REPORT3.g_prn_template := v_xsl;
    end;2, If you have some knowlege in Java change the sequnce of the the nodes in the apex_fop.jsp (or servlet), ie. changing the xsl before you use it for transformation.
    The code depends on the solution you are using to parse the xsl string.
    Hope this may help someone,
    Willi

  • Should I use the .do or .uix file as the destination attribute on a link?

    Good Morning all,
    What is the difference in using the .do action file or the .uix file as the destination attribute on a link? Is one preferred over the other? Any clairification would be helpful.
    Thank you

    I've spent considerable time on this myself but from the perspective of a GO vs. a link. Why the difference and what do we gain?
    You really need to understand Struts. I am just beginning to. The stuff that comes with 10g on Struts is the tip of the iceberg. I picked up an O'Reilly book (Jakarta Struts) which actually addresses why one should use an action reference vs a direct link to a page (UIX JSP or otherwise). There are many other useful discussions on the MVC and Struts' place in it.
    Briefly, a link to a UIX page bypasses the controller aspect of Struts and you forfeit the opportunity for extensions/customizations etc and basically violate the MVC blueprint (See sun.com).
    My issue was why do I have to do a DataAction and a forward (as all the Oracle collateral would have you do)when I just need to go directly to a page?
    Struts has a class (org.apache.struts.actions.forwardAction) that allows you to do just that without violating the MVC rules and without having to create all the extra actions and forwards when you just want to go to a page without a DataAction.
    Get the book, well worth the $ vs the frustration.
    Hope this helps somewhat.
    Tom

  • To display records fetched from the DB through ALBPM, in a custom JSP

    I want to display the records fetched from the database through ALBPM in a custom JSP as a table.
    Currently I am fetching the records and putting them in a BPM object group and sending it to the JSP as a BPM object. Now in the JSP I am trying to iterate and create a table to display the fetched data using the JSTL tag ==&gt;
    &lt;c:forEach ...... &gt;
    &lt;/c:forEach&gt;
    But I am always getting the following error in ALBPM workspace:
    The task could not be successfully executed. Reason: 'java.lang.RuntimeException: /webRoot/customJSP/CustomerSearch1.jsp(29,2) No such tag forEach var in the tag library imported with prefix c'
    Though there is a tag forEach var in the JSTL?? How to solve this error or is there any altrnative way to display the records in a JSP ??
    Thanks,
    Suman.

    Hello. I use custom JSP and it works well. You have to make sure 2 things:
    a) You have imported the libs, including these lines in your JSP:
    <%@ page session="true" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://fuego.com/jsp/ftl" prefix="f" %>
    b) The variable you are using in the "forEach" statement is stored in the BPM object you pass to the JSP in the call.
    Hope this helps.... Bye

  • How to select an "attribute" in a forEach statement?

    I'm a noob, so I appreciate the help! :)
    I'm trying to render text into a table from the node <country> where the attribute is equal to "uk"
    Here is my XML code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE lowest-fares [
         <!ELEMENT lowest-fares (country+)>
         <!ELEMENT country (fare+,rules)>
         <!ATTLIST country id ID #REQUIRED>
         <!ELEMENT fare (from,to,price)>
         <!ELEMENT from (#PCDATA)>
         <!ELEMENT to (#PCDATA)>
         <!ELEMENT price (#PCDATA)>
         <!ELEMENT codeshare (#PCDATA)>
    ]>
    <lowest-fares>
         <country id="uk">
              <fare>
                   <from>London</from>
                   <to>Los Angeles</to>
                   <price>900</price>
              </fare>
              <rules>Rules go here.</rule>
         </country>
    </lowest-fares>Here's my JSTL code in the page:
      <x:forEach select="$lowestFares//country">
          <tr>
            <td><x:out select="from"/></td>
            <td><x:out select="to"/></td>
            <td><x:out select="price"/></td>
          </tr>
          </x:forEach>I need to specify the "uk" attribute in the country element in the forEach statement, but I'm not sure the proper syntax required to add that in?

    Its standard xPath expression syntax: http://www.w3schools.com/xpath/xpath_syntax.asp
    Try select="$lowestFares//country[@id='uk']">
    I think that should select all countries where the id is 'uk'

  • "No bean found under attribute key" exception when a JSP is not accessed

    HI,
    We are using weblogic 7.1 SP6, Oblix and TRC struts in our application. During normal access to various pages system works fine. When the application is not accessed for 30 minutes system displays session expired exception. But some time when a page is not accessed for some time, say 15 - 20 minutes and user clicks any link system displays a exception dump in the screen. The exception displays for pages with track changes. The exception starts with following line
    [ServletException in:/jsp/include/Header.jsp] No bean found under attribute key HomepageFormBean' javax.servlet.jsp.JspException: No bean bound under attribute key HomePageFormBean at org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:221) at org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
    After closing the window and tried to access the same page then the system works fine. The above exception is intermittent.
    Any help is highly appreciated.
    Thanks,
    K.Pushparaj

    Hi dear use this code i modified
    <logic:iterate id="lstDelNotificationData" name="institutionHomeForm" property="delNotification_data" indexId="i" >
    <table cellpadding="0" cellspacing="0" width="320" border="0">
    <tr>
    <td valign="top"><img src="/images/bullet2.gif" alt=" "></td>
    <td>
    "sm"> Your FYE <bean:write name="lstDelNotificationData" property="ins_fye"/> Annual ......is
    Now u will not get bean problem

  • AD user script to populate the IPPHONE attribute with the last 4 digits of the Telephonenumber attribute

    Good Afternoon Scripting Guys. I have a script that I have been working with pretty much all day today and just cant quite get it to play nice. Our objective is to search AD for specific users (say filtering them out with a username that starts with a "T")
    and User account is "Enabled" then grab the last four digits of their phone number (phone number is set up as follows: (800) 123 456 ) then populate the IPPHONE attribute with the last four digits of their phone number. I have read a ton of online
    blogs with users successfully making this happen but it appears that they are all using Quest (as the commands are all Get-qaduser and Set-qaduser). I need something that runs strictly in native Active Directory Module PowerShell on a Windows Server 2008r2
    Domain Controller.  I am also trying to keep it as simple as possible by using a Get command, then piping a Set command.  I have saved the script into a .ps1 file with the logic as follows:
    $SelUsers = Get-ADUser -filter {(SamAccountName -like "t*")} -Properties ipphone,telephonenumber -searchbase "OU=Test Users,OU=Temporary Org,OU=Test_Domain Users,DC=mydomain,DC=com" | where {($_.enabled -eq $True)}
    foreach ($user in $SelUsers)
     {$user.ipphone = $user.telephonenumber(4,$User.telephonenumber.length-4)
     set-aduser -instance $user}
    What is happening is kind of funny, but aggravating at the same time.  When we run the script, it completes with no errors.  When I pull up the properties of a user in the OU, the IP Phone field is populated with the number 8.  If the User
    account did not have a telephone number, the IP Phone field is populated with a -4.  So, apparently, the script is somehow subtracting the "-4" from the number of all of the Telephone Number field's characters.  Basically 12-4 is 8. 
    If there is no telephone number, then 0-4 is -4.  I have run the Get-ADUser portion of the script independently so I know its getting the correct users.  I also know it is populating the IPPHONE attribute but not with the last 4 digits of the telephone
    number.  Can you guys help out and maybe get this to work correctly?  Also, can you add logic to it to the script to delete any value in the IPPHONE field first, then replace it with the last 4 digits of the telephone.
    Any help would be GREATLY appreciated!!!!!  Thanks Guys...
    Lee

    First thing I would do is modify your filtering. This will remove the unneeded piping to the Where-Object cmdlet and also allow us to only return users who already have something in the telephoneNumber field. It is possible this could return all of your
    users, but if you have service accounts, etc. that do not have a telephoneNumber then they will not be included in your results. It's just a little cleaner.
    $SelUsers = Get-ADUser -filter {(SamAccountName -like 't*' -and Enabled -eq $True -and TelephoneNumber -like '*')}
    I suspect you may have a made a mistake when you entered what your phone numbers looks like. I assume that you forgot a final digit. If this is correct, and you have a space in the phone number between the three digits and the final four then you can use
    the split method to grab the last four digits.
    Foreach ($User in $SelUsers) {
    $Number = $User.telephoneNumber.split(' ')[-1]
    Set-ADUser -Identity $User -Replace @{ipPhone=$Number}
    There's no reason to delete what's in the field first because that's part of what the -Replace parameter will do anyway. This should help get you started!

  • Excel MySQL - To set the action attribute in a  form

    Hi All
    I am working on an application that requires to read data from Excel and update the table in MySQL. My java code works well and does the required. For the user to select an excel file, i have designed a form using JSP. This JSP form gets loaded through Tomcat..When the user browses and selects the required file, he then will click on the update button and the java code then should be executed.
    How can i set the action attribute in form tag to execute java code.
    Following is my code.
    <%@page
    language="java"
    import="javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*,java.sql.*"
    info="BulkUpdate"
    session="true"
    %>
    <html>
    <head></head>
    <title>Bulk Update Page</title>
    <body bgcolor="#FFcc00">
    <p style="margin-top: 0; margin-bottom: 0">
    <u><b><font color="#800000" size="4"><center>Update Data from Excel Sheet to Database</center></font></b></u></p><br>
    <p style="margin-top: 0; margin-bottom: 0">
    <font face="arial" color="#000080" align="left"><b>Bulk Update on :</b>
    <%
    java.util.Date date = new java.util.Date();
    %></font>
    <%
        out.print( date );
    %>
    <br><br>
    <b><font size="2" face="Arial" color="#000080">This page is used to Select the
    data and configuration file in the browser and update MYSQL database
    </font></b></p>
    <form action="http:\\localhost:8080\itasm\ExcelTest3.java" method="post" enctype="multipart/form-data">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1">
        <tr>
          <td width="34%" bgcolor="#800000"><b>
      <font face="Arial" color="#FFFF00" size="2">Select the Excel File to update </font>
          </b></td>
          <td width="53%" bgcolor="#800000">
          <p align="left"><input size="34" type="file" name="spreadsheet" /></td>
          <td width="17%" bgcolor="#800000"><input type="submit" value="Update File" /></td>
        </tr><br>
    <tr>
    <td width="34%" bgcolor="#800000"><b>
    <font face="Arial" color="#FFFF00" size="2">Select the corresponding Configuration File</td>
    <td width="17%" bgcolor="#800000"><input size="34" type="file" name="configfile" /></td>
    <td width="53%" bgcolor="#800000"></td>
    </tr></font>
      </table>
    </form>
    <p style="margin-top: 0; margin-bottom: 0">
    </p>
    </body>
    </html>When i execute the above code rather than executing the code, it just displays it in the browser.
    Please help.
    Regards

    Hi Andy!
    I just started to set the tabindex on each item... it wasn't working.. I copied the example you gave.. ha.. you had taxindex --- TAX and I too didn't notice it.. so just want to mention it incase anyone does what I did.. copies without thinking..
    As you said in the previous post it is TABINDEX="n"
    Ha.. its a Monday.. Bill

  • "Java" is not a valid setting for the language attribute

    Got an exception on Weblogic 10.3 after deployment in the JSP as ""Java" is not a valid setting for the language attribute"
    I installed weblogic 10.3 and deployed one of the applications.
    The JSP containing code like <%@ page language="Java" import=" is giving error.
    The error message is like this
    "Java" is not a valid setting for the language attribute"
    Please let me know if i need to include some jars or change some setting.
    Thanks and Regards
    Manoj

    Thanks a lot.
    It is working now with small j of java. But i would still like to know why it was working in Oracle 10g app server and tomcat 5.0 server as well, but not in weblogic 10.3 server. If possible please tell me.
    Thanks and Regards
    manoj

  • Using the binding attribute within Tomahawk's t:dataList tag

    I am trying to create a .jsp page with a dynamic list of tables. Each table on the page has a dynamic number of columns. I read an excellent blog ([The BalusC Code - Using datatables|http://balusc.blogspot.com/2006/06/using-datatables.html#PopulateDynamicDatatable]) that taught me how to create dynamic tables using the binding attribute. I can now get the tables with dynamic columns working.
    What I would like to do next is nest the dynamic tables within a Tomahawk t:dataList tag:
    <t:dataList value="#{utilitiesTableSegBean.attributeTables}" var="attributeTable">
        <h:outputText value="#{attributeTable.title}"/>
        <h:panelGroup binding="#{attributeTable.dynamicTableGroup}/>
    </t:dataList>
    {code}
    When I run my app I get this error:
    javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.jasper.el.JspPropertyNotFoundException: /s/UtilitiesTableSeg.jsp(57,56) '#{attributeTable.dynamicTableGroup}' Target Unreachable, identifier 'attributeTable' resolved to null
    Why do I get this error?
    If I remove the h:panelGroup tag then the h:outputText tag works just fine.  Why does 'attributeTable' resolve to null for the binding attribute of h:panelGroup, yet works for the value attribute of h:outputText?
    So then I thought that I might be able to make it work with an index into a bean property that returned the list of table objects.  So I tried to modify my panel group tag to:
    {code}<h:panelGroup binding="#{utilitiesTableSegBean.attributeTables[0].dynamicTableGroup}"/>{code}
    I was just doing a quick initial test and expected to see the first table repeated over and over because I had hard coded the value of '0' as the index.  But I was wrong.  It listed through all of the tables correctly.  Why?  This makes no sense to me!
    So I changed my jsp again so that it looked like this:
    {code}
    <t:dataList rowIndexVar="tableIndex" value="#{utilitiesTableSegBean.attributeTables}" var="attributeTable">
        <h:outputText value="#{attributeTable.title}"/>
        <h:panelGroup binding="#{utilitiesTableSegBean.attributeTables[tableIndex].dynamicTableGroup}"/>
    </t:dataList>
    {code}
    This is how I expected to code it so that the tables would all be shown correctly.  And it gives this error:
    org.apache.jasper.JasperException: An exception occurred processing JSP page /s/UtilitiesTableSeg.jsp at line 57
    (Line 57 is the line with the h:panelGroup tag.)
    Root cause:  javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalArgumentException: null
    I would really like to get the original version working, but any feedback and/or suggestions would be greatly appreciated.  I have spent a lot of time trying to figure this out and I just don't know where else to look.
    Thank you very much!
    Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Yes, sorry about that - I started off trying to prove a potential solution.
    Aim:
    A user logs onto a weblogic application and is authenticated against OID. The application is making SOAP service calls to a proxy endpoint monitored by another vendors software which authenticates the user against the ldap and checks their roles to see if the user can call the service.
    Solution so far:
    The initial application gets the username from the JAAS principal, but the password is not supplied. I can easily supply the SHA password digest to it (but putting a cleartext password in the header will probably not be given the go-ahead). This would enable the application to make the SOAP call with a username and digest.
    The software protecting the services can be configured in a variety of ways to authenticate the user to the ldap. One involves using the wsse username token in the header (cleartext password or digest).
    This authentication is failing and I don't yet have the diagnostic tools available to see which stage is in error. I was trying to prove that you could actually authenticate with an SHA password digest by doing a bind.
    Regards

  • How do I set the mailhost attribute in Messaging Server 3.5?

    <B>Intent of the hostname aliases feature: </B><BR>
    In Messaging Server 3.5, the hostname aliases feature is designed to facilitate migrating and co-hosting. For
    instance, if you set up all of your sales and marketing users on one Messaging Server, but suspect that you'll
    want to split those groups in the future, you can give the sales users the mailhost value sales.company.com and
    the marketing users the mailhost value mktg.company.com. This feature can also be used for fast failover if
    you want to be able to move a group of users quickly from one Messaging Server to another.
    <P>
    <B>How to use hostname aliases and how to set mailhost and MessageHostName settings: </B><BR>
    Each user's mailhost attribute can have only one value. All users on a single Messaging Server do not need to
    have the same mailhost value in the LDAP directory. The user's mailhost value should match one of the
    MessageHostName attribute values in netscape.mail.conf. (On Unix, the path to this file is
    /etc/netscape.mail.conf. Windows NT users must use Notepad to create this file in
    server-root\bin\mail\Server\etc, where server-root is the base directory where your SuiteSpot servers are
    installed.)
    <P>
    With Messaging Server 3.5 and later, MessageHostName can have multiple values. Think of hostnames as
    colors. Each mail account in the LDAP server has a single color. Each Messaging Server has one or more
    colors. A Messaging Server will check an LDAP account's color (mailhost) against its own color(s)
    (MessageHostName), and if they match, the server considers the account to be local. <P>
    For example: <BR>
    MessageHostName=red.company.com,green.company.com,blue.company.com
    <BR>where original-host-name is the machine's real name. This entry must come first as the server uses the first
    entry to generate machine specific postmaster forms. The subsequent host names can be any values that you
    wish separated by commas that are inside the brackets. Do not place spaces anywhere on the line.
    <P>
    In this example, if the mailhost setting for the user is set for either red.company.com or green.company.com, or
    blue.company.com, the server will consider the user to be local. (Hostname aliases must also be configured in
    DNS. Please see the DNS section at the end of this technote.) No other Messaging Server should list either
    red.company.com or green.company.com or blue.company.com in the MessageHostName field. Mail could
    not be delivered properly if either red.company.com or green.company.com or blue.company.com were listed
    in any other server's MessageHostName field. A user with a mailhost setting of violet.company.com would not
    be considered local to this machine.
    <P>
    Although it is possible with Messaging Server 3.52 to list more than 16 different host names in the
    MessageHostName field, it is not recommended because increasing the number of hostnames in this field beyond
    16 will have a negative impact on performance. This feature is intended to provide fast failover and/or
    migration of users. If users need to be divided up into many smaller groups, the use of some other LDAP
    attribute is recommended.
    <P>
    In Messaging Server 3.0, you can associate a server with only one host name. Consequently, all mail accounts
    on a given server must have the same mailhost value in the LDAP directory. This should be the name of the
    server, i.e. host.company.com
    <P>
    </A>A note about DNS
    Hostname aliases must be configured in DNS. This is done with a CNAME record. For example:
    A 128.101.101.101
    CNAME
    <P>
    Additional MX records are not required to use hostname aliases.
    <P>
    If you aren't sure about how to configure your DNS records, consult the book <I>DNS and Bind </I> by Paul Albitz and
    Cricket Liu.

    You can find the connection settings in Tools > Options > Advanced : Network : Connection
    See "Firefox connection settings":
    *[[Firefox cannot load websites but other programs can]]

  • Assigning a String Value to the value attribute of html:file

    Hi,
    we facing a problem while assigning a value to the VALUE attribute of file tag
    <html:file property="fileupload" size='25' value="sample.xls" onchange="callsheet()" />
    can anyone help me out plzzz,

    Two points -
    1) Java is not Javascript or HTML; you would do better to find a more appropriate forum.
    2) When you take this to a better forum, you need to describe the problem.

  • Not able to get the context attribute set in ServletContextListener

    Hi all,
    I have written a simple ServletContextListener and set an attribute in it. when i am trying to retrieve the attribute value in my servlet, I am getting as null. Could anybody please let me know about this if i need to add any more changes.
    Below is the complete code of my sample application
    web.xml
    <web-app>
    <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.mypackage.MyServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>myServlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <listener>
    <listener-class>
    com.mypackage.MyContextListener
    </listener-class>
    </listener>
    <context-param>
    <param-name>testMe</param-name>
    <param-value>TestedSuccessfully</param-value>
    </context-param>
    </web-app>
    ContextListener
    package com.mypackage;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContextListener;
    public class MyContextListener implements ServletContextListener{
    public void contextDestroyed(ServletContextEvent arg0) {
    public void contextInitialized(ServletContextEvent arg0) {
    ServletContext context = arg0.getServletContext();
    String testApplication = context.getInitParameter("testMe");
    context.setAttribute("myTest", "mkmmkmmkm");
    Servlet
    package com.mypackage;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class MyServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response){
    ServletContext context = getServletContext();
    if(context != null){
    response.setContentType("text/html");
    try {
    String output = (String) getServletContext().getAttribute("testMe");
    PrintWriter out = response.getWriter();
    out.print("The required value is... "+output);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    OUTPUT
    When accessed with any url as below:
    http://localhost:8080/helloworld/u
    gettting output as "The required value is... null" . Because i set the context attribute, I am expecting not null. Can anybody suggest me on this.

    context.setAttribute("myTest", "mkmmkmmkm");
    String output = (String) getServletContext().getAttribute("testMe");You set "myTest" but try to get "testMe"

Maybe you are looking for

  • Photoshop Elements 7.0   Organizer freezes upon opening

    I am so very frustrated.  I have been using this program for onver a year.  I recently started experiencing this problem.  When I import photos fro a folder, the organizer shows "generating thumbnails" then freezes.  I cannot use the organizer at all

  • [SOLVED] An another Broadcom thread

    Hey there, I could use a bit help over here. I'm trying to get my wireless working and so far it's going like hell. Here's some info: 02:00.0 Network controller: Broadcom Corporation BCM4321 802.11a/b/g/n (rev 03) Subsystem: Apple Inc. AirPort Extrem

  • After Boot Camp installation, Kernel Panic when launching OSX partition

    Hey guys. I have a mac mini (early 2009) with Mac OSX 10.6.2 running. I installed XP Professional Sp3 using the Boot Camp Assistant with no errors. It works fine. However, whenever I launch the OSX partition, even in single-user mode, it Kernel Panic

  • Firefox display issue as well as some formatting not showing up correctly when uploaded to site...

    I've been trying to update my site for my custom game mods but I'm having some trouble :s http://users.neko-sentai.com/alikona69/index.html Here is the site (alot of the links aren't working yet) the index formating is correct except my menu is way d

  • Which of two Options should I choose?

    I bought a used iPod for my sister. I synced it with my new iMac, erasing everything on it and adding 1500 songs (very few purchases from iTunes on it) for her. She is now trying to Sync the iPod with her PC. My question is.... which Option should sh