Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

simple struts2 war file generates error on taglib file when import to eclipse

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm trying to deploy a struts2 war file. I downloaded it from the apache website and it works great when I deploy it directly under my webapps folder.

Now, I'm trying to play with it so I import the war file into my eclipse IDE. I reconfigured the path (so the jar will match) but for some reason, the JSP pages still have a problem.

There is a red line below the s:text

as in:
<h3><s:text name="index.heading"/></h3>

the error eclipse provide is: 'taglib directive for "s" doesn't exist or TLD is not found'.

can anyone advise why this happens and what should I do?
thanks
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "I reconfigured the path"? If the struts2-core-2.0.x.jar file is in the WEB-INF/lib folder, Eclipse should be able to find the taglibs.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Merrill

I realized the problem; but traded it with another one.

I read your posting here

and learned that I need to use eclipse with WTP plugin. I downloaded the latest version and *import* the WAR file. So far so good.

In my previous struts1 application I was using a plugin from Tomcat to generate the 'JSP work directory" and to "update context definition". this will automatically depoly the project and I could test it under my localhost.

I wonder what is the deal with strust2? You mentioned in your posting:
"Have you configured a server within WTP?"...well I checked on my project properties under server and it says: "This project is not associated with any servers"

my question is this: How can I deploy this project and have it run under tomcat?

thank you so much.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

Before you can deploy and test a web application in Eclipse, you must set up a server runtime and a server. That means just telling Eclipse where your installation of Tomcat is and setting up a way to deploy applications to it. The help documentation that gets installed when you install WTP explains how to do this. Just select help->help contents from the menu. Then look for the topic Web Application Development User Guide-->Using the server tools.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Merrill,

As always: THANK YOU SO MUCH! I got it...it's working!
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic