Dynamic Web Project Errors

Hi
im developing a dynamic web project in eclipse. i have some java classes that access a database and they get the database url,database driver and server from an inf file. Ive written a simple class that tests this and it works fine, it retrieves the data from the inf file, accesses the database and returns the data. The problem comes when i try and fit this in with some servlets and run it on apachi through eclipse. I have a html login page, when user presses submit it sends data to a servlet which then calls the database access methods in the java classes and depending on if the input matches the database forward user to a successful/unsuccessful login page. Now this works fine when i manually enter the url,driver etc into the code but when i try it using the inf file i get errors. Do i need to place the inf file in a particular directory e.g. WEB-INF so that it can be accessed when it is run on the server?
Thanks
David

Did you put in debugging/logging statements to confirm that the values you're retrieving from the file are correct?

Similar Messages

  • Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1

    Hello.
    I have a problem in OEPE (oepe-juno-distro-win32.zip), where the Data tab in Palette shows no Managed Beans,
    even if I created them in the ManagedBeans in faces-config.xml using the Faces Config Editor.
    I have created a Dynamic Web Project with these Facets:
    Dynamic Web Module 3.0
    Java 1.7 (JDK 1.7_21)
    Java Annotation Processing Support 5.0
    JavaScript 1.0
    JavaServer Faces 2.1
    JSTL 1.2
    Oracle WebLogic Web App Extensions 12.1.1
    I am using Oracle WebLogic Server 12c 12.1.1 zip distribution for hosting the application.
    For example, I have a UserBean Managed Bean of Session scope, that has 3 String fields
    and the respective getters and setters.
    I create a "test.jspx" file, and from the Palette -> Tags tab -> JSF HTML I drag a Form into
    the new file so I can connect it to UserBean and generate a form to enter its details.
    I select the "Generate a form tag and content from data" and in the Choose Bean dialog
    there is none of my Beans.
    What could be the problem?
    Thanks in advance.
    Edited by: 997841 on Apr 30, 2013 6:09 PM
    I forgot to mention the Oracle WebLogic Web App Extensions version 12.1.1 and that also
    for JSF 2.1 the "sub-directory" Faces Configuration below the project in Project Explorer is not
    existent, as in projects created with earlier versions of JSF.

    Yes, they are both listed under the WebLogic System Libraries.
    This is the content of .classpath file when using WebLogic System Library:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
         <classpathentry kind="src" path="src"/>
         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Oracle WebLogic Server 12c (12.1.1) JRE">
              <attributes>
                   <attribute name="owner.project.facets" value="java"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="src" path=".apt_src">
              <attributes>
                   <attribute name="optional" value="true"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.system">
              <attributes>
                   <attribute name="owner.project.facets" value="jst.web"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
         <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
         <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.shared/jstl/exact/1.2"/>
         <classpathentry kind="output" path="build/classes"/>
    </classpath>
    And this is the content when using User Library with Mojarra:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
         <classpathentry kind="src" path="src"/>
         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Oracle WebLogic Server 12c (12.1.1) JRE">
              <attributes>
                   <attribute name="owner.project.facets" value="java"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="src" path=".apt_src">
              <attributes>
                   <attribute name="optional" value="true"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.system">
              <attributes>
                   <attribute name="owner.project.facets" value="jst.web"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
         <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
         <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.shared/jstl/exact/1.2"/>
         <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JSF 2.1 (Mojarra 2.1.6-FCS)">
              <attributes>
                   <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
                   <attribute name="owner.project.facets" value="jst.jsf"/>
              </attributes>
         </classpathentry>
         <classpathentry kind="output" path="build/classes"/>
    </classpath>

  • Creating a Dynamic Web Project from existing source?

    I don't see this option in OEPE like there is in Workshop for Weblogic. All I can choose from is "Create Dynamic Web Project" which creates a new project from scratch, or "Create Java Project" which has an option in the wizard to import existing source.. however this makes it a vanilla Java project instead of a Dynamic web project.
    Did the concept of importing existing code into a project not cross anyone's minds when this plugin was developed? It's as if the expectation was that everyone would use this on their own private projects and there would be no collaborative/parallel development.
    What is the recommended way for creating a Dynamic Web project off of existing source code without stomping all over the existing web.xml weblogic.xml?

    There are many "import" scenarios, so let's break them down and lay out the support expectations:
    1. A java ee project created with base Eclipse using Web Tools Platform project types. This scenario includes both the case where the project creator had OEPE installed as well as the case where there was no OEPE installed. In this case, one should use the import existing projects wizard as the project being included already has metadata that can be read directly.
    2. A java ee project created with a non-Eclipse IDE or perhaps completely by hand with rudimentary tools such as notepad. Currently, the way this case is supported is by creating new projects and copying application source into them. Advanced users may be able to configure support in place, but we cannot support users with this approach as the possibility of corruption is high. We are currently working on a set of wizards that will help automate this case. These wizards will be available in the release of OEPE that's slated to ship around the end of 2009 or early 2010.
    3. A project created with BEA Workshop. This case is not supported as there are a number of technologies in Workshop that have been end-of-lifed (such as Apache Beehive). Users with Workshop applications should stay with Workshop until they are able to remove dependencies on end-of-lifed technologies. At that point moving to OEPE is recommended. Unofficially (this option is not supported but may work), advanced users may be able to migrate a Workshop app to OEPE, by stripping out all Workshop metadata (.project, .classpath, .settings, etc.) and by pretending that this is scenario #2 (import of a non-Eclipse application). Don't try this if your application still have dependencies on end-of-lifed technologies.
    - Konstantin

  • Dynamic Web Project

    Hi all.
    I'm setting up my first Dynamic Web Project in eclipse and wondering what structure the project should have?
    I am currently think of the below structure, is this ok? What are the recomended project structures for a web project?
    ++ +Root
    ++ test+<br / + WebContent
    ++ Meta-Inf+
    + Web-Inf
    + lib
    + classes
    + jsp
    ++ scripts+
    + styles
    Thanks in advance for your help.
    Edited by: stevegc on Aug 18, 2009 4:22 PM
    Edited by: stevegc on Aug 18, 2009 4:25 PM

    Hi,
    while your question is not necessarily a Java related question, if you downloaded the Eclipse Juno J2EE you should have the option in File->New->DynamicWebProject.
    All the best !

  • Dynamic web project link absent in Eclipse Junos

    I cant see the option of Dynamic web project link in Eclipse Junos.
    From where i can download the plugin for the same.

    Hi,
    while your question is not necessarily a Java related question, if you downloaded the Eclipse Juno J2EE you should have the option in File->New->DynamicWebProject.
    All the best !

  • Creating dynamic web project in flash builder 4

    Hi,
         How to create dynamic web project (java) in flash builder 4 ?when I navigate Help->Software Updates,I am getting No Updates Found(There are no update sites to search.Do you wish to open the "Available Software Sites" preferences?)
    Please let me know if any one knows how to create dynamic java web project.
    -sasi

    I have same problem.  Why are the update sites URLs not hardcoded?

  • Jsf web project is not working in eclipse ConfigureListener

    Hi, I created a dynamic web project in eclipse with tomcat server, I also referenced the jsf jar files, besides the web.xml files contains <listener-class>com.sun.faces.config.ConfigureListener</listener-class>; even though when I run the web project or the jsp file, it appears with the following error:
    Estado HTTP 404 - /ejmweb6/start.jsp
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
    25-abr-2010 22:46:10 org.apache.catalina.core.StandardContext listenerStart
    Error configuring class listener com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
    java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletRequestListener
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
    Can you help me with problem? please
    Regards
    Carlos

    That class should be provided by the application server. Double check that the version of Tomcat you have supports servlet 2.4. Also check there are no bug reports against it for this error.

  • Not able to create a web project with jsf or jsp or struts or spring

    Hi,
    I am trying to create a dynamic web project with jsf or jstl or struts or spring or any of web options available for a web project, but I am not able to do it.
    When I choose any of these options, the wizard asks me to "select an existing jstl/jsf/Spring 2.0 library, or click Add to add a new library." and since it doesn't show any existing libraries there, I clicked on add new library. When I click add, it opens a new dialog box where it has two options :
    1. to use spring/jstl/jsf lib from bea web site - when I choose this option, it tries to connect to the bea web site and gives me error that "connect time out". I don't know why it is not able to connect to the internet. I am not able to see the help also. There it gives error "The requested URL could not be retrieved".
    2. to use libraries from an existing spring installation - I provide the path of a directory where spring lib are, but then it gives me error that this is not a valid installation.
    On another machine, I am able to see the help contents, but still not able to get these libraries from the bea site.
    Please help.
    Thanks in advance,
    Sushma

    Hi Sushma,
    The issue you are facing has been addressed and will be part of the next release. For the current release, please follow the steps listed below.
    Send an email to [email protected] with details on specific facets you are trying to enable on your project.
    You will be provided with a url where you can download the required jars and details on how to manually add the jars to the workspace which will prevent the download on demand scenario.
    Cheers
    Raj

  • Eclipse web project using Glassfish 4.1 can not load some libraries in modules directory

    We installed latest "Glassfish Tools for Luna" (updated on 2 October 2013) and created a new Eclipse dynamic web project using Glassfish 4.1. When try to annotate a class with "javax.enterprise.context.ApplicationScoped", it complains as "ApplicationScoped cannot be resolved to a type" although imported as "import javax.enterprise.context.ApplicationScoped".
    Checking "glassfish-4.1/glassfish/modules/" directory and there is cdi-api.jar that contains ApplicationScoped class. But when checking from the project libraries in the eclipse, couldnt see such a jar.
    My configuration:
    Eclipse 4.4
    Glassfish runtime java development kit : java 1.8.0_20
    Project java development kit : java 1.8.0_20
    Project compiler level : 1.8
    Project facets : Dynamic web module 3.1, Java 1.8, Glassfish Web Extensions 4.0, Javascript 1.0
    How to solve this issue?
    Thanks.

    There are 274 jars in the Glassfish 4.0 modules directory, whereas there are 282 jars in the Glassfish 4.1 modules directory. So it is not only cdi-api.jar. Moreover there are some libraries, the names of which have been changed.
    Why not simply importing all libraries in the modules directory to Eclipse, like Tomcat plugin does for tomcat/lib directory? So when manually deploying a library(jar) to modules directory Eclipse will discover it automatically.
    Thanks.

  • JEditorPane  == "Web Project In Eclipse  "

    Hi,
    I am using eclipse 3.2 and I am creating a "Bank" project as a "dynamic web project" in eclipse.
    My Bank project's gui has a JEditorpane . I also have a button outside JEditorpane.
    When the button is clicked, a html file (form) is displayed inside JEditorpane.
    My html file name is "checking.html". I had placed "checking.html" inside the C:/...../workspace/Bank.
    But when I give like this and click button ,it is not displayling my html file in the JEditorpane.
    But instead of having that "Bank" project as a "dynamic web project" in eclipse, if I have it as "java project" in eclipse, it is able to display the html file on button click.
    But I want to have 'Bank' only as "dynamic web project" in eclipse. So what can I do to resolve this issue.
              checking_button.addActionListener(
                        new ActionListener()
                        public void actionPerformed (ActionEvent event)
                             try
                                jeditor_pane.setPage("file:checking.html");
                             catch(Exception e)
              );

    I want to find out the implemented classes of these interfaces.
    can i use the right click menu of mouse to find those classes ?If you want to find the implementors of an interface:
    (1) Right click on the interface whereever it occurs in your code or in the Package
    Explorer, and select "Open Type Hierarchy (F4)"
    (2) Then in the Type Hierarchy pane, right click on the interface and follow the menu
    from "Implementors". You can find the classes that implement this interface in your
    workspace, project or in a working set.

  • Warning message about ClassNotFoundException in a new web project

    - Eclipse 3.3M6
    - Web Tools Platform 2.0M6
    Hello, everybody!
    I created a Dynamic Web Project using JSF and JPA, but I'm getting the following
    warning message in the Problems view:
    Classpath entry org.eclipse.jdt.USER_LIBRARY/Biblioteca JPA will not be exported or published. Runtime ClassNotFoundExceptions may result.
    This user library, Biblioteca JPA, is composed of this jars:
    antlr-2.7.6.jar
    cglib.jar
    dom4j.jar
    ejb3-persistence.jar
    hibernate3.jar
    hibernate-annotations.jar
    hibernate-entitymanager.jar
    sqljdbc.jar
    jboss-hibernate.jar
    In the project I also have these libraries:
    Biblioteca JSF:
    commons-collections.jar
    jstl.jar
    myfaces-api.jar
    myfaces-impl.jar
    JBoss v4.0:
    jboss-j2ee.jar
    jbossall-client.jar
    javax.servlet.jar
    javax.servlet.jsp.jar
    activation.jar
    mail.jar
    So, I would like to know how do I configure the Bliblioteca JPA to disable possible
    problems with ClassNotFoundExceptions happening at runtime. What do I have to add or
    change on it to get rid of the warning message? Or whatever is the solution that you
    use when this message appear.
    Thank you in advance.
    Marcos

    Hi Deepa,
    >As there is no way where we can upload images directly
    Please provide a link to support this statement.
    And, of course, you can upload images. Have a look [here|Re: Visual composer 7.1 upload the image](at your own thread!)
    Regards,
    Vani V

  • How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    Screenshot of how it looks when i try to show a ms access form inside a iframe:
    http://oi58.tinypic.com/2vj4ish.jpg

  • How to create the Custom project System as Web Project

    Hi,
    I have created a custom project system using this walkthrough. But
    this walk through is targeting Visual C# project system. I need to create the Custom project system as Web project and set the start up page as index.html file. How can I achieve this?
    Note: 
    I have got the Custom project system sample from VS2013 SDK samples(https://mpfproj12.codeplex.com/).
    But it demonstrate the Custom console applications only.
    - Abbas K

    Hi,
    So you didn't even follow this walkthrough yet? If you did, how did you do it?
    I failed to create such a web project system because I finally messed up my VS experimental instance. But it's possible to create a custom web project system, by following this walkthrough. Someone else has successfully made it, check this
    link.
    The difference is that you have to use web project type instead of the console application project type. You could copy a web project's .csproj file into the VSPackage project and rename it to xxx.myproj. There's an error in the walkthrough that the AssemblyInfo.cs
    file should be put into Properties folder and set the "Build Action" property to Content, "Include in VSIX" to true.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How does Azure Compute Emulator (or the Azure one) determine if a role is web project or something else ("The Web Role in question doesn't seem to be a web application type project")?

    I'm not sure if this is F# specific or something else, but what could cause the following error message when trying to debug locally an Azure cloud service:
    The Web Role in question doesn't seem to be a web application type project.
    I added an empty F# web api Project to a solution (which adds Global.asax etc., I added an OWIN startup class Startup etc.) and then from an existing
    cloud service project I picked Roles and
    chose Add
    -> Web Role Project in solution, which finds the F# web project (its project type guids are 349C5851-65DF-11DA-9384-00065B846F21 and F2A71F9B-5D33-465A-A702-920D77279786),
    of which the first one seem to be exactly the GUID that defines a web application type.
    However, when I try to start the cloud project locally, I get the aforementioned error message. I have a C# Web Role project that will start when I remove the F# project. I also have F# worker
    role projects that start with the C# web role project if I remove this F# web role project. If I set the F# web project as a startup project,
    it starts and runs as one would expect, normally.
    Now, it makes me wonder if this is something with F# or could this error message appears in C# too, but I didn't find anything on Google. What kind of checks are there when starting the emulator and which one needs
    failing to prompt the aforementioned message? Can anyone shed light into this?
    Sudet ulvovat -- karavaani kulkee

    Sudet,
    Yeah you are right, the GUID mentioned seems to be correct and the first one i.e. {349C5851-65DF-11DA-9384-00065B846F21} means the web application project which compute emulator uses to determine while spawning up role instances.
    You might want to compare the csproj of your C# and F# web projects which might give some pointers.
    Are you able to run your F# web project locally in IIS? If yes then you will definitely be able to run it on azure so I will recommend to test it in IIS Express first.
    Here are some other tips which you can refer or see If you are yet to do those settings
    1. Turn on the IIS Express - You can do it by navigating to project properties
    2. Install Dependent ASP.NET NuGets / Web Api dependencies (If there are any missing), Reference System.Web assembly
    Also I will suggest to refer this nice article about how to create a F# web Api project
    http://blog.ploeh.dk/2013/08/23/how-to-create-a-pure-f-aspnet-web-api-project/
    Hope this helps you.
    Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

  • Importing web project into Workshop 9.2

    Hi,
    I'm trying to import an existing web project into Workshop 9.2.1 from my Subversion source. Unfortunately Workshop doesn't recognize this project as a valid web project.
    I imported the code project using 'File>Import>Existing Projects' into Workspace.
    Unfortunately, I get the following errors:
    - "The library module reference : beehive-netui-1.0 is not allowed from the classpath of a non-web project, only JAR,EJB, and EAR module types are allowed."
    - "The library module reference : jstl is not allowed from the classpath of a non-web project, only JAR,EJB, and EAR module types are allowed."
    How do I tell Workshop that this project is indeed a web project?
    Does anyone have any suggestions?
    Thanks,
    Derrek

    Wow.... I figured out a workaround (aka Ugly Hack). It seems that Workshop doesn't properly import Portlet projects. Here's how I got around it:
    1. Checkout the code from Subversion
    d:\MyProjects\Project\trunk\MyComponent\
    2. Move MyComponent to a temp directory
    d:\MyProjects\Project\trunk\MyComponent\ --> d:\tmp\MyComponent
    3. Open Workshop and create a new Portal project and PortalEAR project of the same name as the MyComponent projects
    File>New myComponentPortal
    4. Copy over the src and WebContent directories in the SVN directory with the files from tmp.
    d:\tmp\MyComponent\src -> d:\MyProjects\Project\trunk\MyComponent\src
    d:\tmp\MyComponent\src\WebContent -> d:\MyProjects\Project\trunk\MyComponent\WebContent
    5. Refresh Workshop and let the spooky voodoo happen. Viola! Now I've got a running portal project with a SVN connection.

Maybe you are looking for