Calling the JSP cartridge directly

I am using OAS 4.0.8.1. I need to be able to call the jservlet cartridge directly, without the virtual path. That is, I want people to be able to type www.host.com and be presented with the jsp pages immediately.
It seems that I always have to use some virtual path (i.e. www.host.com/servlet) to call the jservlet cartridge. Isn't there a way to bypass this?
I know that this can be done by adding a META refresh tag to the wwwIndex.html file, but that solution is not sufficient for me.
Thanks,
Gauti.
[email protected]

Im not sure if i understand your problem,
but try adding a normal, static html file
(i.e. index.html) in the default roo directory of the webserver containing only a redirect to the JSP you want to display.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Olafur Gauti Gudmundsson ([email protected]):
I am using OAS 4.0.8.1. I need to be able to call the jservlet cartridge directly, without the virtual path. That is, I want people to be able to type www.host.com and be presented with the jsp pages immediately.
It seems that I always have to use some virtual path (i.e. www.host.com/servlet) to call the jservlet cartridge. Isn't there a way to bypass this?
I know that this can be done by adding a META refresh tag to the wwwIndex.html file, but that solution is not sufficient for me.
Thanks,
Gauti.
[email protected]<HR></BLOCKQUOTE>
null

Similar Messages

  • How to call the Jsp through BPM Obejct

    Hi,
    I have gone through the some topic, how to call the Jsp through BPM Object.
    I have followed step below,
    1. I have create the sample jsp page
    2. Import into BPM studio under webroot\custom Jsp
    3. Created the screenflow and added the "Interactive Component call" object
    4. Right Click the Object and selected Maintask and Implementation type as "BPM Object Interactive Call"
    5. Selected the use JSP presentation object option and when i click ok its showing "BPM instance object must be selected"
    But when i select the Instance Variable tab, its not showing anything.
    Can any one help me how to call the Jsp in screenflow with step by step procedure, that would be very greate help for me.
    Regards,
    Anandh P

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

  • Can I change the JSP page directive dynamically??

    Should I be able to use the JSP page directive...i.e.,
    ("<% reponse.setContentType("application/vnd.ms-excel"); %>
    ...to *dynamically* switch the page content depending on the users choice? -- Or, do I have to build separate JSP pages??
    I want to be able to switch the content-type based on the user choice from "content="text/html" to "content-type: application/vnd.ms-excel"... or vice versa.
    If so, does someone have an JSP example of doing this?
    Thanks for any quick response!!

    <%
    int userchoice = Session("userchoice") // this may also come from database or somewhere
    If (userchoice == 1)
    reponse.setContentType("application/vnd.ms-excel");
    else
    reponse.setContentType(content="text/html");
    %>

  • How to call the JSP(Web layout) instead of paper layout...

    Hi,
    Iam using Reports 10g. I have created a simple employees report. I have added a listbox in the jsp page by adding small Html and javascript code like below.
    <form action="http://www.wwt.com/reports/rwservlet?10000_reports_listing&p_extranet=p_extranet" name="First" method="post">
    <select name="p_extranet" onChange="First.submit()" >
    <rw:foreach id="RGSOURCE" src="G_SOURCE">
    <rw:getValue id="mysource" src="SOURCE"/>
    <option value=""><%= mysource %>
    </rw:foreach>
    </select>
    </form>
    When I run this report in the report builder as Web layout, Listbox is displayed with values inside.
    But when I move it to Apps server and run it through URL,
    listbox is disappeared. I think report is running the Paper layout instead of weblayout ??????????
    Could you please tell me what is the problem and How to force the Weblayout or JSP to run ?
    Thanks.

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

  • How to call the Jsp file in JspDynpage

    Hello,
    I am using the following jsp code. I saved it as Thumbnail1.jsp.
    <%@page import ="com.sun.image.codec.jpeg.*" %>
    <%@page import ="java.awt.*" %>
    <%@page import ="java.awt.image.*" %>
    <%@page import ="java.io.*"%>
    <%
        // load image from INFILE
             Image image = Toolkit.getDefaultToolkit().getImage("C:/kasturi/sap1.jpg");
         MediaTracker mediaTracker = new MediaTracker(new Container());
            mediaTracker.addImage(image, 0);
             mediaTracker.waitForID(0);
        // determine thumbnail size from WIDTH and HEIGHT
             int newImageWidth = Integer.parseInt("100");
             int newImageHeight = Integer.parseInt("100");
             double newImageRatio = (double)newImageWidth / (double)newImageHeight;
             int oldImageWidth = image.getWidth(null);
              int oldImageHeight = image.getHeight(null);
              double oldImageRatio = (double)oldImageWidth / (double)oldImageHeight;
              if (newImageRatio > oldImageRatio)
                    newImageWidth = (int)(newImageHeight * oldImageRatio);
          else
              newImageHeight = (int)(newImageWidth / oldImageRatio);
        // draw original image to thumbnail image object and
        // scale it to the new size on-the-fly
             BufferedImage newThumbImage = new BufferedImage(newImageWidth, newImageHeight, BufferedImage.TYPE_INT_RGB);
              Graphics2D graphics2D =newThumbImage.createGraphics();
                 graphics2D.drawImage(image, 0, 0, newImageWidth, newImageHeight, null);
        // save thumbnail image to OUTFILE
               BufferedOutputStream outFile = new BufferedOutputStream(new  FileOutputStream("C:/kasturi/ssa.jpg"));
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outFile);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(newThumbImage);
                encoder.setJPEGEncodeParam(param);
              encoder.encode(newThumbImage);
              outFile.close();
              System.out.println("Successfully Saved.");
    %>
    I want to call this thumnail1.jsp file JspDynpage. Can any help me how to make that?
    Thanks in advance.

    hello,
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="Test">
          <component-config>
            <property name="ClassName" value="kasturi.Test"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/Thumbnail1.jsp"/>
            <property name="SecurityZone" value="high_safety"/>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    this is my portalapp.xml file. Still i am getting error.
    i don't know the exact error. i think it may be java code problem.
    can you tel me what is that? thanks in advance.
    Message was edited by: kasturi ramalingam

  • How to setup the jsp service

    Hi all,
    After I setup teh weblogic and write some jsp, I cannot call the jsp up from
    my URL thur a NES.
    My configuration is
    Web-server NES 3.6.3
    WebLogic App Server 4.5.2
    (URL http://hostname:81/servlet/* will proxy-forward the request to
    weblogic 4.5.2)
    like http://hostname:81/servlet/newservlet -> to
    http://weblogicserver:7001/servlet/newservlet
    for the servlet, it is ok....
    but if I call http://hostname:81/servlet/newjsp.jsp , then there will be a
    404 Not Found error....
    My properties setting for jsp is
    weblogic.httpd.register.servlet/*.jsp=weblogic.servlet.JSPServlet
    weblogic.httpd.initArgs.servlet/*.jsp=\
    pageCheckSeconds=1,\
    packagePrefix=a.b.c.d,\
    compileCommand=/jdk1.2.2/bin/javac,\
    workingDir=/abs_path_to_a_newly_created_directory,\ (weblogic
    process has the write right to this directory)
    verbose=true
    weblogic.httpd.documentRoot=public_html/
    And have already place all the jsp into the public_html/ and even one more
    copy in public_html/servlet/
    but I still can't call the jsp....
    can anyone tell me how to fix it........
    THX
    Alex

    Are you able to call the JSP pages directly? Or, does it just not work when
    you are using the plug-in?
    Michael Girdley
    BEA Systems Inc
    "Alex Wong" <[email protected]> wrote in message
    news:[email protected]..
    Hi all,
    After I setup teh weblogic and write some jsp, I cannot call the jsp upfrom
    my URL thur a NES.
    My configuration is
    Web-server NES 3.6.3
    WebLogic App Server 4.5.2
    (URL http://hostname:81/servlet/* will proxy-forward the request to
    weblogic 4.5.2)
    like http://hostname:81/servlet/newservlet -> to
    http://weblogicserver:7001/servlet/newservlet
    for the servlet, it is ok....
    but if I call http://hostname:81/servlet/newjsp.jsp , then there will be a
    404 Not Found error....
    My properties setting for jsp is
    weblogic.httpd.register.servlet/*.jsp=weblogic.servlet.JSPServlet
    weblogic.httpd.initArgs.servlet/*.jsp=\
    pageCheckSeconds=1,\
    packagePrefix=a.b.c.d,\
    compileCommand=/jdk1.2.2/bin/javac,\
    workingDir=/abs_path_to_a_newly_created_directory,\ (weblogic
    process has the write right to this directory)
    verbose=true
    weblogic.httpd.documentRoot=public_html/
    And have already place all the jsp into the public_html/ and even onemore
    copy in public_html/servlet/
    but I still can't call the jsp....
    can anyone tell me how to fix it........
    THX
    Alex

  • Call a JSP from applet and display the results in the browser

    Hello All,
    I have written an applet which performs some functionality at the clinets browser. When the applets method finishes exectution, I would like to call
    a jsp. The results of the JSP should be displayed like a normal page in the browser.
    I tried creating a HttpURLConnection and calling the jsp but two things happened
    1. The jsp call failed because the applet doesn't have a valid session id.
    2. even if I disable the valid user check at the jsp, the results of the jsp are returned as a set of bytes to the applet. They are not displayed in the browser window.
    Then I tried applet.getAppletContext().showDocument()... However with this api I cannot do a POST operation on the JSP with some input data because this takes only a URL as an input parameter.
    Please help me in this problem and I will be very gratefull to you.
    1. applet uses the same session id as the browser so that when applet makes a request to the jsp it does not get user invalid exception.
    2. the results of the jsp are displayed on the browser and not given to the applet.
    Thank you so much for your help.
    regards,
    Abhishek.

    I hope this can help you
    I made a package calls fun
    and a clsss calls JspTestingFun
    package fun;
    public class JspTestingFun{
      private String sample = "welcome to jsp";
      //Access sample property
      public String getSample() {
        return sample;
      //Access sample property
      public void setSample(String newValue) {
        if (newValue!=null) {
          sample = newValue;
    }then I make a jsp file
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ page import =  "fun.JspTestingFun"%>
    <html>
    <head>
    <title>
    jspTest
    </title>
    </head>
    <jsp:useBean id="mytest" scope="session" class="fun.JspTestingFun" />
    <jsp:setProperty name="mytest" property="*" />
    <body bgcolor="#ffffff">
    <%
    mytest.getSample();
    %>
    <h1>
    Just for testing
    </h1>
    <form method="post">
    <br>Enter anything   :  <input name="sample"><br>
    <br><br>
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" value="Reset">
    <br>
    this what we get<jsp:getProperty name="mytest" property="sample" />
    </form>
    </body>
    </html> 

  • JSP Cartridge

    Can any one please tell how and where should i place JSP pages in Oracle Application Server?Is there anything called JSP cartridge like JServlet cartridge?

    In OAS 4.0.8.2 there is a JSP cartridge. Also you can find a sample JSP application, which is already deployed into OAS just after install. You can create your own JSP aplication. If you need JSP & Servlets, install a JSP application and add JServlet cartridge into it. Consult OAS documentation for more info. The directory of your JSPs is specified on the JSP cartridge configuration parameters

  • Calling a JSP Report From HTML parameter form

    Hi,
    I m trying to run a JSP Report from a HTML parameter Form. The JSP reports requires a parameter named userid in the URL with a valid value for database connection.
    eg. URL "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?userid=sysapps/system@trt1". We have created a variable on the server named "parmformjsp" with a value "sysapps/system@trt1". Now i use this variable in the URL as follows, eg. "http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_crdinf.jsp?parmformjsp".
    When i use this URL to call another JSP report from a JSP report it works fine, but the same does not work when calling a JSP report from a HTML form.
    the code for HTML parameter form calling a report is as follows,
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Parameter Form</title>
    </head>
    <body>
    <p>Parameter Form</p>
    <form name="form1" method="GET"
    action="http://win2kdb.oracle9iis.com:7778/repdemo/examples/Tools/fm_custrns.jsp?parmformjsp">
    <p>From Date<input type="text" name="p_fmdate" size="20"></p>
    <p>To Date<input type="text" name="p_todate" size="20"></p>
    <p> </p>
    <p><input type="submit" ><input type="reset" value="Reset" name="B2"></p>
    </form>
    <p> </p>
    </body>
    </html>
    If i create an input parameter named "userid" with a valid database connection value, remove the ?parmformjsp part from the action URL then it works fine. How can i call the JSP report using the parmformjsp variable name instead of using the "userid" clause in the URL.Can anyone suggest any workaround....
    Thanks & Best Regards,
    Unmesh

    do it like this...
    DECLARE
    pl_id ParamList := Get_Parameter_List('tmpdata');
    BEGIN
    IF NOT Id_Null(pl_id) THEN
      Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id, 'ROUTE_CARD_CONTROL', TEXT_PARAMETER, :ROUTE_CARD.ROUTE_CARD_CONTROL);
    Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
    Run_Product(REPORTS, 'D:\STL_FINAL\CHPREPORTS_FINAL\ROUTE_CARD.REP', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END; what exactly happens when you call the report. if its showing the blank page... may be you are not passing the right parameter name. cross-check that your parameter name in the report is 'ROUTE_CARD_CONTROL'.

  • How to call a URL in jsp without direct the page to the URL

    Hi,
    I have a jsp page, which when user come in to the page, the page will call a URL without direct the current jap page the URL. This URL will only help me to do on something in the backend. Anyone know any method that i can use to call the URL?
    Thanks a lot

    Doeas AJAX rings a bell? ;-)
    https://blueprints.dev.java.net/bpcatalog/ee5/ajax/usingAJAXwithoutJSF.html

  • JSP does not call the right method in controller class

    Hi all,
    I have a jsp file which loads a page at this address: http://localhost:8080/dir/list/
    I've added two checkboxes to the page; user can check both checkboxes, only one or none. Following is code I have in jsp file:
    <form class="checkboxForm">
    <c:choose>                                                                                                         
    <c:when test='${newItems==true}'>
    <input id="newItems" type="checkbox" value="#" name="newItems" class="checkbox2" checked="checked" /><strong> New Businesses   </strong>                                                                 
    </c:when>
    <c:otherwise>
    <input id="newItems" type="checkbox" value="#" name="newItems" class="checkbox2"/><strong> New Businesses   </strong>
    </c:otherwise>
    </c:choose>
    <c:choose>                                                                                                         
    <c:when test='${rejectedItems==true}'>
    <input id="rejectedItems" type="checkbox" value="#" name="rejectedItems" class="checkbox3" checked="checked"/><strong> Rejected Businesses   </strong>                                                                 
    </c:when>
    <c:otherwise>
    <input id="rejectedItems" type="checkbox" value="#" name="rejectedItems" class="checkbox3"/><strong> Rejected Businesses   </strong>
    </c:otherwise>
    </c:choose>
    <a href="#" onclick="apply();">
    <button name="apply" class="btn-primary" value="Apply" tabindex="4">Apply</button>
    </a>
    </form>
    <script type="text/javascript">
    function apply(){
         var newItems = document.getElementById("newItems").checked;
         var rejectedItems = document.getElementById("rejectedItems").checked;
         alert("Inside apply() method.");
         alert("newItems= " + newItems + ", rejectedItems: " + rejectedItems);     
         window.location = "<c:url value='/list/'/>" + newItems + "/" + rejectedItems;
         alert("window.location= " + window.location);
         alert("Add extra delay!");
         return false;
    </script>This is my Controller class:
    // Method1: this method gets called when the user loads the page for the first time.
    @RequestMapping(value="/list", method = RequestMethod.GET)
    public String list(Model model, HttpServletRequest request) {          
              System.out.println("Controller: method1: Passing through...");
              model.addAttribute("newItems", Boolean.TRUE);
              model.addAttribute("rejectedItems", Boolean.TRUE);
              // Does other things.
    // Method3: this method gets called when user checks/unchecks one of the checkboxes and clicks on Apply button.
    @RequestMapping(value="/list/{newItems}/{rejectedItems}", method = RequestMethod.GET)
    public String list(@PathVariable Boolean newItems, @PathVariable Boolean rejectedItems, Model model, HttpServletRequest request) {          
              System.out.println("Controller: method3: Passing through...");
              model.addAttribute("newItems", newItems);
              model.addAttribute("rejectedItems", rejectedItems);
    // Does other things.
         }The way my jsp code is written now, it calls the correct method and displays the correct url. When page loads for the first time, it calls method1 and the url is:
    http://localhost:8080/dir/list
    When the user checks/unchecks one or both checkboxes and clicks on apply button, method3 is called and this url is displayed:
    If both checkboxes are checked which both booleans are set to true:
    http://localhost:8080/dir/list/true/true
    Everything is fine... however, if I comment these two lines at the end of JavaScript apply() function,
    alert("window.location= " + window.location);
    alert("Add extra delay!");Then method3 will never gets called; only method1 gets called and I see this url:
    http://localhost:8080/url/list//?newItems=%23&rejectedItems=%23&apply=Apply
    I do not know why it gets confused bet. method1 and method3 and cannot pick the right method?
    I tried to use the POST method instead, but the page goes directly to our internal error page and it never reaches the method I wrote in my controller for POST:
    I don't really know what I'm doing wrong? Any help is greatly appraciated.
    Edited by: ronitt on Dec 13, 2011 2:35 PM

    I changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
    http://www.w3schools.com/tags/tag_form.asp
    The <form> tag is used to create an HTML form for user input.
    The <form> element can contain one or more of the following form elements:
    <input>
    <textarea>
    <button>
    <select>
    <option>
    <optgroup>
    <fieldset>
    <label>
    An HTML form is used to pass data to a server.
    I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
    Please let me know if you have any idea. Thanks.

  • How to call the crystal report in jsp page

    dear friends
    i want to run or call the crystal report in jsp page.
    if u know that can u send sample code for that to my id
    [email protected]

    Hi Sudhakar,
    Could you please be more speicific about the task you want to accomplish?
    Cheers
    Giri :-)

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • Virus scan failed Error on deploying a web application having a jar file for calling the applet on the jsp page

    Hi,
    I have an applet application that i want to deploy on the Oracle cloud.
    So i have created a jar file for the applet application and i am using this jar to call the applet on a jsp page.
    But when i am delpoying my application on the java cloud, its giving me the below error:
    2014-10-28 03:16:41 CDT: Starting action "Virus Scan"
    2014-10-28 03:16:41 CDT: Virus Scan started
    2014-10-28 03:16:49 CDT: ----------------------------------------------------------------------
    2014-10-28 03:16:49 CDT: File Scanned: "Application7.ear".
    2014-10-28 03:16:49 CDT: File Size: "106698122".
    2014-10-28 03:16:49 CDT: File Status: "INFECTED".
    2014-10-28 03:16:49 CDT: ----------------------------------------------------------------------
    2014-10-28 03:16:49 CDT: Virus scan failed.
    2014-10-28 03:16:49 CDT: "Virus Scan" complete: status FAILED
    Can't we deploy any application having applet or swing component's onto the cloud?
    Or do we need to request for any extra permissions for the same?
    Thanks,
    Manoj

    I don't see applets mentioned in the supported features nor in the unsupported features so not sure if they are supported you would likely need to contact the operations team to confirm.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Parametricizing the file name in the jsp directive %@ include file=

    Is there any way to parametricize the file name in the above directive. Am not too keen on using
    <jsp:include ..
    because of performance issues and also i am only including a static HTML issues.
    Any responses would be appreciated?

    Nope.
    The <%@ include %> occurs at the time of translating/compiling the jsp into a servlet. It thus cannot accept any runtime parameters.
    Are the performance issues of using <jsp:include> that large?

Maybe you are looking for