Advertisement

03.09.2008 at 10:05PM PDT, ID: 23227569
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Struts - import com.opensymphony.xwork2.ActionSupport;

I am writing Struts code after 2 years.

As I am trying to write a sample struts code from the website and run the build file it is giving the following error. I have placed The following jar files in the classpath of environment variables
C:\struts-2.0.11.1\lib\xwork-2.0.4;C:\struts-2.0.11.1\lib\struts-core-1.3.5;
C:\struts-2.0.11.1\lib\tiles-core-2.0.4;C:\struts-2.0.11.1\lib\tiles-jsp-2.0.4;
C:\struts-2.0.11.1\lib\struts2-core-2.0.11.1;C:\struts-2.0.11.1\lib\ognl-2.6.11;

My code is located in a different directory
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\struts2tutorial\WEB-INF\src\java\net

The build statement is not recognising the following import statement

import com.opensymphony.xwork2.ActionSupport;

I am really not aware of this new struts which deals with xworks. Please guide me. The error I got is displayed below.

    [javac] C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\strut
s2tutorial\WEB-INF\src\java\net\roseindia\Struts2HelloWorld.java:9: cannot acces
s com.opensymphony.xwork2.ActionSupport
    [javac] bad class file: C:\Program Files\Apache Software Foundation\Tomcat 6
.0\webapps\struts2tutorial\WEB-INF\lib\xwork-2.0.4.jar(com/opensymphony/xwork2/A
ctionSupport.class)
    [javac] class file has wrong version 49.0, should be 48.0
    [javac] Please remove or make sure it appears in the correct subdirectory of
 the classpath.
    [javac] import com.opensymphony.xwork2.ActionSupport;
    [javac]                                ^
    [javac] 1 error
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
import com.opensymphony.xwork2.ActionSupport;
import java.util.Date;
 
public class Struts2HelloWorld extends ActionSupport 
{
	public static final String MESSAGE="Struts 2 Hello World Tutorial !!!";
 
	public String execute() throws Exception
	{
		setMessage(MESSAGE);
		return SUCCESS;
	}
 
	private String message;
 
	private void setMessage(String msg)
	{
		this.message=msg;
	}
 
	private String getMessage()
	{
		return this.message;
	}
 
	public String getCurrentTime(){
      return new Date().toString();
    }
}
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: rmvprasad
Solution Provided By: cmalakar
Participating Experts: 2
Solution Grade: A
Views: 87
Translate:
Loading Advertisement...
03.09.2008 at 10:20PM PDT, ID: 21084324

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.09.2008 at 11:32PM PDT, ID: 21084452

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.09.2008 at 11:39PM PDT, ID: 21084460

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.09.2008 at 11:42PM PDT, ID: 21084465

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.09.2008 at 11:59PM PDT, ID: 21084497

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 12:06AM PDT, ID: 21084507

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 12:18AM PDT, ID: 21084537

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 12:57AM PDT, ID: 21084658

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 01:26AM PDT, ID: 21084763

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 01:28AM PDT, ID: 21084765

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.10.2008 at 01:33AM PDT, ID: 21084777

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628