Moin Khatri

Greenhorn
+ Follow
since Mar 18, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Moin Khatri

thanks for the reply Amir.any explaination this context would be really helpful for me

Cheers,
Moieen
12 years ago
Hi,
I am Moin.Please can anyone explain me whether an Output Stream be serialized or no and why.

Thanks in advance,
Moin
12 years ago
Hi ,

Thanks for replying back Raghavan.

I tried adding the path E:\MyProjects\beerV1\src\com to the CLASSPATH env variable but I still get this error


E:\MyProjects\beerV1>javac -d classes src/com/example/web/BeerSelect.java
src/com/example/web/BeerSelect.java:2: package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors

Please can you let me know what possibly could I be doing wrong and also I tried to compile from cmd line and also did permanently set the classpath but it still doesn't work

Thanks and Regards,
Moieen
12 years ago
Hi ,

Thanks for replying back Raghavan.

I tried adding the path E:\MyProjects\beerV1\src\com to the CLASSPATH env variable but I still get this error


E:\MyProjects\beerV1>javac -d classes src/com/example/web/BeerSelect.java
src/com/example/web/BeerSelect.java:2: package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors

Please can you let me know what possibly could I be doing wrong and also I tried to compile from cmd line and also did permanently set the classpath but it still doesn't work

Thanks and Regards,
Moieen
12 years ago
Hi,

I cannot compile a servlet BeerSelect.java. when I try to compile this servlet from the command line using this command I get the following errors

javac -d classes src/com/example/web/BeerSelect.java



E:\MyProjects\beerV1>javac -d classes src/com/example/web/BeerSelect.java
src/com/example/web/BeerSelect.java:2: package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src/com/example/web/BeerSelect.java:26: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors

Here are the source files:

package com.example.web;
import com.example.model.*;


import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;


public class BeerSelect extends HttpServlet {


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

response.setContentType("text/html");

PrintWriter out = response.getWriter();

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

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

BeerExpert be = new BeerExpert();
List result = be.getBrands(c);
Iterator it = result.iterator();
while(it.hasNext()){
out.print("<br>try: " + it.next());
}


}

BeerExpert class:

package com.example.model;

import java.util.*;

public class BeerExpert {

public List getBrands ( String color) {

List brands = new ArrayList();

if(color.equals("amber")) {

brands.add("Jack Amber");

brands.add("Red Moose");
}

else {

brands.add("Jail Pale Ale");
brands.add("Gout Stout");
}

return(brands);
}
}

Please can someone help me resolve this?

Thanks in advance,
Moieen
12 years ago
ATG

Originally posted by Kalpana Balasubramanian:
I am new to ATG technologies. Is there any ATG tutorials for beginners.

Thanks in advance.


Hi Kalpana,
Please visit www.atg.com

Regards,
Moieen
12 years ago