facebook

Output folder is missing after creating a project [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #225396 Reply

    rakils
    Member

    Hi,
    I am new to eclipse.Actually I couldn`t see the class folder under WEB-INF.I followed all the steps as given in demo for creating a new Web Project.
    I created a helloworld.java under src folder.Should I have to run or compile something…or click something …to make the class available at class folder.
    In the meantime, when I expand the WEB_INF folder ,the folder named class is missing..So when I try to invoke the method written in helloworld.java
    at the jsp…it`s showing an error.
    helloworld.java sits under com.test
    & when I try to import the package at jsp as
    <%@ page import=”com.test.helloworld.”%>it says
    ‘the type defined in com.test.helloworld conflicts with the type defined in the same file.
    pls help me to solve this 😕

    #225432 Reply

    Riyad Kalla
    Member

    Actually I couldn`t see the class folder under WEB-INF.

    Default behavior in Eclipse’s Package View is to hide the “Output” folder.

    Should I have to run or compile something…or click something …to make the class available at class folder.

    Eclipse has a built in incremental compiler, so every time you “Save” a file, it *is* compiled to the output folder… cool hu?

    In the meantime, when I expand the WEB_INF folder ,the folder named class is missing..

    I think you mean “classes”, see my note above.

    <%@ page import=”com.test.helloworld.”%>it says
    ‘the type defined in com.test.helloworld conflicts with the type defined in the same file.

    This is a known bug, you cannot have your class name and your JSP name be the same. So if you have HelloWorld.java, name your JSP something like Hello.jsp, do not name it HelloWorld.jsp else you run into this problem. The reason is that the JSP page gets compiled to a class, having the same name “HelloWorld.class” which conflicts with your class.

    #225455 Reply

    rakils
    Member

    Thanks for the reply.I changed the jsp file name.There is no prompt of error msg.But i `m getting the following error msg while deploying it in Tomcat 4.1
    I`m using Tomcat 4.1.31.
    Parse Error at line 6 column 52: Document root element “web-app”, must match DOCTYPE root “null”.
    org.xml.sax.SAXParseException: Document root element “web-app”, must match DOCTYPE root “null”.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
    Feb 18, 2005 12:33:11 PM org.apache.commons.digester.Digester error
    SEVERE: Parse Error at line 6 column 52: Document is invalid: no grammar found.
    org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
    Feb 18, 2005 12:33:11 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Feb 18, 2005 12:33:11 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Feb 18, 2005 12:33:11 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=30/110 config=C:\jakarta-tomcat-4.1.31\conf\jk2.properties

    Can u pls help me with this.
    Thanks in advance

    #225458 Reply

    Riyad Kalla
    Member

    Most likely your web.xml file is using the Web 2.4 spec definition (XML SChema) and that is only supported by Tomcat 5.x+, so I would suggest either upgrading your app server, or using a Web 2.3 compliant web.xml file.

    If you want a quick way to get a new compliant web.xml file, create a new WEb project, and when the wizard pops up, select Web 2.3 spec, hit Finish and steal that web.xml file from that project into your own.

    #225459 Reply

    rakils
    Member

    I solved the error..The error is due to web.xml.I changed it`s version to 2.3 and Now it`s working fine.Thanks for the support guys.Good Work keep it up.

    #225460 Reply

    Riyad Kalla
    Member

    Glad to hear it’s working.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Output folder is missing after creating a project [Closed]

You must be logged in to post in the forum log in