Example J2EE_QuickCarRental: not forwarding to a jsp

Hello,
i cannot make a forward to the jsp file; always the path will be "QuickCarRental/servlet/quickCarRentalView.jsp" at the server.
My web.xml-file:
<web-app>
    <display-name>Rent-A-Car</display-name>
    <description>Web resources for Car Rental example</description>
    <servlet>
        <servlet-name>quickCarRentalView.jsp</servlet-name>
        <jsp-file>/quickCarRentalView.jsp</jsp-file>
    </servlet>
    <servlet>
        <servlet-name>QuickReservationServlet</servlet-name>
        <servlet-class>com.sap.examples.quickcarrental.servlet.QuickReservationServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>quickCarRentalView.jsp</servlet-name>
        <url-pattern>/view</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>QuickReservationServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <ejb-local-ref>
        <ejb-ref-name>ejb/QuickOrderProcessorBean</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>com.sap.examples.quickcarrental.QuickOrderProcessorLocalHome</local-home>
        <local>com.sap.examples.quickcarrental.QuickOrderProcessorLocal</local>
        <ejb-link>QuickCarRentalEjb.jar#QuickOrderProcessorBean</ejb-link>
    </ejb-local-ref>
</web-app>
code in servlet:
RequestDispatcher dispatcher = request.getRequestDispatcher("/view");
message from server:
Application error occurred during the request procession.
Details: javax.servlet.ServletException: Requested resource ( QuickCarRental/servlet/quickCarRentalView.jsp ) not found.
     at com.sap.examples.quickcarrental.servlet.QuickReservationServlet.doWork(QuickReservationServlet.java:63)
After deployment on server the jsp-file will be in the root-folder.
Thanks,
Frank

try removing the forward slash before your jsp:
<servlet>
<servlet-name>quickCarRentalView.jsp</servlet-name>
<jsp-file>quickCarRentalView.jsp</jsp-file>
</servlet>

