jay thakkar

Greenhorn
+ Follow
since Mar 15, 2013
Merit badge: grant badges
For More
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 jay thakkar

bear bibeault bro if you know what is the problem then you could have explained me instead of leaving it on others ot explain

i mentioned to give detailed explaination of the problem... you could have explained "build classpath" to me...
10 years ago
please give an example of how it is done..

if path of any file is to be changed.. please mention.... thanks
10 years ago
hi pals.... i m new to java n i m trying a thing n stuck up ...

i am trying to call method of normal class from within servlets.. i know this is possible so here is what i did..

LoginForm.java



SimplyHello.java // compilation error

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

public class SimplyHello extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)throws IOException,ServletException
{
LoginForm fl = new LoginForm();
fl.getLoginForm();
}
}

both the files are in

cd c:\program files\apache-tomcat-7.0.39\webapps\root

directory..


as public classes are availabe to members of package i shouldnt get compilation error


the error message i get is

SimplyHello.java:10: error: cannot find symbol
LoginForm fl = new LoginForm();
^
symbol: class LoginForm
location: class SimplyHello
SimplyHello.java:10: error: cannot find symbol
LoginForm fl = new LoginForm();
^
symbol: class LoginForm
location: class SimplyHello
2 errors


10 years ago
hi JESPER

BTW here is the error you were asking for....

10 years ago
hey manshukh...... thanks for your reply , it was valuable.. yes i can use IDE but i am not using 1 cause i want to learn all things manually that is why i found JAVA harder then .net.... yes i can run programs with the help of JDK tools(java , javac).....

my question is does setting classpath like given below effect the CLASSPATH variable you set by "advanced system settings" window in win 7 , if it does change the environment variable then my program should not work but it is not changing the CLASSPATH variable in "advanced system settings" window in win 7. so my program should work na ???

c:> set CLASSPATH="path"

c:> JDKTOOL -classpath "path" "some class file"

other question is that "the CLASSPATH variable which i created myself as per a servlet BOOk , and i m setting it does not change so i must be changing some other variable through commands.. so i guess there are 2 CLASSPATH variables ??? 1 )user defined and 2) system defined

please correct if i am wrong.... i will like to know in detail about this topic
10 years ago
hello pals.... i m new to java world and trying hard to learn it

i m learning servlets and i came to know that proctected method in abstract class can be overridden in subclass as public which was something new to me.. so i made my mind to check myself and i wrote a program given below



and i got some error saying that "cant load class" for you.. so i set the variable throught "advanced system setting" window in WIN 7.. still it is not working.. why so ???

CLASSPATH variable is set to the value as given below

CLASSPATH

C:\Program Files\apache-tomcat-7.0.39\lib\servlet-api.jar;D:\java_technology\programs
10 years ago
sorry guys for replying so late.... i m glad that people are so much "helping natured" here so will soon master java technologies

dont know the problem but installed JDK 7.0 and now i m able to run all the programs...

i guess the problem was to me that i just downloaded javaFX 2.1 jdk... so it did not supported basic JAVA syntax.... please correct me if i m wrong.. i will like to learn something new which i dont know
10 years ago
hi guys i m jay and i m so new to servlet just started about 6 7 days before....

first i was successfully able to run servlet in xp... but now i sometimes get error 500 and sometimes i get error 404...

i m trying first simple helloworld.java example whish is in c:\program files\apache-tomcat-7.0.39\webapps\root

i compiled it and copied its .class file in c:\program files\apache-tomcat-7.0.39\webapps\root\WEB_INF\classes

the "classes" subdirectory in WEB-INF was not ther in but i made it as per i was instructed to do...

CODING is as below

helloworld.java

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

public class helloworld extends HttpServlet
{
private String message;

public void init() throws ServletException
{
//message="hello world";
}

public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException
{
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<h1>helloworld</h1>");
}

public void destroy()
{

}
}

web.xml

<servlet>
<servlet-name>helloworld</servlet-name>
<servlet-class>Helloworld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>helloworld</servlet-name>
<url-pattern>/helloworld</url-pattern>
</servlet-mapping>

please please help me quickly i m having xams soon... and more importantly i want to learn this thing deeply... ne good book to learn servlets deeply in your mind??? please share it .. thanks in advance.
10 years ago


y the compilation error occurd???

i m new in java but i follow oracle documentation n i m reading a book on java called "thinking in java"

i m using netbeans 6.9 which i downloaded to learn javaFx language but i can make java applications also... so i guess that must not be n issue n the JDK is 1.7

please please i can't sleep because of this error.. please help
11 years ago