hi
iam trying to complie this code -
import javax.servlet.*;
-
import javax.servlet.http.*;
-
import java.util.*;
-
import java.sql.*;
-
-
public class MainServlet extends HttpServlet {
-
-
RequestDispatcher dis = null;
-
-
public void doPost(HttpServletRequest req,HttpServletResponse resp) {
-
-
resp.setContentType("text/html");
-
String action = req.getParameter("submit");
-
Dispatcher dis = null;
-
try {
-
-
if (action.equalsIgnoreCase("login")) {
-
System.out.println("login invoked");
-
loginAction(req, resp);
-
}
-
-
}catch(Exception e){
-
}
-
}
-
-
private void loginAction(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException
-
{
-
System.out.println("Accounts Button Clicked");
-
//System.out.println("Hash table values "+ht);
-
dis= req.getRequestDispatcher("/home.html");
-
if (dis != null) {
-
-
// forward request to next page
-
dis.forward(req, resp);
-
}
-
}
-
}
-
Iam getting an error saying
package javax.servlet.http does not exist
please help in compileing the code
Iam begginer to servlets concept
14 1836
most probably the specific library missing .....
hi
iam trying to complie this code -
import javax.servlet.*;
-
import javax.servlet.http.*;
-
import java.util.*;
-
import java.sql.*;
-
-
public class MainServlet extends HttpServlet {
-
-
RequestDispatcher dis = null;
-
-
public void doPost(HttpServletRequest req,HttpServletResponse resp) {
-
-
resp.setContentType("text/html");
-
String action = req.getParameter("submit");
-
Dispatcher dis = null;
-
try {
-
-
if (action.equalsIgnoreCase("login")) {
-
System.out.println("login invoked");
-
loginAction(req, resp);
-
}
-
-
}catch(Exception e){
-
}
-
}
-
-
private void loginAction(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException
-
{
-
System.out.println("Accounts Button Clicked");
-
//System.out.println("Hash table values "+ht);
-
dis= req.getRequestDispatcher("/home.html");
-
if (dis != null) {
-
-
// forward request to next page
-
dis.forward(req, resp);
-
}
-
}
-
}
-
Iam getting an error saying
package javax.servlet.http does not exist
please help in compileing the code
Iam begginer to servlets concept
Have you installed the j2ee compiler?
Have you installed the j2ee compiler?
no i installed only jdk1.5 can u please tell where can i get the J2EE n how to comple the code
no i installed only jdk1.5 can u please tell where can i get the J2EE n how to comple the code
You can download it from here
You can download it from here
thanx for ur reply
can u please tell me after downloading what should i do
thanx for ur reply
can u please tell me after downloading what should i do
Follow the installation instructions. Make sure you also downloaded a server for deploying your applications from.
Follow the installation instructions. Make sure you also downloaded a server for deploying your applications from.
ya i had installed tom cat will tht be ok.
ya i had installed tom cat will tht be ok.
Yes. Tomcat is fine.
Yes. Tomcat is fine.
i installed j2ee n tomcat it still says
package javax.servlet does not exist
what to do sir ??
plz help me
i installed j2ee n tomcat it still says
package javax.servlet does not exist
what to do sir ??
plz help me
I hope you are not using javac from the SDK to compile the servlet.
i installed j2ee n tomcat it still says
package javax.servlet does not exist
what to do sir ??
plz help me
Before compile put the servlet.jar in your class path.
I hope you are not using javac from the SDK to compile the servlet.
in the command prompt iam going to the path
C:\Sun\AppServer\jdk\bin>
where my java is installed
and giving command as
javac MainServlet.java
package javax.servlet does not exist error is coming
i had installed J2ee i want know the use of it
Before compile put the servlet.jar in your class path.
in the command prompt iam going to the path
C:\Sun\AppServer\jdk\bin>
where my java is installed
and giving command as
javac MainServlet.java
package javax.servlet does not exist error is coming
i had installed J2ee i want know the use of it
wherer can i find servlet.jar file and
how shud i have to put servlet.jar the class path ??
in the command prompt iam going to the path
C:\Sun\AppServer\jdk\bin>
where my java is installed
and giving command as
javac MainServlet.java
package javax.servlet does not exist error is coming
i had installed J2ee i want know the use of it
wherer can i find servlet.jar file and
how shud i have to put servlet.jar the class path ??
here is an article on how to set the class path.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Rama krishna |
last post by:
Hi All:
I got the same problem what u got. Could u pls explain me hoe can i proceed.
I saw some sites on this issue, which actually not worked with me. Iam using
System.Directoryservices dll in...
|
by: yanwan |
last post by:
Hello
I am now compling a project, but in one source file of this project, I met
this problem. It seems very strange.
Below is this source file:
----------------------------------------...
|
by: Chris |
last post by:
Hi,
I am trying to follow the same structure as the MS Application Blocks for my
local stuff. I am trying to create an application block to process payments
which I'll hand out to other developers...
|
by: shiling zhang |
last post by:
I have a C program that is complied fine under DOS and UNIX.
However, the same C program has the following compling error under IBM 390.
TIA.
...
|
by: yanwan |
last post by:
Hello
I am now compling a project, but in one source file of this project, I met
this problem. It seems very strange.
Below is this source file:
----------------------------------------...
|
by: gokhan Can |
last post by:
Is it possible to compile a web application code from command prompt instead
of .Net Framework??
If it is how can I do this ??
Gökhan Can
|
by: SSW |
last post by:
Hi!
I want to include .JS(JavaScript file) to my aspx file.
I used the following tag.
<script language="javascript" src="Utility.js" type="text/javascript">
After compling my page and...
|
by: gshy2014 |
last post by:
Hi, all.
IN Windows, TCHAR is translated to be wchar or char according to
whether UNICODE is defined. Dose the complier handle the UNICODE(define
or not define) according to the OS ?
Many...
|
by: Christian Heimes |
last post by:
inhahe schrieb:
I assume you are trying to compile Python 2.5 with VS 9.0. It's not
supported. Some extensions don't compile under VS 9.0
Christian
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |