PageContext.forward vulnerability?

Hi everybody,
I've a problem in using the pageContext.forward() function with parameters.
Suppose to have such source code in a jsp page:
<%
String ATTACH = "../../WEB-INF/classes/myclass.class";
if (true) {
     pageContext.forward("/example.jsp?ID=" + ATTACH);
     return;
%>Changing the page example.jsp with any other existing page and the parameter ID with any other parameter
name the result doesn't change: the server (in my configuration Tomcat 5.5.9) sends the client the byte-code
of myclass.class! In fact the page example.jsp is never called! Is this correct?
Thanks,
Loris

Tomcat Security Team recognized this issue as an important vulnerability that affects Tomcat 4.x, 5.x, 6.x.
Here are the references:
http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-2370
http://tomcat.apache.org/security-6.html
Information disclosure - CVE-2008-2370
When using a RequestDispatcher the target path was normalised before the query string was removed. A request that included a specially crafted request parameter could be used to access content that would otherwise be protected by a security constraint or by locating it in under the WEB-INF directory.
Thanks,
Loris

Similar Messages

  • Strange pageContext.forward Error

    Hello,
    We're migrating from Weblogic 10 to 11g1 using MyFaces 1.2.
    And have encountered with one JSF page with pageContext.forward problem.
    java.lang.IllegalStateException
         at org.apache.myfaces.application.jsp.ViewResponseWrapper.getWriter(ViewResponseWrapper.java:140)
         at javax.faces.webapp._ErrorPageWriter.handleThrowable(_ErrorPageWriter.java:492)
         at javax.faces.webapp._ErrorPageWriter.handleException(_ErrorPageWriter.java:479)
         at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:294)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:192)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:160)
         at jsp_servlet.__query._jspService(__query.java:180)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:287)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:351)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at com.cht.morder.web.sessionFilter.doFilter(sessionFilter.java:396)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    The problem looks like MYFACES-1955
    https://issues.apache.org/jira/browse/MYFACES-1955
    But when I change the line from pageContext.forward to response.sendRedirect, it works.
    Anyone has also got this problem?
    Is it the problem of Weblogic like the discussion in MYFACES-1955?
    Thank you for your help.
    Edited by: user12024433 on 2011/11/21 下午 7:33

    Howdy,
    You've already written to you JSP output, and in this situation you can't forward 'cause it's automatically flushed.
    try changing your forward method position, befor any out.print() or like that.
    OR use this trick,
    <%@ page autoFlush="false" %>
    // Write to JSP and other stuffs...
    // Forward to another content...
    // Do your stuffs...
    response.flushBuffer();

  • PageContext.forward causes strange exception

    Hi,
    I've found a strange exception using pageContext.forward.
    The code is as follows:
    try {
    } catch (Exception e) {
    out.println (...); //for debugging purposes
    pageContext.forward (errorPage);
    pageContext.forward throws an "IllegalStateException: Attempt to clear a buffer that's already been flushed". (I think that this is the right translation, the original is in Spanish).
    I think that there is a very similar problem described in this forum:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=343314
    Has anyone found a similar problem (with its solution, if possible ;=)
    Thanx

    Howdy,
    You've already written to you JSP output, and in this situation you can't forward 'cause it's automatically flushed.
    try changing your forward method position, befor any out.print() or like that.
    OR use this trick,
    <%@ page autoFlush="false" %>
    // Write to JSP and other stuffs...
    // Forward to another content...
    // Do your stuffs...
    response.flushBuffer();

  • JSP page and the pageContext.forward() method

    I am running JSP pages on a coldfusion site so that a CF page (i.e. login.cfm) hosts my login.jsp page. I want to reload the JSP page without having to reload the cfm page each time. pageContext.forward() does do this, however, it only forwards on to a new page. I want to be able to reload a page with the new URL parameters (e.g. when there is an error, login.jsp will reload and give the user an error). What is a method to reload the page with the proper URL variables?
    The following code does not work:
    pageContext.forward("login.jsp?operation=user_edit&jsessionid=" + f_URLEncode(session.getId()));
    Because it runs from the login.jsp page (the forward command only goes to a new page)

    Just to clarify...
    I log into your site. The first page shown is the CF page. The CF page automatically redirects me to the JSP page. Then what, exactly?
    Does the login page automatically determine my URL, attempt to validate it, and if it doesn't work, it reloads the page?
    The reason I ask is because there is a difference between the resulting HTML page and the JSP class file that generates that HTML page. Generally speaking, most web servers, particularly Tomcat, do not recompile the JSP class file, they just simply pass the parameters to the existing class file, and a new HTML page is generated.
    So technically speaking, every time you visit the login.jsp page, you will get a brand new HTML page. The contents of that page are the same because you presumably pass the same parameters to the class which hasn't changed. But in other words, no, you can't forward to an "old" page that was previously generated by the class - each time the web server calls that class, it creates a "new" page.
    Or are you saying that every time you attempt to forward to the login.jsp page, the system erronously calls the CF page instead?

  • PageContext.forward("NewPage.jsp") appends previous page's data

    Hi!
              When I try to use the above mentioned forward, I get to NewPage.jsp, but
              all of the data from OldPage.jsp is appended to the bottom of the
              NewPage. I have tried using requestDispatcher.forward() as well with the
              same results. How should I do this?
              Weblogic 5.1 with SP 6 on Solaris.
              thanks
              Colleen
              

    OOPS and I forgot to mention that this is in a custom tag, not just on the
              jsp page.
              Colleen Wtorek wrote:
              > Hi!
              >
              > When I try to use the above mentioned forward, I get to NewPage.jsp, but
              > all of the data from OldPage.jsp is appended to the bottom of the
              > NewPage. I have tried using requestDispatcher.forward() as well with the
              > same results. How should I do this?
              >
              > Weblogic 5.1 with SP 6 on Solaris.
              >
              > thanks
              > Colleen
              

  • How to make browser aware of new URL after JSP:forward

    When I use JSP:forward (or pageContext.forward() for that matter) to forward from a.jsp to b.jsp, the browser still seems to think he's at a.jsp. Assumably because the request for the new URL didn't originate with the browser. This causes problems when I try to use relative URL's in b.jsp (the forwarded URL) since the client kindly tries to resolve them for me using the wrong base URL.
    For example:
    I log in at <mysite>/Security/login.jsp.
    Here, I do some login magic and then forward to /Accounts/index.jsp.
    The state of the browser is now:
    a) the URL is <mysite>/Security/login.jsp
    b) the page displayed is <mysite>/Accounts/index.jsp
    Is there a better mechanism I can use to keep browser URL and displayed page synched up?
    BTW, in this simplified example I could use JavaScript history.go(-1) to let the browser do the forwarding itself. This won't work in my actual scenario because I actually forward to a page stored in the session several requests back.
    Any help would be very much appreciated!
    Andy

    Assumably because the request for the new URL didn't originate with >the browserThis is correct.
    One way for the browser to show the URL is by using a sendRedirect() after doing all the necessary processing. But you will loose all request attributes during a sendRedirect(). To overcome this, after you have done all processing and are ready to process the accounts jsp, you can put the required info in the session. The accounts jsp can get the info from the session instead of from the request, and then reset these in the session to prevent further use.

  • Problem forwarding error message

    Please advise how I can get the error message to show up on the feedback.jsp page.
    My action page here:
    <%
    String email = request.getParameter("txtEmail");
    if (email == null || email.equals("")) {
    String msg = "Please enter an email address";
    session.setAttribute("ERRORMSG",msg);
    pageContext.forward("feedback.jsp");
    %>The feedback.jsp page gives me error saying problem with msg variable.
    Here is what I have on feedback.jsp:
    <html>
    <body>
    <%
    String myText = session.getAttribute("msg");
    out.println(myText);
    </body>
    </html>
    %>

    You are using different names for the attribute in your get/set calls.
    // if you set the variable like this
    session.setAttribute("ERRORMSG",msg);
    // retrieve it like this
    String myText = (String)session.getAttribute("ERRORMSG"); Cheers,
    evnafets

  • Passing String Parameters using forward tag

    Hi...
    Can anyone please tell me how to pass string parameters using the forward tag, and how to access it?
    And while we're at it, can one pass a String variable using <forward> ?
    Thanks... :-)

    PS...
    Does anyone know what this error is:
    NullPointerException at PageContext.forward(...) Thanks again...

  • Forwarding to a servlet in GNUJSP

    I posted this message in the GNUJSP mailing list, but got tired of receiving virus-infected messages rather than responses. Here goes:
    I have a simple JSP startup page (index.jsp) that forwards to a servet:
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@ page session="true" %>
    <%
       pageContext.forward("/js.cimba/ForumsServlet?command=main");
    %>where "js.cimba" is the servlet zone provided by my hosting service. This code fine when run under the JDeveloper environment, but it looks like GNUJSP is actually trying to COMPILE it rather than passing it on to JServ when I run it on my local server. Is this not supported in GNUJSP 1.0.1, or do I have something misconfigured?
    I am using Apache 1.3, JServ 1.1.2, JSSI 1.1.2, and GNUJSP 1.0.1 on a Windows XP Professional box.
    Here's my error message log:
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: service started
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: PathInfo    =
    '/forums/index.jsp'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: RequestURI  =
    '/forums/index.jsp'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: ServletPath =
    '/js.cimba/gnujsp'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPageForURI: uri=/forums/index.jsp
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPageForURI: key=/forums/index.jsp
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: Depends on
    file:/c:\documents and settings\robert\application data\web
    site\www\forums\index.jsp
    [07/05/2002 18:48:21 EDT] gnujsp/jsp__forums__index_2ejsp: init
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: compileTime was
    1024363318000
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: file:/c:\documents
    and settings\robert\application data\web site\www\forums\index.jsp timestamp
    1024363318000
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPageForURI: uri=/forums/ForumsServlet
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPageForURI: key=/forums/ForumsServlet
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResourceImpl:
    pathdebug.path       : '/forums/ForumsServlet'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResourceImpl:
    pathDebug.includePath: null
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.jsdk20
    : yes
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.pagebase
    : null
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getRealPath: null
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPathTran: '/c:/documents and settings/robert/application
    data/web site/www/forums/ForumsServlet'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.getReqURI
    : '/forums/ForumsServlet'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getPathInfo: '/forums/ForumsServlet'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:
    pathdebug.getServPath: '/js.cimba/gnujsp'
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResIm: return
    file:/c:/documents and settings/robert/application data/web
    site/www/forums/ForumsServlet
    [07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: Parsing
    file:/c:/documents and settings/robert/application data/web
    site/www/forums/ForumsServlet
    [07/05/2002 18:48:21 EDT] gnujsp/java.lang.ClassFormatError: Wrong name
         at java.lang.ClassLoader.defineClass(ClassLoader.java:219)
         at
    org.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:
    465)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:154)
         at
    org.apache.jserv.JServServletManager.load_init(JServServletManager.java:536)
         at
    org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:49
    8)
         at org.apache.jserv.JServContext.getServlet(JServContext.java:166)
         at
    org.gjt.jsp.jsdk20.RequestDispatcherImpl.doServletInclude(RequestDispatcherI
    mpl.java:255)
         at
    org.gjt.jsp.jsdk20.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:
    143)
         at org.gjt.jsp.PageContextImpl.forward(PageContextImpl.java:364)
         at jsp__forums__index_2ejsp._jspService(jsp__forums__index_2ejsp.java:51)
         at org.gjt.jsp.HttpJspPageImpl.service(HttpJspPageImpl.java:75)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:991)
         at org.gjt.jsp.JspServlet.xservice(JspServlet.java:608)
         at org.gjt.jsp.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at
    org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
         at java.lang.Thread.run(Thread.java:466)Thanks,
    Bob

    I figured out what the problem was, and unfortunately, your suggestion was not the same. The problem turned out to be that I was not using the fully-qualified name of the servlet. It should have been
    "/js.cimba/com.cimba.forums.ForumsServlet?command=main"
    which solved the problem of not trying to "compile" the servlet.
    Thanks,
    Bob

  • Forward a page back a folder?

    i want to forward the jsp page like...
    pageContext.forward( "update.jsp" );
    but the update.jsp is in one folder back
    as in its in the main webapp folder and the other page im in calling this update.jsp page is in a folder called Updates/

    You can use either page reletive path or context relative paths to specify the forward.
    For example if your project's directory strucutre is like this
    /rootfolder/somefolder/update.jsp
    /rootfolder/somefolder/thirdfolder/somefile.jsp
    if you want to forward somefile.jsp to update.jsp you can do this inside somefile.jsp:
    <jsp:forward page="/rootfolder/somefolder/update.jsp" />
    <%-- Here the URL is relative to the context / , hence it is known as context relative URL --%>
    <jsp:forward page="../somefolder/update.jsp" />
    <%-- Here the URL is relative to the page somefile.jsp , hence it is known as page relative URL --%>

  • Forwarding 404 not found errors to a jsp...

    Hi,
    We are now using the below line in our obj.conf:
    Error code="404" fn="set-variable" set-srvhdrs="Location: http://aaa.bbb.ccc.com/handleerror.jsp" error="302" stop="true"
    This REDIRECTS the error request to handleerror.jsp.
    What we need is FORWARDING the request to that jsp, ie the forwarding process shall be handled in server itself, not redirecting via users browser.
    In jsp we use pageContext.forward() to achive this.
    Can we use this technique to forward 404 errors to a specific jsp?

    thanks for your anwser it works for IE now,
    To make redirection I tried to use filters in web.xml but in spite of the reference to "http://java.sun.com/dtd/web-app_2_3.dtd" or "file:%%%ROOT%%%/bin/https/dtds/web-app_2_3.dtd" when I restart the server it gives a parser error for xml
    ContextConfig[] WEB3524: Parse error in application web.xml >>org.xml.sax.SAXParseException: Element type "filter" must be declared. at >>org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1183) as if it does not care my reference dtd?
    thanks...

  • Forwarding/redirecting

    We experienced some problems using PageContext.forward(String). For some
              reason it appends the forwarding page to the next one. We half-solved
              the problem by using:
              (HttpServletResponse)pageContext.getAttribute(PageContext.RESPONSE)).sendRedirect(String)
              This works, but the log shows IOExceptions.
              Anyone experienced similar problems?
              Thanks,
              Guy
              

    I don't know to what extent my answer helps but I will a shot. Whenever you want
              to forward stuff you better have a bigger size buffer. If the buffer becomes
              full the jsp engine will flush the contents there by it is illegal to forward
              request since you output is already flushed.
              Let me know if this doesn't answer your questions in which case could you
              explain what you are trying to do and what is happening.
              Thanks,
              Prasad
              Guy Tal wrote:
              > Still doesn't work properly. I also found that the clearBuffer() method
              > that appears on the spec is not implemented (add that to the growing list of
              > JSP pitfalls we tripped on so far).
              > I'm going to post a question about autoflush in a separate thread. Maybe
              > that's the reason for the IOExceptions we're seeing.
              >
              > I appreciate your help!
              >
              > Thanks,
              > Guy
              >
              > Murali Krishna Devarakonda <[email protected]> wrote:
              > > You need to clear your buffer before forwarding.
              > > Here's the generated code for 'jsp:forward' from my jsp.
              > > (ignore the file: stuff- it's the stupid outlook express assuming "//"
              > > should be preceded by either http: or file: :~)
              >
              > > if (true) { file://forwarding request file://[Line: 196]
              > > out.clear(); // clear current output buffer
              > > file://[Line: 196]
              > > String __forwardPage = "myaccount_projects.jsp";
              > > file://[Line: 196]
              > > pageContext.forward(__forwardPage); file://[Line: 196]
              > > return; file://[Line: 196]
              > > } file://[Line: 196]
              >
              > > Regards,
              > > Murali Krishna Devarakonda
              

  • Using jsp:param

    hi,
    i am new to java and jsp programming and i am trying to use jsp:param nested in my
    jsp:forward statement.
    if i specify a value in jsp:param my page would display properly. however when i passed a variable in my jsp:param i get the error:
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\star\jsp\Meeting_CreateMinutes_jsp.java:135: cannot resolve symbol
    symbol : method encode (long)
    location: class java.net.URLEncoder
    pageContext.forward("Meeting_ActionItems.jsp" + "?" + "docno=" + java.net.URLEncoder.encode( carno ) + "&" + "formmode=" + "Add");
    ^
    1 error
    this is the snippet in my jsp page that (i suspect) caused the error:
    <% long carno = newcar.getDocno(); %>
    <jsp:forward page="Meeting_ActionItems.jsp">
    <jsp:param name="docno" value="<%= carno %>"/>
         <jsp:param name="formmode" value="Add"/>
    </jsp:forward>
    my question is : does jsp:param do not accept variables as values?
    thanks in advance.
    best regards,
    noynoy

    <% long carno = newcar.getDocno(); %>Change this part as
    <% String carno = ""+newcar.getDocno(); %>
    Hafizur Rahman
    SCJPhi Hafizur,
    Thanks a lot. It solved my problem on the jsp:param error
    More power!!!
    rgds,
    noynoy

  • Again a Error 500--Internal Server Error

              Hi folks,
              I hope someone can help out. I get a error 500 and the already documented "java.lang.VerifyError:
              (class: jsp_servlet/_cda/_RedArticleDetailFB, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
              Incompatible object argument for function call
              error while generating a servlet from the following JSP. Maybe I'm to blind or
              the platform is corrupt (WebLogic 5.1, Solaris 2.x, JDK 1.3). Can anyone have
              look at the code and make a suggestion.
              <%--
              $Id$
              --%><%@page import="java.sql.*" contentType="text/html; charset=UTF-8"
              %><jsp:useBean id="articleDetail" scope="request" class="ce.beans.ArticleDetail"
              /><jsp:setProperty name="articleDetail" property="*"
              /><jsp:useBean id="dbcon" scope="request" class="client.beans.DBConnection"
              /><jsp:useBean id="publish" scope="request" class="ce.beans.LayoutTemplate" /><%
              Connection con = null;
              * Load the right articleDetail bean if an existing is to be updated
              if ((!request.getParameter("articleDetailId").equals("0")) && (request.getParameter("articleDetail")
              != null)) {
                   try {
                        con = dbcon.getConnection("content");
                        // Load an articleDetail content bean if an update is on progress
                        articleDetail.setId(Long.parseLong(request.getParameter("articleDetailId")));
                        articleDetail.load(con);
                        articleDetail.setArticleId(Long.parseLong(request.getParameter("articleId")));
                   } catch (Exception e) {
                        request.setAttribute("errorMsg","Fehler beim Identifizieren des Konfigurationsbeans:
              "+e.getMessage());
                   } finally {
                   if (con != null) {
                   dbcon.freeConnection("content",con);
              } // if articleDetailId
              * Save the ArticleDetail bean to the database, if requested by "mode" parameter.
              if ((request.getParameter("mode") != null) && (request.getParameter("mode").equals("save")))
                   try {
                        con = dbcon.getConnection("content");
                        // throws exception while saving without a configured article
                        articleDetail.store(con);
                        // Call the SP to update the content_id in TM01_NAVIGATION_CONTENT
                        publish.updateConfFBContentId(con,Long.parseLong(request.getParameter("lid")),articleDetail.getId());
                   } catch (Exception e) {
                        request.setAttribute("errorMsg","Fehler beim Schreiben in die DB, wenden Sie
              sich an den Administrator: "+e.getMessage());
                   } finally {
                   if (con != null) {
                   dbcon.freeConnection("content",con);
              } // if mode
              * Return to the page, defined in the "returnTo" parameter
              if (request.getParameter("returnTo") != null) {
                   request.setAttribute("articleDetail",articleDetail);
                   request.setAttribute("lid",request.getParameter("lid"));
              pageContext.forward(request.getParameter("returnTo"));
                   return;
              } else {
              out.println("Done with save.");
              %><%--
                   $Log$
              --%>
              

    Hunk09 wrote:
    Hi all
    I am using Apex 4.1.1 , linux 11g r2
    Classic report
    I have a query basic select from where typo with *36-38* unions in thast query
    Apex wont let me save the query would report
    500 Internal Server Error
    System Unavailable. Please try again later.Is there a limit for Maximum length of query string.
    when a remove few unions just use 32 union then it work like charm.
    pls throw some light on this.
    thanksYes, first option is to create view. If it's not possible (you want to use apex session state in aueryetc.) then change report type as "PL/SQL function returning SQL" and create function in DB.
    Regards,
    Hari

  • Help on generating token for opendoc url in XI3.1

    Hi Guys,
    I am trying to get some help in generating token for opendoc url to avoid login while trying to access a report in Infoview.
    From a previous post I got this code:
    <%@ page import="com.crystaldecisions.sdk.framework.*" %>
    <%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
    <%@ page import="com.crystaldecisions.sdk.occa.security.*" %>
    <%
    boolean loginSuccessful = false;
    IEnterpriseSession boEnterpriseSession = null;
    String username = "Administrator";
    String password = "pwd";
    String cmsname = "CMS";
    String authenticationType = "secEnterprise";
    try {
    //Log in.
    boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
    if (boEnterpriseSession == null) {
    out.print("Unable to login.");
    } else {
    loginSuccessful = true;
    } catch (SDKException sdkEx) {
    out.print("ERROR ENCOUNTERED
    " + sdkEx + "");
    if (loginSuccessful) {
    ILogonTokenMgr boLogonTokenMgr = boEnterpriseSession.getLogonTokenMgr();
    String logonToken = boLogonTokenMgr.createLogonToken("", 60, 1);
    String infoViewURL = null;
    String tokenParam = null;
    String redirectURL = null;
    infoViewURL = "http://server:8080/InfoViewApp/logon.jsp";
    tokenParam = "ivsLogonToken=" + logonToken;
    redirectURL = infoViewURL + "&" + tokenParam;
    response.sendRedirect(redirectURL);
    %>
    The problem is I don't know where to put this code in the opendoc.jsp file.
    I tried to create a custom OpenDoc.jsp with a above code, leaving the original opendoc.jsp as it is. And used this custom jsp file in the opendoc url. This is taking me to Infoview login page and I see taht a token is created at the end of the url but it is not passed.
    Can somebody help me to understand where exactly to put this code in the opendoc.jsp and any correction to this code or additional steps to get it working.
    Any help is greatly appreciated

    Stratos,
      Thanks for your inputs,
      I changed the code as you suggested , now my whole code looks like :
    <%@ page import="com.crystaldecisions.sdk.framework.*" %>
    <%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
    <%@ page import="com.crystaldecisions.sdk.occa.security.*" %>
    <%
    boolean loginSuccessful = false;
    IEnterpriseSession boEnterpriseSession = null;
    String username = "user";
    String password = "Password";
    String cmsname  = "Server";
    String authenticationType = "secEnterprise";
    try {
       //Log in.
       boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
       if (boEnterpriseSession == null) {
          out.print("<FONT COLOR=RED><B>Unable to login.</B></FONT>");
       } else {
          loginSuccessful = true;
    } catch (SDKException sdkEx) {
       out.print("<FONT COLOR=RED><B>ERROR ENCOUNTERED</B><BR>" + sdkEx + "</FONT>");
    if (loginSuccessful) {
       ILogonTokenMgr boLogonTokenMgr = boEnterpriseSession.getLogonTokenMgr();
         String logonToken = boLogonTokenMgr.createLogonToken("", 60, 1);
         //String logonToken = boLogonTokenMgr.getDefaultToken();
       String infoViewURL = null;
       String tokenParam = null;
       String redirectURL = null;
       infoViewURL = "http://Server:8080/InfoViewApp/logon.jsp";
       tokenParam = "ivsLogonToken=" + logonToken;
       redirectURL = infoViewURL + "&" + tokenParam;
       pageContext.forward( "openDocument.jsp?iDocID=" + 4668 + "&token=" + tokenParam);
    %>
    But I am still getting the Infoview Login Page . The url on the login page is
    http://server:8080/OpenDocument/opendoc/logonTrustedAuth.do?appKind=InfoView&iDocID=4668&isApplication=true&token=ivsLogonToken%server%3A6400%4021181JIipxt70VM0kd90v21179JFd4dHn7kW2FKSBi
    We can see that a token is being generated and appended to this url but it is not passing the user name and password.
    Please let me know what you think about this.

Maybe you are looking for

  • Error vendor is not intended for p org

    HI, When an user ordered the shopping cart  anError " Vendor xxx is not intended for purchasing org.xxxx., came in. Vendor was existing in the vendor organization. Can some body let me know what could be the problem, and what are all the attributes t

  • Doubts In Forms 6i

    Hi ,I've got some doubts in forms. 1) what is the difference b/w commit and commit_form? 2) When we've to use key triggers?What is the purpose of key-triggers? 3) When we've to use On-triggers? Pls reply me asap... Prashanth Deshmukh

  • GoToAndPlay doesn't work second time

    I have made a simple animation using only the timeline. The animation is covered by a button "Knapp"  (alpha 0) wich activates the actions. The whole thing works fine the first time. The last action says go to and play frame 2, wich has two actions:

  • Three missed appointments-meanwhile my phone still not working!

     My cell calls and texts are off-and-on not going through to people in more than one state and to more than one person--even though my phone reports the message as delivered and my calls as completed.  AT&T has missed THREE call back commitments!  Me

  • Question on reporting

    Hi Friends ,                  Can I acheive this requirement in front end , since it is computation based I think its better if we do it over Backened. Actuallly I need to display a field in the report based on other keyfigure value . I have a Keyfig