eswaramoorthy 0 Newbie Poster

Hi everybody,

I want to know the difference between jsp and struts.
Advantage of these two. I expect from all.

Thanks for your effort.

eswaramoorthy 0 Newbie Poster

Hi, I check your code. its worked for me.

But, here i use two jar files : mail.jar and mailapi.jar

These two jar files i add in libraries.(Netbeans IDE6.7.1)
And little i test the mailSeesion object content using out.println(),

Session mailSession = Session.getDefaultInstance(props, null);
  out.println("mailSession : " + mailSession);

And,

try 
{
   transport.sendMessage(msg, msg.getAllRecipients());
   out.println("Email sent");
   //WasEmailSent = true; // assume it was sent 
}
catch (Exception err) 
{
   err.printStackTrace();
  //WasEmailSent = false; // assume it's a fail
}

Finally, after run i got mail (here i use From and to : use my gmail id).
The output:
mailSession : javax.mail.Session@1be9a50 Email sent.

eswaramoorthy 0 Newbie Poster

Hi,

I need to show the loading status(wait status) in cursor for all actions.

If i perform some action(Login), then go to the backend and perform some process and it will return some value.
Here this whole process will be taken some times.

Now that time i want to show processing status (wait status) in cursor.
I mean, after i press Login button , i want to show that loading status(wait status) in cursor...

Similarly, If i do any action in page, then i need to show the loading status...That is, every action in my application show the loading status.

Help me about this.
Thanks in advance.

eswaramoorthy 0 Newbie Poster

hi,
I use onbeforeunload(). Its not worked .Because this script called when i click refresh button.
So i need only click back arraow, then called any script, and go to logout page.
Any otherway(jquery, JSF richfaces) to acheive this 'when i click back button then go to logout page'. Any one help me. I hope. Thanks in advance.

eswaramoorthy 0 Newbie Poster

Sorry for my inconvenience question title.

my original question is :

Is Jquery support to rich:hotKey component in JSF?

eswaramoorthy 0 Newbie Poster

I want know same details. After you know post here...Its helpful to others.

And also
i forget the procedure to post new thread in this forum.
I can't see 'post new thread' link or button.
What is the procedure to post new thread?

I don't know, how to post new thread. Thats why i ask here.

eswaramoorthy 0 Newbie Poster

Hi,

I have problem in rich:hotkey when using JQuery

i have used rich:hotKey for h:inputText in my jsp page.

And also i wrote jQuery for get the textBox value.

When i use jquery, that time rich:kotKey not worked

<%@page contentType="text/html" pageEncoding="UTF-8"%>  
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>  
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>  
 <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>  
 <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>  
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
 "http://www.w3.org/TR/html4/loose.dtd">  
   
 <html>  
 <f:view>  
     <head>  
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
          <title>JSP Page</title>  
          <script type="text/javascript" src="../../resource/js/jquery.min.js"/>  
          <script type="text/javascript">   
              function typedName()  
              {  
                   //Get The value using styleClass id  
                   var userName = jQuery.trim($('.textBox').val());  
                   alert("Name is : " + userName);  
              }  
   
              // If i am not use above typedName() script and load src, then  
              // the following testButton() clicked script perfectly worked.  
   
              function testButton()  
              {  
                   alert("Test Button Clicked");  
              }  
           </script>  
 </head>  
 <body>  
   
 <h:form>  
     <rich:panel>  
   
           <h:outputText value="Enter your Name : "/>  
           <h:inputText id="textBox" styleClass="textBox" value ="" />   
   
           <a4j:commandButton id="nameButton" value="NameButton"    
                              onclick="typedName();"/><br>  
   
           <a4j:commandButton id="testButton" value="TestButton" 
                              onclick="testButton();" />  
             
           <rich:hotKey key="return"   selector="#textBox"   
                        handler="# 
                    {rich:element('testButton')}.click();                        event.stopPropagation();                                                                                                        event.preventDefault(); return false;"/>  
        </rich:panel>  
      </h:form>  
    </body>     
 </f:view>  
 </html>

if i am not include the jquery, then that time i hit the enter button from text box, then automatically called testButton() script.

