The package declaration in your action source doesn't match where it is in your directory hierarchy.
Without knowing the classpath you're using to compile it's impossible to help anyway.
Why are you getting a request parameter from the HttpServletRequest? Is there a reason you're not using the built-in functionality of Struts 2?
Jay Shukla
Ranch Hand
Joined: Jun 08, 2008
Posts: 214
posted
0
Hi David,
Thanks for reply.
This is just a example source given in Struts Black Book. Moreover i am getting parameter using HttpServletRequest because it shows how to use ServletRequestAware Interface using this example.
Well, the package doesn't match. Are you compiling inside an IDE, or outside? What's in the %CLASSPATH% environment variable? With the incomplete information given I'm going to assume you're not including /WEB-INF/classes on the classpath, hence it can't find the class in question.
Jay Shukla
Ranch Hand
Joined: Jun 08, 2008
Posts: 214
posted
0
Hi David,
Thanks for reply.
GetUserAction is under com/kogent/action folder.
Moreover when i did echo %CLASSPATH% word %CLASSPATH% is being displayed in at the beginning of the CLASSPATH.
I am compiling code outside IDE as somehow (not sure why) IDE is not able to compile code automatically.
However i added /WEB-INF/classes in classpath and tried to compile it.
Now i am getting error related to HttpServletRequest.
> GetUserAction is under com/kogent/action folder.
That's not what your original post said--it'll take longer if the information provided isn't accurate.
> Moreover when i did echo %CLASSPATH% word %CLASSPATH% is being displayed in at the beginning of the CLASSPATH.
What OS are you using?
> But i have added servlet.jar in build path as well as in CLASSPATH. This jar is also present in the lib folder.
I find that unlikely, otherwise it wouldn't be showing up as not found. It should *not* be present in your WEB-INF/lib folder, if that's what you mean.
Give the *EXACT* command you're using to compile, the *EXACT* contents of the CLASSPATH variable (the setting of which, by the way, usually causes more trouble than is worth).
Jay Shukla
Ranch Hand
Joined: Jun 08, 2008
Posts: 214
posted
0
Hi David,
Hey Just now i am able to compile GetUserAction.java class. Because servlet.jar files location was not proper in classpath.
Thanks for your suggestions and moreover i will consider all your advices and try to put accurate information from first post itself.
Thanks.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.