Phesto
(Phesto Mwakyusa)
August 9, 2007, 11:22am
1
I am working on web app using eclipse and itmill toolkit, now i have several packages and my main application class is located in default package.
Now i am in UserInterface package and i want to call a method from my main app class that is in default package. But the problem is…it is not visible.
Any help of how to access the method from default package.
Am stuck i need help.
I dont like the idea of moving my classes to the default package. That should be the last thing to do.
vbnet
Anonymous
(Anonymous Anonymous)
August 9, 2007, 11:28am
2
Why do you have any classes in the default package? How about moving all classes from default to proper packages so that you can refer those their full packagenames?
(maybe I just did not understand the question)
Marc
(Marc Englund)
August 9, 2007, 12:46pm
3
Yes, don’t do that - what you probably want to do is move the classes from the default package to a ‘real’ package.
The default package is fine for really small ‘quick-and-dirty-test’ -type apps with one class (or very very few) , anything else should have package names. In fact, I’d even encourage to use package names for the quick-and-dirty stuff - who knows where it’ll end up
//Marc
Phesto
(Phesto Mwakyusa)
August 9, 2007, 5:53pm
4
the thing is…this tomcat project am working on…if i move the main app class to other package …the application wont start at all.
it hat to be at the top root which is the default package…that is why i cant move the main class to the proper package
Marko1
(Marko Grönroos)
August 9, 2007, 6:29pm
5
the thing is…this tomcat project am working on…if i move the main app class to other package …the application wont start at all.
it hat to be at the top root which is the default package…that is why i cant move the main class to the proper package
Any package should work. What does it say in your web.xml? The application class needs the full package path there, for example:
<param-name>application</param-name>
<param-value>com.example.whatever.TheApplicationClass</param-value>
Phesto
(Phesto Mwakyusa)
August 10, 2007, 12:33pm
6
Thanks for the solution…it worked…I was not changing the param value in web.xml.
that was real cool.
thanks
vbnet