X-Application Version: 3.1.3, 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1
Hi dear Friends
I have developed a Demo application with X-application . It has a login page , for wrong Id and passwords it suppose to show a page (named badlogin.jsp) that hase a back link to my original login . but this link dooes not work !
Can U tell me why ?
LOVE
Hi,
is it possible to send us the pages?
Then we could have a look on them …
Bye
Thorsten
HI
this is my login.jsp page that gets the userId and password from user :
================================================
<%@ page language=“java” contentType=“text/html; charset=UTF-8” %>
<%@ taglib uri=“404” prefix=“bdm” %>
Book store - Login
.link {
COLOR: #000000; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A {
COLOR: #000000; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A:link {
FONT-WEIGHT: bold
}
A:hover {
COLOR: #000000; FONT-WEIGHT: bold; TEXT-DECORATION: underline
}
<bdm:module id=“bdProp”>
|
|
|
|
</bdm:module>
================================================
and here is my home.jsp page that checks the valididty of user and password:
======================================
<%@ page language=“java” contentType=“text/html; charset=UTF-8” errorPage=“error1.jsp” %>
<%@ taglib uri=“404” prefix=“bdm” %>
Welcome Noushin
BODY {
SCROLLBAR-FACE-COLOR: #9BBAD6;
SCROLLBAR-HIGHLIGHT-COLOR: #E4ECF6;
SCROLLBAR-SHADOW-COLOR: #E4ECF6;
SCROLLBAR-3DLIGHT-COLOR: #9BBAD6;
SCROLLBAR-ARROW-COLOR: #3E6C96;
SCROLLBAR-TRACK-COLOR: white;
SCROLLBAR-DARKSHADOW-COLOR: #3E6C96;
.version { font-size: 8pt;
font-family: verdana, arial, helvetica, sans-serif;
color: #000000;
text-align: center;
}
.subsystem { font-family: Arial,sans-serif ;
font-size: 10pt;
font-weight: bold ;
color: #000000;
text-align: center;
}
}
.link {
COLOR: #000000; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #0184FC;
}
<bdm:module id=“bdProp”>
<bdm:form module=“bdProp”>
| ||||
| ||||
www.irisaco.com |
</bdm:form>
</bdm:module>
LOVE
Hi,
are you reaching the “badlogin.jsp” Page?
I suppose not.
Your error page is pointing to a wrong destination:
<%@ page language=“java” contentType=“text/html; charset=UTF-8” errorPage=“error1.jsp” %>
<%@ taglib uri=“404” prefix=“bdm” %>
Was that your problem?
Bye Thorsten
hi
my badlogin.jsp is the same as error1.jsp .
when I have a badlogin , and go back to my original login page none of my valid userIDs don’t work ! and my system shows a kind of confusion ! and does not work properly !
what’s the problem ?
(subtitute error1.jsp with badlogin.jsp)
LOVE
Does this mean you get back to your login page, if you cannot login?
Michael
Software AG Germany, Darmstadt
Yes
for example I logon to my app with userid like NFL , it is a correct userid and it is validated and no problem .
then I login with an incorrect userid , and I see my error page and use the back link to my login page . there is two problems now :
1-sometimes I get this error message : Internal servlet error : another requst is still …
2- sometimes I see my loginpage with no problems but after a wrong userid I can not login with my nfl valid userid .
I don’t know !
if there was a way to see what query a jsp page send to tamino , the debugging was easy
LOVE
Hi,
are you using X-Application 3.1.2 or 3.1.3 ?
With X-Application 3.1.2 we noticed some problems when exceptions were thrown. In these cases our sessioncontext was not released properly.
With 3.1.3 we did not recognize these problems.
Your second problem could stand in relation to your first problem.
If you like, you can send us your application and we will hava a closer look on it.
How about an alternative solution for your login problem, without exceptions?
With X-Application 3.1.3 you are able to use plugins and variables.
I will sketch you my proposal:
- 1. The Login Page contains the two HTML input fields for userid an password.
Both fields will be handled as variables within X-Application.
- 2. Your Login Page also contains an ActionTag pointing to your Plugin, e.g: <action type=myLogin"/>.
You will need to “register” your plugin in your xapplication.xml file, e.g.:
variables
- 3. Your Plugin-Code checks the login parameters and stores e.g. a variable “loginOK” with the values “yes/no” into the variables Handler.
- 4. Your Home.jsp Page will contain a small code fragment or an other plugin testing the “loginOK”.
If this proposal sounds interesting to you let me know.
The documentation and our examples gives you support in learning to use variables and plugins.
Please have a look on:
“Defining and Processing Queries”,“The Plugin Module” and our examples on “http://localhost:8080/xapp.”
Bye for now
Thorsten
[This message was edited by Thorsten Raab on 09 Oct 2002 at 09:14.]
Thank U very much for your help ,
I want to know where can I find a good documentation on how to use x-application tags in jsp pages , it seems that we have some limitations .
a x-application programming guide can be useful too
LOVE
Hi Noushin,
first of all I would recommend you to install the newest Version of X-Application (3.1.3).
on http://developer.softwareag.com/tamino/x-application/default.htm you will see the benefits of 3.1.3 in comparison to 3.1.2.
After installing X-Application you will find within your X-Application folder a documentation folder. This is a good starting point for you.
You will find e.g. a Learning Guide, Examples and other helpfull various information.
Hope this will elp you.
Bye
Thorsten
HI
thanx for your help, but can U send me a demo which uses this way ?
and can U send me that plugin ?
I need it very much ,
the property demo in the folder examples of x-application_3_1_3_2 does not use this method and has some problems
please help me
LOVE
here comes a zip file that contains my myloin.jsp and home.jsp pages from my application and the schemas I use .
this application is developed under xapplication3.1.2 .
PLZ take a look and my application and tell me what is the problem with this.
and can U tell me what step should I take to run this app under xapplication3.1.3 ?
and a question : Does Xapplication have any problems with java codes in a jsp file ?
LOVE
noushin.zip (4.16 KB)
Hi,
I build a small application with a login process. Therefore I developed a new login and login_failed page. I have also modified your home.jsp slightly so it runs now with the new pages.
To upgrade to X-Application 3.1.3 should not be very difficult. All changes from 3.1.2 to 3.1.3 are described in the changeloxt.txt file in your X-Application folder.
Perhaps, you need to modify a few tags, but usually existing applications should run.
I attached the application ready to run. Just copy the file in to your tomcat webapps folder and restart tomcat. Afterwards shut down Tomcat and modify web.xml according to your Tamino environment. Now start Tomcat for a second time and the demo application should work.
As I have written in previous posts, I would recommend you to read the affecting parts of the documentation this will help you to understand.
Now I will describe my proceeding:
- 1. Adapt the xapplication.xml file.
You need to register the plugin methods you want to use:
<plugins> <workspace> <action name="setUser" method="WorkspacePlugin.setUser"> <arg>variables</arg> </action> <action name="releaseUser" method=" WorkspacePlugin.releaseUser"> <arg>variables</arg> </action> <action name="checkUser" method="WorkspacePlugin.checkUser"> <arg>variables</arg> </action> </workspace> </plugins> </pre><BR><LI>2. You need to implement the actions above:<BR> See: <theApplication/folder/src/WorkspacePlugin.java<BR><LI>3. trlogin.jsp: You will find this lines of code<BR> //both input fields need to be named as used in the plugin, here: <BR>?<input type="text" name="_user" size="30"/>?<BR>?<input type="password" name="_password" size="30"/>?<BR>// the plugin/action is invoked by an action tag:<BR> ?<xapp:action type="setUser" form="loginForm">?<BR><LI>4. trlogin_failed.jsp: contains no specific X-Application code. This page just indicates the failed access and refers to the login page.<BR><LI>5. home.jsp: Your page with a few modifications:<BR> [list]<LI>i) I removed your check<BR> <LI>ii) I entered an ?onLoad? event to the body tag, which runs a javascript<BR> function.<BR> <LI>iii) This function checks if the access is granted or not.<BR><pre class="ip-ubbcode-code-pre"> function doCheck(){ var str = "<xapp:directcommand type='checkUser'/>"; if (str == "false") { location.replace("./trlogin_failed.jsp"); } }
If the access failed the function leads to the trlogin_failed.jsp page
- iv) I added an further action which allows to release the user and refer to the login page.
[/LIST]
OK, I hope this will help you to understand my previously sketched idea and good luck
Bye Thorsten
login_example.war (2.34 MB)
HI ,THANK U
I executed the files but it seems that the problems still remain . as a matter of fact , it has not a stable behaviour somtimes it works properly but sometimes the previous problems show up :(.
and another thing : in case of bad login , we see the home page for a few seconds , can U change it so that we do not see home page at all ?
and another thing , U wrote a realease user function, but U did not use it, I think the problme is because the user name remains in the workspace (and of course session is not closes properly)
LOVE
I executed the files but it seems that the problems still remain .
> as a matter of fact , it has not a stable behaviour somtimes it works properly but
> sometimes the previous problems show up .
Well, I tried it on my machine and it works absolutly fine. What Tomcat Version do you use?
Have you tried this example as stand alone or have you integrated it in your application?
Does this behavior occur in the stand alone case?
> and another thing , U wrote a realease user function, but U did not use it,
> I think the problme is because the user name remains in the workspace
> (and of course session is not closes properly)
Well, this functionality works also fine. I attached a part of your modified homepage.
You will see behind the user name a link “[logout]”. By pressing the link
the user gets released (<xapp:action type=“releaseUser” >[logout]</xapp:action>)
and the application will continue on the login page.
> in case of bad login , we see the home page for a few seconds ,
> can U change it so that we do not see home page at all ?
OK, I’ve added an additional page, just for checking the user information.
Did the login succeed, then it will forward to the homepage. If it was unsuccessful then it will
forward to the login_failed page.
I attached a new demo login example, please run it as a seperate application - you need to addapt the web.xml file -
and tell me if it works. I’ve tried it on my machine and it does not show your behavior.
Login and logout works fine.
Good Luck
Thorsten
Hi!
Well, as a matter of fact i was not able to
add to attachment to the previous post.
So, here is the war-file ready to deploy.
Bye
Thorsten
login_example.war (2.34 MB)