• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Resin and Struts.

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings,
I have read the issues about integrating struts with resin.
I have read that I should not try to shortcut the system by placing the struts.jar in a WEB-INF directory for all apps to use.
I decided to heed that advice and put it in the WEB-INF of the individual applications.
My code is refusing to compile. I copied the code from http://builder.com.com/article.jhtml;jsessionid=CPGIAXCN1TK4FTQQABUCFEY?id=u00320020206jam02.htm&vf=ra
I copied everything from the page except the struts-config.xml I am guessing from the article that it is in the struts jar file. I am very new at this so pleas forgive my ignorance.
When I load the app into Jbuilder 4, I start to type the import statement
import org.apache.struts.action.ForwardingActionForward.
upon typing this, JBuilder recognizes org.apache but not struts. I don't understand why?
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not familiar with JBuilder, but it sounds like JBuilder is not able to find struts.jar in your classpath.
 
Roger Gazdzicki
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it can find org.apache but nothing else. Is there another jar file with that inforamtion which may be overriding the struts.jar file?
src.jar also contains a path of org.apache but no struts folder. I tried to put the struts.jar in the lib folder of jdk1.4 but that didnt help either.
Thanks for taking the time to help me.
[ October 22, 2002: Message edited by: Roger Garner ]
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The org.apache package is used in most, if not all, of the Jakarta projects so it may not be getting that from struts. Make sure that struts.jar is in your classpath once and only once.
 
Roger Gazdzicki
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the struts.jar file is in the lib folder of the jdk14, does it necessarly have to be in the classpath?
I ask this because the other jar files are recognized by jbuilder and compile works for others.
The classpath is defined as
d:\jdk14
but even adding
d:\jdk14\lib\struts.jar
does not work
Thanks
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger Garner:
If the struts.jar file is in the lib folder of the jdk14, does it necessarly have to be in the classpath?
I ask this because the other jar files are recognized by jbuilder and compile works for others.
The classpath is defined as
d:\jdk14
but even adding
d:\jdk14\lib\struts.jar
does not work
Thanks


I believe that you are correct. I missed that before. You have me stumped. I sounds like it might be an issue with JBuilder. Have you tried to compile outside of JBuilder?
 
Roger Gazdzicki
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured out jbuilder and there is a know issue with using jbuilder with java 1.4. There is no known workaround. something to do with java's api's.
What I did in jbuilder is created a new jdk, which imports all the jar files. I then added the struts.jar file after the fact. When I recreated the jdk in jbuilder, the system worked except for the problem mentioned above.
I then opened the files in textpad, my favorite editor so far, and tried to compile the class. the result I got was
cannot resolve symbol. class bloggerUserForm
and points to a line of code
if(form instanceof bloggerUserForm){
The bloggerUserForm is compiled and put in the
WEB-INF/classes/controller
as that is what I named my package.
There is also a copy in the same directory as my source.
As mentioned above the code came from
http://builder.com.com/article.jhtml;jsessionid=CPGIAXCN1TK4FTQQABUCFEY?id=u00320020206jam02.htm&vf=ra
I appreciate your help.

[ October 23, 2002: Message edited by: Roger Garner ]
P.s. This is not a life threatening problem as I am trying to learn while doing my other job programming in asp.
[ October 23, 2002: Message edited by: Roger Garner ]
The complete code is as follows
bloggerUserAction.java

bloggerUserForm.java

[ October 23, 2002: Message edited by: Roger Garner ]
 
tumbleweed and gunslinger
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I find that placing any webapp .jar files in the WEB-INF\lib folder (of the webapp) is simply good practice.
If, for some reason, you wanted to upgrade to a newer version of Struts for a new application or to test the latest BETA, your existing applications won't be effected.
You can apply this same concept to any 3rd party libs you may use now and in the future.
 
You showed up just in time for the waffles! And this tiny ad:
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
reply
    Bookmark Topic Watch Topic
  • New Topic