aspose file tools*
The moose likes Other Application Frameworks and the fly likes Frontman example, problems running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Frontman example, problems running" Watch "Frontman example, problems running" New topic
Author

Frontman example, problems running

margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

I found this post on the ranch Front man examples 2010. In the post Mike Heffelfinger Original Poster added a link to his site where he has set up a little example of Frontman Sample Hello World Front Man™ JAVA web application. I started a new project and brought in the code from Mike's site. The project builds fine but when I click on the link from the index.jsp the project crashes. It looks like something with the path and I think my web.xml is bad. I get the same error on my work machine with tomcat 6.

What I do not understand is what do I replace <param-value>www.yourserver.commands</param-value> with if I am in and IDE working on a project on my local hard drive. I know many of you use Frontman. Any help is welcome. TIA.

example partial web.xml from the example site



my web.xml


and this is the error dump from tomcat

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

margaret gillon wrote:What I do not understand is what do I replace <param-value>www.yourserver.commands</param-value> with if I am in and IDE working on a project on my local hard drive.

That value should be the Java package where your commands are located. It is not a URL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

Hi Bear,

It is the place where I have the JDK on my computer? C:\Program Files\Java\jdk1.6.0_38

Not where I put the Frontman jar and the jakarta commons logging jar in the project ( /WEB-INF/lib )

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

No it's not a file path, it's the package that the command classes are in.
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

In the simple project I tried with the examples I did not make packages for the files that were calling frontman so wouldn't the package just be the project name since the files were in the default package? 11 hours at this and still thinking it's something really simple that I'm just missing
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

Posting code and most recent error messages. The jsp's are not in any kind of folder or package. qcweb is the project/package. To check what I was doing I put these into another project. These files did not disrupt the project but the same error message came up when I clicked the <a href='command/GetHelloWorldMessageCommand'>get hello world message.</a> link in the index.jsp. Any help appreciated.

web.xml


index.jsp



helloWorld.jsp



GetHelloWorldMessageCommand.java in the commands package


Error messages

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

the qcweb context path is not part of the package. Look at the package statement in your command implementation. It's just commands.
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

Still get the error with just commands. Tried in another web project and the same error shows up.

Could my problem be with the way the IDE is building the application?. I am using netbeans 7 on Windows 7 (at home).

Another question, I have noticed that the view path in the example, and in Bear's documentation, have a second path but I don't see in my projects, is that path determined by the IDE?

frontman docs


tech city systems

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

No, you can just create whatever folder name you want.
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

Finally got Frontman working in Eclipse after starting a clean project and working through software issues on my machine.

What Eclipse showed me is that the command class GetHelloWorldMessageCommand.java couldn't compile because there was some kind of system permissions lock on the APIs the project was calling in the JRE. I added an external library that pointed the project to the APIs in another directory and then the class compiled.

Two things that are probably obvious to most everyone but I missed them.
The command classes have to be in their own package, they cannot sit in the default package.
The jsp's that will be called by the frontman need to be in a folder under the WEB-INF folder, they cannot sit directly in the WEB-INF folder.

These things were done in the Eclipse version when I built the project but the project did not work until the permissions on the APIs were resolved.

I went back to Netbeans and added the same fixes but the application still crashes and I am not sure overriding the default API's worked there.

Thanks to Bear for the support.
 
 
subject: Frontman example, problems running