p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   JSP Basics (http://p2p.wrox.com/forumdisplay.php?f=92)
-   -   Problem with code in wrox book (http://p2p.wrox.com/showthread.php?t=10199)

isgamon2004 March 7th, 2004 05:56 PM

Problem with code in wrox book
 
on page 729 in Beginning JSP Web Development.
I have the following:

login.jsp

<%@ taglib uri="/template" prefix="template" %>
<template:insert template="template.jsp">
  <template:put name="content" content="loginContent.jsp"/>
</template:insert>

and loginContent.jsp

<br/>
<br/>
<br/>
<table cellpadding="2">
<form action="j_security_check" focus="userId" method="post">
  <tr>
   <td align="right">
    <b>login:</b>
   </td>
   <td>
    <input type="text" name="j_username" size="15"/>
   </td>
  </tr>
  <tr>
   <td align="right">
    <b>password:</b>
   </td>
   <td>
    <input type="password" name="j_password" size="15"/>
   </td>
  </tr>
  <tr>
   <td align="right">
   </td>
   <td>
    <input type="submit" value="Enviar"/>
   </td>
  </tr>
 </html:form>

</table>

The problem is:
  I write a user who is in my database but it always returns login.jsp

Could you please help me with this problem as I am really stuck with it.


Many thanks for your help.


brinyblue January 20th, 2005 06:29 PM

Hello,

I am having the same problem as you. All I can tell is that Tomcat is not finding the correct realm or database as called out in server.xml. If you find out a solution please let me know. I will try and let you know if I find one.

Thanks.

Mike

<Context path="/begjsp-tourism" docBase="begjsp-tourism" debug="0" reloadable="true">

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/tourism_db"
userTable="attraction" userNameCol="user_id" userCredCol="password"
userRoleTable="user_role" roleNameCol="role_name" />

</Context>




Eric_1 May 13th, 2006 01:16 PM

It's the same program stuck with me,and I try everything that I can do,but it still not work,do you find the solution?Hope can share it.(it's urgency for me!!!Hope can get the ansower rapidly)

thanks in advance.
Email:wang_233933_1@hotmail.com(contact me).



All times are GMT -4. The time now is 12:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.