Jsp launch another JSP

JSP1 compiles and runs fine. This page contains
a list of data. A button needs to activate JSP2
which uses same 'bean' but display's detailed data
of a record. This second JSP2 doesn't compile. I
removed all 'java' instructions which call methods from
the bean I don't need. However, this page can't be
compiled.
JSP1 launches JSP2 as follows:
<FORM action=/jsp/JSP2.jsp method=POST target="_parent">
<buton><input type="SUBMIT" value="View" name="action"></button>
</form>
JSP2 contains same initializationinfo as JSP1:
<jsp:useBean id="FreightQuotation" class="com.clipper.beans.FreightQuotationBean" scope="session"></jsp:useBean>
however processing is different (another method called):
<% FreightQuotation.getQuotation("action", 1); %>
where getQuoation is a valid method.
I even tried to exit the method withoud doing
anything without success.
I can access same bean from a 2nd JSP no ????
How can I checkout why compilation failes ?
ERROR :
Error 500
An error has occured while processing request:http://WebServer/jsp/JSP2.jsp
Message: Server caught unhandled exception from servlet [jsp10]: Compilation failed
Target Servlet: jsp10
StackTrace:
Root Error-1: Compilation failed
com.sun.jsp.JspException: Compilation failed
java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:94)
com/sun/jsp/JspException.<init>(Ljava/lang/String;)V+1 (JspException.java:29)
com/sun/jsp/compiler/Main.compile(Ljava/lang/ClassLoader;Ljavax/servlet/ServletContext;Ljava/lang/String;Lcom/sun/jsp/compiler/Main$ClassFileData;Ljava/lang/String;ZZLjava/lang/String;)V+503 (Main.java:472)
com/sun/jsp/runtime/JspLoader.compile(Ljava/lang/String;Lcom/sun/jsp/compiler/Main$ClassFileData;Ljava/lang/String;ZLjava/lang/String;)V+44 (JspLoader.java:188)
com/sun/jsp/runtime/JspLoader.loadJSP(Ljava/lang/String;ZLjava/lang/String;)Z+215 (JspLoader.java:368)

sorry, problem found.
left a reference to a field which doesn't exists anymore.

