wood burning stoves 2.0*
The moose likes Struts and the fly likes How to user Struts Tags in a WebApplication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to user Struts Tags in a WebApplication" Watch "How to user Struts Tags in a WebApplication" New topic
Author

How to user Struts Tags in a WebApplication

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hi everyone,

I am using struts tags in my application using NetBeans IDE 6.5, tomcat 5.0 and MySql 5.0 but there is big problem if I using simple HTML tags like:




then application is running without any problem. but when I use like:

and I also included these with it like:




but it is not running every time there are so many errors,warnings and INFO. So please suggest me that what should I do for running application.The errors are shown here:





Thanks


Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

there are no errors in the log posted, only INFO. just put the error log


Have Fun with Java
little,little.. little by little makes a lot..
Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hi,

When I run the application then this is printing on console output but what is the actual problem I can't understand.There is no error I mean to say that this INFO is also a big problem for me. Please help me.The problem is below as I describe last post...




Thanks!
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329


... that this INFO is also a big problem for me

You can change the log configuration of the server to debug or error

From the info log one can observe only concern is the below

INFO: validateJarFile(D:\NetBeans 6.8 Projects\StrutsHelloWorldApplication\build\web\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class


Anyways, which version of struts are you using?

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hi Shankar,

Thanks for reply.

I already change the log of server but no change in this I am using Struts 1.2.9 version
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Also, which web server are you using.. That server info message of jar loading failure is due to server-api.jar whihc is in your web-inf directory. Your web server has its own and want to use it. Remove it and should work fine.

Could you please share your taglib spec in web.xml for the actual problem



Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

Hi Shankar,

I am using struts tags in my application using NetBeans IDE 6.5, Struts 1.2.9,tomcat 5.0 and MySql 5.0

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

I have remove servlet-api.jar from WEB-INF but problem is same.
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329


<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>


So... Use the tld in JSP like this..





I have remove servlet-api.jar from WEB-INF but problem is same.
.. you still have it in the log? which server
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to user Struts Tags in a WebApplication
 
Similar Threads
SEVERE: Error initializing endpoint
log4j Error
Problem loading validation-rules.xml
Tomcat init ValidatorPlugin and TilesPlugin twice -- why?
Please help me tomcat on solaris 10