Accessing AM in JSP

I have successfully created JSPs that use the Data Web Beans to access the database. Currently I am trying to invoke an exported method in a View Object in a remotable Application Module directly from within a JSP without using a Data Web Bean (because the exported method is specific to one particular View Object). Just wondering how I could accomplish this such that the same JSP could be deployed both locally and into a Web Server that communicates with the Application Server via CORBA?

I have successfully created JSPs that use the Data Web Beans to access the database. Currently I am trying to invoke an exported method in a View Object in a remotable Application Module directly from within a JSP without using a Data Web Bean (because the exported method is specific to one particular View Object). Just wondering how I could accomplish this such that the same JSP could be deployed both locally and into a Web Server that communicates with the Application Server via CORBA?

Similar Messages

  • 10.1.3.4 - how to secure access on a jsp page ?

    I have a simple jsp page that takes in some user values and then kicks off a workflow. I want to restrict the access on the jsp page so that only users of a certain group can use it. right now it is completely open and anyone can just go the page and start of a transaction.

    found an article on this
    http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html

  • Location of the file accessed by OA.jsp

    Hi,
    I have the below url
    https://server.server.com/OA_HTML/OA.jsp?page=/oracle/apps/cz/cx/xxx/webui/AttributesValuesPG&retainAM=Y&enableHB=false&debugPath=&debugFile=&oas=dbJT9-mnVxU61nxwoJ5Qbw..
    But, not able to locate the directory /oracle/apps/cz/cx/xxx/webui/ in the unix server. Can someone help. I am trying to obtain the file AttributesValuesPG that is being accessed by OA.jsp.
    Thanks.

    Hi Shankar,
    Under JAVA_TOP you can find the class files only.
    For the .xmls we have to go for MDS.
    You are trying to access a custom developed page.
    All page definitions will reside under MDS.
    So Please perform the following Steps in Putty or WINSCP
    cd $APPL_TOP/cz/11.5.0/mds/cx/xxx/webui
    Here you can find the required .xml page.
    Ex:/eebsmt/orasoft/appl/cz/11.5.0/mds/cx/tso/webui
    Hope this will resolve your problem.
    Regards,
    Palepu

  • Error: cannot access directory oracle\jsp\runtime

    I got this error when try to add a existing project to JDeveloper 9.0.3.4
    Error: cannot access directory oracle\jsp\runtime; verify that directory is reachable from classpath and/or sourcepath
    can someone help me?
    thanks

    Xinwei -
    Make sure you have added the correct libraries to your project; adding JSP Runtime to your project should alleviate this error.
    Hope this helps,
    Lynn
    Java Tools Team

  • Error: cannot access class oracle.jsp.runtime.HttpJsp; file oracle\jsp\runtime\HttpJs

    Hello,
    where is now oracle\jsp\runtime\HttpJsp.class located?
    thanks.
    Oleg.

    Same problem,
    Error: cannot access class oracle.jsp.runtime.HttpJsp; file oracle\jsp\runtime\HttpJsp.class not found
    Thanks
    aldo

  • Verifying access to each jsp

    Hello!
    I'm developing a web app in which users need to be authenticated.
    Users have different profiles and, according the the profile, they may or may not have access to certain pages.
    Some pages may be accessed by all user profiles while other pages may only be accessed by one or two profiles..
    After the user logs on, I keep the profile in the session.
    What is the best way to validate access to each jsp? My app has a big tendency to get bigger and bigger and to have more and more jsps, so I would like the solution to address this issue.
    Any help is appreciated...
    Nuno Geraldes

    You can set up declarative security in your web.xml file.
    Basically you have users and roles.
    You can restrict access to html/jsp pages based on the role a user is logged in on.
    Heres a basic extract from a project: sets up an admin folder, only available to those in the admin role.
    This security is part of the servlet spec, and should be supported by all servlet containers.
    For Tomcat, you may find this page on setting up realms useful.
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
          <form-login-page>/login/login.html</form-login-page>
          <form-error-page>/login/loginerror.html</form-error-page>
        </form-login-config>
      </login-config>
      <security-constraint>
        <web-resource-collection>
          <web-resource-name>Admin Application</web-resource-name>
          <url-pattern>/admin/*</url-pattern>
          <http-method>GET</http-method>
          <http-method>POST</http-method>
          <description>Administration Application</description>
        </web-resource-collection>
        <auth-constraint>
          <role-name>admin</role-name>
          <description>Administrators Only</description>
        </auth-constraint>
      </security-constraint>Check out the J2EE tutorial Chapter 32 on Security.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security.html#wp268799
    Hope this helps,
    evnafets

  • Error Failed to load database information - access report from jsp in linux

    Hi,
    While accessing the report from my jsp file I got the below error. I am using Crystal Report Server 2008 V1 in linux environment.
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Failed to load database information.
    Error in File rpt_dp_customer_stmt {9515FCCB-0245-11E0-9DA4-000C29D5AD7D}.rpt:
    Failed to load database information.---- Error code:-2147482931 Error code name:failed
         com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
         com.crystaldecisions.proxy.remoteagent.s.a(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.z.a(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ak.if(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ad.int(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.bk.for(Unknown Source)
         com.crystaldecisions.proxy.remoteagent.v.a(Unknown Source)
         com.crystaldecisions.proxy.remoteagent.v.if(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
         org.apache.jsp.formula_jsp._jspService(formula_jsp.java:117)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Moreover, in my jsp i am passing the data base parameter like below,
    PropertyBag logonProperties = new PropertyBag();;
        mainPB.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, logonProperties);
        mainPB.put(PropertyBagHelper.CONNINFO_DATABASE_DLL, "libcrdb_jdbc.so");
        logonProperties.put("Database Class Name", "oracle.jdbc.driver.OracleDriver");
        logonProperties.put("Use JDBC", "true");
        logonProperties.put("Connection URL", url);
        logonProperties.put("Server", dbserver);
    Also I set the LD_LIBRARY_PATH in linux machine, because i have the libcrdb_jdbc.so file on that path.
    /home/ReportServer/bobje/enterprise120/linux_x86/crpe/

    Its working. I gave crdb_jdbc.dll name in the connection info

  • How to access variables across JSP and JavaScript?

    Hi,
    I have some .js files and in those files, some of the methods need to access to the variables that I'd declare in the jsp files. How do I do it?
    Anne

    You can do it this way, but I'm not sure if this is what you had in mind.
    Say you had a java variable called XString. And you wanted to display
    the value of XString in a javascript Alert. Here's how:
    <html>
    <body>
    <% String XString = "Hi There!"; %>
    </body>
    <script language="javascript">
    alert("<%=XString%>");
    </html>Hope This Help,
    P.

  • Access denied when jsp writes to a`network  file system

    Hi
    Can anyone help. Im having big problems with my web application which was working fine when it was hosted on a tomcat windows NT machine. The application was recently upgraded to a Windows 2000 machine. My jsp page which has to write to a network drive can no longer do so. I keep getting ACCESS DENIED.
    My jsp page is as follows:
    <html>
    <head><title>test</title></head>
    <body>This is a test page
    <jsp:useBean
    id="sendSMS"
    scope="page"
    class="podsystembeans.phonetrackbeans.FileWrite"
    />
    <%
    String sms = sendSMS.testIO();
    out.println(sms);
    %>
    </body></html>My javabean is as follows:
    package podsystembeans.phonetrackbeans;
    import java.io.*;
    public class FileWrite
         public String testIO(){
              try{
                       // Create file
                  FileWriter fstream = new FileWriter("R:/outt.txt");
                 BufferedWriter out = new BufferedWriter(fstream);
                  out.write("Hello Java");
                  //Close the output stream
                  out.close();
              }catch (Exception e){//Catch exception if any
                System.out.println("Error testing : " + e.getMessage());
         return "success";
    }OBSERVATION
    If i try and write the file to the local machine for example C and D drives then it works. If i try and write the file to R drive which is another windows 2000 machine then i get access denied. Also if i try and write to a L drive which is a windows NT machine then i get the same message too.
    If i run the above bean as a stand alone application with
    public static void main
    and I run it then it will work and write to any drive on the network.
    Everytime my application fails to write to the network drive my windows machine shows the mapped drives with a red cross on it. I have applied the latest service packs and i have followed microsofts suggestions editing the registry autodisconnect keys. But i am still having problems and it is my java app which is causing it.
    SETTINGS
    Windows 2000 service pack 4
    Tomcat 5 installed on d drive
    java 5 installed on c drive
    mapped network drives to other machines , the network is a 192.168.1.x network
    regards
    antek

    Hi
    Thanks for the pointer, I am trying to follow the suggestion and I want to know is the server.policy same as catalina.policy in tomcat under the conf folder. Also in this policy do i write the ip addresses of the machines i want to access?
    Thanks
    Antek

  • Column Not found error while trying to access databse through JSP+Java Bean

    I am trying to acees MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the databse is incorporated in the bean.The jsp only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
         public CompanyBean(){}
         public void connect()
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
         System.out.println("Here1");
         catch (ClassNotFoundException e)
         System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
         catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
         e.printStackTrace();
    public void disconnect()
         try
         if (con!=null)
    con.close();
         catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
         try
    st=con.createStatement();
         rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
         String dbpassword=rs.getString("password");
         if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
              <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    U're getting this error because there is no field called 'password' in ur database, the field in ur database is named 'cpassword' and not 'password'. So change the statement rs.getString("password"); to rs.getString("cpassword");

  • Column Not found error while trying to access database through JSP+Java Bea

    I am trying to access MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the database is incorporated in the bean.The JSP only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
    public CompanyBean(){}
    public void connect()
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
    System.out.println("Here1");
    catch (ClassNotFoundException e)
    System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
    e.printStackTrace();
    public void disconnect()
    try
    if (con!=null)
    con.close();
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
    try
    st=con.createStatement();
    rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
    String dbpassword=rs.getString("password");
    if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
    <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean in WEB-INF/classes,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    Hi, I too have a problem with an SQL exception, the message is Column not found.
    I'm using the sun jdbc odbc driver with access.
    the first few lines of the stack trace are
    sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1852)
    sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:603)
    net.homeip.sdaniels.MemberBean.ejbFindByUnamePwd(MemberBean.java:127)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    I am of course sure that the column does infact exist. I can insert into the column no problems. the sql looks like this:
    SELECT * FROM Members WHERE uName ='Stewart' AND encPwd='�F2C�3����h�1Y�'
    Can any one tell me if there is a common cause to this problem?
    Thanks

  • Problem in accessing mysql thru Jsp

    Hello Friends,
    Here i am having Mysql server 4.1,Apache tomcat 4.1,Connector/j 3.1. I have done all the installation and tyhe configurations. But still i am not able to access the database through Jsp while i am doing with Java appln. I think the error lies in the server.xml file. In the settings of Server.xml, i need to know about the resource name.
    <Resource name="jdbc/MySQLDB"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/MySQLDB">
    Here i need to know what i should give instead of that MySQLDB, Whether database name or any other name. Please help me. With this problem i strucking with not able to proceed further.
    Thanks in Advance
    Aski

    Hi Preet,
    You need to create an Abstract Portal Component  and use the generated link in action class of logon form.
    Also create your jsp under PORTAL-INF/jsp folder.
    Once the portal component is created, you can use the link
    "/irj/servlet/prt/portal/prtroot/PortalProject.PortalComponent" to redirect from logon page as required.
    Thanks and Regards,
    Pravin Patil

  • Timed access restriction in jsp

    Dear Friends,
    While working on a website development, I've faced the following problem:-
    I want to display a Webpage (written in HTML and JSP) in between a particular timing. [e.g. the page will be displayed in between 09:45 AM to 11:30 AM and again from 01:30 PM to 02:45 PM]. But except that particular duration, that page won't be displayed. Rather then an error page will be generated stating that you accessed that page in wrong time!! This task is essential for my project, but actually I don't know how to do it. Can anyone help me please!!! I'll be very greatful to all of those persons who can help me by giving advice or any type of suggestion.
    Thanks in advance,
    Abhinandan Banik

    Here's an example of the filter :
    package test;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    public class TimeFilter implements Filter {
      public void init(FilterConfig config) throws ServletException {
      public void doFilter(ServletRequest request, ServletResponse response,
        FilterChain chain) throws IOException, ServletException {
        int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
        // only service the request between 08:00 and 17:59
        if (hour >= 8 && hour <= 17) {
          chain.doFilter(request, response);
        // for other times, forward the request to someplaceelse
        } else {
          request.getRequestDispatcher("/someplaceelse").forward(request, response);
      public void destroy() {
    }You will also need this in your web.xml :
    <filter>
      <filter-name>TimeFilter</filter-name>
      <filter-class>test.TimeFilter</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>TimeFilter</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

  • Error in accessing servlet from JSP

    Hello everybody,
    When I access a servlet from a JSP page,I am getting the following error message :
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    I am using Weblogic 7.0 and my web.xml code is as follows:
    <web-app>
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TestServlet</servlet-name>
    <url-pattern>/TestServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    I am accessing the servlet from a javascript function in my JSP page.
    I am quite new to the Java technology. So any help in this regard would be highly appreciated.
    Thanks in advance,

    The form action event is in a javascript function. I am sorry I mentioned that I am accessing this servlet from JSP. Actually,this servlet is accessed from an HTML document.
    The following is the javascript code:
    <script language="javascript">
    function lfnCallNext()
         alert("In the function");
         frmMain.method="POST";
         frmMain.action="/TestServlet";
         frmMain.hidChoice.value="GetList";
         frmMain.submit();
    </script>
    And this function is called from an hyperlink as follows:
    Work with Employee Database
    Thanks,

  • How to access dataprovider through jsp syntax

    I am creating an image gallery but here's my issue...
    I have a database table that contains links to images on my file system. I created a dataprovider for this database table on my page so the dataprovider now returns all the image links.
    Now what I need to do is create a row of thumbnails so I add a scriptlet in my jsp code where I want the thumbnail to appear. This scriptlet loops through the dataprovider and for each row it will create a standard html image tag populating the src attribute with the link from the dataprovider.
    I figure creating dynamic html img tags is much easier than creating dynamic image components in the backing bean. Doing the former allows me to output the row of thumbnails exactly where I want them on the page (ie where i put my scriptlet code) and is easier to manage.
    The problem is i don't know how to access the dataprovider through jsp tags and syntax. I'm sure there must be a way, can anyone help?
    Thanks.

    I've done this sometimes using scriplets:
    <%
        request.setAttribute("SOME_CONST", Constants.SOME_CONST);
    %>
    <c:out value="${SOME_CONST}" />But I would also be interested if anyone knows a way without those ugly scriplet..
    O

  • Java Bean access in a JSP Tag handler class

    Hello Everybody,
    I am trying to access my java bean(ErrorBean.java) in th doEndTag() method of the tag handler class(MyTagHandler.java) and iam getting an "CLASSCAST EXCEPTION"
    I am doing it like this in the tag handler class.
    MyBeans.ErrorBean errorBean = (MyBeans.ErrorBean)pageContext.getSession().getAttribute("ErrorBean");
    Where MyBeans is the package in which my Error Bean is and iam placing the ErrorBean object in the session object before it comes to the jsp page where i have the jsp Custom tag:
    <%@ taglib uri="/WEB-INF/taglib.tld" prefix="errors" %>
    <errors:message/>
    <%@ include file="footer.jsp"%>
    I was of the opinion that i was casting it right...can anyone help me to find ...where iam doing it wrong...its really URGENT ..PLEASE

    Friend that did not work either ...
    u know what...the ErrorTagHandler class is comiling fine with out errors but in the jsp page when the custom tag is hit..this error is showing up when i see the server log.
    can you throw some light on this..
    thanks..
    Firasath

Maybe you are looking for