Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

basic jsp error

Posted on 2004-03-26
4
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 10692881
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
ID: 10693948
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
ID: 10702702

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

Expert Comment

by:objects
ID: 10702725
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

636 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