We help IT Professionals succeed at work.

struts error

gudii9
gudii9 asked
on
Medium Priority
638 Views
Last Modified: 2012-08-17
HI,
I was running struts example from following link
http://courses.coreservlets.com/Course-Materials/struts.html
relating to
'Processing Requests with Action Objects'.

I downloaded the zip file of source code. I imported as archive file. I see errors with HTTPServletRequest and response. I right clicked on the project and add jars from the same projecte WEB-INF/lib as in attachment. I still see the errors

Please advise on how can I resolve this issue.Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
Error1.JPG
Error2.JPG
Comment
Watch Question

Author

Commented:
i was reading here


http://stackoverflow.com/questions/4284700/error-httpservletrequest-refers-to-the-missing-type-string



do I need to add JRE to IDE. How can I do that. Please advise

Author

Commented:

Author

Commented:
http://www.dzone.com/tutorials/java/struts/struts-tutorial/struts-tutorial-using-eclipse-1.html

I addd all 10 libraries as mentioned in above link. Still seeing error

Author

Commented:
Even this link I followed has same jars

http://learntechnology.net/content/struts2/struts2_crud.jsp

Author

Commented:
http://www.rameshsengani.in/vaannila/struts/struts-tutorial/struts-tutorial-using-eclipse-1.html


above link also has similar jars

Do I need to keep javaee, servlet etc jars as well. Please advise
ManishLead
CERTIFIED EXPERT

Commented:
ManishLead
CERTIFIED EXPERT

Commented:
add it in lib dir

Author

Commented:
when I click above link leading to

http://www.oracle.com/technetwork/topics/index.html

any other better direct link which gives all the required jars. I wonder what all jars needs to be added for simple struts application. Please advise
Lead
CERTIFIED EXPERT
Commented:
Either go to structs site,,http://struts.apache.org/download.cgi#struts234
or run the application, whatever error you will get,
you can download jars from findjar site,
It will not take much time,,try it,

Author

Commented:
I am struck as that link when I try to download jar is leading to oracle site. also I am not sure what all the JARS needed to remove HTTPSERVELTREQUEST and ?HTTPSERVLETRESPONSE related errors. Please advise

Author

Commented:
servlet.jar and antlr.jar are missiong. I searched in my local machine found under c--eclipse---eclipse--plugins---org.eclipse.tomcat_4.1.30.1
Added them to web-inf/lib and then right clicked on the project went to build path 'add jars'

and deployed and restarted application. Now everything worked fine


My question is
After adding JARS to web-inf/lib do i need to right click on the project went to build path 'add jars'
What is the purpose of above step, Please advise
StrutsAction.JPG

Author

Commented:
Here are all JARs I added
JarList.JPG
ManishLead
CERTIFIED EXPERT

Commented:
When you are working in eclipse, that time still may require to add jars from build path,
When you deploy war in any server, that time it may refer to lib dir,

Explore More ContentExplore courses, solutions, and other research materials related to this topic.