tirapa reddy

Greenhorn
+ Follow
since May 05, 2007
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tirapa reddy

hi,
i am using myeclipse6.5 trial version.it is not generating properly for pojo classes and mapping files for association.for this we have to add the additional tag for association or myeclipse tools automatically genaretes.
i am new to struts application .action class job is to the view the jsp.

why it is showing error
14 years ago
hi
i am new to struts for my first application i got an error "servlet action not available" how resolve this.i sending xml file please suggest me to solve this

<web-app>
<display-name>Struts Blank Application</display-name>

<!-- Standard Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>


struts-config file::


<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config SYSTEM "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<!-- ========== Form Bean Definitions ============================== -->

<form-beans>

<form-bean name="testForm" type="test.ssl.TestForm" />

</form-beans>

<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
</global-forwards>


<!-- ========== Action Mapping Definitions ============================== -->

<action-mappings>
<action path="/te" type="org.students.TEAction">
<forward name="disperror" path="/de.jsp" />
</action>
<action path="/test" type="org.students.TestAction" />

</action-mappings>
</struts-config>


action class::


package org.students;
import javax.servlet.http.*;
import org.apache.struts.action.*;

public class TestAction extends Action
{
TestAction()
{
System.out.println("object created");
}
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletRequest response)throws Exception
{
System.out.println("execute method");

return mapping.findForward("disperror");
}
}

[ July 03, 2008: Message edited by: tirapa reddy ]
[ July 03, 2008: Message edited by: tirapa reddy ]
14 years ago
thank you for your kind response
sorry i modified here
String s5=hel+lo;
hi
String hel="hel";
String lo="lo";
String s1="hello";
String s2="hello";
String s3="hel"+"lo";
String s4="hel".concat("lo");
String s5=s+lo;
System.out.println((s1==s2)+" "+(s1==s3)+" "+(s1==s4)+" "+(s1==s5));

in the above code why (s1==s3) true and why (s==s5) false ?
explain any one.i am confusing about strings provide me some link to that gives clarity on string.

thanks in advance
hi,
i am new to jdbc connection.i want to learn Mysql to jdbc connection.provide some links to learn MySql and jdbc examples.

thanks in advance
hi
m1 is assigned with m how it becomes null ?
my doubt is s6 checks the string pool are not?
hi,
i am confused regarding Strings.please explain this anyone
ex1:

String s1="hi"
String s2="hi";
in this case equals and == give true.

ex2:

String s3="hi";
String s4=new String("hi");
in this case equals gives true because content is same and == gives false because two object reference different

ex3:

String s5=new String("hi");
String s6="hi";

in this case also it is giving same result as ex2 .why it is giving same result?for s6 it won't create new object it checks the string pool and it takes reference(i think).
as per my observation equals method checks for hash code and same class or not,and == checks whether they refer same object or not .
i am confusing some one please explain in clear

thanks in advance
this error come for every program .after uninstall oracle only it is working.
but i want to use both .is there any solution to this.

thanks in advance
14 years ago
i installed oracle ,after that i got an error

Exception in thread "main" java.lang.UnsupportedClassVersionError: first (Unsupp
orted major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)

why this problem raises ,please tell me the solution i want use both oracle and java
14 years ago
hi

tell me how to implement securitymanger in our application.

please guide me.

thank you.
15 years ago
hi
i have sample code.it will block the folder .In my system it is working but some other systems it is not working.i am writing sample code .
anyone suggest me
thank you
// code here

JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
String userpath = System.getProperty("user.home");
File fc = new File(userpath);
chooser.setCurrentDirectory(fc);
int returnVal = chooser.showDialog(this, "Protect");
File theFile = chooser.getSelectedFile();


String ext1 = ".{01E04581-4EEE-11d0-BFE9-00AA005B4383}";//for normal folder
String ext2 = ".{21EC2020-3AEA-1069-A2DD-08002B30309D}";//control panel
String ext3 = ".{645FF040-5081-101B-9F08-00AA002F954E}";//recycle bin

// some code
//for normal folder

JOptionPane.showMessageDialog(this,"Normal Folder will Protect : " + theFile.getName), "PasswordProtection",1);

String path = new String(theFile.toString().concat(ext1));

File theFile2 = new File(path);
theFile.renameTo(theFile2);
//
15 years ago
hi

i want to share global data.a variable that can be modified in two classes.
changes will be made to the variable throughout the program(lifetime).can anyone explain how to do this.

thank you.
15 years ago