srinivas venkat

Greenhorn
+ Follow
since Aug 19, 2009
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 srinivas venkat

Hi
I have a problem with the working of radio button in jsf. i tried the following code


Here in this case valueChangeListener is not getting exe3cuted.But the radio button is getting selected.

when i add document.form.submit(); to the script valuechangelistener is getting executed but the radio button is not getting selected.
Please advice me on this.
10 years ago
JSF
That solved my problem........ i am a beginner started learning servlets and jsps so dont mind if i ask any silly doubts.......Thanks a lot for your help vijitha Kumara ....
12 years ago
thank you very much that solved my problem
12 years ago
Thanks for your help Vijitha Kumara but still the same errors continues package com.example.model doesnot exist ................ i jus changed directories like what you have said...................

i am compiling using the following command

E:\projects\p3>javac -classpath "C:\Program Files\Apache Software Foundation\Tom
cat 5.0\common\lib\servlet-api.jar";"E:\projects\p3\classes\com\example\model";classes:. -d classes src\com\example\web\BeerSelect.java

and my changed directory structure is
E:\projects\p3\src\com\example\model\BeerExpert.java------------this one is compiling and creating .class file at E:\projects\p3\classes\com\example\model\BeerExpert.class
E:\projects\p3\src\com\example\web\BeerSelect.java

the source code for BeerSelect.java is

package com.example.web;
import com.example.model.*; ----------error in importing this
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
{
String c=request.getParameter("color");
BeerExpert be=new BeerExpert();
List result=be.getBrands(c);

response.setContentType("text/html");
PrintWriter out=response.getWriter();
out.println("Beer Selection Advice <br>");

Iterator it=result.iterator();
while(it.hasNext())
{
out.println("<br>try:"+it.next());
}
}
}

help me out please
12 years ago
hi
I am studying head first java .In the starting pages of compiling a java file they gave command

%javac -classpath /your path/tomcat/common/lib/
servlet-api.jar -d classes src/Ch1Servlet.java


I could actually compile java file through editors but when i try to compile using command prompt i got %javac as not recognized command .if i remove % then i get

javac: invalid flag: Files\Apache
Usage: javac <options> <source files>
use -help for a list of possible options


i gave command as
javac -classpath C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar -d classes src\Ch1Servlet.java and i set the correct directory path also

Expecting a reply .
12 years ago
Thanks for your reply

I ill keep my source files in another directory from now onwards


If one of your source files uses any other class file which you compiled those should be accessible in order to compile the class (which is done usually setting a CLASSPATH entry to those packages)

I didnt get your point ......how can i set classpath entry ? how can i solve this problem?
12 years ago
Hi everyone i am newbie to this community.I am reading head first servlets .I got an error showing package com.example.model.*; doesnot exist .........
I set my environmental variable classpath as C:\Program Files\Java\jdk1.6.0\lib\tools.jar;C:\Program Files\Java\jdk1.6.0\lib\dt.jar;.;C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;%CLASSPATH%;

I can compile BeerExpert.java but i cannot compile BeerSelect.java file

my directory structure for BeerSelect.java is C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\chanti3\WEB-INF\classes\com\example\web\BeerSelect.java

my directory structure for BeerExpert.java is C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\chanti3\WEB-INF\classes\com\example\model\BeerExpert.java


I got the error in the line import com.example.model.*;

can any1 help me?
waiting for your reply

thank you
12 years ago