Way to forward in JSP  to a different URL

Hi,
I need to forward the user to a different page keeping the sensitive user information(like credit card details). The problem is that the forward function seems to be looking for the URL inside the same home.
If I'm trying to forward from http://www...../app1 to http://www...../app2 the forward function looks for the app2 inside app1 folder and I'm getting the error page not found.
Thanks.

Generally,<jsp:forward> element forwards the request object containing the client request information from one JSP file to another file, in the same application context as the forwarding JSP file.
<jsp:forward page={"relativeURL" | "<%= expression %>"} />
The relative URL looks like a path-it cannot contain a protocol name, port number, or domain name. The URL can be absolute or relative to the current JSP file. If it is absolute (beginning with a /), the path is resolved by your Web or application server.
Also, To forward the request to another context, try out the following method :
To forward from Context ct1 to Context ct2:
1) Turn the crossContext attribute to "true" in server.xml
2) In your code:
<% ServletContext ctxB = application.getContext("/ct2");
RequestDispatcher rdB = ctxB.getRequestDispatcher ("<file_name_relative_to_context_ct2");
rdB.forward(request, response); %>

Similar Messages

  • JSP Session across different directories

    I have two different JSP pages in two different directories. So, I have:
    upperDirectory/directory1/jsp1.jsp and upperDirectory/directory2/jsp2.jsp
    The thing is that when I set a session attribute in jsp1.jsp, I cannot access it from jsp2.jsp. Then I checked and turned out that the session is different. It doesn't close jsp1's session. But it's like I have two sessions open at the same time because I access the two JSPs from two different directories. This does not happen when I put jsp1 and jsp2 in the same directory.
    Is this suppose to happen? Is this regular, expected behavior? I'm using IPlanet webserver, by the way.
    Thanks so much,
    r

    You're absolutely right. From the API at Sun:
    "Session information is scoped only to the current web application (ServletContext), so information stored in one context will not be directly visible in another. "
    Thanks.

  • Is there a way to open form as if from different responsibility in R12

    Is there a way to open form as if from different responsibility in R12. Have tried to call FND_GLOBAL.apps_initialize but it did not changed a thing.

    *"Is there any way I can send her messages back and make it look as though my email address no longer exists? "*
    "Message" menu --> Bounce

  • What is the best way of deploying a jsp and bc4j aplication

    Hi
    I would like to know what is the best way of deploying a jsp and
    bc4j aplication in ias 9i.
    thanks in advanced
    rjc

    In the page I simply referenced the facescontext directly... no need for a custom servlet.
    public void createcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse resp = (HttpServletResponse)fc.getExternalContext().getResponse();
    Cookie userCookie = new Cookie("cookiename", "cookievalue");
    userCookie.setMaxAge(-1);
    userCookie.setMaxAge(3600);
    resp.addCookie(userCookie);
    return null;
    public String readcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ec = fc.getExternalContext();
    Map cookiemap = ec.getRequestCookieMap();
    if (cookiemap != null) {
    Cookie cookie = (Cookie) cookiemap.get("cookievalue");
    return cookievalue;
    For reference I could not get getCookies() method of HttpServletRequest to work.. it would only return JSESSIONID.

  • Would crtl+f work or is there another way to search or quickly hyperlink to different sections on the page?

    We have a very long extended data tab full of custom sections and we would like to be able to give a user a way to search the page quickly.
    Would crtl+f work or is there another way to search or quickly hyperlink to different sections on the page?

    I don't know enough about your use case to provide specific direction but you may be able to use the 6.1.1 UI extensibility point.  For example, you could add an anchor link collection control that scrolls the page to the top of each section when selected. 

  • How many ways you can invoke JSP from OBPM

    Hi All,
    I just wanted to know how many ways we can invoke JSP Page from BPM.
    1. BPM Interactive component call
    2. ?.
    Thanks
    Sunil.

    When you are using a jsp, its for user interaction only. and in any case, you require interactive component call.
    this is the only way you can use a jsp in OBPM.
    However, in a bpm interactive activity - you can also choose external as implementation type.
    For this, you need to have your jsp source code reference added as an external resource in the project and the external resource is to be specified at configuration while setting implementation type.
    HTH
    Sharma

  • Since the update, is there a way to forward messages

    Since the update, is there a way to forward text messages

    Yup, press and hold the message. Little dots will appear on the left. With the message you held automatically selected. You may select more if you wish. Then the arrow in the bottom right puts the message(s) in a new message window for you to put an address/phone number in.
    KOT

  • Is there any way to forward text messages to Another phone

    Is there a way to forward text messages to another phone

    Select the message thread.
    Select the Edit button.
    Select the specific message and then tap Forward

  • How to forward a JSP page to another dynamically generated JSP

    Hi gurus,
    I have a problem with forwarding a JSP page, to another dynamic jsp page.
    I have to forward a jsp page to (say X1 ) to another JSP page (say X2).
    Iam choosing the name of the page X2, dynamically from a list of JSP pages in a directory depending upon some parameters.
    Here is my code for ur better understanding...
    <java>
    // this gives me the name of the page X2 to which my page X1 should be forwarded.
    <TR> <TD><%=request.getParameter("codeins")%></TD></TR>
    <%
    if(request.getParameter("codeins").length() != 0)
    %>
    // if i use this forward tag i get the error
    <a href=" 
                <jsp:forward page=Ins/<%=request.getParameter("codeins")%">.jsp">
         <jsp:param name="a" value="<%=request.getParameter("a")%>" />     
         <jsp:param name="b" value="<%=request.getParameter("b")%>" />
         <jsp:param name="c" value="<%=request.getParameter("c")%>" />
         <jsp:param name="p" value="<%=request.getParameter("p")%>" />
         <jsp:param name="q" value="<%=request.getParameter("q")%>" />
    </jsp:forward>">GNSS Instantiation</a>
    <%
    else {
    out.println("No entry in the database! ");
    } %>
    </java>
    I am getting the exceptions like
    <java>
    org.apache.jasper.JasperException: /Newspg.jsp(162,67) equal symbol expected
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
         at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
         at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
         at org.apache.jasper.compiler.Parser.parseForward(Parser.java:517)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:661)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
         at org.apache.jsp.SPVariablesg_jsp._jspService(SPVariablesg_jsp.java:425)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:534)
    </java>
    please help me out to let me know, where iam doing wrong.
    Thanx
    mark.

    Hi,
    in reference to the above subject i did like to know what is wrong in the following code of mine:
    <%
         String name = "admin"; // this is line which is being indicated in error message
         int password = 4589;
    %>
    <!-- <script language="javascript" src="init.js"></script> -->
    <head>
    <script>
    function checking()
         if name != document.test.user.value || password != document.test.password.value)
              alert("ur not authorised to view the requested url");
              forward("Firstpage.jsp");
    %>
    </script>
    its says :
    org.apache.jasper.JasperException: /webpg/Dec2Firstpage.jsp(4,21) equal symbol expected
    any solutions?
    thanx in advance

  • Any way to transfer cc libraries to a different owner?

    Any way to transfer cc libraries to a different owner?

    hi shumway,
    you can use share option : https://helpx.adobe.com/creative-cloud/help/collaboration.html#collaborate_libraries
    i hope can help
    regards

  • No redirection to different url upon http connections limit exceeded

    Hi,
    As of Standalone OC4j 10.1.2, if you want messages to be redirected to a different URL when the maximum connections limit is reached, you would include the HTTP redirect URL to max-http-connections tag inside server.xml.
    <max-http-connections max-connections-queue-timeout="120" socket-backlog="50"
    value="100">http://optional.redirect.url/page.jsp</max-http-connections>
    I have a standalone OC4j 10.1.3, and would like to be able to redirect to different URL when maximum connections limit is reached but the above max-http-connections does not work and I am not redirected to different URL when maximum connectionns limit is reached. I read user guide of OC4j 10.1.3 and there is no mentioning of max-http-connections at all. In there, they talk about limiting concurrency via http thread pool but there is no discussion as to the mechanism of redirecting users to a different URL where I can display a user friendly message to say "Server is busy, please try again later..." instead of browser display a message "Page cannot be displayed"..
    Please advice,
    Thanks

    Any thoughts on above issue ? please help.
    thanks
    Sam

  • Why two different URLS lead to same thread?

    My action engine nugget here
    http://forums.ni.com/ni/board/message?board.id=170&message.id=240328#M240328 
    showed up at the botom of the LV page as one ot the most Kudoed and when I hit that link it takes me to here
    http://forums.ni.com/ni/board/message?message.uid=503801#U503801 
    THey both seem to be the same thread but different URLs. Why?
    Just curious*,
    Ben
    * Don't expect me stop asking question now. It is way to late for that to help.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.

    Ben wrote:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=240328#M240328 
    http://forums.ni.com/ni/board/message?message.uid=503801#U503801 
    THey both seem to be the same thread but different URLs. Why?
    I would think that the forum is just a huge database of posts with a front end that formats the pages dynamically.
    Apparently, a post can be addressed either from a global ID (URL#2) or from a board/boardID (URL#1). Same difference.
    LabVIEW Champion . Do more with less code and in less time .

  • Logoff Link go to 2 different URLs

    Hi Portal Knowledgeable Ones,
    I am running EP 6.0 SP13.  For portal authentication, we use IBM's IDM infrastructure.
    Our portal is used by internal users (intranet) and external users (internet).  For internal users, portal authentication is performed by our central authentication service.  For external users, authentication is performed by the portal's native capabilities.
    I have a problem with the Logoff Link.
    When internal users logoff, I need to redirect to the logoff URL for the central authentication system.  However, when external users logoff, I need to redirect to simply a static URL because nothing more than logging of the portal is necessary.
    How do I make the Logoff Link go to 2 different URLs, depending on user type?  Currently, I have 2 portal frameworks, one for internal, and one for external.  Can I utilize that somehow?
    Thanks,
    Kevin
    When internal users enter the internal portal URL, the request is directed to our central authentication system.

    Hi Kevin,
    The masthead is defined in the HeaderiView.jsp in the com.sap.portal.navigation.masthead portal application.
    In this JSP there is:
    GetLogoffURL method that gets the logoff URL.
    isAnonymous method that determines if the user is anonymous.
    Use these two to supply 2 different URLs.
    Hope this helps.
    Daniel

  • Applying different URL's to animated SWF Document

    Hi there
    Can someone please help, i am working in Illustrator to create animated SWF files.  These need to contain a URL.  I have read the forums and found out how to do this for a flat non animated SWF file and this works, howerver when exporting Ai layers to SWF it doesnt work.
    Ideally i want to apply different URL's for each frame of the animation...but will settle for just having a single URL at the moment!!!
    Am i able to do this in Illustrator or do i need a different package?
    Thanks
    Simon.

    Forget it. It doesn't fit in thze "slice" model of AI and PS. What you want requires and event-centric approach and that can be done in Flash Catalyst, Fireworks and InDesign - that is, the soon to be released CS5 versions. A public Beta of Flash Catalyst is still avialable on Adobe Labs, so give it a spin. Otherwise use Flash or do your multi-link banner/ graphic "the proper way" by using JavaScript with jQuery and focusing on doing this all within native HTML/ CSS.
    Mylenium

  • ITunes U Sending Different URLs when Retrieving RSS Feed

    We have a .aspx page that generates RSS feeds for all of our classes on iTunes U, some of which are private and some public. For the private classes, we're checking the signature iTunes U sends along in the URL to make sure the request is coming from iTunes before giving back the RSS feed for the class (with the correct content type), otherwise we return a 403 status.
    The problem we're encountering is that iTunes is sending 3 different URLs when entering the RSS feed address in iTunes.
    For example, one of our rss feed URLs might be http://www.sitename.edu/rss.aspx?classid=10 .
    iTunes U is sending requests to
    http://www.sitename.edu:80/rss.aspx?classid=10,
    http://www.sitename.edu:80/rss.aspx?classid=10&time=foo&userID=foo&signature=foo ,
    and
    http://www.sitename.edu:80/rss.aspx?classid=10&time=foo&userID=foo&signature=foo &time=bar&userID=bar&signature=bar .
    The first and third URLs both fail our check. As of a couple of weeks ago iTunes U was pulling in our private feeds just fine, but this week when we put in a URL iTunes U fails to get the feed with an error ("iTunes U could not update the content because iTunes U could not reach the specified feed. Verify the feed specified in the feed URL field is available, and then try again."), presumably because of the 3 different URLs it's sending at the same time. (We haven't changed the way our feed works in that time.)
    We're using Type: Feed, Security: None, Signature: Append SHA-256 Signature, Check for changes: Daily, and I'm entering the URL into iTunes U as http://www.sitename.edu/rss.aspx?classid=10 .

    Any word on this? The only people that could really check on this are at Apple. From the documentation, it's pretty clear that the only URL iTunes U should be sending is the one with one time, userID, and signature, plus it was working until the multiple URLs started being sent.
    We really can't leave off the security check because of copyright issues (students in the class are legally allowed to view the materials but anyone outside is not).

Maybe you are looking for

  • Getting exception after adding new View attribute in OCO

    Hi, I have added a new field in Oracle Customers Online -> Customers -> Accounts Summary page. I had changed the query in the VO and added the view attribute through JDeveloper and created the corresponding VORowImpl java class. I have referred the s

  • Oracle 10G and SGA

    Hi, i've a question about Oracle 10G and their SGA. When I do in SQLplus show sga, I get for example: SQL> show sga Total System Global Area 167772160 bytes Fixed Size 1247900 bytes Variable Size 58721636 bytes Database Buffers 104857600 bytes Redo B

  • Source of the Australia's Address Dictionaries

    Which is the source for the Australia Address Cleanse month directory files? The Australia Post? Thanks.

  • Swf into html- explorer problem

    I have this code: and it looks perfect with firefox, but the problem is in explorer :( do not see it completely what am I doing wrong? the full website is here: http://www.geocities.com/aniaacolgate thank you in advance for reply

  • Aperture 3 very slow on lion

    running on my macbook pro 2.66 ghz core 2 duo with 4 MB of ram, aperture 3 was lightning-fast in snow leopard, now is mud-slow in lion. as in *unbelievably* slow. is a fix coming? f