File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes simple struts2 war file generates error on taglib file when import to eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "simple struts2 war file generates error on taglib file when import to eclipse " Watch "simple struts2 war file generates error on taglib file when import to eclipse " New topic
Author

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

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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

Joined: Feb 15, 2005
Posts: 4864
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

Joined: Sep 10, 2004
Posts: 755
Merrill,

As always: THANK YOU SO MUCH! I got it...it's working!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: simple struts2 war file generates error on taglib file when import to eclipse