PDA

Visualizza la versione completa : [Servlet]HTTP Status 404


fatina biondina
22-05-2007, 12:27
ciao a tutti
ho un problema con tomcat e le servlet
in pratica le servlet vengono compilate senza problemi
il problema sta nel richiamare questa servlet da tomcat in quanto se faccio

http://localhost:8080/ITemRecommender/servlets/Login

mi da sto maledetto errore:


HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

description The requested resource () is not available.


--------------------------------------------------------------------------------

Sun Java System Application Server Platform Edition 9.0_01


provo e riprovo ma l'errore sta sempre qua nel file web.xml
potreste aiutarmi a configurare per bene i tag relativi alle servlet?
ora vi spiego la mia disposizione dei file

C:\Programmi\Apache Software Foundation\Tomcat 6.0\webapps\ITemRecommender\WEB-INF\classes\servlet\Login.class

io ho fatto cos (ma vedo ke non va :dh: )

<servlet>
<servlet-name>Login</servlet-name>
<servlet-class>Login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Login</servlet-name>
<url-pattern>servlets/Login</url-pattern>
</servlet-mapping>

ditemi cosa ho fatto di sbagliato :(
grazie aspetto vostre notizie
(vi prego aiutatemi.. urgente :( )

ps.: lo so ke questo argomento c'era gi sul forum ma seguendo pure i consigli ke c'erano l'errore me lo da sempre ecco perk ho postato il mio caso :yuppi:

dardo
22-05-2007, 12:41
ciao
tu hai scritto <servlet-class>Login</servlet-class>
prova a inserire invece :
<servlet-class>servlet.Login</servlet-class>

fatina biondina
22-05-2007, 15:21
nada avevo gi provato
ora ho riprovato appare sempre lo stesso errore..
diventato un incubo!! :oVVoVe:
help :bh:

dardo
22-05-2007, 18:39
(le maiuscole mi sembrano corrette)
nella classe hai dichiarato il package di appartenenza?

fatina biondina
22-05-2007, 22:49
si :(
help :dh:

al massimo vi posto cosa mi dice catalina quando tento di avviare tomcat.. magari pu essere di aiuto.. :bh:

ps: non so come allegare qui il file senn lo avrei fatto :(

fatina biondina
22-05-2007, 23:03
22-mag-2007 21.52.19 org.apache.coyote.http11.Http11Protocol init
GRAVE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEnd point.java:499)
at org.apache.coyote.http11.Http11Protocol.init(Http1 1Protocol.java:175)
at org.apache.catalina.connector.Connector.initialize (Connector.java:1059)
at org.apache.catalina.core.StandardService.initializ e(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize (StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina .java:504)
at org.apache.catalina.startup.Catalina.load(Catalina .java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstr ap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:412)
22-mag-2007 21.52.19 org.apache.catalina.startup.Catalina load
GRAVE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.initialize (Connector.java:1061)
at org.apache.catalina.core.StandardService.initializ e(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize (StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina .java:504)
at org.apache.catalina.startup.Catalina.load(Catalina .java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstr ap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:412)
22-mag-2007 21.52.19 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1297 ms
22-mag-2007 21.52.20 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22-mag-2007 21.52.20 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
22-mag-2007 21.52.24 org.apache.tomcat.util.digester.Digester fatalError
GRAVE: Parse Fatal Error at line 2 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner .reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner .scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanPIData(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner .scanPI(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1562)
at org.apache.catalina.startup.ContextConfig.applicat ionWebConfig(ContextConfig.java:369)
at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062)
at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4238)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:448)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
22-mag-2007 21.52.24 org.apache.catalina.startup.ContextConfig applicationWebConfig
GRAVE: Parse error in application web.xml file at jndi:/localhost/ITemRecommender/WEB-INF/web.xml
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1562)
at org.apache.catalina.startup.ContextConfig.applicat ionWebConfig(ContextConfig.java:369)
at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062)
at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4238)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:448)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
22-mag-2007 21.52.24 org.apache.catalina.startup.ContextConfig applicationWebConfig
GRAVE: Occurred at line 2 column 6
22-mag-2007 21.52.24 org.apache.catalina.startup.ContextConfig start
GRAVE: Marking this application unavailable due to previous error(s)
22-mag-2007 21.52.24 org.apache.catalina.core.StandardContext start
GRAVE: Error getConfigured
22-mag-2007 21.52.24 org.apache.catalina.core.StandardContext start
GRAVE: Context [/ITemRecommender] startup failed due to previous errors
22-mag-2007 21.52.24 org.apache.tomcat.util.digester.Digester fatalError
GRAVE: Parse Fatal Error at line 2 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.

fatina biondina
22-05-2007, 23:04
spero ke possa essere di aiuto
(non tutto ho dovuto spezzare spero di aver preso le parti pi salienti)

puntino
23-05-2007, 00:34
Hai provato con:

<servlet-mapping>

<servlet-name>Login</servlet-name>
<url-pattern>/ servlets/Login</url-pattern>
</servlet-mapping>

dardo
23-05-2007, 09:39
java.net.BindException: Address already in use: JVM_Bind:8080

be qui gia c' un'altro tipo di errore
forse cerchi di avviare un secondo tomcat.

fatina biondina
23-05-2007, 10:55
Originariamente inviato da dardo
java.net.BindException: Address already in use: JVM_Bind:8080

be qui gia c' un'altro tipo di errore
forse cerchi di avviare un secondo tomcat.
ho notato che me lo dice di nuovo
come posso fare per evitare ci?
( la prima volta che uso tomcat quindi abbiate un p di pazienza se vi chiedo cose stupide)

Loading