Where to put jar files for struts 2 in eclipse,giving error index.jsp(8,40) File “/struts-tags” not found

StackOverflow https://stackoverflow.com/questions/8679753

  •  05-05-2021
  •  | 
  •  

Question

Eclipse is only giving me option to include jar files in Java Build Path->Libraries .In some tutorial sites they are showing to add jar files in WEb-INF/lib,but iam not able to add jar here.i tried importing files to WEB-INF/lib,jars were added but they did not had jar icon instead some weird icon ,and when i m trying to run my struts login page its giving me error /index.jsp(8,40) File "/struts-tags" not found.Where to put jar to make it work,Also while learning struts sometime i get Http 404 error,but when i restart eclipse(I tried restarting server but it didnt help) the error is gone all of a sudden.why this is happening.Eclipse is so confusing.

Was it helpful?

Solution

Go to the your web-project folder outside the eclipse.Cope your jars (which are required for your project).

Than open-up Eclipse, follow these steps

  1. Right Click on project(Project Explorer) choose -->Configure build path.
  2. Go to Library tab and click on add jars, it will open this wizard

enter image description here

Add required jars and i hope this will solve your problem. Make sure you have required jars in your class-path..

OTHER TIPS

As jars are showing some weird icon, I would suggest you to change the jar files. Also, make sure your added jar contains struts-tags.tld file. This will resolve error on index.jsp.

sorry, system is not allowing me to put comment. So editing the same.

Follow below steps to check the jars are added to build path correctly -

  1. switch to package explorer view.
  2. check whether your jars are added under web app Libraries. If yes your jars are added properly.
  3. Then check struts-tags.tld file is present inside struts2-core.jar. If not present then copy it or add new jar containing the same.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top