Agnit Chatterjee

Greenhorn
+ Follow
since Mar 04, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Agnit Chatterjee

Sorry......it's resolved .equals method was required!!!
14 years ago
JSP
how can i compare a session parameter value with variable value? will this code work? It doesn't give the correct result.........please help

useraccount.jsp




[Edit by Dave - removed the shouting]
14 years ago
JSP
please tell me where is the error?



I get the following error:


An error occurred at line: 13 in the jsp file: /fdmonitorprops.jsp
String literal is not properly closed by a double-quote
10: Class.forName("oracle.jdbc.driver.OracleDriver");
11: Connection conn3=DriverManager.getConnection("jdbc:oracle:thin:@Agnit-PC:1521:devdb","system","bababobby");
12: PreparedStatement ps3=conn3.prepareStatement
13: ("select fdaccountno,customerid,amount,interest,to_char(account_start_date),duration,to_char(maturityday),
14: case
15: when (sysdate-maturityday) > 0 then 'matured'
16: when (sysdate-maturityday) = 0 then 'maturityday'


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:95)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:367)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:345)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:342)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
14 years ago
JSP
Do we have to use a virtual ftp server to be able to send email through JSP?
Would you please suggest me the software and code to send email through JSP??
Thanks in advance
14 years ago
JSP
how can I get the name of file uploaded using uploadbean???
I have done it.......thanks to everyone who helped!!! Actually the problem was that the session parameter was not being recognized by the bean form..........so I tried the other way round.............I did not use:




What I did was that pass the session parameter as an argument to the Java file and got the result

The problem why I got the resultSet exhausted was that the Java program was not able to recognize one of the parameters and taking it as null for which I was basically getting:




14 years ago
JSP
getting exhausted result set when using <jsp:setProperty name="details" property="id" value="${sessionScope.user}" />
14 years ago
JSP
thanks.........I don't know whether it worked or not because when I am sending the value to the java file I still get the same result as follows:
false ACCOUNT NUMBER: 5456
ACCOUNT TYPE:null
USERNAME:null
ID:
BALANCE:null

here are the codes:

viewuserdetails.jsp




detailsproperties.jsp



viewaccountbalance.java

I would be grateful if someone could point out my mistake

Please tell me whether the JSP programs are right and whether the values enter the java file because I have separately run the java file in IDE using specific values and it worked just fine

I am now sure that the value is not entering the java program because I am getting Resultset exhausted
14 years ago
JSP
Can we assign a session variable to a form property

Suppose I have a session variable named "username"........I do the following:


<%
String user=(String) session.getAttribute("username");
if(user==null) user="";
%>

Now can I write:


<jsp:setProperty name="details" property= "*" />

<jsp:setProperty name="details" property="id" value="user" />


If no, then how can I use the session parameter as a form parameter?
14 years ago
JSP
Can we use this name property in another jsp file say efgh just by using <jsp:setProperty id="myBean" property="name"> or using the request.getParameter("name");


How will the jsp recognize in which jsp file the property name was initially used for???
14 years ago
JSP
suppose we write a jsp file and obtain a property called name from the user input like say:

<input type="text" name="name" size="25" />

in abc.jsp

how can we use this name property in another jsp file
14 years ago
JSP
userpass.jsp




UserpassCheck.java





And there are three other html files........

I was getting the correct values in the morning and now this:


init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Compiling 2 source files to C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\classes
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:129: 'catch' without 'try'
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:129: ')' expected
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:129: not a statement
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:129: ';' expected
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:136: 'finally' without 'try'
} finally {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:35: 'try' without 'catch' or 'finally'
try {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\UserpassCheck_jsp.java:140: reached end of file while parsing
}
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:129: 'catch' without 'try'
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:129: ')' expected
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:129: not a statement
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:129: ';' expected
} catch (Throwable t) {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:136: 'finally' without 'try'
} finally {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:35: 'try' without 'catch' or 'finally'
try {
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\build\generated\src\org\apache\jsp\userpass_jsp.java:140: reached end of file while parsing
}
14 errors
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\nbproject\build-impl.xml:589: The following error occurred while executing this line:
C:\Users\Agnit\Documents\NetBeansProjects\FirstReal\nbproject\build-impl.xml:285: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)

14 years ago
JSP
If you are using IDE then the process is completely different
I have been able to do it..........something like this:



where users is the name of the bean I have used!!!

Just wanted to know whether this is the right way to it or not??? Is there any other alternate way?
14 years ago
JSP