aspose file tools*
The moose likes Other Application Frameworks and the fly likes Need Help: Problems with Stripes. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Need Help: Problems with Stripes." Watch "Need Help: Problems with Stripes." New topic
Author

Need Help: Problems with Stripes.

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

Hi All,

I am using Stripes for a simple web application. I am facing following problems:

(1) First of all I have defined following entry in web.xml

<filter>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>com.learninginnovations.biz</param-value>
</init-param>
<init-param>
<param-name>ActionBeanContext.Class</param-name>
<param-value>com.learninginnovations.biz.ApplicationActionBeanContext</param-value>
</init-param>
</filter>


All of my action beans are in com.learninginnovations.biz package. But at the time of deployment its not loading the action classes.

(2) Second thing is in my jsp I have defined like this

<stripes:form beanclass="com.learninginnovations.biz.StudentLoginActionBean" focus="">

and when I saw the source in HTML its generating

<form action="/Final-Project/com/learninginnovations/biz/StudentLogin.action;jsessionid=6A84661EF18ABE860CCD3FAB7E50786E" method="post">

Where Final-Project is the name of application. This is not what it should generate according to the Stripes documentation. I don't know where I am doing a mistake.

Please let me know what should I do to recover these errors. Thanks in advance!!


Pawan Chopra
SCJP - DuMmIeS mInD
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

It looks and sounds to me like a development environment setup issue. For some reason Stripes thinks that Final-Project is part of your package structure. That would explain why the Resolver isn't finding your action beans in the package you've specified.

Are you using an IDE? If so, what do you have marked as your source folders? If not, how are you compiling? Can you show us the actual command?


GenRocket - Experts at Building Test Data
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

I am using eclipse and the source folder is "LearningCenter/WEB-INF/src". First issue has been resolved I had to use java 1.5. Please help for the second one. Thanks
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

What version of Stripes are you using?
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

stripes-1.5
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I'm having a hard time figuring out why it would be doing that. I don't recall this ever coming up on the mailing list and I've never encountered it before. I still say it has something to do with your packaging. If you look in your WEB-INF/classes folder do you see a folder called Final-Project? Or do you just see com ?
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

I am able to see only com.Anyways I am trying to figure out the problem. Thanks, for your help! I will let you know once I will figure this out.
Frederic Daoud
author
Ranch Hand

Joined: May 22, 2008
Posts: 71
Pawan:

It looks like /Final-Project is the root context path of your web application, could that be?


Frederic Daoud
Author, Stripes...and Java Web Development is Fun Again
Stripes book
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

Hi,

I am not able to figure out the problem. Now I am trying by using action instead of beanclass

<stripes:form action="com/learninginnovations/biz/StudentLogin.action" focus="">

but I am getting following error on tomcat window when I am trying to submit my request:

17:37:36,472 ERROR FormTag:369 - Could not locate an ActionBean that was bound to the URL [com/learninginnovations/biz/StudentLogin.action].
Without an ActionBean class Stripes cannot determine whether the ActionBean is a wizard or not. As a result wizard behaviour will be disabl
ed.


But at the time of deployment I was able to see the following lines:

17:33:12,520 DEBUG AnnotatedClassActionResolver:156 - Bound: StudentLoginActionBean.login() ==> /com/learninginnovations/biz/StudentLogin.action?login


I tried putting ?login at the end in action value but it didn't work. I was going fast when I started with Stripes but now I am too slow. Please help if you can figure out the issue.
Frederic Daoud
author
Ranch Hand

Joined: May 22, 2008
Posts: 71
Pawan:

You need the slash "/" at the beginning of the action="/...".
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

yes, thanks it is working now just like begining I am again going fast thanks to Stripes and you guys who are genious. Thanks alot!

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

Actully I didnt get your book till now , I have ordered one in my local book store, may be not availabel in India. I think that will solve all of my problems thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help: Problems with Stripes.