Similar Messages

  • Passing html object in a JSP to another JSP

    Below, I have a jsp page I want to pass the object name "BP" and all its values to a jsp in another jsp page. I can't use the session object can I? The html the jsp creates is within a form.
    I know the request.getParameter("BP") doesn't work because it must be a string.
    out.println("<form name=myform action='RevUpdate.jsp' method=post>");
    out.println("<PRE><Center><TABLE border = '5'>");
    for (int i=0; i < vBP.size(); i++)
    out.println("<TR><TD><font size='4'>" + ((Fetch_BP_RevLetter)vBP.elementAt(i)).getBP() + "</font></TD><TD><font size='4'><input type='text' size='3' maxlength='2' name='BP' value='" + ((Fetch_BP_RevLetter)vBP.elementAt(i)).getItemRev() + "'/></font></TD></TR>");
    out.println("</Center></Table>");
    out.println("<input type='submit' value='Save'><INPUT TYPE='Button' VALUE='Back' onClick='history.go(-1)'>");
    out.println("</Center>");
    out.println("</form>"); //END OF myform
    HttpSession sessionid = request.getSession(false);
    sessionid.invalidate();

    request.setAttribute()

  • Can I have a JSP  inside another JSP??

    if so,
    say, I have a JSP inside another JSP then,
    how many servlets r generated by the JSP engine??

    Yes U can have JSP inside another JSP, ofcourse using jsp:include and in that case two servlets will be generated. Thats what i feel that happens.

  • How can I get the value for static content of 1 jsp into another jsp

    Hi, I have a jsp which have a header ,now i want this header value in another jsp dynamically.Can u tell me how I can do it?

    What I want to know is that , is it possible to get the value of a static content of one jsp into another jsp,something like getParameter() method that we use to get the value of a field in the jsp to a servlet,or to another jsp,the only difference here is I do not have a field here but a static jsp content .

  • How to carry an object from one JSP to another JSP?

    How can I carry an object from one JSP to another JSP?
    I have a servlet where I am setting an object in request as an attribute and then forwarding to PageA.jsp.
    MyDTO myDTO = new MyDTO();
    request.setAttribute("MyDTO", myDTO);
    RequestDispatcher rd = getServletContext().getRequestDispatcher("/PageA.jsp");
    rd.forward(request, response);
    I can get MyDTO object in PageA.jsp:
    MyDTO myDTO = (MyDTO) request.getAttribute("MyDTO");
    Now PageA.jsp has a form named form_pageA which submits to PageB.jsp. How can I make sure that myDTO object is available in PageB.jsp? I would like to not store it in session.
    Edited by: srhcan on May 4, 2012 7:52 PM

    srhcan wrote:
    but its not a text I want to store; instead its a JavaBean object. Thats why I cannot use a hidden text type input field.No, but perhaps you could stick something in there which you can use to reconstruct your DTO object on the next request?

  • How can i get the values from one JSP to another JSP

    Hi All,
    I am very new to JSP technology, I have one jsp having radio button, i want to accecc the state of this radio button to another JSP page, How can i do this.
    Could anybody help me.
    with Regards
    Suresh

    Try page import <%@ page import ="index.jsp" %> or include <%@include file="index.jsp" %> methods perhaps they might work.

  • How to call jsp from another jsp

    Hi, All,
    I have several jsp files in my pagelet. I need to put a link in one jsp file. When client click the link, it will show another jsp file. Could anybody tell me how to do that?  i have tried to use following code in page1.jsp,
    IPortalComponentURI componentURI= componentRequest.createPortalComponentURI();
    componentURI.setContextName("pagelet/page2.jsp");
    String docuri = componentURI.toString();
    <body>
    click  '<a href="<%=docuri %> ">here</a>' to link to pages.
    But it does not work. Any help will be great appreciated.
    Marea
    Message was edited by:
            Marea Yang
    Message was edited by:
            Marea Yang

    HI Yang,
    You can achieve it through eventhandliling in jspdynpage.
    Go through this link ,
    i.<a href="http://help.sap.com/saphelp_nw70/helpdata/en/2e/d2a441cd47a209e10000000a155106/content.htm">eventhandling</a>.
    ii.<a href="https://forums.sdn.sap.com/thread.jspa?threadID=103335">method to call jsp</a>.
    iii.<a href="https://forums.sdn.sap.com/thread.jspa?threadID=393522">calling  resource JSP in Portal Compoent</a>
    Hope It'll help you.
    Regards ,
    Malini.V

  • How to use session to passing data from one JSP to another JSP

    Dear All, I had create 2 jsp web page and want to do this:
    1. input some data into the text box and click the submit button, the jsp page
    will open another jsp page and send the text box data to the new open jsp page.
    can any one tell me how to open a new jsp web page and reciev data from another jsp page?
    thanks yu very much!
    the question.jsp got some code like:
    <html>
    <input type= 'text' name = 'txtName' size = 10 >
    <input type= 'submit' name = 'submit'>
    <% some jsp code %>
    </html>
    answer.jsp
    <html>
    <%
    some jsp code here
    %>
    </html>

    Contents of HTML forms are transmitted as name-value pairs, so you can call request.getParameter(String name) with your form field's name in order to access its value:
    String textValue=request.getParameter("txtName");Regards

  • Is it possible to pass selected value from one jsp to another jsp page?

    In my welcome page(in jsp), if the user is selecting some values, is it possible to pass those values to another jsp page and display?
    If yes, how can it be done?
    please help..

    Yes, you would have to make the motion from one page to the next submit a form. Then on the second JSP you can use request.getParameter("nameOfInputField") to get the value the user selected.

  • How to pass information from one JSP to another JSP? help please

    hi there
    my question is how to pass some information such from one JSP to another one. for exmple, on one page there is a form, and i need to pass some values from the form to another jsp, or some values that were calculated on one JSP and need to be passed to another one. thanks

    You can do this in several ways...here is a simple one...
    When you call the second page url, use this
    http://www.mysite.com?myVariableFromPageOne="hello"
    on the second page use this:
    String firstPageVariable = request.getParameter("myVariableFromPageOne");
    Thanks

  • Include a JSP inside another JSP

    Hi SDN,
    I am stuck with a problem. There is a JSP file available. In this JSP I have to add some more fields. But when I try to ad new fields I am getting a Portal Runtime Error stating that "Code Too Large". So now I thought of putting the new code in another JSP and include that JSP inside my main JSP. Here I cannot use <@include file="..."> because this finally compiles both the JSPs as one.
    So I tried to use <JSP:include>. Some one please help me with how to include a JSP inside another using <JSP:include>. Here both the JSPs are having HBJ content inside.
    I know that <jsp:include page="relPathOfChild.jsp"/> will include the child.jsp into my main jsp. Problem is both the JSPs are having HBJ content, so If I dont declare <hbj:content> tag inside the child jsp, it is throwing an error. But If I declare a <hbj:content> tag inside my child jsp, only child content is coming and main jsp content is not coming.
    Please help me..
    Regards,
    SrinivaS

    Hi,
    This Problem is solved. Now I am able to include a child JSP inside the parent JSP. But now the problem is,
    This Parent JSP will have 8 tabs. Now my chils JSP should come inside 7th tab.  but it is coming above the parent JSP.
    Below is how I am including my child JSP.
    <% try{ if(isCAR){
         %>
                   <tr>
    <jsp:include page="/pagelet/CAREligibility.txt" />
                   </tr>
                <%} } catch(Exception e) {}%>
    Please help.
    Regards,
    SrinivaS

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

  • Invoking a JSP from another JSP

    I have two JSP and both are calling different servlets. How can I call JSP B from JSP A (perhaps using a button). and how can I pass one field value from JSP B to JSP A when JSP B closes or terminate.

    Here is what I'm doing that invokes the second JSP - B
    <SCRIPT>
    function JumpToURL(url) {
              if (url != '') {
              window.location = url;
    </SCRIPT>
    <TD><INPUT type="button" name="configBtn" value="Configuration" onclick="JumpToURL('options.jsp');"><a href="/WebAppName/jsp/options.jsp"></a></TD>
    The one problem that I'm facing right now is this:
    When I start the app or JSP A (JSP that contains the code above), if the FIRST thing that I do is to click on the button above, the app call the second JSP - B, with no problem. But if start the app and click on something else that goes out to the servlet (of JSP A) and then, click on the button above I get the message: "THe pahe cannot be found" or HTTP 404 - File not found Internet Explorer.
    Can you help on this please.........Thanks..

  • Can't include a jsp in another jsp?

    I am useing Jbuilder7.0+wls7.0
              I got the Exception:
              "index.jsp": weblogic.utils.ParsingException: nested
              TokenStreamException: antlr.TokenStreamException: Could not include
              conn/conn.jsp
              

              Include Jsp with the <jsp:include/> tag.
              <jsp:include page="relativeURL" />
              Simon Evans <[email protected]> wrote:
              >are you using
              >
              ><%@ include file="myinclude.inc" %>
              >
              >the include file will be referenced from the same directory as the jsp
              >page.
              >
              >
              >itsenser wrote:
              >> I am useing Jbuilder7.0+wls7.0
              >> I got the Exception:
              >> "index.jsp": weblogic.utils.ParsingException: nested
              >> TokenStreamException: antlr.TokenStreamException: Could not include
              >> conn/conn.jsp
              >>
              >
              

  • Submit data from a jsp to another jsp in other window

    Hi all,
    In my project I call a popup jsp where I do a browse of a database. The selected data must be showed in the first jsp. I can't do this with a href because the popup window must be closed. Is there a solution for this problem?
    Jef

    I have on my main page:
    window.name= "main"; (in javascript)
    <input type="text" name="txtPicUrl" value="" size="50"> (in body)
    And the next on the popup page:
    <form name="frmImage" target="main">
    <input type="text" name="txtPath" size="125"/>
    </form>
    why does this not work. I find this solution in another forum and it should work. Did I forget something.
    Thanks
    Jef

Maybe you are looking for