[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

JSP forward and Bean Execution question

Posted on 2004-03-25
3
Medium Priority
?
190 Views
Last Modified: 2010-04-01
hey guys
general question
this is a similar question
that i had help from kennethxu with
earlier
is there any way in JSP that you can forward from one page to another
after a process/method is complete in the associated javabean without the method being a boolean

i have an insertData() method in the bean of type void
it is processed when isValid() boolean method is true
after the insert is complete i would like to move to another page
<% if(Bean1.isValid())
               Bean1.insertData(); %>

after the insert is complete i would like to move on to the new page
i tried this but it don't work

<% if(Bean1.isValid())
               Bean1.insertData(); {%>
<jsp:forward page="main.jsp"/>
<% } %>

would i have to do a redirect in the bean instead??
gaz
0
Comment
Question by:Gar04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10681146
what problems you got in the above written code????
0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 2000 total points
ID: 10681179
and if I think your if condition is written incorrectly up there...

it should be

<% if(Bean1.isValid())
 { Bean1.insertData();%>
<jsp:forward page="main.jsp"/>
<% } %>

if you want to keep the jsp forward logic in side the if condition
0
 

Author Comment

by:Gar04
ID: 10682544
i have been staring at this stuff for too long

thanks a lot
gaz
p.s. i am a novice forgive me
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question