i am trying to deploy a .war file on my local server using sun microsystem's application server. the problem i am having is when i try to launch it in the address bar as:
http://localhost:8080/HelloServlet/
it shows the directory listing for/ text on the screen.
but when i insert /hello ( "<url-pattern>/hello</url-pattern>") like this: http://localhost:8080/HelloServlet/hello,
shows error---
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error allocating a servlet instance
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)

root cause

java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1798)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:910)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1375)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1239)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)

note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
===============================================
i guess the problem may be with web.xml file.
but could not figured it out.
any help would be appreciated.

you guessed wrong.
You're trying to deploy a web application compiled with one version of the JDK to a server running a lower version.

thanks for replying.
i don't get your point.
can you please elaborate further.

no, if you don't understand that nothing I can tell you is going to make you understand.
You'd best just give up and go back to flipping burgers and filling shelves at the supermarket.

thanks for the wonderful reply.
i would love do that anytime of the day.
but how will that going to solve my problem.

see reply #1. If you can't understand that, learn English and/or see reply #3

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.