You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nic Hobbs <ni...@yahoo.com> on 2001/07/27 16:16:59 UTC

Re: wap

Hi Rakesh,

Sorry it's taken me a while to get back to you. I have posted this to the list as well for info.

What you need to do to get things going is as follows:

All references to your webapp are to an existing struts webapp.

a)    Put the dtd with your others (probably in the WEB-INF directory of your webapp or a sub directory of this)
b)     Compile the classes and put them in org/apache/struts/taglib/wml directory under your WEB-INF/classes directory, so they can be found by the web app in addition to the normal struts classes
c)    Create your jsps in the normal place referencing the dtd (as at the top of the example jsp I provided) using the tags. You should be able to work out from a brief study of the  example jsp I included what you need to do. NB Most of the tags correspond to their wml equivalents - the only exception I think is the wml:form tag which does not output anything but is there for similarity with the way struts html tags work. Compare the example jsp with the example text file which shows the generated wml.

I have attached another example jsp to this mail which shows how the input tags are used. If you use these tags for the input boxes etc then the corresponding postfield elements are automatically created for you with the same name. The way this is done in the code is not great and can be improved but it works and makes things a little easier.

Hope this helps, any other questions let me know!

Nic
  ----- Original Message ----- 
  From: Rakesh 
  To: Nic Hobbs 
  Sent: Thursday, July 26, 2001 11:34 AM
  Subject: wap


  Hi,

  I saw the wap stuff you had put up on the struts-user mailer list. Could you please tell me how to get the stuff up and running ?
  What are the prerequisites and limitations.
  We are currently working on a project in Struts (Tomcat and Apache on Linux) . We are planning to add up a WAP extension to the whole thing.

  Regards,

   Rakesh Ayilliath
  (Software Engineer)

  Synergy IT Innovations Pvt Ltd,
  #196, 1st Floor, 9th Cross,
  HMT Layout, RT Nagar
  Bangalore 560032

  ayilliath@india.com

dynamic forward mapping

Posted by Matt Raible <ma...@yahoo.com>.
I have a form that is accessible from two different jsp pages.

In my form, I have an action-mapping and the following:

<action
       path="/saveHoliday"
      
type="us.co.douglas.application.timetracker.presentationlogic.SaveHolidayAction"
       name="holidayForm"
       scope="session"
       validate="true"
       input="/holidayManage">
         <forward
          name="success"
          path="/holidayList" />
      </action>

I'd like the <forward ... path="/holidayList"> to change dynamically based on
where the page the user came from.  Is this possible?

I was thinking I could add a forward="/fromMe" as a parameter in the request,
and then in SaveHolidayAction - I could change:

return(mapping.findForward("success"));

to:

return(mapping.findForward(request.getParameter("forward"));

Is this the best way?


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

iterate over two containers in paralell

Posted by Andreas Leitner <al...@macron.at>.
Is it possible to use iterate to iterate over two containers in
paralell?
 
while (it1.hasNext () && it2.hasNext)
{
    System.out.println (it1.next ();
    System.out.println (it2.next ();
}
 
But just with the <logic:iterator> tag.
 
 
many thanks in advance,
Andreas