Jsp:forward problem, help appreciated

hi all,
The following piece of code from a jsp page is giving the following error
"java.lang.IllegalStateException: Error: Attempt to clear a buffer that's already been flushed".
updateToCompAccount is a button on the previous page
<%
if(request.getParameter("updateToCompAccount")!=null){
%>
<jsp:forward page="UpdateToCompAccount.jhtml" />
<% } %>
here is the stack trace:
java.lang.IllegalStateException: Error: Attempt to clear a buffer that's already been flushed
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:376)
at org.apache.jsp.adminUserProfileUpdate_jhtml._jspService(adminUserProfileUpdate_jhtml.java:474)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:409)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:528)
at java.lang.Thread.run(Thread.java:595)
Anybody have any ideas?
Thanks.

Well, the simplest way to do this would be:
public class MyClass extends HttpServlet {
  public void doGet(HttpServletRequest request, HttpServletResponse response) {
       String buttonName = request.getParameter("myButtonRequestVariable");
       if ("update".equals(buttonName)) {
           request.getRequestDispatcher("UpdateToCompAccount.jhtml").
                         forward(request, response)
         } else if ("delete".equals(buttonName)) {
              request.getRequestDispatcher("DeleteCompAccount.jhtml").
                        forward(request, response)
         } else {
              request.getRequestDispatcher("ErrorPage.jhtml").
                  forward(request, response)
  public void doPost(HttpServletRequest request,
} But that can get unwieldy if you've loads of buttons. Have you studied the concept of Model View Controller (MVC)?

Similar Messages

  • Jsp forward problem, I think.....

    I have a default.htm page that takes in a feild, EMP_NUM. Once the user
              hits the Submit button, I run a select statement(select.jsp) to see if that
              number exists. If it does then I forward the contents to correct.jsp, if the
              number doesn't exist then I forward to failed.jsp.
              Today is Tuesday, and last Friday I was working on this and everything
              worked fine, in fact perfect. I came in this morning to do some more
              testing, specifically catching errors in my try and catch, example - to make
              sure they enter in a number, and after I type in a number and hit the submit
              button, it trys to go to the next page, but displays nothing, the page is
              blank. Where has before, when everything was working fine on Friday, my
              correct.jsp page or my failed.jsp page would be displayed.
              From Friday to Tuesday I had not made any changes to my files. The only
              thing different, that I can think of, would be that on Friday I would have
              stoppped weblogic and this morning I started weblogic again. This is why I
              think this is a weblogic issue or syntax on my part. I have tried to restart
              my computer, restart weblogic, and I even deleted the .java files that
              weblogic creates and places in the weblogic/myserver/classfiles/jsp_servlets
              folder.
              Below is my source code.
              Please help!
              Thanks, jl.
              <% try {
              <%@ include file = "db_conn.jsp"%>
              <%
              // A Statement object is what sends your SQL statement to the db
              Statement stmt = conn.createStatement();
              // Retrieve the user id number from the previous form.
              int EMP_NUM = Integer.parseInt(request.getParameter("EMP_NUM"));
              //SQL prepared statement
              String selectEMP_NUM = "SELECT NAME, COMPANY_KEY FROM WTS_PROFILE WHERE
              EMP_NUM=?";
              PreparedStatement psEMP_NUM = conn.prepareStatement(selectEMP_NUM);
              psEMP_NUM.setInt(1, EMP_NUM);
              ResultSet rsEMP_NUM = psEMP_NUM.executeQuery();
              String NAME = "";
              int CompanyKey = 0;
              while (rsEMP_NUM.next()) {
              NAME = rsEMP_NUM.getString("NAME");
              CompanyKey = rsEMP_NUM.getInt("COMPANY_KEY");
              }// end of while
              psEMP_NUM.clearParameters();
              psEMP_NUM.close();
              conn.close();
              String sEMP_NUM = Integer.toString(EMP_NUM);
              String sCompanyKey = Integer.toString(CompanyKey);
              if (NAME.equals("")) {
              request.setAttribute("EMP_NUM", sEMP_NUM);%>
              <jsp:forward page="failed.jsp">
              <% }// end of if
              else {
              request.setAttribute("NAME", NAME);
              request.setAttribute("EMP_NUM", sEMP_NUM);
              request.setAttribute("CompanyKey", sCompanyKey);%>
              <jsp:forward page="creditcard.jsp">
              <% }// end of else
              }// end of try1
              catch(Exception e) {
              <% if(e.toString().equals("java.lang.NumberFormatException: ")) { %>
              <font face="Arial" size="2" color="red"><center><strong>Please enter in a
              EMPLOYEE ID NUMBER.<br><br></strong></font></CENTER>
              <%}// end of if
              %>
              </TD></TR></TABLE></DIV>
              <font color="red">"<%=e.toString()%>"</font>
              <%
              }// end of catch1
              %>
              

              Sounds like you have some debugging to do. If you didn't reinstall WLS and it worked fine before,
              then I doubt it is a WLS problem.
              Is your page really blank? Try show source in your browser? I think you have some mismatched
              <table> </table>. Try it in both IE and Netscape - one of them forgives you for mismatched table
              tags.
              Add some System.out.println() in your code to see what is being executed.
              "james lorenzen" <[email protected]> wrote:
              > I have a default.htm page that takes in a feild, EMP_NUM. Once the user
              >hits the Submit button, I run a select statement(select.jsp) to see if that
              >number exists. If it does then I forward the contents to correct.jsp, if the
              >number doesn't exist then I forward to failed.jsp.
              > Today is Tuesday, and last Friday I was working on this and everything
              >worked fine, in fact perfect. I came in this morning to do some more
              >testing, specifically catching errors in my try and catch, example - to make
              >sure they enter in a number, and after I type in a number and hit the submit
              >button, it trys to go to the next page, but displays nothing, the page is
              >blank. Where has before, when everything was working fine on Friday, my
              >correct.jsp page or my failed.jsp page would be displayed.
              > From Friday to Tuesday I had not made any changes to my files. The only
              >thing different, that I can think of, would be that on Friday I would have
              >stoppped weblogic and this morning I started weblogic again. This is why I
              >think this is a weblogic issue or syntax on my part. I have tried to restart
              >my computer, restart weblogic, and I even deleted the .java files that
              >weblogic creates and places in the weblogic/myserver/classfiles/jsp_servlets
              >folder.
              >
              >Below is my source code.
              >Please help!
              >Thanks, jl.
              >
              ><% try {
              > <%@ include file = "db_conn.jsp"%>
              ><%
              > // A Statement object is what sends your SQL statement to the db
              > Statement stmt = conn.createStatement();
              >
              > // Retrieve the user id number from the previous form.
              > int EMP_NUM = Integer.parseInt(request.getParameter("EMP_NUM"));
              >
              > //SQL prepared statement
              > String selectEMP_NUM = "SELECT NAME, COMPANY_KEY FROM WTS_PROFILE WHERE
              >EMP_NUM=?";
              > PreparedStatement psEMP_NUM = conn.prepareStatement(selectEMP_NUM);
              > psEMP_NUM.setInt(1, EMP_NUM);
              >
              > ResultSet rsEMP_NUM = psEMP_NUM.executeQuery();
              >
              > String NAME = "";
              > int CompanyKey = 0;
              > while (rsEMP_NUM.next()) {
              > NAME = rsEMP_NUM.getString("NAME");
              > CompanyKey = rsEMP_NUM.getInt("COMPANY_KEY");
              > }// end of while
              >
              > psEMP_NUM.clearParameters();
              > psEMP_NUM.close();
              > conn.close();
              >
              > String sEMP_NUM = Integer.toString(EMP_NUM);
              > String sCompanyKey = Integer.toString(CompanyKey);
              > if (NAME.equals("")) {
              > request.setAttribute("EMP_NUM", sEMP_NUM);%>
              > <jsp:forward page="failed.jsp">
              ><% }// end of if
              > else {
              > request.setAttribute("NAME", NAME);
              > request.setAttribute("EMP_NUM", sEMP_NUM);
              > request.setAttribute("CompanyKey", sCompanyKey);%>
              > <jsp:forward page="creditcard.jsp">
              ><% }// end of else
              >}// end of try1
              >catch(Exception e) {
              ><% if(e.toString().equals("java.lang.NumberFormatException: ")) { %>
              > <font face="Arial" size="2" color="red"><center><strong>Please enter in a
              >EMPLOYEE ID NUMBER.<br><br></strong></font></CENTER>
              ><%}// end of if
              >%>
              > </TD></TR></TABLE></DIV>
              > <font color="red">"<%=e.toString()%>"</font>
              ><%
              >}// end of catch1
              >%>
              >
              >
              

  • MATSHITA DVD-R   UJ-85J Problem, help appreciated

    I have been trying to burn an I Movie through I DVD on the Matshita DVD-R UJ-85J. The program seems to work correctly until right at the last minute. The burning process gets to Multiplexing and burning and suddenly the disc ejects and says done. The disc when reinserted still is blank. I am fairly new at this and was wondering if I am doing something wrong or is their a problem with my drive? Any help from anyone would be greatly appreciated. Thanks.

    I too am having a similar problem. Whenever I burn a Memorex DVD-R through my drive, SimplyBurns stops the operation immediately, saying "disc not writable." I read somewhere that resetting PRAM fixes some problems; that didn't work. Furthermore, here is what System Profiler reports:
    MATSHITA DVD-R UJ-85J:
    Firmware Revision: FCQ5
    Interconnect: ATAPI
    Burn Support: Yes (Apple Shipping Drive)
    Cache: 2048 KB
    Reads DVD: Yes
    CD-Write: -R, -RW
    DVD-Write: -R, -RW, +R, +R DL, +RW
    Write Strategies: CD-TAO, CD-SAO, DVD-DAO
    Media:
    Type: DVD-R
    ID: RITEKF1
    Blank: No
    Erasable: No
    Overwritable: No
    Appendable: Yes
    Write Speeds: 2x, 4x, 8x
    Message was edited by: andlabs

  • Moving iTunes Problem(help appreciated)

    Ok. My computer's disk space was almost full, so I bought an external hard drive and simply cut and pasted the iTunes folder on my computer. I then simply added all the files(from the external hard drive) into iTunes. The problem is that it's registering this library as a new one and I have to erase and sync. Is there anyway to undo what I've done? Help is much appreciated !!
    [email protected](contact me)

    Hi,
    Press the Windows Button + R.
    Once Run Pops Up,
    Type: dxdiag
    and hit ok.
    link this:
    Then DirectX Diagnostic Tool Should appear.
    Select "Save All information..."
    Then save it onto your Desktop.
    Open the DxDiag.txt (The information you saved onto the desktop)
    Then copy all and paste it here as a reply.
    Thanks,
    Blueloony

  • A Bit of an Odd Problem (Help Appreciated)

    Or at least I assume this is the problem...
    I have windows 8 and Skype came as an app on my laptop; that's fine, it worked really well. But several weeks ago I bought a Student edition of MS Office 365 and installed it on my laptop, and the package said that a skype account was needed (or something like that, I think because you needed a microsoft account), and I was like "Okay that's fine". 
    When activing Office account it required a microsoft sign in, and while trying to sign in, what I thought was my account didn't work so I though that I was mistaken (didn't make the connection between MS and Skype at that moment) and that I didn't have one. Now the Student edition only works if you prove you're a student,  so I used my college email when signing up for a microsoft account. 
    And next thing I know my skype is screwed up. Not just that it won't connect, but it won't call anyone, I can't answer incoming calls, and (going by the sounds) it doesn't know whether I'm signed on or trying to call someone.  
    I think the problem is that it's registering two different accounts and doesn't know which one to go with - the one already set up on the laptop, or the one MS Office 365 is supposed to be signed in? 
    Does anyone have any suggestions for what I should do? I'm afraid of uninstalling it incase that messes up my other apps (since this laptop came with Skype installed as an app), even if I re-installed it. I was also thinking about leaving it and just not touching it, while installing Skype on the desktop... but how much confusion could that cause? 
    I could really use some help with this. 

    you need to contact skype support (this is just a user forum)
    log on to the skype webpage on a computer
    klick help
    scroll down
    klick "get more help" almost at the bottom
    there you'll find how to get in touch with them

  • Green - Home Lab Setup problem - Help Appreciated

    Below you will find my config for a 2520 Router and an AS2509-RJ. I am attempting to reverse telnet from my AS to 2520. However when I try this I end up telnetting back to the AS. (Very confusing, but confirmed as the only password accepted is test1.)
    From my AS I am entering:
    Telnet R1 2001
    Note: Setup is as follows.
    AS(RJ45-1) via Rolled cable to 2520 (console port)
    Can someone help me out?
    R1_2520 Config:
    Current configuration : 760 bytes
    version 12.1
    no service single-slot-reload-enable
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    hostname R1_2520
    enable secret xxx
    enable password xxx
    ip subnet-zero
    ip tftp source-interface Ethernet0
    interface Loopback0
    ip address 169.1.x.x.255.255.255
    interface Ethernet0
    ip address 10.1.1.1 255.255.0.0
    interface Serial0
    no ip address
    no ip mroute-cache
    shutdown
    interface Serial1
    no ip address
    shutdown
    interface Serial2
    no ip address
    shutdown
    interface Serial3
    no ip address
    shutdown
    interface BRI0
    no ip address
    shutdown
    ip classless
    no ip httpserver
    line con 0
    line aux 0
    line vty 0 4
    password xxx
    login
    end
    R0_2509 Config:
    Current configuration : 976 bytes
    version 12.1
    no service single-slot-reload-enable
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    hostname R0_2509
    enable secret xxx
    enable password xxx
    ip subnet-zero
    no ip domain-lookup
    ip host R1 2001 10.101.1.1
    interface Loopback0
    ip address 10.101.1.1 255.255.255.255
    interface Ethernet0
    ip address 10.10.10.10 255.255.0.0
    no ip mroute-cache
    shutdown
    no cdp enable
    interface Serial0
    no ip address
    no ip mroute-cache
    shutdown
    interface Group-Async0
    ip unnumbered Ethernet0
    async mode interactive
    group-range 1 8
    ip classless
    ip httpserver
    dialer-list 1 protocol ip permit
    dialer-list 1 protocol ipx permit
    no cdp run
    line con 0
    password test1
    login
    no exec
    transport preferred telnet
    line 1 8
    password test1
    login
    no exec
    transport preferred telnet
    line aux 0
    line vty 0 4
    password lions
    login
    no exec
    transport preferred telnet
    end
    Debug Info from Telnet:
    4d20h: TCB001E7458 created
    4d20h: TCB001E7458 setting property TCP_TOS (11) 273F4F
    4d20h: TCB001E7458 bound to UNKNOWN.11073
    4d20h: TCP: sending SYN, seq 541398595, ack 0
    4d20h: TCP0: Connection to 10.101.1.1:2001, advertising MSS 1474
    4d20h: tcp0: O CLOSED 10.101.1.1:2001 10.101.1.1:11073 seq 541398595
    OPTS 4 SYN WIN 4128
    4d20h: IP: s=10.101.1.1 (local), d=10.101.1.1 (Loopback0), len 44, sending
    4d20h: TCP0: state was CLOSED -> SYNSENT [11073 -> 10.101.1.1(2001)]
    4d20h: IP: s=10.101.1.1 (Loopback0), d=10.101.1.1 (Loopback0), len 44, rcvd 3
    4d20h: tcp0: I LISTEN 10.101.1.1:11073 10.101.1.1:2001 seq 541398595
    OPTS 4 SYN WIN 4128
    4d20h: TCP: connection attempt to port 2001
    4d20h: TCP: sending RST, seq 0, ack 541398596
    4d20h: TCP: sent RST to 10.101.1.1:11073 from 10.101.1.1:2001
    4d20h: IP: s=10.101.1.1 (local), d=10.101.1.1 (Loopback0), len 40, sending
    4d20h: IP: s=10.101.1.1 (Loopback0), d=10.101.1.1 (Loopback0), len 40, rcvd 3
    4d20h: tcp0: I SYNSENT 10.101.1.1:2001 10.101.1.1:11073 seq 0
    ACK 541398596 RST WIN 0
    4d20h: TCP0: state was SYNSENT -> CLOSED [11073 -> 10.101.1.1(2001)]
    4d20h: TCP0: bad seg from 10.101.1.1 -- closing connection: seq 0 ack 541398596 rcvnxt 0 rcvwnd 0
    4d20h: TCP0: connection closed - remote sent RST
    4d20h: TCB 0x1E7458 destroyed

    So, now we're sure the connection is broken. Let's analyze the problem this way.
    There are 3 components in this connection:
    1.The 2520's console port
    2.rollover cable
    3.The 2509's line ports
    If one of the above components have any problem, it will cause a broken connection.
    First let's check the 2520's console port. Can you login to the 2520 by directly conecting the console port to your PC? If so, this can be excluded from being a probable cause.
    Second, change the rollover cable. Is it improved then? If so, the rollover cable you were using is bad. If not, the rollover cable can be likely excluded from being the probable cause.(One possibility is that all the rollver you have are bad, but not likely)
    Third, plug your rollover cable to line 2, then type "telnet 10.101.1.1 2002", and see whether you can login to the 2520. If not, repeat the process on line 3, line4 ,...,and line 8.
    If all the 8 lines cannot be used, there is the last chance. Remember your aux port? It's your line 9. Before repeat the above process, add some command lines in your confiuration:
    line aux 0
    no exec
    transport preffered telnet
    then type "telnet 10.101.1.1 2009
    Good lucks
    SSLIN
    (I have had the same problem before; it's just the cable problem)

  • Very unusual LCD display problem, help appreciated

    First post, I want to thank anyone who can help me in advance. I just took over my sister's MBP Unibody, and she has been having an issue where there is about a 1.5 inch wide strip of complete distortion on the left hand side of the screen. Everything in that strip is completely color distorted with constant screen tearing and flickering. I suspect there is something wrong with a wire in the lcd screen, as this problem only starts after using the computer for 15 minutes, and goes away initially by tapping the screen or adjusting the screen. After about half an hour of use however, it does not go away. In a completely unrelated incident, the glass panel cracked yesterday (This problem has been going on for about a month and a half), and i ordered a replacement, so I will be "under the hood" on Thursday. If anyone has any recommendations of what I might do to try to fix this, I would greatly appreciate it.
    3 pictures of my screen:
    http://i771.photobucket.com/albums/xx356/basicallydylan/IMG_0179.jpg
    http://i771.photobucket.com/albums/xx356/basicallydylan/IMG_0178-1.jpg
    http://i771.photobucket.com/albums/xx356/basicallydylan/IMG_0177.jpg

    Well its 70 dollars vs 600 dollars and it wasn't me who bought the applecare. And I would gladly bring it in to an apple technician instead, however my only problem with that is its not like they can just take off the glass, take a look at it and then tell me how much it costs. i mean the glass is shattered, you take it off and its going to be in pieces. Likewise, they very well might say that they can't do anything about it because the broken glass is clearly accidental damage and immediately attribute it to the lcd problem even though it has nothing to do with it. If the glass wasn't broken, I would never have even posted and immediately taken it to the apple store. Please, tell me I'm wrong and I will take it to them right away to tell me exactly why the screen is the way it is, and it will probably be covered seeing how it started out of no where. My understanding of apples policy however is that with the glass cracked as it is, they will have no choice but to immediately charge me for a full repair. But like I said, if I'm wrong please tell me and I'll take it in tomorrow

  • Color Saturation Problem (help appreciated!)

    Hi.
    I'm in Spain and making DVD's from footage shot on NTSC cameras (a bad idea in the first place, I know).
    At the moment I have no way of verifying my results on an NTSC tv, so.... My question is that the majority (but strangely, not quite all) of the DVD's I've produced, when watched on a normal PAL television, have EXTREMELY over-saturated colors. They are so saturated that they're flattened and bleedy so that subtle textures aren't discernible.
    Aside from that, the image appears stuttery and jumpy. This makes sense to me, being an NTSC DVD on a PAL tv, but should the COLORS be so drastically affected also?
    I've done five project here. 4 of them look stuttery and with bad colors, but 1 of them looks fine. This is the mystery. Is there some encoding setting that I'm overlooking that can reduce the problem?? Is this a normal symptom of NTSC seen on PAL equipment?
    I've tried on various different PAL tv's and players. no change.
    (this problem occurs with both 24p and regular NTSC footage. I use DVDSP4 and FCP4)
    THanks for your time!!
    powerbook 1.5GHz 15"   Mac OS X (10.4.1)  

    any ideas anyone? thanks

  • Difficult problem, help appreciated.

    Hi,
    I have the following tables:
    1.assessments
    2.meters
    3.meter_readings
    assessment : meters = 1:M
    meters : meter_readings = 1:M
    Now, I need to calculate "meter usage" which is a sum of a usage field in meter_readings for certain period for each meter, and "assessment usage", which is the sum of those "meter usages" for the each assessment.
    So I would like to have something like:
    assess_num meter max_date m_usage a_usage
    1 1A 1/1/00 100 160
    1B 3/1/00 50 160
    1C 4/1/00 10 160
    2 2A 5/1/00 12 32
    2B 6/1/00 20 32
    Now, in disco admin, I have done the following:
    1. On the meter readings folder, created
    - max date on date item
    2. Joined assessments folder with meters folder based on meter ID.
    These 2 steps will give me everything up to meter_usage.
    I'm wondering how I can get the assessment usage. I tried using a function that takes in assessment number in the workbook, but it altered the meter_usage figures and gives unexpected/wrong assessment_usage figures whenever the function is used.

    I figured out a work around but it would be nice to display GROUP Calendars via anonymous. The workaround is to create a calid (useranem) for every calendar you want to group together. Then on ww command line you can call or calids that you want grouped and it will group them into one calendar ie. http://mycalendar.com/command.shtml?calid=username1;username2;userndame3;username4&view=weekview

  • Sql  problem - help appreciated!

    I have two tables, report_t and report_details_t.
    report_t has the following structure
    reportId fiscalYear
    ============
    1 2007
    2 2008
    Report_details_T
    reportID fund_type fund_value
    ========================
    1 direct 40
    1 indirect 20
    2 direct 30
    2 direct 5
    I am trying to generate a report using just SQL statment, the result will look like this
    report_id fund_type, 2007_fund_value, 2008_fund_value
    ====================================
    1 direct 40 0
    1 indirect 20 0
    2 direct 0 30
    2 indirect 0 5
    Is there any way achieving it?
    Thanks in advance.

    ah, ok - and was there a typo in your original set of data for the report_details_t table? there are two rows for direct for fiscal year id = 2, but one has morphed into indirect in your results.
    Assuming there was a typo:
    with    report_t as (select 1 reportid, 2007 fiscalyear from dual union all
                         select 2 reportid, 2008 fiscalyear from dual),
    report_details_t as (select 1 reportid, 'direct' fundtype, 40 fund_value from dual union all
                         select 1 reportid, 'indirect' fundtype, 20 fund_value from dual union all
                         select 2 reportid, 'direct' fundtype, 30 fund_value from dual union all
                         select 2 reportid, 'indirect' fundtype, 5 fund_value from dual)
    -- end of mimicking your data: USE SQL below:
    select rdt.reportid,
           rdt.fundtype,
           decode(rt.reportid, 1, rdt.fund_value, 0) "2007_FUND_VALUE",
           decode(rt.reportid, 2, rdt.fund_value, 0) "2008_FUND_VALUE"
    from   report_t rt,
           report_details_t rdt
    where  rt.reportid = rdt.reportid;
      REPORTID FUNDTYPE 2007_FUND_VALUE 2008_FUND_VALUE
             1 direct                40               0
             1 indirect              20               0
             2 direct                 0              30
             2 indirect               0               5Edited by: Boneist on 30-Mar-2009 15:00

  • Problem in jsp:forward

    hi,
    i have a jsp page from where i have to call my servlet.but it is mapped in xml by other name.so what should i do?can i call that servlet using named mapped into the xml.
    can i do this?
    <jsp:forward page="/servlet/web.xml mapping"></jsp:forward>
    it's urgent.
    so please help me.
    kamlesh solanki

    hey man,
    how u doin?
    your problem is quite funny. here in servlet configuration in the xml file there is what we call servlet mapping<servlet-mapping>.
    here is how we map a servlet to a kind of url:
    <servlet-mapping>
    <servlet-name>
    havet
    <servlet-name>
    <url-pattern>
    /havva.jspa
    </url-pattern>
    </servlet-mapping>
    nbow when calling this servlet using this url pattern it now behaves as if its in the main application directory just like where jsps are so u will forward to it like a jsp.
    thats the shizzy.
    ok call it like this now
    <jsp:forward page="havva.jspa" />
    or
    <jsp:forward page="havva.jspa"></jsp:forward>
    since u may be used to this style of calling the tag.
    stay cool and let me know if u had any problems.

  • Problem using jsp:forward in java script

    hi,
    when I use jsp forward tag inside java script i'm getting a problem that
    when the jsp is invoked it is getting forwarded to the page specified in the forward tag, without checking the if conditions. Following code may give you a better idea.
    <html>
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    <jsp:forward page="success.jsp" />
    </script>
    <body>
    <form name="f" method=post>
    <input type=text name=htemp value="true">
    <input type=button onclick="test()">
    </form>
    </body>
    </html>
    please help me,thanks inadvance
    regards
    chandu

    What pgeuens means is that you can't mix javascript and jsp/java code in this way.
    ALL of the jsp/java code gets executed at the server end.
    This produces an HTML page (with embedded javascript) which gets sent to the client.
    The client then runs javascript code in response to events (onLoad, onClick, onChange etc etc)
    So in this case, the jsp:forward will always be executed, because as far as the server is concerned, the javascript is just template text.
    If you WANT to do a conditional forwarding on the server side you do it in java ie (horribly using scriptlet)
    <%
    if (testCondition){
    %>
      <jsp:forward>
    %<
    %>Or if you want to test what the client has entered client side, all you can do is submit the form, or navigate to a URL
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    document.f1.action="success.jsp";
    document.f.submit();
    </script>You cannot run JSP code based on your javascript code.
    Java. Javascript. Not the same thing.
    Hope this helps,
    evnafets

  • Jsp:forward URL problem

    Hi,
    I have 2 pages X.jsp and Y.jsp
    The content of X.jsp is a simple
    // send an email here
    <jsp:forward page="Y.jsp">
    </jsp:forward>
    The content of Y.jsp is only "Mail is sent" message.
    The problem is that everytime page X is loaded,
    the browser displays Y.jsp content, but the URL in the Address box of the browser still displays X.jsp
    This leads me to reload problem, even though the page displays the "Mail is sent" message, the URL still shows X.jsp, and everytime the browser is reloaded, another mail is sent.
    How to make the URL change to Y.jsp ?
    TIA.

    Hi,
    I have 2 pages X.jsp and Y.jsp
    The content of X.jsp is a simple
    // send an email here
    <jsp:forward page="Y.jsp">
    </jsp:forward>
    The content of Y.jsp is only "Mail is sent" message.
    The problem is that everytime page X is loaded,
    the browser displays Y.jsp content, but the URL in the
    Address box of the browser still displays X.jsp
    This leads me to reload problem, even though the page
    displays the "Mail is sent" message, the URL still
    shows X.jsp, and everytime the browser is reloaded,
    another mail is sent.
    How to make the URL change to Y.jsp ?
    TIA.Thats the natural behavious of forward.
    One simple solution is not to use forward. You can use HTTP redirection rather than forward.
    Hope it helps.

  • Need code help in jsp:forward ... /

    Can any one give a little code as to how am i suppose to redirect my jsp execution with <jsp:forward../> tag.
    Give a little code of JSP file. i have tried with 2-3 examples but i could not do it. Certainly some wizard will help me doing this.
    Thanx in advance.
    husami

    its fine. i have understood your code. i have even tested with param attribute.
    Earlier i was using JWS2.0 now i have shifted to tomcat. it gives me problem to run jsp file. what could be the reason? servlets are running fine.
    is there any path or classpath setting probs
    or do i have to execute some other files of tomcat
    or do i have to use jspc with some options?.......
    please help
    husami

  • I was trying to sync my 120GB iPod Classic earlier and it said it couldn't sync as the iPod disk could not be "read" or "written to". I now can't get anything onto my iPod, and I was wondering if it is a hard drive problem? Any help appreciated. Thanks.

    I was trying to sync my 120GB iPod Classic earlier, and it said it couldn't sync as the iPod disk could not be "read" or "written to." I now can't get anything onto my iPod, and I was wondering if it is a hard drive problem? Any help appreciated. Thanks.

    Did you go into iTunes to change the location of your media files? if not you will need to go into iTunes and click on preference and select the advance tab then click the iTunes Media folder location.  Select the location of your on external hard drive. 

Maybe you are looking for

  • Acrobat 7.0 Distiller error

    I have the complete Adobe Creative Suite Premium package, and I recently have started having issues converting Documents or Spreadsheets to PDF. When I click on "Convert to Adobe PDF", after the PDF window opens, I get a Distiller error message, foll

  • Another import.* problem

    I've obviously got something set wrong in my new installation of CS4 I have two projects, both of which use the Zinc library. The first was built by someone else, and import mdm.*; works just fine. But, in my new project, import mdm.*; gives compiler

  • How to pass output from one selection-as input to another selectiion??

    From a user prompt will iniate many user table selections.   And  the outputs  of each table selection will be used as inputs for the next table selection I reviewed variable Scope and inner and outer Declare—it would be a great help if some one coul

  • Can you print study cards created in ibooks?

    Is it posible to print the study cards that you can create by highlighting sections of a book, in iBooks  

  • Quicktime Plugin Playing MP3s In IE

    Why is my Quicktime plugin all of a sudden playing all the MP3s in IE? I changed the MIME types so the plugin qill only play moves...in both places in QT (browser and file types)...and it just won't stop. Is there anything I can do short of uninstall