Hi,
--- Aaron Andersen <[EMAIL PROTECTED]> wrote:
> Chris,
>
> Thanks for the info. However, I have tried changing the action
> to /jetspeed. I then get a 404 not found. Do I need to add
> somthing to the config of tomcat in server.xml?
>
How have you got jetspeed installed?
Is it on the root context - ie if you specify no directory in your
url, does it loads jetspeed?
Is it in the webapps directory of tomcat?
Sounds like it is neither of these, given your problems, assuming you
have installed it in a context of /foo, then the action should just
be /foo.
Alternatively, maybe there is a typo in your generated code - have
you looked at the source of your generated webpage - does it look
good?
Have you tried entering the action url directly - that should help
identify if the problem is the generated html or the web server
config.
HTH,
Chris
> -Aaron
>
>
> Chris Kimpton wrote:
> >
> > Hi,
> >
> > --- Aaron Andersen <[EMAIL PROTECTED]> wrote:
> > > I've been digging through this list, the jakarta portlet
> catalog
> > > and several other places but haven't been able to find an
> example
> > > doing something similar to what I would like.
> > >
> > > What I want to do is write a Java class that extends
> > > AbstractPortlet
> > > or ApplicationPortlet. However, this class will call itself
> within
> > > a
> > > form element. A simple pared down code without all the method
> calls
> > >
> > > and imports follows. Is this possible or am I way off?
> > > I've done similar things will servlets but can't seem to make
> it
> > > work with portlets.
> > >
> >
> > This should be fine - we've done it with portlets.
> >
> > > Thanks in advance for any help.
> > >
> > > public class JobSubmit extends AbstractPortlet
> > > {
> > >
> > > public ConcreteElement getContent(RunData data)
> > > {
> > > String text = null;
> > > String action = null;
> > > Boolean success;
> > >
> > > ParameterParser params = data.getParameters();
> > > action = params.getString("action");
> > > if (action == null)
> > > {
> > > text = "<form
> > > method=\"POST\"action=\"/jetspeed/servlet/JobSubmit\">\n" +
> > > "<input type=\"hidden\" name=\"action\"
> > > value=\"submitjob\">\n" +
> > > ..... //additional form elements here
> > > "</form>
> >
> > Your action should just be /jetspeed - as that is the servlet.
> The
> > action will then passed to all portlets - so using a good unique
> name
> > might avoid clashes.
> >
> > > }
> > > else if(action.equals("submitjob"))
> > > {
> > > //get job parameters here
> > > //submit job based on parameters
> > > success = jobsubmit( ... );
> > > if(success)
> > > {
> > > text = "Job submitted succesfully!";
> > > } else {
> > > text = "Job failed!";
> > > }
> > > }
> > >
> > > return (new StringElement(text));
> > >
> > > }
> > >
> >
> > HTH,
> > Chris
> >
=====
Need somewhere to Live in London - http://freeflats.com
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]