Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Why isn't this JSP working?

 
webmaster forum
flyaway  Offline
Activity
0%
 
New Poster
Posts: 1
Topics: 1
October 09, 2008, 05:49:08 PM

Hey guys,
Just wondering if you could give me abit of help. I am creating a website with jsp's and while submit buttons are working fine I can't get the buttons to go from one jsp to the next to work. I have set up the faces-config diagram and set the actions but it comes up with an internal error on the screen when i run the jsp, it works if i don't have the button on there. Here is the code -

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/webcache" prefix="afc"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>login</title>
    <style type="text/css">
      body {
      background-color: #d6d6ff;
}
    </style>
  </head>
  <body><p>
      <font face="Croobie" size="6" color="#c60063">
        Welcome to Blog Space
      </font>
    </p><p>
      Please enter your username and password
    </p><p>
      &nbsp;
    </p><form>
      <p>
        <input type="text" name="username"/>
      </p>
      <p>
        <input type="text" name="password"/>
      </p>
      <p>
        <input type="submit"/>
      </p>
    </form><p>
       
    </p><p>
      For a new account please select register
    </p><p>
      <h:form>
        <h:commandButton value="commandButton1" action="register"/>
      </h:form>
    </p></body>
</html>

So it is the commandButton1 that is giving me the errors. Is there some sort of rule that doesn't allow a submit and command button on the same page or something?
Thanks for your help.
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page January 28, 2012, 03:31:04 AM