Error in context path

Error in context path

I Tried a Struts2 Login application having following class as Action class..

    package com.actions;

    import com.dao.EmpDao;
    import com.hibernate.employees;
    import com.opensymphony.xwork2.ActionSupport;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts2.interceptor.ServletRequestAware;

    public class EmployeesAction extends ActionSupport implements ServletRequestAware {

    public HttpServletRequest request;
    private int employeeNumber;
    private String firstName=null;
    employees e=new employees();
    @Override 
    public String execute() throws Exception{

        String contextPath = request.getContextPath();
        System.out.println("Context Path " + contextPath);
        EmpDao empDao=new EmpDao();
        if(empDao.validate(getEmployeeNumber(), getFirstName()))
            {
             return SUCCESS;
            }
        else{
         this.addActionError("Invalid Credentails");
        }
         return ERROR;
    }

    public int getEmployeeNumber() {
        return employeeNumber;
    }

    public void setEmployeeNumber(int employeeNumber) {
        this.employeeNumber = employeeNumber;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    @Override
    public void setServletRequest(HttpServletRequest hsr) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

But its showing following error.. PLZ help me

Tomcat server started.
Undeploying ...
undeploy?path=/strutsDemo
OK - Undeployed application at context path /strutsDemo
In-place deployment at C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\strutsDemo\build\web
deploy?config=file%3A%2FC%3A%2FDOCUME%7E1%2FADMINI%7E1%2FLOCALS%7E1%2FTemp%2Fcontext7613233730293202418.xml&path=/strutsDemo
FAIL - Deployed application at context path /strutsDemo but context failed to start
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\strutsDemo\nbproject\build-impl.xml:755: 
The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 19 seconds)
View Answers









Related Tutorials/Questions & Answers:
Error in context path
Error in context path   I Tried a Struts2 Login application having... = request.getContextPath(); System.out.println("Context Path " + contextPath... ... undeploy?path=/strutsDemo OK - Undeployed application at context path /strutsDemo
Add context path to URL for outputLink
Add context path to URL for outputLink  How to add context path to URL for outputLink
Advertisements
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using...;forward name="add" path="/Add.do" /> <forward name="welcome" path...; <action path="Add" forward="add.jspx"/> <action path
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using...;forward name="add" path="/Add.do" /> <forward name="welcome" path...; <action path="Add" forward="add.jspx"/> <action path
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using...;forward name="add" path="/Add.do" /> <forward name="welcome" path...; <action path="Add" forward="add.jspx"/> <action path
error http status-500 invalid path was requested
error http status-500 invalid path was requested  I am using..." path="/Add.do" /> <forward name="welcome" path="/Welcome.do"/>... path="Add" forward="add.jspx"/> <action path="/Welcome" forward
Getting File path error - JSP-Servlet
Getting File path error  I have a requirement where i need to get certain properties on application login page start itself. I an currently using String str = request.getRealPath("/")+"a" + System.getProperty( "file.separator
context
context  what is context in general in java ?   An association between a name and an object is called a binding, and a set of such bindings is called a context
error
error  how do i set jdk home path in jcreator le
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version.ADS_TO_REPLACE_1 This type error also comes
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
ModuleNotFoundError: No module named 'path'
is throwing following error: ModuleNotFoundError: No module named 'path' How to remove the ModuleNotFoundError: No module named 'path' error..., ModuleNotFoundError: No module named 'path' error will be solved. Thanks
error
"+it); } } this is my program i am getting an error saying cannot find symbol class stringADS
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
path classpath
path classpath  EXPLAIN PATH AND CLASSPATH ? DIFF send me ans plz..., Path is system wide variable that tells where to find your commands. Lets... be in path. While Classpath is Enviroment Variable that tells JVM or Java Tools where
Path was not found
Path was not found  The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
path problem - Java Beginners
path problem  I dont know how to set the path. What path should we...-FINAL-20081019.jar in jdk's lib folder. I entered path as "C:\Program Files\Java\jdk1.6.0_07\lib" , is this correct? Becoz even after this path compilation
absolute path in php - PHP
absolute path in php  how to get absolute path in php
Java Path Class
on the encounter of an error. The Path represents a path in the file system...Java Path Class In this section we will discuss all the aspect of Path class of Java. In Java, Path class is added from the SE 7 release. Java 7 has added
ModuleNotFoundError: No module named 'critical-path'
'critical-path' error? Thanks   Hi, In your python...;critical-path' error will be solved. Thanks...ModuleNotFoundError: No module named 'critical-path'  Hi, My
ModuleNotFoundError: No module named 'epic-path'
-path' error? Thanks   Hi, In your python environment you... python library, ModuleNotFoundError: No module named 'epic-path' error...ModuleNotFoundError: No module named 'epic-path'  Hi, My Python
ModuleNotFoundError: No module named 'floweaver-path'
'floweaver-path' error? Thanks   Hi, In your python... 'floweaver-path' error will be solved. Thanks...ModuleNotFoundError: No module named 'floweaver-path'  Hi, My
ModuleNotFoundError: No module named 'forked-path'
;forked-path' error? Thanks   Hi, In your python environment...ModuleNotFoundError: No module named 'forked-path'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'lib-path'
library, ModuleNotFoundError: No module named 'lib-path' error...ModuleNotFoundError: No module named 'lib-path'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'lib
ModuleNotFoundError: No module named 'nxpy-path'
-path' error? Thanks   Hi, In your python environment you... python library, ModuleNotFoundError: No module named 'nxpy-path' error...ModuleNotFoundError: No module named 'nxpy-path'  Hi, My Python
ModuleNotFoundError: No module named 'nxpy-path'
-path' error? Thanks   Hi, In your python environment you... python library, ModuleNotFoundError: No module named 'nxpy-path' error...ModuleNotFoundError: No module named 'nxpy-path'  Hi, My Python
ModuleNotFoundError: No module named 'pandas-path'
;pandas-path' error? Thanks   Hi, In your python environment...ModuleNotFoundError: No module named 'pandas-path'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path-and-address'
named 'path-and-address' error? Thanks   Hi, In your...: No module named 'path-and-address' error will be solved. Thanks...ModuleNotFoundError: No module named 'path-and-address'  Hi, My
ModuleNotFoundError: No module named 'path-diag'
python library, ModuleNotFoundError: No module named 'path-diag' error...ModuleNotFoundError: No module named 'path-diag'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path_helpers'
;path_helpers' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'path_helpers'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path_helpers'
;path_helpers' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'path_helpers'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path_manifest'
'path_manifest' error? Thanks   Hi, In your python...;path_manifest' error will be solved. Thanks...ModuleNotFoundError: No module named 'path_manifest'  Hi, My
ModuleNotFoundError: No module named 'path-and-address'
named 'path-and-address' error? Thanks   Hi, In your...: No module named 'path-and-address' error will be solved. Thanks...ModuleNotFoundError: No module named 'path-and-address'  Hi, My
ModuleNotFoundError: No module named 'path-diag'
python library, ModuleNotFoundError: No module named 'path-diag' error...ModuleNotFoundError: No module named 'path-diag'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path-explain'
;path-explain' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'path-explain'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'path_helpers'
;path_helpers' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'path_helpers'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named

Ads