vijay kaaman

+ Follow
since May 18, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by vijay kaaman

I find the following error message.

Nov 17, 2011 11:15:37 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory Beer-v1
java.lang.UnsupportedClassVersionError: com/example/web/BeerSelect : Unsupported major.minor version 51.0 (unable to load class com.example.web.BeerSelect)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(
at org.apache.catalina.loader.WebappClassLoader.findClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(
at org.apache.catalina.startup.ContextConfig.start(
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.startup.HostConfig.deployDirectory(
at org.apache.catalina.startup.HostConfig.deployDirectories(
at org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(

in the catalina.* file
6 years ago
There is a web.xml in the "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\WEB-INF" directory.

This is what I have in web.xml

<web-app xmlns="" xmln:xsi=""
version = "2.4">

<servlet-name>Ch3 Beer</servlet-name>

<servlet-name>Ch3 Beer</servlet-name>



I have the following code in and is placed in "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes\com\example\web" directory. The BeerSelect.class file is also present in this directory.

package com.example.web;

import javax.servlet.*;
import javax.servlet.http.*;

public class BeerSelect extends HttpServlet {

public void doPost(HttpServletRequest request,
HttpServletResponse response
) throws IOException, ServletException{


PrintWriter out = response.getWriter();

out.println("Beer Selection Advice<br>");

String c = request.getParameter("color");

out.println("<br> Wants beer color "+ c);


This is the code in form.html

<h1 align="center">Beer Selection Page </h1>
<form method = "POST" action="">Select beer characteristics<p>

Color:<select name="color" size="1">
<option value="light">light</option>
<option value="amber">amber</option>
<option value="brown">brown</option>
<option value="dark">dark</option>


<input type = "SUBMIT">


6 years ago
I am on windows 7.

I have this "form.html" in the following directory location.

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\form.html

I believe I have tomcat started.
Navigated to.. C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin and ran the Tomcat6w as administrator.

I used the following URLs..

Tried this on IE and Google chrome.

Keep getting the error..
HTTP Status 503 - This application is not currently available


type Status report

message This application is not currently available

description The requested service (This application is not currently available) is not currently available.


Apache Tomcat/6.0.33
6 years ago

I am using windows 7.

JAVA_HOME and PATH environment variables set. "C:\Program Files\Java\jdk1.7.0_01"

on the following directory.."C:\SCWCD\beerV1\src\com\example\web\" there exists a file called

when I issue the javac command in the above directory as "javac"..I get the "javac not recognized as an internal external command.." error message. However, if I move the java file to the bin directory in "C:\Program Files\Java\jdk1.7.0_01", I do not get the javac not recognized error.

Can someone help me with this?

THank you.

6 years ago
I am preparing to take the SCJP 6.0.

I am primarily using Sierra and Bates for my preparation.

I found some interesting (read those that I could not answer questions on boxing, and would welcome any help to understand this topic a little better.

1. Long and Integer extend Number.
***Why does 12 get boxed to an Integer object, when I am only assigning it to a Supertype Number? I mean, why did it not get Boxed to Number directly?***

Number x = 12;

May be the reason I cannot cast an Integer x to Long is because they are not on the same class tree..i.e, Long does not extend Integer, and Integer does not extend Long. Please clarify if my assumption is right.
Number y = (Long) x;

2. I can do this
int x = 1;

Number y = x;

but when I do this..
if (y == x) I get an error..
would it be safe for me to assume that, a Number object and a Integer object cannot be compared, even if Integer is ONLY a subclass of Number. I ask this question becuase the compiler does not complain when I try to do this.
int x = 1;
Integer y = x;
if (y == x) errors