Lisa Modglin

Ranch Hand
+ Follow
since Oct 28, 2003
Merit badge: grant badges
For More
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 Lisa Modglin

Thanks. I have looked around and am I understanding it right that Apache can rewrite URLs, but Tomcat alone cannot? We are not using Apache.
15 years ago
What is it called when I want to change where a page request goes, but it's within the same host? I want to do it at the server level and I don't know what to search on. I don't want my users to have to use tiny url.

Example:
I want this request: http://mydomain.com/page.jsp to resolve to: http://mydomain.com/onedir/twodir/page.jsp?param=1¶m=2¶rm=3

Thanks!
15 years ago
The URLConnection class did the trick. Thanks!
16 years ago
My Servlet needs to call another Servlet, passing a key to that second Servlet. The second Servlet will return a userid as its response. I do not want to pass control to that second Servlet. Can I create a connection to that second Servlet and read the response into a variable?

I don't know what this is called so I don't know what to search on.
16 years ago
For reasons I'm not going to go into, we cannot make a database table to hold permission info at this time. So, I decided to make an XML document that will represent my future database info. The Java classes that build the page need to read in the XML document and lookup the nodes pertinent for that page. What is the suggested parser for this use? I used Xerces in the past, but I thought I would check to see what's being used more recently.
Thanks, I'll see what I can do with this info!
17 years ago
I'm not sure this question belongs in this area, but part of it is definitely Servlet-related.

I'm using a custom tag library/page builder servlet to put together my jsp pages. As I understand it, the Servlet gets loaded on startup because it is included within a JSP library. The Servlet goes to the web.xml to find the location of the template that I want to use as a basis for my jsp pages. The Servlet then locates and reads in the file and does some processing. That's all perfect.

My issue is that I can only get this to work if I put the absolute path to the template file in the web.xml. My new supervisor wants me to use a relative path in the web.xml. I have tried putting the template.inc file in various places and using a relative path, but it isn't found using any of these methods. I wasn't sure if it should be relative to the web.xml file, relative to the location of the tag library jar file, or relative to a page that uses the tag library. None worked.

I have the same problem when I use FOP. Within the Java class, I need to locate the .xslt file on the server and it only works when that location is hard-coded.

Is this just the way it is? Is there a reference where I can look it up and show it to my tech lead?

Thanks!
17 years ago
Henry,

Thanks so much! I knew how to get the 147 and 148 values, but I just didn't know what to do with them. How did you convert 147 to 93?

Paul,

I understand what you are saying, but sometimes there isn't an option of changing the database. Our DBA would have nothing of that!

Lisa
17 years ago
It's true that the only place where I'm experiencing problems is at the database level. That's why I simply want to search the string for the smartquote and replace it with a regular quote.
17 years ago
I have an application where the user copies text from a MS Word document and pastes it into a form field. The data is stored in a database. The smart quotes are being stored in the database as question marks.

I want to search and replace the form input field before saving it to the database. I'm just not sure what I want to search for. I used the following:

String textString = request.getParameter( "test" );
for( int i = 0; i < textString.length(); i++ )
{
out.println( "<br />Char(" + i + "): " + textString.charAt( i ) + "-" + (int)textString.charAt( i ) );
}

Where the smart quotes appear, I get the value of 147 and 148.

I want to replaceAll of the smart quotes, but can't get it to work:

out.println( "New String: " + textString.replaceAll( "\\p147", "\"" ) );

I also tried this from another forum:

out.println( "New String: " + textString.replaceAll( "\\u201c", "\"" ) );

Exactly what value am I searching the string for? The unicode value, the ascii value, what?

Any comments are appreciated!

Lisa
17 years ago
Is anyone out there using DataSource Realms in Tomcat 5? I could use some help setting it up.

I understand Tomcat's instructions for database layout, how to add the realm element to the server.xml and how to set up the realm element in the server.xml file.

I don't understand how to configure a JNDI named JDBC DataSource. There is a link to instructions, but even after reading, they make no sense to me.

Lisa
17 years ago
Well, I'm using SQLServer. I thought I looked into limiting the results and that SQLServer does not have the same functions as MySQL. I thought, based on some posts, that you can only retrieve from the top in SQLServer and not from within the middle. Please let me know how if it is possible to retrieve, for example, rows 11 - 20.

Thanks!
I think I found it. Is it the absolute() method?
I'm going to try this method of pagination retrieve from the FAQs. I have never had the necessity of using anything less than the entire ResultSet. How do I skip rows? Is it done with the ResultSet object? If not, I can do this in a loop by counting to the row I want to begin on. I just thought there might be a way to jump to the row I want. Is there?

Repeat the query for each new request.
Algorithm
Client requests page 1
Execute the query
Return rows for page 1
Client requests page 2
Execute the query
Skip rows for page 1
Return rows for page 2
That Debugger class does not implement all of the methods in PreparedStatement for newer versions of Java.