Solved

basic jsp error

Posted on 2004-03-26
4
171 Views
Last Modified: 2010-03-31
Hi, the following code throws this error, how do i combine convert these statement to valid jsp?

   outfile.write("<?xml version="1.0" encoding="ISO-8859-1"?>");
   outfile.write("<?xml-stylesheet type="text/xsl" href="localhost:8080\seanproj\cdcatalog.xsl"?>");

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\seanproj\makexml_jsp.java:146: ')' expected
0
Comment
Question by:Ronayne
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
Comment Utility
outfile.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
   outfile.write("<?xml-stylesheet type=\"text/xsl\" href=\"localhost:8080/seanproj/cdcatalog.xsl\"?>");
0
 

Expert Comment

by:Sony213002
Comment Utility
hello
if u r getting ther error
" ; expected instead of this token "
or
"  ) Statement inserted to complete Statement"

then u have forgot to put the escape character for u r string
put a \ before every occurrence of " character in u r string
hope this will solve u r problem
0
 

Author Comment

by:Ronayne
Comment Utility

Cheers, objects code worked fine, thx again
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoresSpecial  challenge 13 40
countX 22 69
computer science syllabus 3 52
Unexpected HttpURLConnection connection behavior 2 46
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now