Anutosh Swamy

Ranch Hand
+ Follow
since Sep 20, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anutosh Swamy

Let me make it more specific

I have a list object set in the request as an attribute which contains all the details about the users of an application, in JSP am displaying the list of the users using <logic:present>, <logic:iterate> and <bean:write> this is working fine but the problem is there when I have to apply some if() condition, for this I have to make use of the <bean:write> value inside the scriptlet.

15 years ago
For example :

what i need inside JSP is

<% System.out.println(<bean: write name="userList" property="userName"/> %>

that's all

but this is giving me this error - illegal start of expression
org.apache.jasper.JasperException: Unable to compile class for JSP

So what will be the possible solution for this.
15 years ago
Can anyone help me with using the <bean:write/> value inside the scriptlet in JSP

Thanks in advance
15 years ago
Hi Ranchers,

I cleared the IBM Certified Solution Developer for XML 1.1 and Related Technologies with 92%.

for preparation I studied

1) XML in a Nutshell

2) Professional XML 2nd Edition

3) XSLT by O'Reily (this is a must as the major portion of the test is covered by this only)

4) W3Schools XML tutorials and

5) http://www.zvon.org/

Hi Rob,

and the email asking me to apply for my SCEA came in two days later.



for SCEA, SCJP or SCWCD is not a pre-requisite

or

is it?
Dear Krishna,

We can forward a request either by using the RequestDispatcher() of ServletContext interface or the ServletRequest interface, the point when to use ServletContext or ServletRequest is that the ServletRequest looks for the resources in the same context (same webapp) to which the invoking servlet belongs.

Moreover the pathname used in the RequestDispatcher() of ServletContext must begin with a "/" which is an absolute path.

The pathname used in the RequestDispatcher() of ServletRequest interface can be an absolute path or a relative path means it can start with “/” or “../..”.
16 years ago
Hi Krishnan,

It seems that you want to read the contents of an XML file and display the text of each element.

If this is the case than follw this steps:

Step I : Download dom4j.jar and place this into the classpath.

Step II : Suppose the XML file is testing.xml in the test folder of your C drive.
testing.xml


Step III: The Code snippet for ReadXml.java


Hope this will solve your problem.



Hi All,

I am getting an exception of

java.lang.IndexOutOfBoundsException
java.io.FileOutputStream.writeBytes(Native Method)
java.io.FileOutputStream.write(FileOutputStream.java:260)
com.aem.upload.ZipFileUploadServlet.processRequest(ZipFileUploadServlet.java:91)
com.aem.upload.ZipFileUploadServlet.doPost(ZipFileUploadServlet.java:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

when I try uploading a ZIP file through my application running on Linux OS but the same is running fine on Windows OS (without any exception and uploading perfectly) kindly let me know where the code is wrong or I need to make some changes accordingly while making this run perfectly on Linux OS

Here's my Servlet code for uploading the Zip file:

ZipFileUploadServlet.java


index.jsp


Thank you in Advance
16 years ago
Hi Ulf,

Can you please show me the way how should I proceed for the same.

That will be a great help for me.

Thanks in advance.
16 years ago
Hi,

Is there any any way we can retrieve the list of mails send using the Javamail API?
As I have to show those sent mails under sent item list.
16 years ago
Hi Campbell Ritchie,

Thanks for correcting my mistake, this will be surly taken care of in future.
[ October 20, 2008: Message edited by: Anutosh Swamy ]
16 years ago
Hope this code will help you to upload any file type to any location
you need to modify the the code according to your project.




K.Anutosh
---------------------------------------------------------------------------
SCJP 1.4
SCWCD 1.4
OCA (Paper I)

[edit]Add code tags. CR[/edit]
[ October 13, 2008: Message edited by: Campbell Ritchie ]
16 years ago
Hi,

Can any one help me with directing the log messages in Log4j to their respective logger files.

For example:

I need to direct the INFO level messages to info-logger.log file
WARN level message to warn-logger.log file
ERROR level message to error-logger.log file and so on

and no file will have the messages from different level loggers, means info-logger.log file will have INFO level messages only and not the WARN or ERROR level messages and so on.

NOTE:: I am using only log4j.properties configuration file and not the log4j.xml

Thanks in advance

K.Anutosh
----------------------------------------------------------------
SCJP 1.4
SCWCD 1.4
OCA (Paper I)
Thanks Jair
Thanks Ulf

This will definitely solve my issue.
16 years ago
Hi Jair,

See I'd already opened an URL like this at client side

BufferedReader httpbr=null;
String url = "http://localhost:8080/MyApp/loginClient?uid="+user_name+"&pid="+password;

URL opr1_url=new URL(url);
httpbr = new BufferedReader(new InputStreamReader(opr1_url.openStream()));

And from server side I had generated a respose (success or failure).

If failure I need to send two parameters "failure" and "message for the same"

If success I need to send one paramerter "success".

How sholud I send this from server to client and read the same at client side.
16 years ago