Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

struts error

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
0
gudii9
Asked:
gudii9
  • 9
  • 4
1 Solution
 
gudii9Author 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
0
 
gudii9Author Commented:
0
 
gudii9Author 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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
gudii9Author Commented:
Even this link I followed has same jars

http://learntechnology.net/content/struts2/struts2_crud.jsp
0
 
gudii9Author 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
0
 
ManishLeadCommented:
0
 
ManishLeadCommented:
add it in lib dir
0
 
gudii9Author 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
0
 
ManishLeadCommented:
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,
0
 
gudii9Author 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
0
 
gudii9Author 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
0
 
gudii9Author Commented:
Here are all JARs I added
JarList.JPG
0
 
ManishLeadCommented:
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,
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 9
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now