Error in context path

Ads

 
 

Share on Google+Share on Google+

kirankumar kadali
Error in context path
0 Answer(s)      5 years and 4 months ago
Posted in : Struts

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)
Ads
View Answers
Ads









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
Context binding
Context binding  What is meant by Context binding?   A binding context is an object that holds data that you can reference from your... context that refers to the nested view model data.   Thanks:-) public
context attribute
context attribute  i have writteh the program lyk this ...still error... { res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.println("context... that server is not getting the path of servlet. Anyways, follow these steps: Put
Servlet Context
Servlet Context  Defined Servlet Context
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
error
error  how do i set jdk home path in jcreator le
JSP Request.getContextPath( )
;       JSP Request .get Context Path ( ), the context path is the portion of the request URL that indicates the context...;font color="red">The Context Path is:<%=request.getContextPath()%><
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
What is Application Context?
What is Application Context?  Hello, What is Application Context? Thanks
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
java.lang.NoClassDefFoundError: org/springframework/context/support/AbstractRefreshableConfigApplicationContext
java.lang.NoClassDefFoundError: org/springframework/context/support... java.lang.NoClassDefFoundError: org/springframework/context/support/AbstractRefreshableConfigApplicationContext error. Thanks
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. This type error also comes when java file
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
File path for jar file
File path for jar file  Hi Experts, I have created one eclipse... path of the template, which is working as per expectation. But I have created jar file of that application, unfortunately it is giving the error that resource

Ads

 
Advertisement null

Ads