Similar Messages

  • Servlet not forwarding a control to the jsp with req dspher

    hi ppl,my servlet code is supposed to forward a control to a jsp page so as to display the value in the jsp.but the request dispatcher's forward is not forwarding the control to the jsp page.....here is my servlet code----
    // Decompiled by DJ v3.4.4.74 Copyright 2003 Atanas Neshkov  Date: 7/4/2003 12:37:00 PM
    // Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name:   BdgtMaster.java
    package publicity;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class BdgtMaster extends HttpServlet
        public synchronized void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
            throws ServletException, IOException
            Object obj = null;
            String s3 = "";
            String s4 = "";
            out = httpservletresponse.getOutputStream();
            String s = "";
            String s1 = "";
            String s2 = httpservletrequest.getParameter("option");
            s3 = httpservletrequest.getParameter("branch");
            s4 = httpservletrequest.getParameter("publicity_code");
            String s5 = httpservletrequest.getParameter("budget");
            try
                String s6 = "0";
                String s7 = "0";
                String s8 = "INSERT INTO Budget_Master(Branch,Publicity_Code,Budget_Alloted,Work_In_Progress,Amount_Paid) VALUES (?,?,?,?,?)";
                String s9 = "update budget_master set old_budget = budget_alloted where branch='" + s3 + "' and publicity_code=" + s4;
                String s10 = "UPDATE Budget_Master set budget_alloted=" + s5 + " where Branch='" + s3 + "' and publicity_code=" + s4;
                datasource = "jdbc:odbc:budget";
                con = DriverManager.getConnection(datasource);
                int i = con.getTransactionIsolation();
                con.setTransactionIsolation(2);
                con.setAutoCommit(false);
                if("new".equalsIgnoreCase(s2))
                    PreparedStatement preparedstatement = con.prepareStatement(s8);
                    preparedstatement.setString(1, s3);
                    preparedstatement.setString(2, s4);
                    preparedstatement.setString(3, s5);
                    preparedstatement.setString(4, s7);
                    preparedstatement.setString(5, s6);
                    preparedstatement.executeUpdate();
                    con.commit();
                    preparedstatement.close();
                if("update".equalsIgnoreCase(s2))
                    Statement statement = con.createStatement();
                    statement.executeUpdate(s9);
                    statement.executeUpdate(s10);
                    con.commit();
                con.setTransactionIsolation(0);
                /*htmlStart(out, "BUDGET MASTER");
                out.println("<p> </p><div align=\"left\">");
                out.println("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"50%\">");
                out.print("<tr>");
                out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Branch </font></small></strong></td>");
                out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s3 + "</font></small></td></tr><tr>");
                out.println("<td width=\"50%\"><strong><small><font face=\"Tahoma\">Budget Alloted </font></small></strong></td>");
                out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s5 + "</font></small></td></tr><tr>");
                out.println("<td width=\"50%\"><small><strong><font face=\"Tahoma\">Publicity Code</font></strong></small></td>");
                out.println("<td width=\"50%\"><small><font color=\"#004080\" face=\"Tahoma\">" + s4 + "</font></small></td></tr></table></div>");
                htmlEnd(out);
              con.close();
                httpservletrequest.getRequestDispatcher("/pages/serview/BdgM.jsp").forward(httpservletrequest,httpservletresponse);        
            catch(SQLException sqlexception)
                cleanUp();
                printSQLException(sqlexception, out);
            out.flush();
        public void init(ServletConfig servletconfig)
            throws ServletException
            super.init(servletconfig);
            try
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                return;
            catch(ClassNotFoundException classnotfoundexception)
                log("Couldn't load class sun.jdbc.odbc.JdbcOdbcDriver");
                throw new ServletException(classnotfoundexception.getMessage());
        static void printSQLException(SQLException sqlexception, ServletOutputStream servletoutputstream)
            throws IOException
            servletoutputstream.print("<b>SQLException</b>\n<p>\n\n");
            for(; sqlexception != null; sqlexception = sqlexception.getNextException())
                servletoutputstream.print("<b>SQLState:</b> " + sqlexception.getSQLState() + "<br>\n");
                servletoutputstream.print("<b>Message:</b> " + sqlexception.getMessage() + "<br>\n");
                servletoutputstream.print("<b>Vendor:</b> " + sqlexception.getErrorCode() + "<br>\n");
        private static boolean checkForWarning(SQLWarning sqlwarning)
            throws SQLException
            boolean flag = false;
            if(sqlwarning != null)
                System.out.println("\n *** Warning ***\n");
                flag = true;
                for(; sqlwarning != null; sqlwarning = sqlwarning.getNextWarning())
                    System.out.println("SQLState: " + sqlwarning.getSQLState());
                    System.out.println("Message:  " + sqlwarning.getMessage());
                    System.out.println("Vendor:   " + sqlwarning.getErrorCode());
                    System.out.println("");
            return flag;
        /*void htmlStart(ServletOutputStream servletoutputstream, String s)
            throws IOException
            servletoutputstream.println("<html><head><title>" + s + "</title></head>");
            servletoutputstream.println("<body topmargin=\"0\" leftmargin=\"0\" bgproperties=\"fixed\">");
            servletoutputstream.println("<div align=\"left\"><table border=\"0\" width=\"100%\">");
            servletoutputstream.println("<tr><td width=\"100%\" bgcolor=\"#DFDFFF\">");
            servletoutputstream.println("<font face=\"Tahoma\" color=\"#000000\"><strong>B u d g e t   M a s t e r - D e t a i l s   E n t e r e d</strong></font></td>");
            servletoutputstream.println("</tr></table>");
        void htmlEnd(ServletOutputStream servletoutputstream)
            throws IOException
            servletoutputstream.print("<hr>");
            servletoutputstream.print("</body></html>\n");
        String link(String s, String s1)
            return "<a href=\"" + s + "\">" + s1 + "</a>";
        public String getServletInfo()
            return "Display and SQL manipulate JDBC databases on the server.";
        public void cleanUp()
            throws IOException
            if(con != null)
                try
                    out.print("Closing database connection");
                    con.setTransactionIsolation(0);
                    con.close();
                    return;
                catch(SQLException _ex)
                    return;
            else
                return;
        public BdgtMaster()
        private Connection con;
        private String datasource;
        private String user;
        private String password;
        private String base;
        private ServletOutputStream out;
    plz tell me where im wrong...
    regards....a_joseph

    Hi,
    Sorry to say this but it'd be lot simple if we can avoid cross posting similar Queries.
    I'd appriciate if you can continue using with your post
    http://forum.java.sun.com/thread.jspa?threadID=5208928
    Hope there are no hard issues on this.
    REGARDS,
    RaHuL

  • Problem in forwarding to a JSP file

    Here is my code. I'm not able to forward to another jsp when I click on the modify button. If I display anything using alert inside the modify function, it is displaying. But when I include the forward statement, the entire screen becomes blank. What could be the reason.
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,java.util.*,com.gh.db.*" errorPage="Error.jsp" %>
    <html>
    <head>
    <TITLE>Guest Houses of DOS</TITLE>
    </head>
    <%@ include file="StdValidations.js" %>
    <script Language="text/JavaScript">
    function ClearFields()
         document.UserAdmin.Ln.value = "";
         document.UserAdmin.Nm.value = "";
         document.UserAdmin.SecNm.value = "";
         document.UserAdmin.submit1.disabled=false;
         document.UserAdmin.submit2.disabled=false;
         document.UserAdmin.submit3.disabled=false;
         document.UserAdmin.submit4.disabled=true;
         document.UserAdmin.option1.value="";
         document.UserAdmin.option3.value="";
         document.UserAdmin.option2.value="";
    function EnterTo()
              document.UserAdmin.option1.value ="Add";
              document.UserAdmin.submit1.disabled=true;
              document.UserAdmin.submit2.disabled=true;
              document.UserAdmin.submit3.disabled=true;
              document.UserAdmin.submit4.disabled=false;
              document.UserAdmin.submit;
    function Save()
         alert(document.UserAdmin.option1.value);
         if ((document.UserAdmin.option1.value == "Add"))
    if ((document.UserAdmin.Ln.value != "") &&(document.UserAdmin.Nm.value != "") && (document.UserAdmin.SecNm.value != ""))
         document.UserAdmin.option3.value = "Save";
         return true;
    else
         alert("Input ALL Values");
         return false;
    function valid(form)
         if (document.UserAdmin.option3.value == "")
              this.disabled=true;
              return false;
    function Modify()
         <jsp:forward page="ModifyUser.jsp" />
    </script>
    <body>
    <form name="UserAdmin" method="post" action="UserAdmin.jsp" onSubmit="return valid(this);">
    <br><br><br>
    <center>
    <%
         String choice1="",choice3="";
         String Ln="",Nm="",SecNm="",Rl="";
         DBconnection pool = DBconnection.getInstance();
         Connection con = pool.getConnection();
         con.setAutoCommit(false);
         Statement st1 = con.createStatement();
         int NoofRows;
         choice1 = request.getParameter("option1");
         if (choice1 == null) choice1 = "";
         choice3 = request.getParameter("option3");
         if (choice3 == null) choice3 = "";
         if ((choice1.equals("Add")) && (choice3.equals("Save")))
         %>
              <script> alert("done");</script>
         <%
         Ln = request.getParameter("Ln");
         if (Ln == null) Ln = "";
         Nm = request.getParameter("Nm");
         if (Nm == null) Nm = "";
         SecNm = request.getParameter("SecNm");
         if (SecNm == null) SecNm = "";
         try
         st1.executeUpdate("insert into TableUser (LoginName,Name,SectionName,Password) values ('" + Ln + "', '" + Nm + "','" + SecNm + "','" + Ln + "')");
              choice1="";
              choice3="";
              con.commit();
         catch(Exception e)
         e.printStackTrace();
         %>
         <script> alert("Record Already Exists : <%= e %>"); </script>
         <%
         %>
         <script> ClearFields(); </script>
         <%
    %>
    <%      
         String LoginName= "";
         String Name= "";
         String SectionName= "";
         try
              LoginName = session.getAttribute("LoginName").toString();
              Name = session.getAttribute("Name").toString();
              SectionName = session.getAttribute("SectionName").toString();     
         catch(NullPointerException npe)
              %>
              <jsp:forward page="LoginHere.jsp" >
              <jsp:param name="SessionMode" value="Session Expired try again to log on" />
              </jsp:forward>
              <%
    %>
         <table width="80%" bgcolor="#F6F8C4">
              <tr >
              <td align="center">
                   <img src="Images/Title.gif">
                   <img src="Images/gh1.jpg" ></br>
              </td>
              </tr>
              </tr>
                        <tr>
                        <td>
                        </td>
                        <td align="right">
                             <font face="Times New Roman, Times, serif" size="+1">Logout</font>
                        </td>
              </tr>
         </table>
         <table width="80%" bgcolor="#B6C7E5">
         <tr >
         <td align="center">
              <font face="Comic Sans MS" color="6D3C1E" size="+1">User Addition</font>
         </td>
         </tr>
         </table>
         <table width="80%" bgcolor="#B6C7E5">
              <tr >
              <td >
              <font face="Times New Roman, Times, serif" size="+1">Name:  <%= Name %></font>
              </td>
              <td align="right">
                   <font face="Times New Roman, Times, serif" size="+1">SectionName:  <%= SectionName %></font>               
              </td>
              </tr>
         </table>
              <table width="80%" bgcolor="#B6C7E5">
              <tr>
              <td align="center">
              <INPUT name="img" type="Image" value="Assign Role" src="Images/Role.jpg">
              </td>
              <td>
              <table width="80%" bgcolor="#B6C7E5">
                   <tr>
                   <td width="60%" align="right">
                   <P >     Login Name :     <INPUT id=text1 name=Ln> </P >
                   <P >     User Name :     <INPUT id=text2 name=Nm> </P>
                   <P >     Section Name :    <INPUT id=text3 name=SecNm> </P>
                   <p>
                   <INPUT name="submit2" type="button" value="Modify" onclick="Modify();">
                   <INPUT name="submit1" type="button" value="Add" onclick="EnterTo();">                                                  
                   <INPUT name="submit3" type="button" value="Delete" onclick="Delete();"></p>
                   </td>
                   <td align="left">
                   <INPUT name="submit4" class="Button" type="submit" value="Save" disabled="true" onclick="Save();" ></br></br>
                   <INPUT name="reset1" type="reset" value="Clear" onClick="ClearFields()" > </br>
                   </td>
                   </tr>
                   </table>
              </td>
              </tr>
              </table>
              <table width="80%" bgcolor="#B6C7E5">
              <tr>
              <td align="center">
                   </br>
                   <img src="Images/Home.jpg">
              </td>
              </tr>
              </table>     
              <input type=hidden name= "option1"> <br>
              <input type=hidden name= "option3"> <br>
              <input type=hidden name= "option2"> <br>
              <% if (st1 != null) st1.close();
                   if (con != null)
                        con.rollback();
                        con.setAutoCommit(true);
                        pool.returnConnection(con);
              }     %>
    </table>
    </center>
    <input name="HomePage" type="hidden">
    </form>
    </body>
    </html>

    Hi snma,
    This is probably happening because you commited the response twice. Maybe you�ve used the ActionForward object, to forward the response and after forward it, you�ve tried to re-forward using the jsp tag.
    the HttpServletResponse has a isCommited() method that can check if the response was commited .

  • Refreshing Parent.jsp and forwarding to Child.jsp

    Hi
    I have a parent.jsp where I provide criteria to query and export the data to excel. If the resultset is null I forward to parent.jsp with error message, but if there is data I forward to child.jsp.
    If in the first attempt there is no data and display of error message in parent.jsp and in the subsequent second attempt I change the selection criteria and get the data report in excel format, but the error message displayed in parent.jsp for the earlier transaction remains the same i.e. parent.jsp should ideally refresh and then forward to child.jsp.
    Currently I am using the following code and controlling it with a script that is called on click of submit i.e. I set the text (error text) value to null. Is there a better way to achieve this? Kindly help
    <%if (error != null) {%>
    <table>
    <tr>
    <td>
    <input type="text" name="errorMsg"
    style=" color:red; font-size: 8pt; FONT-FAMILY: verdana, helvetica;font-style: TT; border:'0'; font-weight: Bold"
    value='<%= error %>'
    size="141" readonly="readonly"/>
    </td>
    </tr>
    </table>
    <%}%>

    Thanks a lot frndz.. for your reply.. but both ways I tried its not working ..Devendra I went thru the code given there in the link but it couldn,t work... I tried for window.opener.refresh(). In spite of refreshing the parent jsp and getting the pop up closed ,it displayed the the refreshed parent JSP in the pop up window. keeping parent JSP intact..
    Any other alternative can anyone advise... :)

  • Repeater does not forward data packets

    Hello all!
    I have following setup:
    A root access-point ap1, model AIR-AP1231G-E-K9 with IOS 12.3(8)JEE, is configured with one SSID on VLAN 1 (native) and working fine.
    Now I would like to add a 2nd access-point ap2 of the same model with the same IOS version as a repeater to extend the WLAN coverage of the overall network.
    I managed to configure the 2nd access-point successfully as repeater (same SSID settings, infrastructure ssid set, parent 1 mac-address set) and it associates successfully with the main root access-point.
    Now I observe following effect: As soon I leave the coverage area of the first AP and enter the area of the repeater, the client (iPhone, Laptop or any other WLAN device) associates successfully to the repeater (confirmed with "show dot11 ass" and due to the log entries of the repeater) but the data packets are not forwarded to the main access-point. There is no IP connectivity to the root AP or internet anymore.
    Another example which might lead to the solution is following observation:
    I have my laptop connected to the wireless network with two console sessions open. In one I run a ping to the first AP, ap1 (10.200.3.5) and in the other console I run a ping to the repeater ap2 (10.200.3.6). Both access-points reply.
    Now if I enter the coverage area of the repeater, my laptop gets associated to it and the ping to the first AP ap1 times out.
    Again, it looks like that the repeater denies to forward traffic to the main root AP.
    I have no clue why this happens, nor are there any log messages available which might explain this issue.
    I hope someone can help me finding the problem.
    The configuration of the working root access-point ap1 as the repeater ap2 is attached.
    Thank you!
    Best regards,
    Bernhard

    You  have configured sub-interface on radio interface & not in ethernet interface at Root AP end. change the config like below & see.
    dot11 ssid Internet Las 3 Marias
       vlan 1
       authentication open
       authentication key-management wpa
       guest-mode
       infrastructure-ssid
       wpa-psk ascii 7 xxxx
    interface Dot11Radio0
    no ip address
    no ip route-cache
    encryption vlan 1 mode ciphers aes-ccm tkip
    encryption mode ciphers aes-ccm tkip
    bridge-group 1
    ssid Internet Las 3 Marias
    speed basic-1.0 2.0 5.5 6.0 9.0 11.0 12.0 18.0 24.0 36.0 48.0 54.0
    channel 2412
    station-role root access-point
    world-mode dot11d country-code US both
    interface Dot11Radio0.1
    encapsulation dot1Q 1 native
    bridge-group 1
    Here is a reference post for a similar setup (vlan 110 is native vlan though)
    http://mrncciew.com/2013/01/20/autonomous-ap-repeater/
    Also suggest to configure WPA2/AES (instead of WPA/TKIP), if it is supporting in this AP model, command syntax is like below.
    dot11 ssid xx
    authentication key-management wpa version 2
    int d0
    encryption mode ciphers aes-ccm
    Let us know how it goes
    HTH
    Rasika
    **** Pls rate all useful responses ****

  • How to forward from a jsp  to another jsp on another server

    I am facing issue in forwarding to a jsp residing in another server. While using response.redirect(url), the response is send back to the browser and then redirected(which is not expected as it would create problem in production). i am facing issue while using the <jsp: forward> tag and forward() as they seem to be taking relative URL. Please help me with this issue.

    probably, you could use <c:redirect url=""/> tag to request to jsp on another server and pass ur parameters as 'GET' so that u can get all your respective params values. Other way (or crude) way is to do a scoket or HttpConnection to post your all datas via 'POST' and expect respective values on the server side.

  • Bigpond not forwarding all emails

    Hi, I currently have bigpond forward my emails to another non bigpond address, however not all emails get forwarded. For example and emails from facebook are not forwarded, they are in my webmail inbox, but go through to my other address. Other emails are forwarded with no issues ? My bigpond webmail is still on the old system (MyConnect ?) Any suggestions ? Thanks

    Have you considered setting your current provider to 'pull' all the email from your Bigpond box rather than relying on Bigpond to 'push' it out?
    Most providers have a relatively simple process for fetching mail from other boxes by either POP or IMAP.

  • Problem while uploading the file page is not forwarding

    Hi,
    Please tell me the solution for this.
    I'm uploading the file, i'm getting the values very thing, but the page is not forwarding what happening i don't no.
    Here is the code.
    <HTML>
    <%@ page language="java" import="javazoom.upload.*,java.util.*" %>
    <%@ page errorPage="ExceptionHandler.jsp" %>
    <HEAD>
    <BODY style="font:'Bookman Old Style' size="3"">
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
    </jsp:useBean>
    <%
    // Uploading file code
    if (MultipartFormDataRequest.isMultipartFormData(request))
    // Uses MultipartFormDataRequest to parse the HTTP request.
         MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
    String todo = null;
         if (mrequest != null) todo = mrequest.getParameter("todo");
         if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
                        Hashtable files = mrequest.getFiles();
         UploadFile file = (UploadFile) files.get("uploadfile");
              if ((file != null) && (file.getFileSize() <= 82000))
                        {System.out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
                    // Uses the bean now to store specified by jsp:setProperty at the top.
                        upBean.store(mrequest, "uploadfile");
                        else
                        System.out.println("Not Uploaded");
    if (mrequest != null)
         String Schoolname= mrequest.getParameter("schoolname");
         session.setAttribute("saSchoolname", Schoolname);
    System.out.println("Schoolname     "+Schoolname);
    %>
                        <jsp:forward page="FileTransfer.jsp"/>
    <%     
         else out.println("<BR> todo="+todo);
    //System.out.println(session.getAttribute("saswrite"));
    String amessage = request.getParameter("passmsg");
    %>
    <form name='subregiform' method="POST" onsubmit='return checkForm()' action ="FileSubmit2.jsp" ENCTYPE="multipart/form-data">
    <table width="491" border="0" cellpadding="2" >
    <tr>
    <td width="171" align="right"><br> S.S.C  :</td>
    <td width="103" align="center">Institution Name
         <input type="text" name="schoolname" size = 12 maxlength = 35 value = <%
              if(session.getAttribute("saSchoolname")!= null){%>
         <%=session.getAttribute("saSchoolname")%><%}%>>     </td>
    <tr><td width="165"><div align="right">Upload Resume :<br> <br> <br></div></td>
    <td width="356"><input type="file" name="uploadfile" size = 20>
    <font size=1><br>    <I>(Only .doc,.rtf,.txt,.html)</I></font><BR>
       <% if (amessage !=null){ %><FONT SIZE="" COLOR="RED"><strong><%= amessage %></strong></FONT><% }%> </td>
    </tr>
    <tr>
    <td colspan="2">
    <p align="center">
         <input type="hidden" name="todo" value="upload">
    <input type="submit" name="Submit" value="Submit">
         </p>
    </td>
    </tr>
    </table>
    </form>
    </BODY>
    </HTML>

    This code is a mess! Don't put your logic and control into your JSP; use the JSP only for display!
    As for your error, it's because you can't forward after the response has been committed. An illegal state exception will be thrown except you can't see it in the browser because the server has already committed the response and can't change it now. You need to get rid of the forward action. Put in a link to that page instead. Or use a a meta tag to redirect.
    But really, this code cannot be modified to get rid of the problem. It should be scrapped and you should rethink your design. Have a servlet do your control and all this uploading code should also be put into a servlet; never in a JSP
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    Edited by: nogoodatcoding on Oct 5, 2007 2:56 PM

  • Difference between jsp:forward sendRedirect and jsp include directive

    Am very much confused, please explain me the difference between
    jsp:forward sendRedirect and jsp include directive with a suitable example.
    I'll be very gratefull. Its very urgent.

    One basic difference. The include executes in the .jsp servelet created. The redirect transfers "control" by redirecting the client request to another destination. In other words, the current .jsp is no longer in charge or in the calling chain in any way.

  • Classroom in a Book Examples Do Not Work.

    I am working through the Dreamweaver CS4 Classroom in a Book, while working on a MacPro OS X 10.6.1 Snow Leopard.
    Many examples do not function as advertised. This is one example:
    On page 114, the user is asked to insert a Spry menu into the page. When this is done the properties panel should appear, in which the Text, Links, Titles and so on can be entered. On my system the properties panel does not appear as it should. Instead, the properties panel for HTML and CSS remains present. It is not possible to enter the attributes as intended in the lesson. I can enter them manually into the markup, but since this will not result in correctly generated script (it is generated Javascript) it is pointless to do this. The failure of the Dreamweaver GUI makes it impossible to proceed with the lesson.
    I tried to repair this situation be deleting the files and copying them anew from the CD ROM. then started again. The error was repeated.
    My file setup is slightly different from the default. I always make an extra directory for the HTML files, named html
        ~/username/Documents/DW CIB/html/
        ~/username/Documents/DW CIB/css/
        ~/username/Documents/DW CIB/images/
        ~/username/Documents/DW CIB/js/
        ~/username/Documents/DW CIB/SpryAssets/
          and so on.
    But this is not the problem, as the system is seeing this. For example, the links inserted to the pages are automatically correct:
       <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    Is there an issue here with Mac and Snow Leopard? Or are more people having these problems? Or am I missing something here?

    Benjamin Rossen wrote:
    I have a reason for using a different directory structure. I like to see all the .html files in alphabetic order, and not interrupted by the directories containing images, scripts and other resources. These directories are particularly disturbing if they are open.
    You have two options:
    Buy a Windows computer. Windows organizes files and folders that way by default.
    On your Mac, expand the Files panel so you can see the Type column header. Click Type, and the files will be reorganized the way you prefer.
    I put only the index.html in the site root, with a redirect on it to home.html in the lower directory, so that only one .html file is in the default root directory of the site. Now I know the Dreamweaver will not function correctly when I do this. 
    I think this is not good. I recommend that Adobe augment the system to operate correctly for any file structure built by the user.
    Dreamweaver does operate correctly for  any file structure, but it can't detect a redirect.

  • HT4994 I have an Iphone 4 and can not forward calls. every time I put the number in the call forward field it jumps back a page and the button moves to off. can anyone assist.

    I can not forward calls. I go to call forwarding, turn it on, copy and paste my phone number into the correct field (including the international dialling code).
    I then tap the Call Forwarding button, which takes me back one stage and the Call Forwarding button goes to off after a couple of seconds. Anyone who can help?

    Yes, a blocked call will go immediately to your voice mail.
    If you would rather not have that behavior, ask your cellular carrier if you can block that person through the carrier.

  • Purchase Requisition action have submit but not forward(is null)

    Dear all,
    Purchase Requisition action history have "submit" but not "forward"(it is null), and PR header status is "In Process", why? please help me, tks.
    Regards
    Edited by: user3392434 on 2012/2/15 下午 9:51

    user3392434 wrote:
    Dear all,
    Purchase Requisition action history have "submit" but not "forward"(it is null), and PR header status is "In Process", why? please help me, tks.
    Regards
    Edited by: user3392434 on 2012/2/15 下午 9:51which approval process are you using in your system??
    Thanks
    Mahendra

  • JS file not getting included in JSP

    I have a javascript file that I have included in my jsp file, but for some reason it does not get included.
    F1/Sort.js and F2/Sort.js are the same file with different color displays in them.
    Scenario :
    I have a file called Common.jsp, which includes the js file :
    if(F1)
    <script language="JavaScript" src="scripts/F1/Sort.js"></script>
    else
    <script language="JavaScript" src="scripts/F2/Sort.js"></script>
    The file Common.jsp is included in all other jsp files :
    <%@include file="Common.jsp"%>
    now, if F1=false, it includes F2/Sort.js, which works perfectly fine
    but, if F1=true, it includes F1/Sort.js, which is not working fine.
    Sort.js is needed in 3 jsp files, when F2/Sort.js is called, it works fine in all JSPs (S1.jsp,S2.jsp,S3.jsp), but, when F1/Sort.js is included, it works fine in S2.jsp, it displays 'parentNode null or not an object' error in S1.jsp, and does not work in S3.jsp.
    Any help is appreciated.
    TIA

    From your problem description;
    "... when F1/Sort.js is included, it works fine in S2.jsp, it displays 'parentNode null or not an object' error in S1.jsp, and does not work in S3.jsp."
    Maybe the case is that the file is getting included but it is not functioning due to some problem in the JS.
    Is the same "if-else" condition used in all 3 JSPs for including F1/Sort.js ?
    You can try putting an alert in both the JS files (outside a JS function) which will show if the file has been included or not.

  • How can I forward to a jsp under the WEB-INF directory?

    I have a webapp with a jsp that forwards to a jsp called /WEB-INF/pages/secure.jsp When I try to forward to it, I get the error:
    "trying to GET /mywebapp/WEB-INF/pages/secure.jsp, deny-existence reports: denying existence of /web/webapps/mywebapp/WEB-INF/pages/secure.jsp"
    How can I forward to this page?
    Thanks,
    Micah

    Craig - I'm trying to do something very similar - build a waiting page into the
    flow. I've got a support case open (to get the BEA recommended approach) but so
    far have had no luck. Let me know if you've found the answer - or are still struggling.
    Cheers,
    Niall
    [email protected] (Craig Coffin) wrote:
    I am trying to get a JSP in a portlet to forward to a Webflow URL,
    without much success...
    The following code produces the ubiquitous "Functionality temporarily
    unavailable" message, presumably because jsp:forward chokes on the
    absolute URL:
    <c:set var="url">
    <portlet:createWebflowURL event="next"/>
    </c:set>
    <%
    // convert to a scripting variable for the jsp:forward tag
    String url = (String) pageContext.getAttribute("url");
    %>
    <jsp:forward page="<%=url%>"/>
    Using c:redirect fares little better. This code produces an empty
    portlet:
    <c:set var="url">
    <portlet:createWebflowURL event="next"/>
    </c:set>
    <c:redirect url="${url}"/>
    The closest I've been able to get is to have the user click a link to
    get to the next page, but I'd like to have an automatic forward rather
    than introduce another mouse click:
    ">
    Click to continue...</A>
    Am I missing something obvious? Any help would be appreciated...
    Thanks,
    -- Craig

  • The ELResolvers for JSF were not registered with the JSP container

    I'm trying to configure mojarra on tomcat6 (because I want to use Elastic Beanstalk). tomcat complains:
    Feb 8, 2011 10:24:17 AM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
    INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
    I have tried all sorts of combinations of replacing EL2.2 libs in tomcat/lib, putting the libs in WEB-INF/lib, and the context param:
    <context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
    </context-param>
    JSF pages seem to work but I'd rather have a clean startup. Please assist. Thx in advance.

    Thx for replying.
    I have jstl-1.2.jar:
         <dependency>
                   <groupId>javax.servlet</groupId>
                   <artifactId>jstl</artifactId>
                   <version>1.2</version>
    <scope>provided</scope>
              </dependency>
    Which version numbers are you referring to in *.xml? The following?
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">

Maybe you are looking for

  • Error while uploading WSDL file in Interactive Form Data Connection!

    I have created we service to return some data based on user input. I am trying to link this webservice to Interactive adobe form! and While creating new data connection->uploading WSDL file--> I am receiving error i.e. Invalid File. Please help me in

  • T410 memory not showing up

    this is a new t410, came with 4 gb memory, but i added another 4 gb memory, yet when i see the properties, the RAM says 4 GB wiith 3.56 GB available. Can anyone tell me where do i check if all the memory is available or not? or is this a bug? Any qui

  • Mobil.aftonbladet.se results in XML Parsing Error: undefined entity

    On Nokia N900. Was OK before, but now (since friday 27 aug 2010) gives: XML Parsing Error: undefined entity Location: http://mobil.aftonbladet.se/ Line number 18, Column 366: ...

  • Can anything be done about the slowness??

    I really am trying to invest heavily in Intune as a tool, but loading the admin console in IE takes about 10 minutes. Can anything be done about this? I don't imagine it is a client side issue but figured worth an ask.

  • Button rollover state plays again after click

    Hello, I have made a portfolio in Flash 8 using Presentation Screens. The intro and all the navigation buttons are on the first parent screen. I have a rollover label animation on each button, which plays fine on the first rollover, but also plays ag