If i include the Jquery, then rich:hotkey not work.

I am also Used , var $J = jQuery.noConflict(); . But this time also not work jQuery.

I take lot of effort this.

I hope help me about this.

eswaramoorthy 0 Newbie Poster

Its worked in Firefox 3.0.18

Here, i received image id using both h:form and h:graphicImage tag id's

JSF code is :

<h:form id="fileViewerForm">


<h:panelGrid columns="2">
<h:commandButton value="Print" onclick="printImage();"/><br>
<rich:panel id="imageViewerPanel">
<h:graphicImage id="imageViewer" url="sampleImage.png" value="sampleImage.png" width="200" height="200" />
</rich:panel>
</h:panelGrid>


</h:form>


The Java script is :


function printImage()
{
var iamgeId = document.getElementById('fileViewerForm:imageViewer');
var imagObject = new Image();
imagObject = iamgeId;
var originalImage = '<img id="imageViewer" src="'+imagObject.src+'" height="'+imagObject.height+'" width="'+imagObject.width+'" />';


popup =  window.open('','popup','toolbar=no,menubar=no,width=200,height=150');
popup.document.open();
popup.document.write("<html><head></head><body onload='print()'>");
popup.document.write(originalImage);
popup.document.write("</body></html>");
popup.document.close();
}
eswaramoorthy 0 Newbie Poster

How to add logout page into the browser history...
help me...

eswaramoorthy 0 Newbie Poster

The back arrow navigates the history object which AFAIK can't be changed.
However, you may be able to manage it as follows:
after login create a history entry for the logout page [by loading it without displaying anything and then loading page1 using location.replace]
navigate within the site using nothing but location.replace [which creates no history entries]
With that strategy, back() should always go to the logout page [which must recognize that is to display this time and not load page1]

Suppose i have 10 to 15 pages after login...
you mean ,
so each and very page visit, before i create history for the logout page ?
Otherwise only one time create history for logout page during login page ,is it enough?
i, can't clear...
i am new one, that why ask..

eswaramoorthy 0 Newbie Poster

give any reference link, otherwise please give a sample code...

eswaramoorthy 0 Newbie Poster

I am new one of jsp .i have developed simple webapplication using jsp...

Step 1 : I have one login page : (contains username ,password and sumbit button)

Step2 : I have one logout page : it has one link (Go to login page), just u
click this link go to login page..

step3 : And i have some pages like (page1,page2,page3, page4.....)

Normal application working following way :

after login comes page1..
Then click some action and it will go to page2
Then i click some action and it will goto page3
Then i click some action and it will goto page4

So now i am in page4...
now click back arrow in navigation toolbar in
browser, generally go to previous page (page3).

For example... If u seeing gmail inbox msg... that time
u click back arrow..then automatically go to previous
page..

But i need , if click back arrow in navigation toolbar
(from any page in my application) ,then
go to logout page...

For example.... Suppose i am in page4... here i click backarrow
in browser then i want to go logout page, don't go to page3

how to acheive this...
Is there any possible....Any javascript or anyotherway

eswaramoorthy 0 Newbie Poster

hi

i have developed simple webapplication using JSP and JSF framework

Step 1 : I have one login page : (contains username ,password and sumbit
button)

Step2 : I have one logout page : it has one link (Go to login page), just
u click this link go to login page..

step3 : And i have some pages like (page1,page2,page3, page4.....)

Normal application working following way :

after login comes page1..
Then click some action and it will go to page2
Then i click some action and it will goto page3
Then i click some action and it will goto page4

So now i am in page4...
now click back arrow in navigation toolbar in
browser, generally go to previous page (page3).

For example... If u seeing gmail inbox msg... that time
u click back arrow..then automatically go to previous
page..

But i need ,
if click back arrow in navigation toolbar
(from any page in my application) ,then
go to logout page...

For example.... Suppose i am in page4... here i click backarrow
in browser then i want to go logout page, don't go to page3

how to acheive this...
Is there any possible....
Any javascript or anyotherway...

Pls help me about this...
i hope anyone help about this task...