Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts Error in context path
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


kirankumar kadali
Error in context path
0 Answer(s)      2 years and 6 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)

Advertisement
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
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 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 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
What is Application Context?
What is Application Context?  Hello, What is Application Context? Thanks
application context file problem
application context file problem  how to configure junit application context file with struts........? it is not finding sessionfactory method
Application context problem code
Application context problem code   now i am posting my code here . i got error of sessionfactory. so tell me where i declare sessionfactory method... FileSystemXmlApplicationContext context = null; protected SessionFactory sessionFactory=null
Message Context in AXIS
Message Context in AXIS  Is there any method in Axis classes to het the size of IN and OUT Message Conetext
Servlet Context
getContextPath() : This method is used to find out the context path of web application...Servlet Context In this section we will read about the SevletContext... by providing the value in web.xml file using the <context-param></context
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
context menu overlapped in IE8
context menu overlapped in IE8  I developed a contex menu in XHTML while opening it is overlapped in border of IE8 browser. even i have tried change the zaxis in css. I am using like below
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()%><
Spring Context Loader Servlet
context won't initialized and you will get the following error: HTTP Status 500... Spring Context Loader Servlet       In this section we will learn about Spring's Context
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 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
Spring Context - Writing Application Context
Spring Context - Writing Application Context  ... by defining the Application context definition file (applicationContext-hibernate.xml). This file is used by context loader servlet to initialize the Spring
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
Java Thread Context
Thread Context       The Thread Context is required by the current thread from the group... for the development of the thread pools Every Thread required a context
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
Use Log in Servlet Context
Use Log in Servlet Context       This section illustrates you how to use log in Servlet Context. We are providing you an example. In the given example, an object of Servlet Context is defined
Context attributes in Servlet
Context attributes in Servlet       In this section you will study about the use of  Context Attributes in Servlet. All Servlets belong to one servlet context. A Servlet
Fileupload from source path to destination path
Fileupload from source path to destination path  first we will create... source path &Destination path fields and BOTH INPUT TYPES ARE "TEXT" we will give source path as statically where the .doc or .rtf files path will be their.and
What are difference between Bean Factory and Application Context ?
What are difference between Bean Factory and Application Context ?  Hi, What are difference between Bean Factory and Application Context
Setting of java1.4.2 path
Setting of java1.4.2 path  Hello I have uploaded java1.4.2 into my laptop and i have done path settings for System variabales as Path... Hello is my class name) the console is telling there is an error in internal
 

 

 

DMCA.com