HELP with EJB to JSP Integration tool WLS 7.0

          Hi,
          Has anyone used the EJB2JSP Integration tool in WLS 7.0? I can't find any documenation
          except for the page at http://edocs.bea.com/wls/docs70/jsp/ejb2jsp.html. It is
          not much help. I can get the graphical tool to run, but not import a .jar file.
          This is the error I get when trying to open an ejb.jar.
          C:\bea\user_projects\myTestDomain\applications\DefaultWebApp\WEB-INF\classes\EJB\Spike>java
          weblogic.servlet.ejb2jsp.gui.Main
          error occurred: java.lang.NullPointerException
          java.lang.NullPointerException
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
          at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:343)
          at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:314)
          at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:266)
          at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:391)
          at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
          at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
          at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
          at java.lang.Thread.run(Thread.java:479)
          error occurred: java.lang.NullPointerException
          java.lang.NullPointerException
          at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:379)
          at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
          at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
          at java.lang.Thread.run(Thread.java:479)
          Is this error and the fix to it obvious to someone else? If so, I would appreciate
          some help!
          THank you!!
          Wendy
          

Try weblogic.servlet.ejb2jsp.gui.Main
Kris

Similar Messages

  • TagLib created by EJB to JSP Integration Tool

              Hi, I've an EJB deployed on WebLogic 6.1 and I'm using WebLogic's EJB to JSP Integration
              Tool to create JSP Tag Libraries.
              I've written a jsp look like this.
              <%@ taglib uri="WEB-INF/abc-tags.tld" prefix="abc" %>
              

    In web.xml include a <taglib> element
              taglib>
              <taglib-uri>/abc-tags</taglib-uri>
              <taglib-location>WEB-INF/abc-tags.tld</taglib-location>
              </taglib>
              Gary Tam wrote:
              > Hi, I've an EJB deployed on WebLogic 6.1 and I'm using WebLogic's EJB to JSP Integration
              > Tool to create JSP Tag Libraries.
              > I've written a jsp look like this.
              >
              > <%@ taglib uri="WEB-INF/abc-tags.tld" prefix="abc" %>
              

  • EJB to JSP Integration Tool

              Hello,
              I am looking for the command line version of
              java weblogic.servlet.ejb2jsp.gui.Main
              What is it and where is the doco please?
              Thank you,
              T
              

              Got it sorry ;-)
              As simple as weblogic.servlet.ejb2jsp.Main
              t
              

  • How to master good design with EJB and JSP?

    I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?

    You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.

  • Help with Login Form (JSP DB Java Beans Session Tracking)

    Hi, I need some help with my login form.
    The design of my authetication system is as follows.
    1. Login.jsp sends login details to validation.jsp.
    2. Validation.jsp queries a DB against the parameters received.
    3. If the query result is good, I retrieve some information (login id, name, etc.) from the DB and store it into a Java Bean.
    4. The bean itself is referenced with the current session.
    5. Once all that's done, validation.jsp forwards to main.jsp.
    6. As a means to maintain state, I prefer to use url encoding instead of cookies for obvious reasons.I need some help from step 3 onwards please! Some code snippets will do as well!
    If you think this approach is not a good practice, pls let me know and advice on better practices!
    Thanks a lot!

    Alright,here is an example for you.
    Assume a case where you don't want to give access to any JSP View/HTML Page/Servlet/Backing Bean unless user logging system and let assume you are creating a View Object with the name.
    checkout an example (Assuming the filter is being applied to a pattern * which means when a resource is been accessed by webapplication using APP_URL the filter would be called)
    public doFilter(ServletRequest req,ServletResponse res,FilterChain chain){
         if(req instanceof HttpServletRequest){
                HttpServletRequest request = (HttpServletRequest) req;
                HttpSession session = request.getSession();
                String username = request.getParameter("username");
                String password = request.getParameter("password");
                String method = request.getMethod();
                String auth_type  = request.getAuthType();
                if(session.getAttribute("useInfoBean") != null)
                    request.getRequestDispatcher("/dashBoard").forward(req,res);
                else{
                        if(username != null && password != null && method.equaIsgnoreCase("POST") && (auth_type.equalsIgnoreCase("FORM_AUTH") ||  auth_type.equalsIgnoreCase("CLIENT_CERT_AUTH")) )
                             chain.doFilter(req,res);
                        else 
                          request.getRequestDispatcher("/Login.jsp").forward(req,res);
    }If carefully look at the code the autherization is given only if either user is already logged in or making an attempt to login in secured way.
    to know more insights about where these can used and how these can be used and how ?? the below links might help you.
    http://javaboutique.internet.com/tutorials/Servlet_Filters/
    http://e-docs.bea.com/wls/docs92/dvspisec/servlet.html
    http://livedocs.adobe.com/jrun/4/Programmers_Guide/filters3.htm
    http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html
    http://www.servlets.com/soapbox/filters.html
    http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
    and coming back to DAO Pattern hope the below link might help you.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    http://java.sun.com/blueprints/patterns/DAO.html
    http://www.javapractices.com/Topic66.cjp
    http://www.ibm.com/developerworks/java/library/j-dao/
    http://www.javaworld.com/javaworld/jw-03-2002/jw-0301-dao.html
    On the whole(:D) it is always a good practice to get back to Core Java/J2EE Patterns.and know answers to the question Why are they used & How do i implement them and where do i use it ??
    http://www.fluffycat.com/java-design-patterns/
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
    http://www.cmcrossroads.com/bradapp/javapats.html
    Hope that might help :)
    REGARDS,
    RaHuL

  • Help with the insert table/form tool in BIP 10.1.3.2.1

    Hi, I'm trying to use the insert table/form tool in BIP, and running into some issues that I don't understand. First off, my data coming in looks like this (left column of tool):
    Rowset
    --- Row
    ------ Customer ID
    ------ Customer Name
    ------ Customer City
    ------ Product
    ------ Amount Sold
    I would like the output to do the following:
    a) have one page per customer. Customer should be determined by customer ID, and has attributes of customer ID, customer Name, Customer City
    b) Show a table of all products and the total Amount Sold by product for that customer
    c) Give a "grand total" for the customer
    Can someone help with the steps needed to do this? I've tried several variations of the following without much luck:
    1) Added Rowset and all children to the "Template" pane
    2) Clicked on the "Row" group, and set Grouping = Customer ID, with a break of "New page per Element"
    3) Clicked on the newly created (from step 2) Cust ID group, and set it to group by Product
    4) Moved "amount sold" to be at same level as Product
    5) Moved all of the customer attributes (name, address, etc.) to be at same level as Cust ID
    6) On the Cust ID level, set the style to table
    7) on row and rowset levels, set style to free form
    This seems to be VERY close, except that it isn't creating a total amount for the sum of all products purchased by a customer. What do I need to do inside the tool to get a total per customer to show up?
    Thanks in advance!
    Scott
    p.s. the final hierarchy in the template window looks like this:
    Rowset (style = freeform, no grouping/sort by/breaks)
    --- Row (style = freeform, group by customer ID, break new page per element)
    ------ Customer ID (style = table, group by product, no breaks)
    --------- Product (nothing special)
    --------- Amount Sold (calc for grouping = SUM)
    ------ Customer Name (nothing special)
    ------ Customer City (nothing special)
    Thanks very much for the help!
    Scott

    To anyone else who sees this post, the answer is to do the following. Insert the Amount Sold field using the "Insert Field" tool, and set the function to sum, with the grouping checkbox turned on.
    Thanks,
    Scott

  • Help with EJB Arch: Synchronous front-end -- Asynchronous back-end

    Hi folks, We are developing an application with the following characteristics: - users can invoke requests on our appl and they will expect a quick response - to obtain the information requested by the user, our application talks with Tibco using RV. This communication follows a pub/sub messaging paradigm and is asynchronous. - thus, we have a synchronous req/resp front-end and an asynch back-end.
    We would like some advice as to the best way of architecting this application. Here is our approach. Please critic and suggest alternatives.
    1. Consider an user who has requested something from our app. 2. The user will be using a JSP based front-end. (S)he submits the request on a form and a servlet is driven. 3. The servlet uses a session EJB and invokes one of its methods, which handles some business-specific logic. 4. The method in the session EJB then instantiates a helper class. 5. A method on our helper class is now driven. This method sends a message to Tibco and it provides a callback method in the helper class. 6. The method in the helper class blocks the thread - basically, it waits. 7. Meanwhile, Tibco does the processing and invokes the callback method (in the helper class) with the result. 8. In the callback method, the data sent by Tibco is stored in member variables of the helper class. 9. The callback method wakes up the blocking thread. 10. The method in step 6 wakes up and returns the information to the session EJB. 11. The session EJB returns the information to the invoking servlet. 12. The servlet provides the information back to the user.
    The version of Tibco-RV that we are using is not JMS compliant.
    We keep hearing that threads should be handled very carefully in an EJB container environment, so we would like to know if the way we are handling the thread in the helper class is okay. Could we remove the helper class and do the same thread-handling in the session EJB itself?
    Can we use JMS in this solution even though our Tibco-RV does not support JMS?
    Tools: Weblogic App Server 6.1, JBuilder 5.0.
    Thanks for your advice and suggestions!

    Let me start off by mentioning that Sonic MQ (an excellent JMS server) now provides a bridge for TIB/Rendezous. I am also wrestling with a simliar issue, something that requires threading at the servlet or ejb level, and have given some thought to using JMS. My concern was that JMS is an asynchronous process so it's model does not fit well with the synchronous front end. Technically I can see a few ways to implement it but architecturally I am not convinced that they are sound. You could send a message from the session bean to the TIB via SonicMQ and have a JMS message bean registered as a listener for messages from the TIB, again via SonicMQ. The JMS bean could update a static class or singleton which your session checks but you still have the issue of making the session bean wait on that event.
    I'll do a bit more digging and see if there's a design pattern available for this situation.
    -Dat

  • Help With EJB Client

    I have successfully gotten my client to run when I use the appclient with the reference implementation. When I try to run my simple client outside of appclient I get the following error.
    Exception: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: I
    DL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    I have my client.jar which is returned from the deploy tool, I have the j2ee.jar in my classpath, and I have my jndi name set up as ejb/Hello in the server. My code to access this is such:
    public static void main(String[] args)
    try
    System.out.println("Adding properties");
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://MyHost:3700");
    Context initial = new InitialContext(env);
    System.out.println("Got initial context!");
    Object o = initial.lookup("java:comp/env/ejb/Hello");
    System.out.println("got object from lookup");
    HelloHome home = (HelloHome)PortableRemoteObject.narrow(o, com.tosht.ejb.HelloHome.class);
    System.out.println("got home object back and did remote narrow cast");
    Hello h = home.create();
    System.out.println("got component interface");
    System.out.println(h.sayHello());
    System.out.println("called business method on component interface");
    catch(Exception ex)
    System.out.println("Exception: " + ex.toString());
    I am sure this is a jndi issue, but in the deploy tool my applications jndi name for my component is ejb/Hello just as it is in code?
    Any help would be greatly appreciated!!!!!

    Hi Tim,
    Couple things I can think of. 1) Are you sure that the ejb application deployed correctly? ejb/Hello does look like the right global JNDI name given the sun-ejb-jar.xml, so one explanation is that the ejb is not found because it wasn't deployed at all or wasn't deployed successfully. 2) It's worth double-checking that you have the correct client code compiled and found at runtime. Is it possible there is still the old version of the client main class that is looking up java:comp/env/ejb/Hello?
    One final suggestion is to print the exception.printStackTrace() rather than exception.toString(). There is often very valuable information about the exception that is not printed out as part of toString().
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

  • Help with customised login JSP on SSO server

    Our customised version of the SSO login page JSP is required to access a database table in order to retrieve a dynamic message to display. This means we will need to create utility java classes in order to connect to the database and retrieve the information. We will also ideally need a data source on the SSO APP Server that we can reference in order to avoid hard-coding environment specific connection data.
    Can anyone help out on where we will need to install the utility classes and where the data source can be created in order for the login JSP to see them. Is there any other configuration we need to consider e.g. classpaths etc?
    The coding we are fine with, it is the actual "what goes where and don't forget to include this" that we are unsure of.

    Hello St***,
    Did you accomplished the cusomized SSO logon page with database access. If yes can you please provide met with some examples and instructions how to accomplish this.
    Regards,
    Dennis

  • Help with EJB plz

    Hi,
    I'm new to EBJs and am playing with an entity bean pretty much identical to the one on the J2EE tutorial but the home interface does not compile and I've got no idea why. Would really appreciate your help.
    COMPILER COMPLAINT*****
    C:\j2sdkee1.3\nim\src\ejb\addresses>javac AddressesHome.java
    AddressesHome.java:7: cannot resolve symbol
    symbol : class Addresses
    location: interface AddressesHome
    public Addresses Create(String id, String firstname, String lastname, St
    ring address, int contactno) throws RemoteException, CreateException;
    ^
    AddressesHome.java:10: cannot resolve symbol
    symbol : class Addresses
    location: interface AddressesHome
    public Addresses FindByPrimaryKey(String id) throws FinderException, Rem
    oteException;
    ^
    2 errors
    HOME INTERFACE*****
    import java.util.Collection;
    import java.rmi.RemoteException;
    import javax.ejb.*;
    public interface AddressesHome extends EJBHome
         public Addresses Create(String id, String firstname, String lastname, String address, int contactno) throws RemoteException, CreateException;
         public Addresses FindByPrimaryKey(String id) throws FinderException, RemoteException;
         public Collection FindByLastName(String lastname) throws FinderException, RemoteException;
    ADDRESSESSBEAN CLASS*****
    import java.sql.*;
    import javax.sql.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    public class AddressesBean implements EntityBean
         private String id;
         private String firstname;
         private String lastname;
         private String address;
         private int contactno;
         private Connection conn;
         private EntityContext context;
         private String dbName = "java:comp/env/jdbc/AddressesdB";
         public String ejbCreate(String id, String firstname, String lastname, String address, int contactno) throws CreateException
                   if(address == null || address.length() == 0)
                        throw new CreateException("You must specify an address");
                   try
                        insertRow(id, firstname, lastname, address, contactno);
                   catch(Exception e)
                        throw new EJBException("ejbCreate: " + e.getMessage());
                   this.id = id;
                   this.firstname = firstname;
                   this.lastname = lastname;
                   this.address = address;
                   this.contactno = contactno;
                   return id;
         public void changeAddress(String address)
              this.address = address;
         public String getAddress()
              return address;
         public void changeContactno(int contactno)
              this.contactno = contactno;
         public int getContactno()
              return contactno;
         public String getFirstname()
              return firstname;
         public String getLastname()
              return lastname;
         public String ejbFindByPrimaryKey(String primaryKey) throws FinderException
              boolean result;
              try
                   result = selectByPrimaryKey(primaryKey);
              catch(Exception e)
                   throw new EJBException("ejbFindByPrimaryKey: " + e.getMessage());
              if(result)
                   return primaryKey;
              else
                   throw new ObjectNotFoundException("Row for id " + primaryKey + " not found");
         public Collection ejbFindByLastName(String lastname) throws FinderException
              Collection result;
              try
                   result = selectByLastName(lastname);
              catch(Exception e)
                   throw new FinderException("ejbFindByLastName :" + e.getMessage());
              return result;
         public void ejbRemove()
              try
                   deleteRow(id);
              catch(Exception e)
                   throw new EJBException("ejbRemove : " + e.getMessage());
         public void setEntityContext(EntityContext context)
              this.context = context;
              try
                   makeConnection();
              catch(Exception e)
                   throw new EJBException("Unable to connect to database: " + e.getMessage());
         public void unsetEntityContext()
              try
                   conn.close();
              catch(Exception e)
                   throw new EJBException("unsetEntityContext: " + e.getMessage());
         public void ejbActivate()
              id = (String)context.getPrimaryKey();
         public void ejbPassivate()
              id = null;
         public void ejbLoad()
              try
                   loadRow();
              catch(Exception e)
                   throw new EJBException("ejbLoad: " + e.getMessage());
         public void ejbStore()
              try
                   storeRow();
              catch(Exception e)
                   throw new EJBException("ejbStore: " + e.getMessage());
         public void ejbPostCreate(String id, String firstname, String lastname, String address, boolean contactno)
         /****************************** DataBase Routines ******************************/
         private void makeConnection() throws NamingException, SQLException
              InitialContext ic = new InitialContext();
              DataSource ds = (DataSource) ic.lookup(dbName);
              conn = ds.getConnection();
         private void insertRow(String id, String firstname, String lastname, String address, int contactno) throws SQLException
              String insertStatement = "inset into ADDRESSES values (?, ?, ?, ?, ?)";
              PreparedStatement prepStmt = conn.prepareStatement(insertStatement);
              prepStmt.setString(1, id);
              prepStmt.setString(2, firstname);
              prepStmt.setString(3, lastname);
              prepStmt.setString(4, address);
              prepStmt.setDouble(5, contactno);
              prepStmt.executeUpdate();
              prepStmt.close();
         private void deleteRow(String id) throws SQLException
              String deleteStatement = "delete from ADDRESSES where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(deleteStatement);
              prepStmt.setString(1, id);
              prepStmt.executeUpdate();
              prepStmt.close();
         private boolean selectByPrimaryKey(String primaryKey) throws SQLException
              String selectStatement = "select id from ADDRESSES where id = ? ";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, primaryKey);
              ResultSet rs = prepStmt.executeQuery();
              boolean result = rs.next();
              prepStmt.close();
              return result;
         private Collection selectByLastName(String lastname) throws SQLException
              String selectStatement = "select id from ADDRESSES where lastname = ? ";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, lastname);
              ResultSet rs = prepStmt.executeQuery();
              ArrayList a = new ArrayList();
              while(rs.next())
                   String id = rs.getString(1);
                   a.add(id);
              prepStmt.close();
              return a;
         private void loadRow() throws SQLException
              String selectStatement = "select firstname, lastname, address, contactno from ADDRESSES where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, this.id);
              ResultSet rs = prepStmt.executeQuery();
              if(rs.next())
                   this.firstname = rs.getString(1);
                   this.lastname = rs.getString(2);
                   this.address = rs.getString(3);
                   this.contactno = rs.getInt(4);
                   prepStmt.close();
              else
                   prepStmt.close();
                   throw new NoSuchEntityException("Row for id " + id + " not found in the dataBase");
         private void storeRow() throws SQLException
              String updateStatement = "update ADDRESSES set firstname = ?, lastname = ?, address = ? contactno = ? where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(updateStatement);
              prepStmt.setString(1, firstname);
              prepStmt.setString(2, lastname);
              prepStmt.setString(3, address);
              prepStmt.setInt(4, contactno);
              prepStmt.setString(5, id);
              int rowCount = prepStmt.executeUpdate();
              prepStmt.close();
              if(rowCount == 0)
                   throw new EJBException("Storing row for id " + id + " failed.");
    }

    EJB questions should be posted in the EJB forum! :=)
    I did find the compiler message a bit strange. Usually if I don't have a class defined it complains that it cannot find package_name.class_name (when I'm using packages for my own code).

  • Please Help with my first jsp

    Hi, this may seem basic to you but i've frying my head with simple jsp. Any books i looked at only show code segments!
    All i want to do is create an html entry page with form fields for username, password, email address, send the information to a jsp page that validates the form entries and then stores the info in database, and be able to display the info stored in the db also.
    Any help or pointers would be appreciated, or links to good tutorials!
    Thanks in advance.....

    with this i am sending my own code :
    its a html page :
    <Script LANGUAGE="JavaScript" ></Script>
    <%@ page import="java.util.*" %>
    <%@ page import="java.lang.*" %>
    <html>
    <head>
    <title>Login</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Microsoft Theme" content="expeditn 011">
    </head>
    <body background="exptextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#993300" vlink="#666600" alink="#CC3300">
    <!--mstheme--><font face="Book Antiqua, Times New Roman, Times">
    <form name="frmlogin" method="post">
    <p> 
    </p>
    <p> 
    </p>
    <p> 
    </p>
    <p> 
    </p>
    <p>                                                       
    User Name : 
    <input type="text" name="txtname">
    <br>
    <br>
    Password   : 
    <input type="password" name="txtpassword">
    </p>
    <p>                                                                    
    <input type="submit" name="submit" value="Submit" onclick="javascript: return loadmy('sub')">
    </p>
    </form>
    <script>
    var i=0;
    function loadmy(val)
              if(val=="new")
                   document.frmlogin.action='form.jsp';          
              }else
                   if(onCheck())
                        document.frmlogin.action='login.jsp';
                   }else
                        return false;
    function onCheck()
         if(document.frmlogin.txtname.value=="")
              alert("Please enter user name ..");
              document.frmlogin.txtname.select();
              document.frmlogin.txtname.focus();
              return false;
         if( document.frmlogin.txtpassword.value=="")
              alert("Please enter password ..");
              document.frmlogin.txtpassword.select();
              document.frmlogin.txtpassword.focus();
              return false;
         return true;
    </script>
    <p> </p><!--mstheme--></font></body>
    </html>
    IN this page i am taking user name and password. ok?
    now another JSP file with database connection is here: I think you have enough idea for database connection. So i'll ommit that.
    <html>
    <head>
    <title>Login Result Page</title>
    <meta name="Microsoft Theme" content="expeditn 011">
    </head>
    <%@ page import="java.lang.*,java.sql.*"%>
    <%@ page import ="Database.*" %>
    <body background="exptextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#993300" vlink="#666600" alink="#CC3300">
    <!--mstheme--><font face="Book Antiqua, Times New Roman, Times">
    <%
         String uname = request.getParameter("txtname");
    String password = request.getParameter("txtpassword");
         String pquery="Select * from login where uname='"+uname+"'";
         String query="Select * from login where uname='"+uname+"'and password='"+password+"'";
         ClsDataBase cdb = new ClsDataBase();
         Connection con = cdb.getConnection();
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(pquery);
         if(rs!=null)
              if(rs.next())
                   ResultSet r=stmt.executeQuery(query);
                   if(r!=null)
                        if(r.next())
                        session.setAttribute("uname",uname);
                        session.setAttribute("Lflag","true");
    %>
    <p><font size=4 color="green">Wel Come <%= uname %>!!!</font></p>
    <p>
    <form action="listofuser.jsp" method="post" name="f1">
    </form>
    <%                    }
                        else
    %>
    <p> <font size=4 color="red">Wrong Password.</font> </p>
    <p><font size="4" color="green">Go back to login screen</font></p>
    <%
              else
    %>
         <font size=4 color="red">Invalid user....</font>
         <p><font size="4" color="green">Go back to login screen</font></p>     
    <%
         stmt.close();
         cdb.close();
    // conn.close();
    %>
    <!--mstheme--></font>
    </body>
    </html>
    hope this will help you. bye....

  • Help with EJB & JNDI

    I am getting following error while compiling EJB session client
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at client.SimpleSessionClient.main(SimpleSessionClient.java:20)
    My session client code is
    package client;
    import java.util.Hashtable;
    import beans.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.*;
    import javax.naming.spi.InitialContextFactory;
    import javax.naming.NamingException;
    public class SimpleSessionClient {
         public static void main(String[] args) {
              try {
                   Context jndiContext = new InitialContext();
                   Object ref = jndiContext.lookup("ejb/beans.SimpleSession");
                   SimpleSessionHome home = (SimpleSessionHome)PortableRemoteObject.
                   narrow(ref, SimpleSessionHome.class);
                   SimpleSession simpleSession = home.create();
                   for (int i=0; i<args.length; i++) {
                        String returnedString = simpleSession.getEchoString(args);
                        System.out.println("Sent String:" + args[i] +", " +
                                  "recieved string" + returnedString);
              } catch(Exception e) {
                   e.printStackTrace();
    I have include j2ee.jar in the classpath too and I could deploy the EJB home and remote interface as well as Bean class in sun application server.
    Any help wuld be appreciated.
    Rashmi

    I am using Sun App server for deploying EJB. In the same system, I am running eclipse where I run the EJB client with JNDI to connect to EJB component.
    If this is not the right way, please suggest. I am trying to do this for the first time and completely clueless. I have tried to include different jar files in my classpath and even I am in the process of downloading websphere in case that could help me.

  • Help with EJB and JNDI, please

    Hello. My name is Santiago, and i am a student from the University of Valladolid, in Spain. I am newcome in the world of EJB, I have done the first EJB from de Sun tutorial (I�m using the Sun Java System Application Server PE 8.2) and now I am trying to improve it in that way: I have the EJB and the client in diferent machines conected.
    I am trying to understand how to use JNDI, but i have not good results :( I have read about using ldap but i dont know if it is apropiated, or if it is installed automaticaly with the sun aplication, or if i have to download and install it... i am not sure about anything :)
    This is my client�s code (part of it)
    Hashtable envirom = new Hashtable();
    envirom.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    envirom.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
    envirom.put(Context.PROVIDER_URL,"iiop://Santiago:389");
    envirom.put(Context.PROVIDER_URL,"ldap://192.168.1.101:389");
    envirom.put(Context.SECURITY_AUTHENTICATION,"none");
    InitialContext ctx = new InitialContext(envirom);
    Object objref = ctx.lookup("java:comp/env/ejb/Multiplica");
    When I try to connect in local mode (client and EJB in the same machine) i get something like that:
    javax.naming.CommunicationException: 192.168.1.101:389 [Root exception is java.n
    et.ConnectException: Connection refused: connect]
    at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
    at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
    at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1578)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
    It is even worse when i try it in different machines:
    10-mar-2006... com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImp1<init>
    ADVERTENCIA: "IOP00410201: <COMM_FAILURE> Fallo de conexion: Tipo de socket: IIOP_CLEAR_TEXT;
    name of host: portatil; puerto: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:201 completed:No
    Both SSOO are XP and I have disabled Firewalls.
    PLEASE, if you colud help me It would fantastic, because I am in that trouble, i have tryed 1000 solutions but i am not able to understand it.
    Hoping you can help me.
    Santiago.

    This thread is now being followed up in:
    http://swforum.sun.com/jive/thread.jspa?threadID=64092

  • Help With SkillBuilders Plug-Ins Integration

    Hi All,
    I have the following situation and I appreciate any help regarding to this (Apex Version 4.1.1.00.23):
    I have a Page with the SB Calendar Plug-In, when the user clicks on the Create Event button, a modal page pop-ups with a form that allows the user to enter an event using the Schedule Plug-in. After created, the modal page closes and the calendar is refreshed with the event. This part works fine.
    My problem is with the following situation: when clicking in an existing Event on the Calendar, I want to be able to open the same modal page with the Event Details to allow the user to modify it.
    I tried defining a class in my Calendar query, and specified the URL with the Event Details Page; also, created a Dynamic Action to trigger when the class is clicked (Scope: live) and open the modal, but what it does instead:
    1. The Modal Page opens empty, and immediately
    2. The complete page is redirected to the Event Details Page with the information of the Event.I set up an example on apex.oracle.com:
    Workspace: EDIAZJORGE
    Username: TEST
    Password: test
    Application: 34925 - Schedule Event
    Again, I appreciate any help!
    Thank you and regards,
    Erick

    Erick,
    When the anchor is clicked, its default action is executed, which is to redirect to the href.
    You have bound a click handler to the div container of the anchor. This occurs, and you briefly see the modal start up before the page is redirected.
    So, to fix this the default action on click of the anchor tag has to be prevented.
    You can not specify something like this in the plugin however, and also not from the SQL. Neither can you adjust the dynamic action: adding a "Cancel Event" true action will not fix this.
    I changed the "Edit Event Details" dynamic action jQuery selector from ".eventClicked" to ".eventClickedLink"
    I added a dynamic action "Attach modal page edit to links", which is a "Page load" action. There is a true action which executes javascript:
    $(".eventClicked a").click(function(event){
    event.preventDefault();
    }).addClass("eventClickedLink")This will prevent the default action on click of the anchor tag, which has the eventClicked class on page load, and then add the class eventClickedLink to it, which will allow the modal page dynamic action to react to it (it has to have the dynamic scope too, which it already had).
    The class juggle is necessary. If you'd not use the class names and let the page load, then the modal page dynamic action will already have bound a click handler to the matched elements. Assigning another click handler at that point would have no result.

  • Help with BI Report iView integration!

    Hello,
    I have been provided with a BI 7.0 Report URL (http://<BI FQDN>:8000/sap/bw/BEx?cmd=ldoc&infocube=<SUPPLIED INFOCUBE>&query=<SUPPLIED QUERY>&sap-language=EN) that i need to integrate into Portal as an iView. I have created BI System in the Portal System Landscape by entering following Parameters:
    Connector Properties:
    Logical System Name: <BI LS Name>
    SAP Client: 100
    SAP System ID (SID): B01
    SAP System Number: 00
    System Type: SAP_BW
    User Management Properties:
    Logon Method: UIDPW
    User Mapping Type: admin, user
    Web Application Server (Web AS) Properties:
    Web AS Description: BI Web AS
    Web AS Host Name: <BI FQDN>:8000
    Web AS Path: /sap/bw/Bex
    Web AS Protocol: http
    After this i gave an alias SAP_BW for this system and then did the User Mapping for this system with my user account. Now i from PCD i am creating a New iView of type "SAP BW Report iView" and entered following parameters:
    Application Verison: 7.x
    Application Parameter: SAP_BW
    BEx Web Application Query String: infocube=<SUPPLIED INFOCUBE>&query=<SUPPLIED QUERY>
    Then when i do a PREVIEW test i get following message:
    Service cannot be reached
    What has happened?
    URL http://<BI FQDN>:8000/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.web.portal.integration.launcher call was terminated because the corresponding service is not available.
    Note
    The termination occurred in system B01 with error code 404 and for the reason Not found.
    The selected virtual host was 0 .
    What can I do?
    Please select a valid URL.
    If you do not yet have a user ID, contact your system administrator.
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:sapb01_B01_00-v:0-s:404-r:Notfound
    HTTP 404 - Not found
    Your SAP Internet Communication Framework Team
    If i execute the same query from Query Designer then also i get a error screen with an invalid URL in the address bar and a message in the body saying "The Page Cannot be Displayed". The URL that is pointed from Query Designer is:
    http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=<SUPPLIED QUERY>&VARIABLE_SCREEN=X&DUMMY=7
    The same report gets perfectly executed from BI System. Can anyone please tell me why am i getting these error messages and how do i resolve? Please advice. Thanks.

    Hi Vasu ,
    I think you have a problem is due to BI-JAVA . Please check the  links in below.
    BI Java
    Displaying BW3.x Objects on Portal 6.0 SP9 after upgrade to NW2004s BI
    what exactly is in "BI java" ?
    Regards,

Maybe you are looking for

  • Analysis Authorization based on Hier node with multiple display hierarchies

    Hi guys - I've got a problem where s.o. might have an idea of how to switch on the light at the end of the tunnel, I am currently standing in: Requirement: Cost Center Authorization should be given through RSECADMIN, reporting should be possible for

  • A question on the SG 300-10...

    I am using the default factory settings on this device.  Is this device capable of handing all 10 ports at Gigabit Ethernet at the same time?  The reason I ask is because I've experience strange things.  Say I am using 6 ports and Gigabit ethernet. 

  • In iCal can't assign .ICS calendar event to non-"on my mac" calendars

    In apple mail, I click on the the .ICS file [sent by windows outlook user] and can see that it is added into iCal. Great, as expected. However, if I right click on this event, under "calendars" I can only assign it to either "home" or "work" i.e. tho

  • Problem with mysql count with where clauese

    i think my query is wrong. can please someone guide me. I am trying to get the countedvalue of myinbox table but i am running into big trouble. i tried searching the google but could not find the relevant data. please guide me cheers SELECT COUNT(sen

  • Playlist burning song order

    occasionally the playlist that gets burned to a cd changes its order, latest one rearranged songs into order by artist...