This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two actions in a single JSP

 
P Arunkumar
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I ham having login and register in a single jsp page. i can't use two actions in single jsp page please help me to solve my issue. and the main thing is it wants to display in right side.


I have developed but my login text field only coming in right side my register field it's not coming in right side please help me.




My register field is coming in left on the login field please solve my issue. No one is not there to guide me in my office please solve me. within a day i wants to solve my issue. please help me.

If iam using single form with action it is coming in right side but i can't bring two actions in sing jsp page in right side.


Thanks in advance.
 
Junilu Lacar
Bartender
Pie
Posts: 7771
62
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P Arunkumar wrote:My register field is coming in left on the login field please solve my issue. No one is not there to guide me in my office please solve me. within a day i wants to solve my issue. please help me.

First of all: EaseUp (<-- click the link)

Table-based layouts are inefficient and outmoded; they're so 1990s. Please use CSS to style forms so that they are displayed where you want them on the page.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have some html errors in there, "<<s:" on line 15/16 ?

Also your second table has no <tr><td>

If you want the forms aligned horizontally, create a wrapper table with two cells.
(If you want to stay with tables, css and divs are the better more modern way)

<table>
<tr><td>LOGIN Stuff</td><td>REGISTER Stuff</td></tr>
</table>

WP
 
P Arunkumar
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.

I agree that we can use CSS instead of table format. but question is i wants to use two actions in single jsp page. please help me.
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arun,
One way out is to have a javascript method for the second action and use this javascript method to set the action explicitly . something like
 
P Arunkumar
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thank You So Much.... I have completed my task. Its working perfectly. 2 forms 2 actions in a single page. I have used Servlet concept on this, but for time being i have completed in servlet but after completing in will post my code in struts.


Main.jsp



Login.java




Register.java



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic